/* The app's own styles, loaded after Tabler 1.7.1 (lib/tabler, the CSS only). UI refresh, 2026-10-25: our names for
   colours are Tabler's tokens, so the rules below (and the pages' own markup) take Tabler's look in light and dark. */
:root {
    /* Light or dark follows the device unless the person chose one (below): Tabler's colours are light-dark() pairs, chosen by color-scheme. No script. */
    color-scheme: light dark;
    --fg: var(--tblr-body-color);
    --bg: var(--tblr-bg-surface);
    --page-bg: var(--tblr-body-bg);
    --muted: var(--tblr-secondary);
    --line: var(--tblr-border-color);
    --link: var(--tblr-link-color);
    --accent: var(--tblr-primary);
    --accent-soft: var(--tblr-primary-lt);
    --panel: var(--tblr-bg-surface-secondary);
    --danger: var(--tblr-danger);
    --success: var(--tblr-success);
    --radius: var(--tblr-border-radius);
    /* The dark frame: the sidebar and the phone's top bar and tab bar, the same in light and dark mode. Dark navy
       since the brand (2026-10-26), a shade darker than the logo's own navy so its disc and ring stand out. */
    --frame-bg: #0d2340;
    --frame-line: #1d3657;
    --frame-raised: rgba(255, 255, 255, 0.06);
    --frame-accent: #74b4ff; /* the current tab or link on the dark frame: Tabler's blue is too dark there */
}

/* What Tabler sets on [data-bs-theme=dark] beyond its light-dark() colours: for a device in dark mode, unless the person
   chose Light on Your account, and for anyone who chose Dark (data-theme on <html>, decision 2026-11-20). */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --tblr-body-color-rgb: 229, 229, 229;
        --tblr-body-bg-rgb: 23, 23, 23;
        --tblr-emphasis-color-rgb: 255, 255, 255;
        --tblr-secondary-color-rgb: 229, 229, 229;
        --tblr-secondary-bg-rgb: 38, 38, 38;
        --tblr-tertiary-color-rgb: 229, 229, 229;
        --tblr-tertiary-bg-rgb: 30, 30, 30;
        --tblr-link-color-rgb: 121, 170, 231;
        --tblr-link-hover-color-rgb: 148, 187, 237;
    }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --tblr-body-color-rgb: 229, 229, 229;
    --tblr-body-bg-rgb: 23, 23, 23;
    --tblr-emphasis-color-rgb: 255, 255, 255;
    --tblr-secondary-color-rgb: 229, 229, 229;
    --tblr-secondary-bg-rgb: 38, 38, 38;
    --tblr-tertiary-color-rgb: 229, 229, 229;
    --tblr-tertiary-bg-rgb: 30, 30, 30;
    --tblr-link-color-rgb: 121, 170, 231;
    --tblr-link-hover-color-rgb: 148, 187, 237;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }

/* Tabler sets html and body to 100% height: the page would then be one screen tall and the sidebar couldn't stay put. */
html, body { height: auto; }

body {
    margin: 0;
    font-family: var(--tblr-font-sans-serif);
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--fg);
    background: var(--page-bg);
}

h1 { margin: 0 0 1rem; font-size: 1.5rem; font-weight: 600; line-height: 1.3; }
h2 { margin: 1.75rem 0 0.75rem; font-size: 1.125rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }

.site-header {
    padding: 0.75rem 1rem;
    color: #fff;
    background: var(--frame-bg);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: inherit;
    text-decoration: none;
}
.brand-mark { width: 1.4rem; height: 1.4rem; border-radius: 6px; background: var(--accent); flex: none; }
/* The brand's logo (Product__Brand): the white-wordmark version, made for the dark frame. */
.brand-logo { display: block; height: 2.4rem; width: auto; } /* about 142 px wide: the kit's 140 px minimum */
.brand-icon { display: block; width: 2rem; height: 2rem; }

main {
    max-width: 48rem;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

p { color: var(--muted); }

a { color: var(--link); }

/* Long words (emails, report titles, handles) break instead of widening the page on a phone. */
main { overflow-wrap: break-word; }
img, svg { max-width: 100%; }

/* Under signed-out pages: the privacy policy (Product__PrivacyUrl). */
.site-footer { max-width: 48rem; margin: 0 auto; padding: 0 1rem 1.5rem; font-size: 0.875rem; }

/* App frame (option C, M6; dark since the UI refresh). Phone: top bar, page, tab bar; "Menu" opens the sidebar as a
   full-screen sheet. Computer (60rem and wider): the sidebar stays on the left; the bars are hidden. */
.icon { flex: none; }

body.app { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)); } /* room for the tab bar */

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem max(1rem, env(safe-area-inset-right, 0px)) 0.6rem max(1rem, env(safe-area-inset-left, 0px));
    color: var(--fg);
    background: var(--frame-bg);
    border-bottom: 1px solid var(--frame-line);
}
.topbar .context-label { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
    flex: none;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    text-decoration: none;
    color: var(--accent);
    background: var(--accent-soft);
}

.tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    background: var(--frame-bg);
    border-top: 1px solid var(--frame-line);
}
.tabbar a, .tabbar button {
    display: grid;
    justify-items: center;
    gap: 0.15rem;
    margin: 0;
    padding: 0.55rem 0.25rem 0.5rem;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    text-decoration: none;
    cursor: pointer;
}
.tabbar [aria-current="page"] { color: var(--frame-accent); }

/* What waits on the person there: a small count on the tab's icon, and at the end of the menu link. */
.nav-count {
    min-width: 1.15rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.15rem;
    text-align: center;
    color: #fff;
    background: var(--danger);
}
.tabbar a { position: relative; }
.tabbar .nav-count { position: absolute; top: 0.3rem; left: calc(50% + 0.35rem); }
.nav-section .nav-count { margin-left: auto; }
/* The same count on a page's button (a group's page repeats the menu's links, issue #120). */
a.button .nav-count { display: inline-block; margin-left: 0.5rem; vertical-align: 0.05rem; }

/* The menu: a sheet over the page on a phone (when opened), the sidebar on a computer. */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem max(0.75rem, env(safe-area-inset-right, 0px)) calc(1rem + env(safe-area-inset-bottom, 0px)) max(0.75rem, env(safe-area-inset-left, 0px));
    color: var(--fg);
    background: var(--frame-bg);
    overflow-y: auto;
}
.sidebar[popover] { inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; border: 0; }
.sidebar[popover]:not(:popover-open) { display: none; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0 0.25rem; }
.sidebar-top .brand { font-size: 1.05rem; font-weight: 700; }
.icon-button { display: grid; place-items: center; margin: 0; padding: 0.4rem; color: var(--fg); background: transparent; border: 1px solid var(--frame-line); border-radius: var(--radius); box-shadow: none; }

/* Where the person is: the host, and the group when there is one (no switcher; see AppNav). */
.where { padding: 0.65rem 0.75rem; border: 1px solid var(--frame-line); border-radius: 8px; background: var(--frame-raised); }
.where p { display: flex; align-items: center; gap: 0.5rem; margin: 0; overflow-wrap: anywhere; }
.where .icon { width: 1.1rem; height: 1.1rem; color: var(--muted); }
.where-host { font-size: 0.85rem; color: var(--muted); }
.where-host + .where-group { margin-top: 0.25rem; }
.where-group { font-weight: 600; color: var(--fg); }

.nav-section h2 { margin: 0 0 0.25rem; padding: 0 0.6rem; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); overflow-wrap: anywhere; }
.nav-section ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; }
.nav-section a, .nav-button {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    margin: 0;
    padding: 0.5rem 0.6rem;
    border: 0;
    border-radius: var(--radius);
    box-shadow: none;
    font: inherit;
    font-weight: 400;
    text-align: left;
    color: var(--fg);
    background: none;
    text-decoration: none;
}
.nav-section a:hover, .nav-button:hover { background: var(--frame-raised); }
.nav-section a[aria-current="page"] { font-weight: 600; background: var(--frame-raised); box-shadow: inset 3px 0 0 var(--frame-accent); }
.nav-section .icon, .nav-button .icon { color: var(--muted); }
.sidebar form { margin: 0; }

/* The initial in the dark frame: a lighter blue, readable on the dark grey. */
.topbar .avatar, .sidebar .avatar { color: #cfe2ff; background: rgba(66, 135, 245, 0.35); }

/* Who is signed in: a card at the foot of the sidebar. */
.account-card { margin-top: auto; padding: 0.65rem; border: 1px solid var(--frame-line); border-radius: 8px; background: var(--frame-raised); }
.account-who { display: flex; align-items: center; gap: 0.65rem; min-width: 0; color: var(--fg); text-decoration: none; }
.account-who:hover strong, .account-who:hover .signed-in-as { text-decoration: underline; }
.account-names { display: grid; min-width: 0; }
.account-names strong, .signed-in-as { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signed-in-as { font-size: 0.8rem; color: var(--muted); }
.account-actions { margin-top: 0.4rem; }
.account-actions .nav-button { padding: 0.35rem 0.4rem; font-size: 0.85rem; color: var(--muted); }

@media (min-width: 60rem) {
    body.app {
        padding-bottom: 0;
        display: grid;
        grid-template-columns: 16rem minmax(0, 1fr);
        grid-template-areas: "menu content";
        min-height: 100vh;
    }
    body.app .topbar, body.app .tabbar, .menu-close { display: none; }
    body.app > main { grid-area: content; width: 100%; max-width: 60rem; padding: 2rem 2.5rem; }
    .sidebar[popover], .sidebar[popover]:not(:popover-open) {
        grid-area: menu;
        display: flex;
        position: sticky;
        inset: auto;
        top: 0; /* after inset, which would reset it */
        width: auto;
        height: 100vh;
        border-right: 1px solid var(--frame-line);
    }
}

/* A browser without popovers ignores the attribute: the menu then sits at the end of the page on a phone. */
@supports not selector(:popover-open) {
    .tabbar button[popovertarget] { display: none; }
}

/* Forms: Tabler's control look (.form-control, .btn) on the plain elements every page uses. */
.stack { display: flex; flex-direction: column; gap: 0.5rem; max-width: 24rem; }
.stack label, .stack .label-like { font-weight: 500; margin-top: 0.5rem; }
.stack .label-like + .hint { margin: 0; }

input, select, textarea {
    font: inherit;
    padding: 0.5rem 0.75rem;
    color: var(--fg);
    background-color: var(--tblr-bg-forms);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--tblr-box-shadow-input);
}
input, textarea { width: 100%; }
input:focus, select:focus, textarea:focus {
    outline: 0;
    border-color: color-mix(in oklab, var(--accent) 50%, var(--line));
    box-shadow: 0 0 0 0.25rem color-mix(in oklab, var(--accent) 25%, transparent);
}
input[type="checkbox"], input[type="radio"] { width: auto; margin-right: 0.5rem; accent-color: var(--accent); box-shadow: none; }
input[type="file"] { padding: 0.35rem; }

button {
    font: inherit;
    font-weight: 500;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: #fff;
    background: var(--accent);
    box-shadow: var(--tblr-box-shadow-input);
    cursor: pointer;
}
button:hover { background: color-mix(in oklab, var(--accent) 88%, #000); }
button:focus-visible, a.button:focus-visible, label.button:focus-within { outline: 0; box-shadow: 0 0 0 0.25rem color-mix(in oklab, var(--accent) 25%, transparent); }
button:disabled { opacity: 0.55; cursor: not-allowed; }

/* A password field with its Show button (site.js adds both). */
.password-field { display: flex; gap: 0.5rem; }
.password-field input { flex: 1; min-width: 0; }
button.password-toggle { margin-top: 0; padding: 0.5rem 0.8rem; min-width: 4.5rem; }

button.link {
    margin: 0;
    padding: 0;
    font-weight: 400;
    color: var(--link);
    background: none;
    border: 0;
    box-shadow: none;
    text-decoration: underline;
}

.form-error, .field-error { color: var(--danger); }
.form-error ul { margin: 0; padding-left: 1.2rem; }
.validation-summary-valid { display: none; }

a.button, label.button {
    display: inline-block;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: #fff;
    background: var(--accent);
    box-shadow: var(--tblr-box-shadow-input);
    text-decoration: none;
}
a.button:hover, label.button:hover { background: color-mix(in oklab, var(--accent) 88%, #000); }

button.secondary, a.button.secondary, label.button.secondary {
    color: var(--fg);
    background: var(--bg);
    border-color: var(--line);
}
button.secondary:hover, a.button.secondary:hover, label.button.secondary:hover { background: var(--panel); }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.actions button { margin-top: 0; }

.or { margin: 0.5rem 0; text-align: center; color: var(--muted); }

/* Notices: Tabler's alert look, a coloured edge on the surface colour. */
.notice {
    padding: 0.75rem 1rem;
    color: var(--fg);
    background: var(--bg);
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: var(--tblr-box-shadow-card, none);
}
.notice.success { border-left-color: var(--success); }
.notice.success strong { color: var(--success); }

/* A list without bullets whose items line up a link, a note and a small button (a line's receipts). */
ul.plain { list-style: none; padding: 0; }
ul.plain li { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; }

/* A small marker after a name ("Pilot", "SoD off"), drawn like Tabler's badge. It may wrap: a long one ("Account
   security change, held until …") that couldn't would make the page wider than a phone, which then zooms the page out
   and pushes the tab bar's labels off the bottom of the screen (M6, the Payments page). Tabler has its own .tag. */
.tag {
    display: inline-block;
    max-width: 100%;
    height: auto;
    margin-left: 0.4rem;
    padding: 0.05rem 0.5rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: var(--panel);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.4;
    vertical-align: 0.1em;
    white-space: normal;
}

/* Numbered setup steps (the authenticator page). Tabler's .steps is a progress bar: put the list back. */
ol.steps { display: block; width: auto; margin: 1rem 0; padding-left: 1.2rem; list-style: decimal; overflow: visible; }
.steps > li { margin-bottom: 1.5rem; }

.qr { width: min(240px, 100%); background: #fff; padding: 0.5rem; border-radius: var(--radius); }
.qr svg { display: block; width: 100%; height: auto; }

kbd { font-family: var(--tblr-font-monospace, ui-monospace, SFMono-Regular, Consolas, monospace); overflow-wrap: anywhere; }

.codes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    gap: 0.25rem 1.5rem;
    font-family: var(--tblr-font-monospace, ui-monospace, SFMono-Regular, Consolas, monospace);
}

.facts dt { font-weight: 600; margin-top: 1rem; }
.facts dd { margin: 0.25rem 0 0; color: var(--muted); }

.passkeys { list-style: none; padding: 0; }
.passkeys li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
}

form.inline { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0; }
form.inline input { width: auto; flex: 1 1 10rem; }
form.inline button { margin-top: 0; }

.muted { color: var(--muted); }

/* A field that must be filled in (RequiredLabelTagHelper): an asterisk after its label, before anything is saved. */
.required-mark { margin-left: 0.2rem; font-weight: 700; color: var(--danger); }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media print {
    .site-header, .topbar, .actions, nav { display: none; }
    body.app { display: block; padding: 0; }
    body { color: #000; background: #fff; }
}

/* List tables: Tabler's table look (small upper-case headings, a card around the rows). */
table.list {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}
table.list th, table.list td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list thead th {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--panel);
}
table.list tbody tr:last-child > * { border-bottom: 0; }
/* At phone width a list table becomes one block per row; a cell with data-label="Total" shows "Total: " before its
   value, since the column headings are hidden. Every cell says what it is (ListTableLabelTests): data-label, or
   row-title (the cell that names the row), row-actions (buttons and links) or row-check (a tick box).
   A table that must stay a grid goes in a .scroll-x box instead. */
@media (max-width: 40rem) {
    table.list thead { display: none; }
    table.list, table.list tbody { display: block; } /* no table sizing: a long word wraps instead of widening the page */
    table.list tr { display: block; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); }
    table.list tbody tr:last-child { border-bottom: 0; }
    table.list td, table.list tbody th { display: block; border: 0; padding: 0.15rem 0; }
    table.list td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
    table.list td:empty { display: none; }
    table.list td.row-title { font-weight: 600; }
    table.list td.row-title .hint, table.list td.row-title .muted { font-weight: 400; }
    table.list td.row-check { float: left; margin-right: 0.5rem; }
    table.list td.row-actions { padding-top: 0.4rem; }
}
.scroll-x { overflow-x: auto; }

.hint { font-size: 0.875rem; color: var(--muted); }

.stack label:has(> input[type="checkbox"]),
.stack label:has(> input[type="radio"]) { font-weight: 400; }

/* Question threads on a report: one bordered block per thread, messages keep their line breaks. */
.thread {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
}
.thread h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.thread .message { margin: 0.75rem 0; }
.thread .message p { margin: 0.25rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Receipt upload: the area to drop files on (the file input inside it is the way to pick them, including on a phone). */
.drop-zone {
    display: grid;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px dashed var(--line);
    border-radius: 6px;
}
.drop-zone.dragging { border-color: var(--accent); background: var(--accent-soft); }
.upload-status { margin: 0; }
.upload-status progress { flex: 1 1 6rem; max-width: 10rem; }

/* One-page line form (M6, option 2): receipts beside the details on a computer, receipts first on a phone. */
.crumb { margin: 0; font-size: 0.9rem; }
.line-editor { display: grid; gap: 1.5rem; }
.line-editor h2 { font-size: 1.1rem; margin: 0 0 0.5rem; }
.line-receipts, .line-details { min-width: 0; }
.line-details .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.line-details .field { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.line-details .field label { font-weight: 600; margin-top: 0.5rem; }
.line-details { max-width: none; }
.no-receipt { margin-top: 0.75rem; }
.no-receipt summary { cursor: pointer; color: var(--link); }
/* The volunteer guide's contents and status list. */
.guide-contents ul { padding-left: 1.2rem; }
.guide-statuses dt { font-weight: 600; margin-top: 0.75rem; }
.guide-statuses dd { margin: 0.15rem 0 0; }
ul.plain.contact li { display: block; }

/* A list's filters folded away until used (the audit log). */
.filter-box { margin: 1rem 0; }
.filter-box > summary { cursor: pointer; color: var(--link); }
.filter-box form.filters { margin-top: 0.5rem; }
.no-receipt[open] { display: flex; flex-direction: column; gap: 0.5rem; }
.no-receipt label { font-weight: 600; margin-top: 0.5rem; }
.drop-zone .actions label.button { cursor: pointer; }
.drop-zone input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.take-photo { display: none; }
@media (pointer: coarse) { label.take-photo { display: inline-block; } }
.receipt-viewer { display: none; margin: 0 0 1rem; }
.receipt-viewer img { display: block; width: 100%; max-height: 28rem; object-fit: contain; border-radius: 6px; background: var(--panel); }
.receipt-viewer figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.25rem; }
.pdf-card { display: block; padding: 2rem 1rem; text-align: center; border: 1px solid var(--line); border-radius: 6px; }
.receipt-choices { list-style: none; margin: 0.5rem 0 1rem; padding: 0; display: grid; gap: 0.5rem; }
.receipt-choice {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.25rem 0.6rem;
    align-items: center;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: 8px;
}
.receipt-choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.receipt-choice input[type="checkbox"] { width: 1.2rem; height: 1.2rem; margin: 0; }
.receipt-choice .receipt-name { display: flex; flex-wrap: wrap; gap: 0 0.5rem; align-items: baseline; min-width: 0; }
.receipt-choice .receipt-name a { font-weight: 600; }
.receipt-choice > button.link { grid-column: 2 / -1; justify-self: start; font-size: 0.85rem; }
.preview-button { margin: 0; padding: 0.3rem 0.7rem; font-size: 0.85rem; }

/* The hover card: a computer with a mouse shows the receipt when the pointer is over it; nothing to click. */
.hover-card {
    display: none;
    position: absolute;
    z-index: 20;
    top: 0;
    left: calc(100% + 0.75rem);
    width: 18rem;
    padding: 0.5rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
    pointer-events: none;
    font-size: 0.8rem;
    color: var(--muted);
}
.hover-card img { display: block; width: 100%; max-height: 22rem; object-fit: contain; margin-bottom: 0.4rem; }
@media (hover: hover) and (pointer: fine) {
    .receipt-choice:hover .hover-card, .receipt-choice:focus-within .hover-card { display: block; }
    .preview-button { display: none; }
}

/* The inline preview: a phone's Preview shows the receipt in the page, above the details, until closed. The picture
   zooms with the page (pinch); tapping it opens it full size in a new tab. */
.inline-preview { scroll-margin-top: 4.5rem; /* clear of the sticky top bar */ margin: 1rem 0 0; padding: 0.75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.inline-preview[hidden] { display: none; }
.inline-preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; min-width: 0; }
.inline-preview-bar strong { min-width: 0; overflow-wrap: anywhere; }
.inline-preview-bar button { margin: 0; padding: 0.35rem 0.8rem; }
.inline-preview img { display: block; width: 100%; height: auto; border-radius: 6px; background: #fff; touch-action: pinch-zoom pan-x pan-y; }
.inline-preview figcaption { margin-top: 0.4rem; }

/* The report page's Receipts section: rows on a phone (collapsible), a grid of thumbnails on a computer. */
.report-receipts { margin: 1.5rem 0; }
.report-receipts > summary { cursor: pointer; }
.report-receipts > summary h2 { display: inline; margin: 0 0.5rem 0 0; font-size: 1.3rem; }
.report-receipt-list { list-style: none; margin: 0.75rem 0; padding: 0; display: grid; gap: 0.5rem; }
.report-receipt {
    display: grid;
    grid-template-columns: minmax(0, 1fr); /* name, then its buttons on their own row */
    gap: 0.35rem 0.75rem;
    align-items: center;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: 8px;
}
.report-receipt .receipt-name { display: flex; flex-wrap: wrap; gap: 0 0.5rem; align-items: baseline; min-width: 0; }
.report-receipt .receipt-name > a { font-weight: 600; }
/* A phone camera's file name has no spaces to break at: one line, cut with an ellipsis, the whole name on hover. */
.receipt-name .file-name { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receipt-lines { font-size: 0.85rem; color: var(--muted); }
.receipt-lines.unused { font-style: italic; }
.receipt-actions { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center; }
.receipt-actions form.inline { margin: 0; }
.receipt-thumb { display: none; }
.receipt-upload { margin-top: 0.75rem; }
@media (min-width: 60rem) {
    .report-receipt-list { grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 1rem; }
    .report-receipt { grid-template-columns: 1fr; align-content: start; align-items: start; }
    .receipt-thumb { display: block; aspect-ratio: 3 / 4; border-radius: 6px; overflow: hidden; background: var(--panel); }
    .receipt-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
    .pdf-tile { display: grid; place-items: center; height: 100%; font-weight: 700; color: var(--muted); }
    .inline-preview { display: none; }
    /* The thumbnail opens the receipt full size, so there's no in-page Preview here (issue #181). */
    .report-receipt .preview-button { display: none; }
}

/* Receipt auto-fill above the receipts: a tinted box to start it, a spinner and bar while it runs, a green one when it's
   done; and a mark on each receipt (every state is in the page, data-state picks the one shown). */
.autofill-box {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem;
    margin: 0 0 1rem; padding: 0.8rem 1rem;
    border: 1px solid color-mix(in oklab, var(--accent) 45%, var(--line));
    border-radius: var(--radius);
    background: color-mix(in oklab, var(--accent) 9%, var(--bg));
    scroll-margin-top: 5rem;
}
.autofill-box p { margin: 0; }
.autofill-box strong { color: var(--accent); }
.autofill-body { flex: 1 1 16rem; min-width: 0; }
.autofill-box button { margin: 0; }
.autofill-icon { flex: none; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; color: var(--accent); }
.autofill-icon .icon { width: 1.6rem; height: 1.6rem; }
.autofill-box.finished { border-color: color-mix(in oklab, var(--success) 45%, var(--line)); background: color-mix(in oklab, var(--success) 9%, var(--bg)); }
.autofill-box.finished strong, .autofill-box.finished .autofill-icon { color: var(--success); }
.autofill-box progress { display: block; width: 100%; height: 0.45rem; margin-top: 0.5rem; border: 0; border-radius: 1rem; overflow: hidden; background: var(--bg); color: var(--accent); accent-color: var(--accent); }
.autofill-box progress::-webkit-progress-bar { background: var(--bg); }
.autofill-box progress::-webkit-progress-value { background: var(--accent); border-radius: 1rem; transition: width 0.4s; }
.autofill-box progress::-moz-progress-bar { background: var(--accent); border-radius: 1rem; }
.spinner { display: inline-block; box-sizing: border-box; border: 3px solid color-mix(in oklab, var(--accent) 25%, transparent); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
.autofill-icon.spinner { width: 1.5rem; height: 1.5rem; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.5s; } }

.autofill-mark { display: flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; color: var(--muted); }
.autofill-mark > span { display: none; }
.autofill-mark[data-state="waiting"] .mark-waiting,
.autofill-mark[data-state="reading"] .mark-reading,
.autofill-mark[data-state="done"] .mark-done,
.autofill-mark[data-state="partly"] .mark-partly,
.autofill-mark[data-state="missed"] .mark-missed { display: inline-grid; }
.autofill-mark .mark-icon { place-items: center; flex: none; width: 1.25rem; height: 1.25rem; }
.autofill-mark .mark-icon .icon { width: 1.1rem; height: 1.1rem; }
.autofill-mark .mark-waiting.mark-icon { box-sizing: border-box; width: 0.9rem; height: 0.9rem; margin: 0 0.175rem; border: 2px dashed var(--muted); border-radius: 50%; }
.autofill-mark .mark-reading.spinner { width: 1rem; height: 1rem; margin: 0 0.125rem; border-width: 2px; }
/* While the box updates live, a receipt whose line was just added still says "Not on a line yet" until the reload. */
.report-receipt:has(.autofill-mark[data-state="done"]) .receipt-lines.unused { display: none; }
.autofill-mark[data-state="reading"] { color: var(--accent); }
.autofill-mark[data-state="done"] { color: var(--success); }
.autofill-mark[data-state="missed"] { color: var(--tblr-warning); }
.autofill-mark[data-state="partly"] { color: var(--tblr-warning); }
@media (min-width: 60rem) {
    /* On a computer the icon sits on the thumbnail's corner, the words under the name. */
    .report-receipt { position: relative; }
    .autofill-mark .mark-icon { position: absolute; top: 0.9rem; right: 1rem; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--bg); box-shadow: 0 1px 3px rgb(0 0 0 / 0.25); }
    .autofill-mark .mark-icon .icon { width: 1.3rem; height: 1.3rem; }
    .autofill-mark .mark-reading.spinner { width: 1.9rem; height: 1.9rem; margin: 0; border-width: 4px; }
    .autofill-mark .mark-waiting.mark-icon { width: 1.9rem; height: 1.9rem; margin: 0; border-width: 3px; }
}

.remove-line { margin-top: 2.5rem; }

@media (min-width: 60rem) {
    .line-editor { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
    .receipt-viewer:not([hidden]) { display: block; }
}

/* People lists: the search and filter row, and the pager under a long list. */
form.filters { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; margin: 1rem 0; }
form.filters label { display: grid; gap: 0.25rem; }
form.filters button { margin-top: 0; }
.pager { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin: 1rem 0; }
.pager-pages { display: none; gap: 0.6rem; align-items: center; }
@media (min-width: 40rem) { .pager-pages { display: flex; } }
form.filters label.check { display: flex; gap: 0.4rem; align-items: center; }
form.filters select { min-width: 12rem; }

/* UI refresh, stage 2: Tabler's page header, cards and badges on the report pages and My reports. */
.page-head { margin-bottom: 1.25rem; }
.page-head .breadcrumb { margin-bottom: 0.4rem; font-size: 0.85rem; }
.page-head-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.page-head-title h1 { margin: 0; }
.page-head-meta { margin: 0.35rem 0 0; }

main .card { margin-bottom: 1rem; }
.card-header .card-title { margin: 0; font-size: 1rem; }
.card > table.list, .card > form > table.list { border: 0; border-radius: 0; }
.card-footer .actions { margin: 0; }
.card-total { display: flex; justify-content: space-between; align-items: baseline; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge + .badge { margin-left: 0.25rem; }
.notice.warning { border-left-color: var(--tblr-warning); }
button.danger { color: var(--danger); border-color: color-mix(in oklab, var(--danger) 45%, var(--line)); }
button.wide-button { width: 100%; }
.step-note { margin: 0.5rem 0 0; text-align: center; }

/* The report page (decisions 2026-11-19): one column with a summary band, then the decision, the lines, the receipts,
   the questions and the decisions so far. */
.report-receipts { margin: 0; }
.report-receipts > summary.card-header { cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; }
.report-receipts > summary.card-header h2 { display: inline; margin: 0; font-size: 1rem; }
.report-receipts:not([open]) > summary.card-header { border-bottom: 0; }
.report-receipt-list { margin-top: 0; }
@media (min-width: 60rem) {
    body.app > main.wide { max-width: 84rem; }
}

/* A phone's bar above the tabs with the page's main action (the report's Decide jumps to the review). */
.action-bar {
    position: sticky;
    bottom: calc(3.75rem + env(safe-area-inset-bottom, 0px));
    z-index: 9;
    margin: 1rem -1rem -1.5rem;
    padding: 0.6rem 1rem;
    background: var(--frame-bg);
    border-top: 1px solid var(--frame-line);
}
.action-bar .button { display: block; text-align: center; }
@media (min-width: 60rem) {
    .action-bar { display: none; }
}

/* Add a line and a line's page: receipts and details are cards. On a phone the receipts go: add one, tick, the ticked
   one shown large, then the details (issue 97); a computer keeps the large receipt first, beside the details. */
.line-editor .card { margin-bottom: 0; }
.line-receipts-body { display: flex; flex-direction: column; gap: 0.75rem; }
#receipt-choices { display: flex; flex-direction: column; }
.receipt-viewer:not([hidden]) { display: block; }
.line-receipts-body > .drop-zone { order: 1; }
.line-receipts-body > .upload-status { order: 2; }
.line-receipts-body > #receipt-choices { order: 3; }
.line-receipts-body > .inline-preview { order: 4; }
#receipt-choices > .receipt-viewer { order: 1; margin: 0.25rem 0 0; }
.line-receipts .receipt-choices { margin-bottom: 0; }
@media (min-width: 60rem) {
    .line-receipts-body > *, #receipt-choices > .receipt-viewer { order: 0; }
    #receipt-choices > .receipt-viewer { margin: 0 0 1rem; }
    .line-editor { grid-template-columns: minmax(0, 24rem) minmax(0, 1fr); gap: 1.5rem; }
}

/* UI refresh, stage 2, second group: the review queues, Payments, a run's page and Payouts CSV. */
a.button.page-head-action { margin-left: auto; display: inline-flex; align-items: center; gap: 0.4rem; }
.page-head-action .icon { width: 1.1rem; height: 1.1rem; }
.card-header-note { margin-left: auto; }
.card-header .nav-tabs .nav-link strong { font-weight: inherit; }
/* On a phone the view tabs stay one row that scrolls sideways, rather than wrapping under each other. */
@media (max-width: 40rem) {
    .card-header-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; white-space: nowrap; padding-bottom: 1px; }
    .card-header-tabs .nav-link { padding-inline: 0.75rem; }
}
.card-filters { border-bottom: 1px solid var(--line); }
.card-filters form.inline select { width: auto; }
.card-empty { margin: 0; color: var(--muted); }
.datagrid-wide { grid-column: 1 / -1; }
.text-danger { color: var(--danger); }
@media (min-width: 40rem) {
    table.list .money { text-align: right; }
}

@media (max-width: 59.99rem) {
    .phone-hidden { display: none; }
}
.card-footer .actions .hint { margin: 0; flex: 1 1 16rem; }

/* Payouts CSV: the two dates side by side. */
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.field-pair > .stack { gap: 0.5rem; }

/* UI refresh, stage 2, third group: the host's and a group's pages, the people pages, New report, Submit, holds and releases. */
.card-footer .pager, .card-footer > .hint, .card-footer > p { margin: 0; }
.card-filters > .hint { margin: 0 0 0.75rem; }
.card-filters form.filters { margin: 0; }
.card-list { margin: 0; padding-left: 1.25rem; }
.card-list li + li { margin-top: 0.35rem; }
.card-body > form + form { margin-top: 1.25rem; }
/* A card that holds a warning (Submit: still missing, possible duplicates): Tabler's coloured top edge. */
.card-warning { border-top: 3px solid var(--tblr-warning); }
/* A row's roles: the tick boxes in a row with Save beside them, wrapping on a phone. */
form.role-form { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; align-items: center; margin: 0; }
form.role-form label { display: inline-flex; gap: 0.35rem; align-items: center; font-weight: 400; margin: 0; }
form.role-form button { margin-top: 0; }
/* Everyone: the groups someone is in, as chips linking to each group's people page. */
.group-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.group-chips li { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; }
.group-chips a.badge { max-width: 100%; white-space: normal; text-align: left; color: inherit; }
.hold-list { list-style: none; padding: 0; }
table.list td.row-title .muted { overflow-wrap: anywhere; }

/* UI refresh, stage 2, fourth group: the setup pages. */
.card-header > div:first-child { min-width: 0; }
.card-header .card-subtitle { margin: 0.25rem 0 0; font-size: 0.875rem; color: var(--muted); }
.card-header .card-actions { flex: none; }
.card-header .card-actions .button { margin: 0; }
@media (max-width: 40rem) {
    .card-header:has(.card-actions) { flex-wrap: wrap; gap: 0.75rem; }
    .card-header .card-actions { margin: 0; }
}
/* Fields and categories: links that jump to each card, and two cards side by side on a wide screen. */
.jump-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.jump-links a { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.75rem; border: 1px solid var(--line); border-radius: var(--tblr-border-radius); background: var(--tblr-bg-surface); text-decoration: none; }
.card-pair { display: grid; gap: 0 1rem; }
@media (min-width: 75rem) {
    .card-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
/* A card for something that can't be undone (resetting someone's sign-in security). */
.card-danger { border-top: 3px solid var(--danger); }
/* Separation of duties: each choice a box you can click anywhere on. */
.choice-form fieldset { display: grid; gap: 0.75rem; }
.choice-form legend { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
.choice-form label.choice { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.75rem 0.9rem; border: 1px solid var(--line); border-radius: var(--tblr-border-radius); font-weight: 400; margin: 0; cursor: pointer; }
.choice-form label.choice:has(input:checked) { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 7%, transparent); }
.choice-form label.choice input { margin-top: 0.25rem; flex: none; }
.choice-form .stack, form.choice-form { max-width: 40rem; }
@media (min-width: 40rem) {
    table.list td.nowrap { white-space: nowrap; }
}

/* UI refresh, stage 2, fifth group: signing in, invitations, the account pages, Platform, the guide. */
/* Signed-out pages (and the authenticator setup before it's on) sit in one centered card, Tabler's sign-in look. */
.auth-card { max-width: 26rem; margin: 1.5rem auto 2rem; }
.auth-card-wide { max-width: 34rem; }
.auth-card h1 { font-size: 1.4rem; margin: 0 0 0.75rem; }
.auth-card h2 { font-size: 1.05rem; }
.auth-card .stack { max-width: none; }
.auth-card .card-footer .hint, .auth-card .card-footer .actions { margin: 0; }
.auth-card .card-body + .card-body { border-top: 1px solid var(--line); }
.confirm-card { max-width: 28rem; }
.confirm-card .stack { max-width: none; }
/* Home: each host's places as a list of links inside its card. */
.place-list { list-style: none; margin: 0; padding: 0; }
.place-list li + li { border-top: 1px solid var(--line); }
.place-list a { display: block; padding: 0.7rem 1rem; text-decoration: none; }
.place-list a:hover { background: var(--panel); }
/* The guide: its contents and each section in a card, the reading width kept short. */
.guide-contents, .guide-section { max-width: 48rem; }
.guide-contents .card-title { margin-bottom: 0.5rem; }
.guide-contents ul { margin: 0; columns: 2 16rem; }
.guide-section h2 { margin-top: 0; font-size: 1.15rem; }
.guide-section .card-body > :last-child { margin-bottom: 0; }
.guide-section h2[id] { scroll-margin-top: 1.5rem; }
/* Host settings, how people are paid (2026-11-16): each kind's choices side by side when they fit. */
.payout-modes fieldset { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.payout-modes legend { flex-basis: 100%; }
.payout-modes fieldset > .hint, .payout-modes fieldset > .field-error { flex-basis: 100%; }
/* Payment provider fees (2026-11-17): percent, flat and cap side by side when they fit. */
.fee-rate .field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 0.75rem; }
.fee-rate .field-row label { display: grid; gap: 0.25rem; }
.fee-rate .fee-payer { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin-top: 0.75rem; }
.fee-rate .fee-payer > .field-label, .fee-rate .fee-payer > .field-error { flex-basis: 100%; margin: 0; }

/* A page's summary band (decision 2026-11-18): the page's own figures sit on the page, not in a card, so they read as
   its headline and the cards below read as its lists. */
.page-summary { margin: 0 0 1.25rem; padding: 0 0 1.25rem; border-bottom: 1px solid var(--line); }
.summary-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.summary-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; margin: 0; }
.summary-figure { min-width: 0; margin: 0; }
.summary-figure dt { font-size: 0.8rem; font-weight: 400; color: var(--muted); }
.summary-figure dd { margin: 0.1rem 0 0; font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.summary-figure dd.summary-note { font-size: 0.85rem; font-weight: 400; color: var(--muted); margin-top: 0.15rem; }
.summary-lead dd { font-size: 2rem; }
.summary-head > .summary-figures { flex: 1 1 28rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.summary-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.5rem; }
.summary-actions form { margin: 0; }
.summary-actions button { margin-top: 0; }
.summary-progress { margin: 0.75rem 0 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.9rem; }
@media (min-width: 48rem) {
    .summary-figures { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* The provider's balance in a summary band, or under a release statement (decisions 2026-11-18). */
.summary-wallet { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.wallet-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; font-size: 0.85rem; color: var(--muted); }
.wallet-name { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--fg); font-weight: 600; }
.wallet-icon { flex: none; display: inline-grid; color: var(--muted); }
.wallet-icon svg { width: 1.1rem; height: 1.1rem; }
.wallet-head form { margin: 0; }
.wallet-head .badge { margin-left: auto; }
.wallet-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-top: 0.6rem; align-items: end; }
.wallet-body .summary-figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wallet-line { display: flex; justify-content: space-between; gap: 0.75rem; font-weight: 500; }
.balance-bar { height: 0.5rem; margin-top: 0.6rem; border-radius: 999px; background: var(--panel); overflow: hidden; }
.wallet-short .balance-bar { background: var(--danger); }
.balance-fill { display: block; height: 100%; width: 0; background: var(--accent); }
.fill-5 { width: 5%; } .fill-10 { width: 10%; } .fill-15 { width: 15%; } .fill-20 { width: 20%; } .fill-25 { width: 25%; }
.fill-30 { width: 30%; } .fill-35 { width: 35%; } .fill-40 { width: 40%; } .fill-45 { width: 45%; } .fill-50 { width: 50%; }
.fill-55 { width: 55%; } .fill-60 { width: 60%; } .fill-65 { width: 65%; } .fill-70 { width: 70%; } .fill-75 { width: 75%; }
.fill-80 { width: 80%; } .fill-85 { width: 85%; } .fill-90 { width: 90%; } .fill-95 { width: 95%; } .fill-100 { width: 100%; }
.wallet-note { margin: 0.5rem 0 0; }
.text-success { color: var(--success); }
@media (min-width: 48rem) {
    .wallet-queue .wallet-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
}

/* A list whose rows open (decision 2026-11-18): one card per list, a row per item, and the item's details and forms
   under its row when opened. Plain <details>, so it works without script. Columns are set per list. */
.disclosure-head, .disclosure-row > summary { display: grid; grid-template-columns: var(--disclosure-columns, 1.5rem minmax(0, 1fr)); gap: 0.75rem; align-items: center; }
.disclosure-head { padding: 0.5rem 1rem; font-size: 0.8rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.disclosure-row { border-bottom: 1px solid var(--line); }
.disclosure-row:last-child { border-bottom: 0; }
.disclosure-row > summary { list-style: none; padding: 0.65rem 1rem; cursor: pointer; }
.disclosure-row > summary::-webkit-details-marker { display: none; }
.disclosure-row > summary:hover { background: var(--panel); }
.disclosure-row > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.disclosure-chevron { width: 0.5rem; height: 0.5rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform 0.15s; justify-self: center; }
.disclosure-row[open] > summary .disclosure-chevron { transform: rotate(45deg); }
.disclosure-row[open] > summary { background: var(--panel); }
.disclosure-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.disclosure-cell { min-width: 0; overflow-wrap: anywhere; }
.disclosure-body { padding: 0.75rem 1rem 1rem 3.25rem; background: var(--panel); border-top: 1px solid var(--line); }
.disclosure-body .datagrid { margin-bottom: 0.75rem; }
.disclosure-body table.list { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }

/* Your account: the home-screen steps. Not shown once the app is opened from the home screen. */
.home-screen-row h3 { font-size: 1rem; margin: 0.5rem 0 0; }
.home-screen-row ol { margin: 0; padding-left: 1.25rem; }
@media (display-mode: standalone) { .home-screen-row { display: none; } }

/* The payment queue: a tick per payee (ticks their reports; shown by our script) beside each payee's row. */
.payee-list { --disclosure-columns: 1.5rem minmax(0, 1.3fr) minmax(0, 1.6fr) 5.5rem 6.5rem minmax(0, 1fr); }
.payee-item { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.payee-item:last-child { border-bottom: 0; }
.payee-item > .payee-tick { padding: 0.75rem 0 0 1rem; }
.payee-item > .disclosure-row { border-bottom: 0; }
.payee-item > .disclosure-row > summary, .payee-item > .disclosure-row .disclosure-body { padding-left: 0.25rem; }
.payee-list .disclosure-head { padding-left: 3.25rem; }

/* A run's payouts. */
.payout-list { --disclosure-columns: 1.5rem minmax(0, 1.3fr) minmax(0, 1.7fr) 6.5rem minmax(0, 1fr); }
.payout-actions { display: grid; gap: 1.5rem; }
.payout-actions .stack { margin: 0; }
.payout-problems { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 60rem) {
    .payout-actions { grid-template-columns: repeat(2, minmax(0, 24rem)); }
}

/* On a phone a row is its name and status, then the rest on a line beneath; the column headings go. */
@media (max-width: 47.99rem) {
    .card-header:has(> .card-header-note.hint) { flex-wrap: wrap; }
    .card-header > .card-header-note.hint { flex-basis: 100%; margin-left: 0; }
    .disclosure-head { display: none; }
    .disclosure-row > summary { grid-template-columns: 1.5rem minmax(0, 1fr) auto; row-gap: 0.15rem; }
    .disclosure-row > summary > .disclosure-cell { grid-column: 2 / -1; font-size: 0.875rem; color: var(--muted); }
    .disclosure-row > summary > .disclosure-status { grid-column: 3; grid-row: 1; }
    .disclosure-body { padding-left: 1rem; }
    .payee-item > .disclosure-row .disclosure-body { padding-left: 0.25rem; }
}

/* A statement: line items, then the total (the release confirmation). */
table.statement { width: 100%; border-collapse: collapse; }
table.statement th, table.statement td { padding: 0.5rem 1rem; text-align: left; border-bottom: 1px dashed var(--line); font-weight: 400; }
table.statement thead th { font-size: 0.8rem; color: var(--muted); border-bottom: 1px solid var(--line); }
table.statement .money { text-align: right; }
table.statement tr.statement-extra > * { color: var(--muted); }
table.statement tfoot th, table.statement tfoot td { font-weight: 600; font-size: 1.05rem; border-top: 2px solid var(--line); border-bottom: 0; }
.statement-funding { margin: 0 1rem 1rem; padding: 0.75rem 1rem; border-radius: var(--radius); background: var(--panel); }
.statement-funding .summary-figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.statement-funding .summary-figure dd { font-size: 1.15rem; }

/* The report page's band: its total, who and which group, when, how it's paid, then flags and its progress. */
.report-figures { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.summary-figure dd.summary-text { font-size: 1rem; font-weight: 500; overflow-wrap: anywhere; }
/* A small form in a figure (the report's Paid to picker) uses normal text, not the figure's size. */
.summary-figure dd.summary-form { font-size: 1rem; font-weight: 400; margin-top: 0.25rem; }
.summary-form form.inline select { flex: 1 1 12rem; width: auto; min-width: 0; max-width: 100%; }
.summary-figure dd.summary-note > span { display: block; }
.summary-figure dd form.inline { margin-top: 0.25rem; }
.summary-wide { grid-column: span 2; }
.summary-alert { margin: 0.75rem 0 0; }
.summary-steps { margin-top: 1rem; }
@media (max-width: 47.99rem) {
    .summary-wide { grid-column: 1 / -1; }
}

/* The decision: the one card set apart, straight after the band. */
.decision-card { border-left: 4px solid var(--accent); }
.decision-card .notice { margin-top: 0; }
.decision-forms { display: grid; gap: 1rem; margin-top: 1rem; }
.decision-forms .stack { margin: 0; }
@media (min-width: 48rem) {
    .decision-forms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* A report's lines. */
.line-list { --disclosure-columns: 1.5rem minmax(0, 1.6fr) 6.5rem minmax(0, 1fr) 6rem minmax(0, 1fr); }
.line-body { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }
.line-facts { flex: 1 1 16rem; min-width: 0; }
.line-facts p { margin: 0 0 0.5rem; }
.line-facts p:last-child { margin-bottom: 0; }
.line-receipts { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.line-receipt { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; width: 6rem; font-size: 0.85rem; }
.line-receipt img, .line-receipt .pdf-tile { display: grid; place-items: center; width: 6rem; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); font-weight: 700; color: var(--muted); }

/* What's been decided so far, as a timeline. */
.timeline-list { margin: 0; padding: 0; list-style: none; }
.timeline-entry { position: relative; padding: 0 0 1rem 1.5rem; border-left: 2px solid var(--line); margin-left: 0.4rem; }
.timeline-entry:last-child { padding-bottom: 0; }
.timeline-entry::before { content: ""; position: absolute; left: -0.45rem; top: 0.3rem; width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--bg); border: 2px solid var(--muted); }
.timeline-green::before { border-color: var(--tblr-green); }
.timeline-orange::before { border-color: var(--tblr-orange); }
.timeline-red::before { border-color: var(--tblr-red); }
.timeline-entry p { margin: 0; }
.timeline-entry p.timeline-comment { margin-top: 0.35rem; }
.timeline-comment { padding: 0.5rem 0.75rem; background: var(--panel); border-radius: var(--radius); white-space: pre-line; }

/* A figure that's good, needs a look or is a problem (the submit page's "To fix" and "To check"). */
.summary-good dd:not(.summary-note) { color: var(--tblr-green); }
.summary-warn dd:not(.summary-note) { color: var(--tblr-orange); }
.summary-bad dd:not(.summary-note) { color: var(--danger); }

/* A checklist: what to fix (a cross) or look at (a mark) before going on. */
.checklist { margin: 0; padding: 0; list-style: none; }
.checklist > li { display: flex; gap: 0.75rem; align-items: baseline; padding: 0.65rem 1rem; border-bottom: 1px solid var(--line); }
.checklist > li:last-child { border-bottom: 0; }
.check-mark { flex: none; display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; font-size: 0.75rem; font-weight: 700; }
.check-fix .check-mark { background: var(--tblr-red-lt); color: var(--tblr-red); }
.check-look .check-mark { background: var(--tblr-orange-lt); color: var(--tblr-orange); }

/* Final review's waiting list: rows that open to decide. */
.final-list { --disclosure-columns: 1.5rem minmax(0, 1.8fr) minmax(0, 1fr) minmax(0, 1fr) 6rem minmax(0, 1.1fr); }
.final-list .disclosure-name .hint { display: block; font-weight: 400; }
.final-body > * { margin-top: 0; }
.final-lines { margin: 0 0 0.75rem; padding: 0; list-style: none; max-width: 32rem; }
.final-lines > li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.25rem 0; border-bottom: 1px dashed var(--line); }
.final-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.final-actions form, .final-actions p, .final-actions button { margin: 0; } /* a button's usual top margin pushed it below Open report (issue #174) */
.final-return { max-width: 32rem; margin: 0; }

/* A report's lines on a phone: where and the receipt badge, then the date and amount on one line. */
@media (max-width: 47.99rem) {
    .line-list .disclosure-row > summary > .line-date { grid-column: 2; grid-row: 2; }
    .line-list .disclosure-row > summary > .disclosure-cell.money { grid-column: 3; grid-row: 2; text-align: right; color: inherit; font-weight: 600; }
    .line-list .disclosure-row > summary > .disclosure-cell:empty { display: none; }
}
.final-list .disclosure-status { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.final-list .disclosure-status .badge + .badge { margin-left: 0; }
@media (max-width: 47.99rem) {
    .final-list .disclosure-row > summary > .disclosure-status { grid-column: 2 / -1; grid-row: auto; }
}
@media (max-width: 47.99rem) {
    .report-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Link lists (decision 2026-11-20): the settings home and Sign-in and security. Each row is one link to its own page,
   with what is set now and a ›; a small heading names each group of rows. */
.link-list-heading { margin: 1.5rem 0 0.5rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.link-list-heading:first-of-type { margin-top: 0.5rem; }
.link-list { margin: 0; padding: 0; list-style: none; }
.link-list > li + li { border-top: 1px solid var(--line); }
.link-list a { display: flex; align-items: center; gap: 0.75rem 1rem; min-height: 2.75rem; padding: 0.85rem 1rem; color: var(--fg); text-decoration: none; }
.link-list a:hover { background: var(--panel); }
.link-list a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.link-list-text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.link-list-name { font-weight: 600; overflow-wrap: anywhere; }
.link-list-hint { font-size: 0.85rem; color: var(--muted); overflow-wrap: anywhere; }
.link-list-value { flex: 0 1 auto; max-width: 50%; text-align: right; color: var(--muted); overflow-wrap: anywhere; }
.link-list-value:empty { display: none; }
.link-list-value .badge + * { margin-left: 0.4rem; }
.link-list-chevron { flex: none; width: 0.5rem; height: 0.5rem; margin-right: 0.25rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); }
@media (max-width: 40rem) {
    .link-list a { flex-wrap: wrap; position: relative; padding-right: 2.25rem; }
    .link-list-value { flex-basis: 100%; max-width: none; text-align: left; }
    .link-list-chevron { position: absolute; right: 1rem; top: 50%; margin-top: -0.25rem; }
}

/* The payment provider page: one card per provider that can be connected, the same whether or not one is in use. */
.provider-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.provider-cards .card { margin: 0; }
.provider-cards .card-body { display: flex; flex-direction: column; gap: 0.4rem; height: 100%; }
.provider-cards h3 { margin: 0; font-size: 1.1rem; }
.provider-cards p { margin: 0; }
.provider-cards .button { align-self: flex-start; margin-top: auto; }
.provider-none { margin: 0 0 1.5rem; padding: 1rem 1.25rem; border: 1px dashed var(--line); border-radius: var(--radius); }
.provider-none p { margin: 0; }
.provider-none p + p { margin-top: 0.25rem; }
.page-summary:has(.provider-none) { border-bottom: 0; padding-bottom: 0; }
.connect-section { margin-top: 1.5rem; }
.connect-section > h2 { margin: 0 0 0.25rem; font-size: 1.1rem; }
.connect-section > .hint { margin: 0 0 1rem; }

/* Staff, payout methods and the account page: rows that open, and plain rows of the same shape. */
.people-list { --disclosure-columns: 1.5rem minmax(0, 1.6fr) minmax(0, 1.4fr) minmax(0, 0.8fr); }
.people-list .disclosure-name .hint { display: block; font-weight: 400; }
.person-body { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.person-body form { margin: 0; }
.method-list { --disclosure-columns: 1.5rem minmax(0, 1.6fr) minmax(0, 1.2fr) minmax(0, 1fr); }
.summary-list { --disclosure-columns: 1.5rem minmax(0, 1fr) minmax(0, 1.4fr) auto; }
.summary-list-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 0.75rem; align-items: center; padding: 0.65rem 1rem 0.65rem 3.25rem; border-top: 1px solid var(--line); }
.summary-list-row .disclosure-name .hint { font-weight: 400; }
.summary-list-action { color: var(--accent); font-weight: 500; }
.summary-list-link { color: var(--fg); text-decoration: none; }
.summary-list-link:hover { background: var(--panel); color: var(--fg); }
.summary-list-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (max-width: 47.99rem) {
    .summary-list-row { grid-template-columns: minmax(0, 1fr) auto; padding-left: 1rem; row-gap: 0.25rem; }
    .summary-list-row > .disclosure-cell { grid-column: 1 / -1; grid-row: 2; }
    .summary-list-row > .disclosure-status { grid-column: 2; grid-row: 1; }
}
.summary-figure dd.summary-large { font-size: 1.25rem; font-weight: 600; }
.disclosure-status .badge, .summary-figure .badge { white-space: normal; text-align: left; }
@media (max-width: 47.99rem) {
    .method-list .disclosure-row > summary > .disclosure-status,
    .people-list .disclosure-row > summary > .disclosure-status { grid-column: 2 / -1; grid-row: auto; }
}
