/*
 * Stewardship portal theme (staff Administration pages and the Family portal).
 *
 * Constraints that shape this file:
 * - The Content-Security-Policy admits only same-origin styles, fonts and
 *   images, so there are no web fonts, CDN frameworks or data: URI images.
 *   Typography uses system font stacks; decoration is pure CSS.
 * - Templates and tests depend on the existing class names (.panel, .notice,
 *   .notice-error, .notice-info, .actions, .help, .flow, .table-scroll,
 *   .changed, .brand, .site-header, .skip-link, .content-editor, ...).
 *   Restyle them; do not rename them.
 * - Every text/background pair below meets WCAG AA (4.5:1), and control
 *   boundaries and the focus ring meet the 3:1 non-text minimum. Re-check
 *   contrast when changing any color token.
 */
/* .light-card redeclares the light tokens on itself, so an email sample
   preview stays light inside a dark Admin page and shows what is sent
   (#1264; ui-conventions "Colour scheme"). */
:root, .light-card {
  color-scheme: light;
  /* These values come from web/design_tokens.py, which the email components
     also read; test_design_tokens.py fails if the two disagree (#732). */
  /* Text */
  --ink: #1b2a31;
  --muted: #4f5e66;
  /* Surfaces */
  --page: #f6f5f1;
  --paper: #fff;
  --paper-soft: #f3f6f5;
  --border: #dfe3e2;
  --track: #d3dbd9;
  --control-border: #7a8a90;
  /* Brand: a calm teal with a warm gold used only for decoration */
  --accent: #115e56;
  --accent-strong: #0c4a44;
  --accent-soft: #e4f0ee;
  --gold: #b5862e;
  --link: #155a8a;
  --focus: #b45309;
  /* Status */
  --warning-bg: #fdf5e1;
  --warning-border: #a86f00;
  --warning-ink: #7a4f00;
  --error-bg: #fcebe8;
  --error-border: #b42318;
  --error-ink: #8f1d12;
  /* Log levels without a status colour of their own (#601) */
  --level-info: #1d5fbf;
  --level-critical: #7f0000;
  --level-audit: #5b3fa0;
  /* Chrome details with their own dark value (#1264) */
  --selection: #cfe6e2;
  --unavailable: #646e73;
  --accent-line: #b9d7d2;
  --rule-strong: #c9d1cf;
  --row-hover: #f8faf9;
  --progress-track: #e3e8e7;
  /* Shape */
  --radius: .75rem;
  --radius-small: .5rem;
  /* Buttons: every variant shares this shape */
  --button-border-width: 2px;
  --button-padding: .6rem 1.25rem;
  --button-weight: 650;
  --button-min-height: 44px;
  /* Headings: sections, subsections, and a plain fieldset or table caption */
  --heading-2: 1.3rem;
  --heading-3: 1.1rem;
  --card-heading: 1.05rem;
  --heading-weight: 650;
  --shadow: 0 1px 2px rgb(16 24 40 / 5%), 0 4px 16px rgb(16 24 40 / 6%);
  --gutter: max(1rem, calc((100% - 72rem) / 2));
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font: 100%/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
/* The Admin portal's dark scheme (#1264; ui-conventions "Colour scheme").
   admin-base.html marks every Admin page's root (sign-in and setup too) with
   admin-document, and admin-gate-v1.js, which runs in the head before the
   body is parsed, sets data-theme to the scheme in use: the Appearance
   choice saved in this browser, or the operating system's setting when
   none is saved. Family pages extend base.html, never load that script and
   stay light. In dark, the colour tokens take their values from DARK_COLORS
   in web/design_tokens.py (test_design_tokens.py checks this block against
   it), so every rule that reads a token follows with no per-component CSS.
   "screen" keeps a printed page light. color-scheme makes the browser's own
   form controls and scrollbars dark too. */
@media screen {
  html.admin-document[data-theme="dark"] {
    color-scheme: dark;
    --ink: #e4eaeb;
    --muted: #a8b5ba;
    --page: #121a1d;
    --paper: #1b2529;
    --paper-soft: #222e33;
    --border: #34434a;
    --track: #3b4b52;
    --control-border: #80929a;
    --accent: #5cc0b2;
    --accent-strong: #86d5ca;
    --accent-soft: #173c38;
    --gold: #d2a54e;
    --link: #84bdf0;
    --focus: #f0a34a;
    --warning-bg: #2f2611;
    --warning-border: #d09a2c;
    --warning-ink: #f2c66e;
    --error-bg: #3b1c19;
    --error-border: #f07a6a;
    --error-ink: #ffb3a7;
    --level-info: #7eaaf2;
    --level-critical: #ff8f86;
    --level-audit: #bba5ee;
    --selection: #245a53;
    --unavailable: #8d9ba1;
    --accent-line: #2f6a62;
    --rule-strong: #45555c;
    --row-hover: #202b30;
    --progress-track: #34434a;
  }
  /* The closed select's arrow is an image, so it cannot read --ink. */
  html.admin-document[data-theme="dark"] select:not([multiple]):not([size]) { background-image: url("select-arrow-dark-v1.svg"); }
  /* An uploaded image (the parish logo, a Campaign image, a hosted image)
     is drawn for the light Family pages and emails; a white backing behind
     its transparent parts keeps a dark logo visible. It adds no size. */
  html.admin-document[data-theme="dark"] :is(.brand img, img.branding-preview, .branding-preview img, .hosted-file-thumbnail, .file-preview-box img) { background-color: #fff; border-radius: var(--radius-small); }
  /* A light card keeps its edge clear of the email's text on the dark page. */
  html.admin-document[data-theme="dark"] .light-card:not(.content-sample) { padding: 1rem; border-radius: var(--radius-small); }
}
* { box-sizing: border-box; }
/* Always reserve the vertical scrollbar's space, so a centred page does not
   move sideways when it starts or stops needing a scrollbar, such as when
   "About this page" opens (#607). Overlay scrollbars reserve nothing. */
html { scrollbar-gutter: stable; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--page); color: var(--ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--selection); color: var(--ink); }

/* Links and focus */
a { color: var(--link); text-underline-offset: .2em; text-decoration-thickness: .08em; }
a:hover { text-decoration-thickness: .15em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.skip-link { position: absolute; top: .75rem; left: .75rem; padding: .75rem 1.1rem; background: var(--accent); color: var(--paper); border-radius: var(--radius-small); font-weight: 650; transform: translateY(-300%); z-index: 10; }
.skip-link:focus { transform: none; }

/* Header: brand row with status indicators, then a full-width navigation row. */
/* --header-inline is the header's side padding, which the Admin pages widen
   and the Appearance switch lines up with. */
.site-header { --header-inline: var(--gutter); padding: 1rem var(--header-inline); background: var(--paper); }
.site-header { position: relative; display: flex; flex-wrap: wrap; align-items: center; column-gap: 1rem; row-gap: 0; justify-content: space-between; border-bottom: 1px solid var(--border); box-shadow: 0 1px 3px rgb(16 24 40 / 5%); padding-top: 1.25rem; }
.site-header::before { content: ""; position: absolute; inset: 0 0 auto; height: .3rem; background: linear-gradient(90deg, var(--accent), var(--accent) 60%, var(--gold)); }
.brand { flex: 1 1 auto; margin: 0; font-family: var(--serif); font-size: clamp(1.15rem, 2.5vw, 1.4rem); font-weight: 600; line-height: 1.3; letter-spacing: .005em; color: var(--ink); }
/* The menu logo is drawn within 16rem x 4rem: square, or a wordmark up to
   4 times as wide (#1062). Its width and height attributes are that drawn
   size (branding_context.header_logo_size), so the browser reserves its
   whole box before the file arrives and the parish name beside it never
   moves. On a narrow screen it takes at most half the width, keeping its
   shape (height: auto follows the attributes' ratio), and it never shrinks
   to make room for the name, which wraps instead. */
.brand img { flex: none; max-width: min(16rem, 50vw); height: auto; margin-inline-end: .5rem; }
/* A logo drawn without its size (no attributes) still stays within 4rem. */
.brand img:not([width]) { max-height: 4rem; }
/* Reserve the logo's largest drawn height before the image loads, so a late
   logo cannot grow the header and push the page down (#638). The logo stays
   at its own size, centred on the line; it is never stretched to fill it. */
.brand:has(img) { display: flex; align-items: center; min-height: 4rem; }
.branding-preview { max-width: 100%; height: auto; }
/* A chosen image's preview (setup's Parish logos, #2270). The box has a fixed
   height whatever it holds, so choosing, clearing or replacing the file moves
   nothing below it; the image is scaled to fit, never stretched. */
.file-preview-title { margin-block: 0 .25rem; font-weight: 600; }
.file-preview-box { display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 100%; height: 10rem; padding: .5rem; border: 1px dashed var(--border); border-radius: var(--radius-small); overflow: hidden; margin-block-end: 1rem; }
.file-preview-box img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.file-preview-box img[hidden], .file-preview-empty[hidden] { display: none; }
.file-preview-empty { margin: 0; text-align: center; }
/* One logo size's preview (Parish logos' current logos and Advanced fields,
   data-logo-size): the image is drawn the way that size is saved, fitted
   within its LOGO_SIZES bound (web/content.py) at one CSS pixel per image
   pixel and never enlarged, so a favicon looks tiny beside a menu logo.
   The large logo (1024 pixels) is capped at its box. Each size's box has its
   own fixed height (at least 6rem, room for the empty text), and the
   image shrinks only when the column is narrower than the bound. The bounds
   are checked against LOGO_SIZES by test_admin_branding.py. */
[data-logo-size=favicon] { --logo-width: 32px; --logo-height: 32px; }
[data-logo-size=icon] { --logo-width: 128px; --logo-height: 128px; }
[data-logo-size=menu] { --logo-width: 512px; --logo-height: 128px; }
[data-logo-size=large] { --logo-width: 1024px; --logo-height: 16rem; }
[data-logo-size] .file-preview-box { height: max(6rem, calc(var(--logo-height) + 1rem + 2px)); }
[data-logo-size] .file-preview-box img { max-width: min(100%, var(--logo-width)); max-height: min(100%, var(--logo-height)); }
/* Parish logos' current logos (#2279): one fixed-size preview box per size,
   above the upload form. Each frame's width comes from its size alone
   (wide enough for its bound, or the column), and frames wrap by the
   window's width alone, so logos appearing or changing never move the form
   below. The caption is kept to one line for the same reason. */
.logo-frames { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 1rem; }
.logo-frame { margin: 0; min-width: 0; flex: 0 0 min(100%, max(8rem, calc(var(--logo-width) + 1rem + 2px))); }
.logo-frame .file-preview-box { margin-block-end: .25rem; }
.logo-frame figcaption { margin-block-end: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The delivery warning's live region stays in the tree; it takes a full row
   only when its notice is shown, and adds no height while empty. */
.site-header > [role=status] { order: 11; flex: 1 0 100%; }
.site-header > [role=status] .notice { margin-block: .75rem 0; }
.site-header > .help { font-size: .875rem; }
[data-background-indicator], [data-presence-indicator] { display: inline-block; min-height: 44px; margin-block: .25rem; padding: .6rem .9rem; line-height: 1.4; border: 1px solid var(--border); border-radius: 999px; background: var(--paper-soft); color: var(--ink); font-size: .875rem; font-weight: 550; text-decoration: none; }
[data-background-indicator]:hover, [data-presence-indicator]:hover { border-color: var(--accent); color: var(--accent-strong); }
/* Each pill's counts, its "status unavailable" sentence and an invisible
   copy of that sentence (.pill-size, as .field-error-size does for field
   errors) share one grid cell. The copy always reserves the sentence's
   size, so a failed poll (ui-v1.js un-hides the sentence, and the counts
   give way to it) changes the pill's text, never its size, and nothing in
   the header or below it moves (#1643). visibility: hidden also drops the
   counts from the accessibility tree, so the link's name is the sentence. */
:is([data-background-indicator], [data-presence-indicator]) { display: inline-grid; align-items: center; }
:is([data-background-indicator], [data-presence-indicator]) > * { grid-area: 1 / 1; }
.pill-size { visibility: hidden; }
:is([data-background-indicator], [data-presence-indicator]):has(> :is([data-background-unavailable], [data-presence-unavailable]):not([hidden])) > :first-child { visibility: hidden; }
/* The delivery warning's two links (the other mode's, then this mode's,
   #1576) sit side by side: each is a full 24px target with room between
   them. The gap is the second link's own margin, so the first never moves
   when the second disappears. */
[data-delivery-warning] a { display: inline-block; min-block-size: 24px; }
[data-delivery-other]:not([hidden]) + [data-delivery-here] { margin-inline-start: 1rem; }
/* The header's Find a Family box (#561): a search field whose results drop
   down beneath it over the page, ordinary links in a panel. On narrow
   screens it takes a full row under the brand. */
.find-family { position: relative; flex: 0 1 22rem; margin-block: .25rem; }
.find-family form { margin: 0; }
.find-family input[type=search] { width: 100%; min-height: 44px; }
.find-family-results { position: absolute; z-index: 15; inset-inline: 0; top: calc(100% + .25rem); max-height: min(28rem, 70vh); overflow-y: auto; padding: .5rem; border: 1px solid var(--control-border); border-radius: var(--radius-small); background: var(--paper); box-shadow: var(--shadow); }
.find-family-results[hidden] { display: none; }
.find-family-summary { margin: .25rem .5rem .5rem; color: var(--muted); font-size: .875rem; }
.find-family-list { list-style: none; margin: 0; padding: 0; }
.find-family-list a { display: block; min-height: 44px; padding: .5rem; border-radius: var(--radius-small); color: var(--ink); text-decoration: none; }
.find-family-list a:hover, .find-family-list a:focus-visible { background: var(--accent-soft); }
.find-family-list li:not(:has(a)) { padding: .5rem; }
.find-family-name { font-weight: 600; }
.find-family-detail { display: block; color: var(--muted); font-size: .85rem; }
.find-family-more { margin: .5rem .5rem .25rem; }
@media (max-width: 40rem) { .find-family { flex: 1 0 100%; } }
/* The Appearance switch (#1264, admin-appearance.html): three 36px icon
   segments at the top right of every Admin header, sign-in and setup too.
   Each native radio covers its segment, invisible, as in the Basic /
   Advanced toggle, so the group keeps its keyboard behaviour and names. The
   selected segment is drawn from data-theme-choice, which admin-gate-v1.js
   sets in the head, so it is right from the first paint; choosing changes
   only colours, never a size (no layout shift). */
.appearance-switch { display: inline-flex; flex: none; margin-block: .25rem; padding: 2px; gap: 2px; border: 1px solid var(--control-border); border-radius: var(--radius-small); background: var(--paper-soft); }
.appearance-switch label:has(> input[type=radio]) { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; min-height: 0; height: 36px; margin: 0; padding: 0; border-radius: calc(var(--radius-small) - 2px); color: var(--muted); }
.appearance-switch label:has(> input[type=radio]) > input { inset: 0; width: 100%; height: 100%; opacity: 0; }
.appearance-switch svg { width: 18px; height: 18px; pointer-events: none; }
.appearance-switch label:has(> input[type=radio]):hover { background: var(--accent-soft); color: var(--accent-strong); }
:is(html[data-theme-choice=light] [data-choice=light], html[data-theme-choice=dark] [data-choice=dark], html[data-theme-choice=auto] [data-choice=auto]):is(.appearance-switch label) { background: var(--accent); color: var(--paper); }
.appearance-switch label:has(> input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
/* Forced colours drop backgrounds, so the selected segment keeps a system
   highlight of its own. */
@media (forced-colors: active) {
  :is(html[data-theme-choice=light] [data-choice=light], html[data-theme-choice=dark] [data-choice=dark], html[data-theme-choice=auto] [data-choice=auto]):is(.appearance-switch label) { forced-color-adjust: none; background: Highlight; color: HighlightText; }
}
/* Wider than a phone, the switch is pinned to the header's top right corner,
   level with the first row, and the header keeps its width clear on every
   row, so the Find a Family box and status pills wrap before reaching it
   instead of pushing it onto a lower row. The minimum height is the first
   row's usual height, for a header with only the parish name (sign-in). */
@media (width > 40rem) {
  .site-header:has(> .appearance-switch) { min-height: calc(2.25rem + 52px); padding-inline-end: calc(var(--header-inline) + 118px + 1rem); }
  .site-header > .appearance-switch { position: absolute; top: calc(1.25rem + 5px); inset-inline-end: var(--header-inline); margin: 0; }
}
/* On a phone the header's items each take a row, so the switch follows the
   parish name on the first row instead (the name wraps to make room, down
   to a 320px screen) and everything else moves below it. */
@media (max-width: 40rem) {
  .site-header > .brand { flex-basis: 0; min-width: 0; }
  .site-header > .appearance-switch { order: 1; }
  .site-header > :not(.brand, .appearance-switch, [role=status]) { order: 2; }
}

/* Generic navigation lists (header and pagination) */
nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1rem; }
nav a { display: inline-block; min-height: 44px; padding: .5rem; }
/* Pagination and page-level navigation inside the content area */
main nav { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-block: 1.5rem; color: var(--muted); }
main nav ul { gap: .5rem; }
main nav a { padding: .5rem 1rem; border: 1px solid var(--control-border); border-radius: var(--radius-small); background: var(--paper); color: var(--accent); font-weight: 600; text-decoration: none; }
main nav a:hover { background: var(--accent-soft); color: var(--accent-strong); }
main nav form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }

/* Layout */
main { flex: 1 0 auto; width: 100%; max-width: 74rem; margin: 0 auto; padding: 2rem 1rem 4rem; min-height: 65vh; overflow-wrap: anywhere; }
.flow { max-width: 42rem; margin-inline: auto; }
.flow.panel { margin-top: clamp(1rem, 5vh, 3rem); }
/* The Admin portal requires JavaScript (#565). admin-base.html renders a
 * js-required class on <html> and admin-gate-v1.js removes it before the body
 * is parsed. While the class is present, only the "needs JavaScript" panel
 * shows; display: none also makes every hidden link, button and form control
 * unreachable. !important keeps a later layout rule from revealing content.
 * The panel also carries the hidden attribute, so if this stylesheet fails
 * to load it stays hidden; the !important display: block below outranks the
 * [hidden] rule. Family pages never carry the class. */
.js-required-panel { display: none; }
html.js-required body > :not(.js-required-panel) { display: none !important; }
html.js-required .js-required-panel { display: block !important; width: 100%; max-width: 74rem; margin: 0 auto; padding: 2rem 1rem; }
img { max-width: 100%; height: auto; }
/* The site footer (ui-conventions "Site footer", #2354): one quiet, centred
   line of links below every page's content. It is kept short (one line even
   on a 320px phone), so a page scrolled to its end gains little extra
   scroll room. Each link keeps a 24px-tall target (WCAG 2.2 target size). */
.site-footer { padding: .375rem var(--gutter); border-top: 1px solid var(--border); background: var(--paper); font-size: .75rem; line-height: 1.25; }
.site-footer ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .75rem; margin: 0; padding: 0; list-style: none; }
/* Not the 44px navigation links (nav a): a footer link is a small text
   link, with WCAG 2.2's 24px minimum target height. */
.site-footer a { min-height: 0; padding: .3rem 0; color: var(--muted); }
.public-page h2 { margin-top: 2rem; }

/* Admin shell: a sidebar menu beside the content, desktop-first. On narrow
   screens the sidebar is a collapsed "Menu" disclosure above the content
   (ui-v1.js closes it there). */
.admin-shell { flex: 1 0 auto; width: 100%; max-width: 94rem; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); }
.admin-shell > main { max-width: none; margin: 0; min-width: 0; }
/* Line the header up with the wider Admin shell. */
.admin-body .site-header { --header-inline: max(1rem, calc((100% - 94rem) / 2 + 1rem)); }
.admin-sidebar { padding: 1rem 1rem 0; }
.admin-menu > summary { display: inline-flex; align-items: center; min-height: 44px; padding: .5rem 1rem; border: 1px solid var(--control-border); border-radius: var(--radius-small); background: var(--paper); color: var(--accent); font-weight: 650; cursor: pointer; }
.admin-sidebar ul { display: block; list-style: none; margin: 0; padding: 0; }
.admin-sections { margin-top: .75rem; }
/* Menu groups read as separate, collapsible groups: each title is a
   disclosure summary styled as a small, muted, uppercase label with an arrow
   for its open or closed state, a divider above every group after the first,
   and the group's links indented beside a rule (accent-colored for the
   current page's group). Links stay normal weight; the current page is a
   solid accent block in bolder type. */
.admin-sections > li + li { margin-top: .75rem; }
.admin-sections > .admin-section { margin-top: 1.25rem; }
.admin-section + .admin-section { padding-top: 1rem; border-top: 1px solid var(--border); }
/* The groups are bare disclosures: none of the shared details/summary box
   (border, padding, margins, 44px summary), so the menu stays as dense as a
   heading and its links. */
.admin-group, .admin-group[open] { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; }
.admin-sidebar .admin-section-title { display: flex; align-items: center; gap: .4rem; min-height: 24px; margin: 0 0 .25rem; padding: 0 .75rem; border-radius: var(--radius-small); font-size: .75rem; font-weight: 700; line-height: 1.4; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); cursor: pointer; list-style: none; }
.admin-sidebar .admin-section-title::-webkit-details-marker { display: none; }
/* The arrow: a small chevron pointing right when closed and down when open. */
.admin-sidebar .admin-section-title::before { content: ""; flex: none; width: .4rem; height: .4rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.admin-group[open] > .admin-section-title::before { transform: rotate(45deg); }
.admin-sidebar .admin-section-title:hover { color: var(--accent-strong); }
.admin-section.is-current .admin-section-title { color: var(--accent-strong); }
.admin-group > ul { margin-inline-start: .75rem; padding-inline-start: .5rem; border-inline-start: 2px solid var(--border); }
.admin-section.is-current .admin-group > ul { border-inline-start-color: var(--accent); }
.admin-group li { position: relative; }
/* WebKit keeps laying out an open group nested inside the closed narrow-screen
   Menu disclosure, so its entries would still show; hide a closed
   disclosure's list explicitly. */
.admin-menu:not([open]) > .admin-sections, .admin-group:not([open]) > ul { display: none; }
.admin-sidebar a { display: block; min-height: 40px; padding: .5rem .75rem; border-radius: var(--radius-small); color: var(--ink); font-weight: 400; line-height: 1.4; text-decoration: none; }
.admin-sidebar a:hover, .admin-sidebar a:focus-visible { background: var(--accent-soft); color: var(--accent-strong); }
.admin-sidebar a[aria-current=page] { background: var(--accent); color: var(--paper); font-weight: 650; }
/* A queue entry's open count (#585): a small pill after the name. */
.admin-menu-count { display: inline-block; margin-inline-start: .35rem; padding: 0 .45rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: .8125rem; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.5; }
.admin-sidebar a[aria-current=page] .admin-menu-count { background: var(--paper); }
/* An entry the role may open but that is unavailable right now: greyed out,
   still focusable, and never styled like a link that goes somewhere. Its
   grey (--unavailable) keeps 4.5:1 on the page background, so the name stays
   readable. Its reason is a small tip under it, hidden until
   admin-menu-v1.js shows it on hover, focus or tap. */
.admin-sidebar a.admin-unavailable, .admin-sidebar a.admin-unavailable:hover, .admin-sidebar a.admin-unavailable:focus-visible { background: none; color: var(--unavailable); cursor: not-allowed; }
.admin-sidebar a.admin-unavailable[aria-current] { background: var(--paper-soft); font-weight: 400; }
/* admin-menu-v1.js places a shown tip (fixed, so the sidebar's scroll area
   cannot clip it) beside its entry, or above it where there is no room. A
   tapped tip lets the next tap through to whatever is under it. */
.admin-tip { display: none; position: fixed; z-index: 20; left: 0; top: 0; width: max-content; max-width: min(20rem, calc(100vw - 1rem)); padding: .4rem .6rem; border: 1px solid var(--control-border); border-radius: var(--radius-small); background: var(--ink); color: var(--paper); font-size: .875rem; line-height: 1.4; box-shadow: 0 2px 6px rgb(0 0 0 / 20%); }
.admin-tip.is-shown { display: block; }
.admin-tip.is-tapped { pointer-events: none; }
/* An unavailable in-page control (components/disabled-control.html, rule 10):
   greyed like an unavailable menu entry. admin-menu-v1.js places its tip
   beside it, or above it where there is no room, never over the next
   control. */
.disabled-control { position: relative; display: inline-block; }
.disabled-control-link, .disabled-control-link:hover { color: var(--unavailable); text-decoration: none; cursor: not-allowed; }
/* Sign out is a POST button that looks like the menu's links, set apart at the end. */
.admin-sections > li.admin-signout { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--border); }
.admin-signout form { margin: 0; }
.admin-signout button { display: block; width: 100%; min-height: 40px; margin: 0; padding: .5rem .75rem; border: 0; border-radius: var(--radius-small); background: none; box-shadow: none; color: var(--ink); font: inherit; line-height: 1.4; text-align: start; cursor: pointer; }
.admin-sidebar .admin-signout button:not(:disabled):hover { background: var(--accent-soft); border: 0; box-shadow: none; color: var(--accent-strong); }
@media (min-width: 60rem) {
  .admin-shell { grid-template-columns: 15.5rem minmax(0, 1fr); column-gap: 1.5rem; padding-inline: 1rem; }
  .admin-sidebar { position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; padding: 1.5rem 0 2rem; }
  .admin-menu > summary { display: none; }
  .admin-sections { margin-top: 0; }
}

/* Breadcrumbs: the page's place in the Admin hierarchy, above its heading. */
main nav.breadcrumbs { display: block; margin: 0 0 1rem; font-size: .9rem; color: var(--muted); }
main nav.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .15rem .35rem; list-style: none; margin: 0; padding: 0; }
main nav.breadcrumbs li + li::before { content: "\203A"; margin-inline-end: .35rem; color: var(--muted); }
main nav.breadcrumbs a { display: inline; min-height: 0; padding: 0; border: 0; background: none; color: var(--link); font-weight: 500; text-decoration: underline; }
main nav.breadcrumbs [aria-current=page] { color: var(--ink); font-weight: 600; }

/* Step indicator for multi-step Admin flows (edit, review, apply): a
   numbered row under the breadcrumbs. Text states each step's status for
   assistive technology; the filled or outlined number only repeats it. */
.flow-steps { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; list-style: none; margin: 0 0 1.25rem; padding: 0; font-size: .9rem; color: var(--muted); }
.flow-step { display: inline-flex; align-items: center; gap: .45rem; }
.flow-step-number { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border: 2px solid currentColor; border-radius: 50%; font-size: .8rem; font-weight: 700; }
.flow-step-done .flow-step-number { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.flow-step-current { color: var(--ink); font-weight: 650; }
.flow-step-current .flow-step-number { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }

/* Typography */
h1, h2, h3, h4 { color: var(--ink); text-wrap: balance; }
h1 { font-family: var(--serif); font-size: clamp(1.75rem, 4vw, 2.4rem); font-weight: 600; line-height: 1.2; letter-spacing: -.005em; margin-block: .25rem 1.25rem; }
h2 { font-size: var(--heading-2); font-weight: var(--heading-weight); line-height: 1.35; margin-block: 1.75rem .75rem; }
h3 { font-size: var(--heading-3); font-weight: var(--heading-weight); line-height: 1.4; margin-block: 1.5rem .5rem; }
h4 { font-size: 1rem; font-weight: var(--heading-weight); margin-block: 1.25rem .5rem; }
p, ul, ol, dl { margin-block: 0 1rem; }
code, pre { font-family: var(--mono); font-size: .9em; }
pre { padding: .85rem 1rem; background: var(--paper-soft); border: 1px solid var(--border); border-radius: var(--radius-small); }
hr { border: 0; border-top: 1px solid var(--border); margin-block: 2rem; }

/* Cards */
.panel { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.1rem, 3vw, 2rem); margin-block: 1.25rem; }
.panel > :first-child, .notice > :first-child, fieldset > legend + *, fieldset > legend + [hidden] + * { margin-top: 0; }
.panel > :last-child, .notice > :last-child { margin-bottom: 0; }
/* A card inside a card is a flat inset rather than a second floating layer. */
.panel .panel { background: var(--paper-soft); box-shadow: none; }
.empty-state { text-align: center; background: transparent; border-style: dashed; border-color: var(--control-border); box-shadow: none; color: var(--muted); }
/* Overview pages (ui-conventions "Overview pages", #1673). Home's Needs attention row: short
   count lines side by side, wrapping onto more lines and stacking on a phone. */
.home-alerts { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0 0 .5rem; padding: 0; }
:where(.admin-body) .home-alerts > li.notice { flex: 1 1 20rem; margin: 0; padding: .35rem .85rem; line-height: 1.4; }
/* Home's panels, count lines and tiles are tighter than a form page's, so the overview fits a
   laptop window (1366 x 768) without scrolling, with room to spare in Linux's wider fonts
   (DejaVu Sans), where the count lines wrap onto more lines than in macOS's (#1673). */
:where(.admin-body) .panel.home-panel { padding: .75rem 1.25rem; margin-block: .5rem; }
.home-participation { margin-top: .4rem; }
.home-participation .stat-tiles { margin-bottom: .5rem; }
.home-participation .stat-tiles:last-child { margin-bottom: 0; }
.home-participation .stat-tile { padding: .4rem .85rem; gap: .1rem; }
.home-participation-foot { margin: 0; }
/* The campaign panel's fact strip: one key/value row (label above value), wrapping. */
.home-facts { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin: 0; }
.home-facts > div { display: flex; flex-direction: column; }
.home-facts dt { font-size: .85rem; font-weight: 600; color: var(--muted); }
.home-facts dd { margin: 0; font-weight: 600; }
/* A panel heading with its "See the page" link on the same line. */
.home-panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; margin-bottom: .5rem; }
.home-panel-head > h2, .home-panel-links { margin: 0; }
.home-next-steps > h2 { margin-block: 0 .4rem; }
/* Link cards (components/link-cards.html): a grid of cards, each one link whose text reads the
   page's name, then its count large and what it means. Each card is two short lines, so a row
   of three stays compact even in Linux's wider fonts (#1673): the name above what the count
   means, and the count large at the end, spanning both lines. The DOM order (name, count,
   meaning) is the order the link's name reads. 16rem columns put three cards on a row in a
   laptop window, leaving each name room for one line. The start bar reinforces the count
   (warning above zero, accent at zero); the words carry it. Hover and focus change only the
   underline, never the size (no layout shift). */
.link-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); gap: .5rem; list-style: none; margin: 0; padding: 0; }
.link-card { border: 1px solid var(--border); border-inline-start-width: .35rem; border-radius: var(--radius-small); background: var(--paper-soft); }
.link-card > a, .link-card.link-card-off { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label count" "note count"; align-items: center; column-gap: .75rem; box-sizing: border-box; height: 100%; padding: .35rem .85rem; }
.link-card > a { text-decoration: none; }
.link-card > a:hover .link-card-label, .link-card > a:focus-visible .link-card-label { text-decoration: underline; }
.link-card-label { grid-area: label; font-weight: 600; }
.link-card-count { grid-area: count; font-size: 1.5rem; font-weight: 650; line-height: 1.9rem; font-variant-numeric: tabular-nums; color: var(--ink); }
.link-card-note { grid-area: note; font-size: .875rem; line-height: 1.35; color: var(--muted); }
.link-card-attention { border-inline-start-color: var(--warning-border); }
.link-card-clear { border-inline-start-color: var(--accent); }
.link-card-off { color: var(--muted); }
/* A card with a second, small link (#1576: Sent mail's other-mode count) puts it at the card's
   end, beside the main link's count and divided from it, so the card stays two lines; on a
   narrow card it wraps under the main link. Its padding and gaps are a little tighter than a
   plain card's so both fit a third of a laptop window's row in Linux's DejaVu Sans. */
.link-card-split { display: flex; flex-wrap: wrap; }
.link-card-split > a:first-child { flex: 1 1 auto; height: auto; column-gap: .4rem; padding-inline-end: .5rem; }
.link-card > a.link-card-other { display: flex; align-items: center; flex: 0 0 auto; padding: .35rem .5rem; border-inline-start: 1px solid var(--border); font-size: .8125rem; }
.link-card > a.link-card-other:hover, .link-card > a.link-card-other:focus-visible { text-decoration: underline; }
/* A card without a count leaves the count column empty, so it needs no gap beside it. */
.link-card-off, .link-card > a:not(:has(> .link-card-count)) { column-gap: 0; }
/* My review work (#1690) is an overview page, so all five stream panels fit a laptop window
   (1366 x 768) without scrolling: each is one row, the stream's name beside its cards, as
   tight as Home's panels; on a narrow window the cards wrap under the name. On Admin Home the
   streams are h3 groups inside one panel, laid out the same way. A stream has up to four cards
   besides the rare Not seen in ParishSoft (#2101), so its cards take 12rem columns, four on a
   row in a laptop window, where a longer stage name may take two lines (the ui-conventions
   exception for these panels). The panels keep tight vertical padding and gaps so that all five,
   with Pledges greyed and its reason under each card, still fit with room to spare. */
:where(.admin-body) .panel.review-work { padding: .5rem 1.25rem; margin-block: .375rem; }
.review-work, .review-work-stream { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; }
.review-work > h2, .review-work-stream > h3 { flex: 0 0 10rem; margin: 0; }
.review-work > .link-cards, .review-work-stream > .link-cards { flex: 1 1 32rem; grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr)); }
.review-work-stream + .review-work-stream { margin-top: .75rem; }
/* Review one at a time beside the tables (review-work-split.html, #2123, R52 Part W): the One
   at a time pane, a vertical rule with "or", then the In bulk stream groups. The pane's text
   sits at its top and its button is centred in the height left below it (margin-block: auto,
   with no justify-content, and no flex gap, which auto margins would leave out of the centring),
   so it reads as the panel's main action. The split is a container,
   so the layout follows the room the panel has, whether or not the menu is open. From 48rem
   (a laptop window, menu open) the parts sit side by side; beside the pane the stream names
   take 7.5rem at a smaller size (--heading-3, 1.1rem: in Linux fonts "information" and "Limitations" are
   wider than 7rem at the heading size and broke letter by letter, train t127) and the cards
   8.5rem columns with a little less padding (and the panels a little
   less space), so four cards share a row with the name and My review work still fits a
   1366 x 768 window. A label prefers to break between words and a count never breaks (main's
   overflow-wrap: anywhere would split "review" letter by letter in a narrow card).
   Below 48rem (a phone or a narrow window) the parts stack: the pane full width with its
   button after its text (beside it while there is room), a horizontal rule with "or", then the
   tables at full width. Without the wizard the tables column is alone, as before. */
.review-work-split { container: review-work / inline-size; }
.review-work-split-row { display: flex; flex-direction: column; gap: .75rem; }
.review-work-wizard { display: flex; flex-flow: row wrap; align-items: center; gap: .5rem 1rem; box-sizing: border-box; padding: 1rem; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius-small); }
.review-work-wizard-text { flex: 1 1 16rem; display: flex; flex-direction: column; gap: .5rem; }
.review-work-kicker { display: block; font-size: .8rem; font-weight: 600; line-height: 1.4; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.review-work-wizard .review-work-kicker { color: var(--accent-strong); }
.review-work-wizard-help, .review-work-wizard-off { font-size: .9rem; line-height: 1.45; color: var(--muted); }
.review-work-wizard > .button, .review-work-wizard-off { flex: 0 1 auto; max-width: 100%; margin-block: 0; }
.review-work-or { display: flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.review-work-or::before, .review-work-or::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--border); }
.review-work-tables { min-width: 0; }
.review-work-tables > .review-work-kicker { margin-bottom: .4rem; }
/* My review work's stream panels are panels of their own: the first starts level with the pane. */
.review-work-tables > .review-work-kicker + .panel.review-work { margin-top: 0; }
@container review-work (width >= 48rem) {
  .review-work-split-row { flex-direction: row; align-items: stretch; gap: 1.25rem; }
  .review-work-wizard { flex: 0 0 13rem; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0; }
  .review-work-wizard-text { flex: none; }
  .review-work-wizard > .button, .review-work-wizard-off { margin-block: auto; }
  .review-work-or { flex-direction: column; }
  .review-work-or::before, .review-work-or::after { width: 1px; height: auto; }
  .review-work-tables { flex: 1 1 auto; }
  .review-work-wizard ~ .review-work-tables :is(.review-work > h2, .review-work-stream > h3) { flex-basis: 7.5rem; font-size: var(--heading-3); }
  .review-work-wizard ~ .review-work-tables :is(.review-work, .review-work-stream) > .link-cards { flex-basis: 20rem; grid-template-columns: repeat(auto-fit, minmax(min(8.5rem, 100%), 1fr)); }
  .review-work-wizard ~ .review-work-tables :is(.link-card > a, .link-card.link-card-off) { column-gap: .5rem; padding-inline: .6rem; }
  .review-work-wizard ~ .review-work-tables .link-card :is(.link-card-label, .link-card-note) { overflow-wrap: break-word; }
  .review-work-wizard ~ .review-work-tables .link-card-count { white-space: nowrap; }
  .review-work-wizard ~ .review-work-tables .panel.review-work { padding: .4rem .85rem; margin-block: .25rem; }
  .review-work-wizard ~ .review-work-tables > .review-work-kicker + .panel.review-work { margin-top: 0; }
}
/* A Ministry leader's My review work (review-leader-steps.html, #2405): two large, friendly
   steps, each a panel whose heading starts with a "Step N" badge, so the number shows once,
   then the step's name (it wraps beside the badge on a phone). Step 1's download is the shared export row, drawn at the large button size on this
   page only (ui-conventions "Downloaded files", Export actions). Step 2's two choices are equal
   alternatives, not steps: one grid row of two equal columns with a small "or" between them,
   each card the same structure (button, line, count) and stretched to the row's height. The
   choices are a container, so they sit side by side from 34rem of room and stack, with the
   "or" as a horizontal rule, in less (a phone). Nothing changes size on hover or focus, and
   every colour is a theme token, so dark mode follows. */
.panel.leader-step { padding: 1rem clamp(1rem, 2.5vw, 1.75rem); margin-block: .5rem; }
.leader-step-heading { display: flex; align-items: center; gap: .75rem; margin: 0 0 .5rem; }
.leader-step-badge { flex: none; padding: .3rem .8rem; border-radius: 999px; background: var(--accent); color: var(--paper); font-size: 1rem; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.leader-step-title { min-width: 0; }
.leader-step-help { margin: 0 0 .5rem; }
.leader-step .export-actions { gap: .75rem; margin-block: 0 .25rem; }
.leader-step .export-actions .button-small { min-height: var(--button-min-height); padding: .8rem 1.5rem; font-size: 1.1rem; font-weight: var(--button-weight); }
.leader-choices { container: leader-choices / inline-size; }
/* Stacked, the two 1fr rows share the taller card's height, so the choices stay one size. */
.leader-choice-row { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto 1fr; gap: .75rem; }
.leader-choice { display: flex; flex-direction: column; gap: .5rem; box-sizing: border-box; min-width: 0; padding: .85rem 1.25rem; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius-small); }
.leader-choice > * { margin: 0; }
.leader-choice > .button { display: block; width: 100%; box-sizing: border-box; }
.leader-choice-count { font-weight: 600; }
.leader-choice-number { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
@container leader-choices (width >= 34rem) {
  .leader-choice-row { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-rows: auto; gap: 1.25rem; }
  .leader-choice-or { flex-direction: column; }
  .leader-choice-or::before, .leader-choice-or::after { width: 1px; height: auto; }
}
/* Stat tiles (ui-conventions "Stat tiles", #1540), drawn by components/stat-tiles.html: a row of
   cards, wrapping, each its label, value and up to two explanation lines; a row's tiles stretch
   to one height. */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .75rem; list-style: none; margin: 0 0 1.25rem; padding: 0; }
.stat-tile { display: flex; flex-direction: column; gap: .2rem; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-small); background: var(--paper-soft); }
/* The Campaign comparison's Compare on day (#1018): a short day field with
   its button beside it, wrapping under it on the narrowest phones. A <p>,
   not a <div>, so the desktop rule that stacks a form's short fields into
   columns leaves it alone. */
.compare-day-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .25rem 0; }
.compare-day-row > * { margin: 0; }
.compare-day .compare-day-row input { width: 7rem; }
/* The Campaign comparison's pledge distribution (#1221): every year's pane
   sits in the same grid cell, so the section is as tall as the tallest
   year's and choosing another year in its selector moves nothing on the
   page. Only the chosen pane is visible; the others keep their layout
   (so their charts are drawn to the panel's width) but are hidden from
   sight, focus and assistive technology. */
.band-panes { display: grid; }
.band-panes > [data-pane] { grid-area: 1 / 1; min-width: 0; }
.band-panes > [data-pane]:not([data-shown]) { visibility: hidden; }
.band-year select { width: auto; max-width: 100%; }
.stat-label { font-weight: 600; }
/* Every value's line is 2.1rem tall (#1537), whatever its size. A tile drawn by the component
   (data-stat) keeps its value on one line, drawn smaller when it is long (StatTile.fit), so a
   fresh answer's wider figure never wraps and makes its row taller in place, moving everything
   below under the reader's pointer. A one-line value must also stay inside its tile, so a row
   of component tiles has a wider minimum column (12.5rem, not 10rem): the row drops to three
   or two across before a tile is too narrow for its value. In rem, so it scales with the
   reader's font size; min() keeps a row in a narrower container from overflowing it. In
   Linux's wide fonts each size then fits its longest value (9, 13 and 17 characters, such as
   "$9,999,999.99" at 13) inside the tile at every width. Not sized to the tile with container
   units: a size container makes WebKit's scroll anchoring jump the page when an in-place
   answer replaces it. Tiles still drawn by hand keep wrapping until they move onto the
   component (#1540). */
.stat-value { font-size: 1.75rem; font-weight: 650; line-height: 2.1rem; font-variant-numeric: tabular-nums; }
.stat-tiles:has(> [data-stat]) { grid-template-columns: repeat(auto-fit, minmax(min(12.5rem, 100%), 1fr)); }
.stat-tile[data-stat] .stat-value { white-space: nowrap; }
.stat-value-long { font-size: 1.25rem; }
.stat-value-longest { font-size: 1rem; }
/* On a phone even one tile per column of two is too narrow for a one-line value, so every
   .stat-tiles row stacks, those still drawn by hand (home, campaign comparison, financial
   report, ministry follow-up) as well as the component's. */
@media (max-width: 40rem) { .stat-tiles, .stat-tiles:has(> [data-stat]) { grid-template-columns: 1fr; } }
/* A stacked tile can still be narrower than 12.5rem, its values' design width, when the window
   is very narrow and the text large (320px at 150%, #1667): a one-line value then made its tile
   and the page wider than the window. So on a phone each size shrinks in step with the room
   left for a value: --stat-room is the window less the page's and the tile's gutters and
   padding (5.75rem) and 20px for a scrollbar and rounding, and each size's divisor is the
   12.5rem tile's 10.5rem of room over that size in rem (1.75rem: 6; 1.25rem: 8.4; 1rem: 10.5),
   so a value that fits the 12.5rem tile fits the narrower one. min() keeps the usual size
   wherever it fits, and 12px keeps a value legible at extreme text sizes. Window units, not
   container units, for the WebKit scroll anchoring noted above; the line stays 2.1rem tall,
   so nothing moves. Only the component's tiles do this: hand-drawn ones wrap instead. */
@media (max-width: 40rem) {
  .stat-tile[data-stat] { --stat-room: calc(100vw - 5.75rem - 20px); }
  .stat-tile[data-stat] .stat-value { font-size: clamp(12px, var(--stat-room) / 6, 1.75rem); }
  .stat-tile[data-stat] .stat-value-long { font-size: clamp(12px, var(--stat-room) / 8.4, 1.25rem); }
  .stat-tile[data-stat] .stat-value-longest { font-size: clamp(12px, var(--stat-room) / 10.5, 1rem); }
}
/* Balanced lines (#1537): a component row of four or five tiles never leaves one tile alone on
   a line. Each track's minimum is 12.5rem while the whole row fits on one line, and otherwise a
   half (four tiles) or a third (five) of the row, so four go 4 or 2 + 2 across and five go 5 or
   3 + 2. "(W - 100%) * 100000" is at most zero once the row is W wide (all its tiles at 12.5rem
   and the gaps), and huge before: one layout unit under W (1/64px in Chromium and WebKit, 1/60px
   in Firefox) already makes it over 1,500px, past any half or third, so no real row width lands
   between. (A smaller "* 999" left a band of up to 0.4px under each W where the term lay between
   12.5rem and a half, and a row there drew 3 + 1 or 2 + 2 + 1.) The huge values are safe: an
   engine caps a length it cannot hold, and clamp() and min() then pick their other argument. A
   half under 12.5rem leaves clamp() its 12.5rem minimum, so four tiles stack; five whose third
   is under 12.5rem (a row under 39rem) stack too, through the max() with the full width, rather
   than go 2 + 2 + 1. Not a container query, for the WebKit scroll anchoring noted above. Phones
   still stack. */
@media (min-width: 40.0625rem) {
  .stat-tiles:has(> [data-stat]:nth-child(4):last-child) { grid-template-columns: repeat(auto-fit, minmax(clamp(12.5rem, (52.25rem - 100%) * 100000, (100% - .75rem) / 2), 1fr)); }
  .stat-tiles:has(> [data-stat]:nth-child(5):last-child) { grid-template-columns: repeat(auto-fit, minmax(max(clamp(12.5rem, (65.5rem - 100%) * 100000, (100% - 1.5rem) / 3), min(100%, (39rem - 100%) * 100000)), 1fr)); }
}
.stat-detail { color: var(--muted); font-size: .875rem; }
/* Mail queue (#1562): the other mode's line keeps one line's height while empty, so the
   table below never moves when it appears (no layout shift); a kind's zero counts are muted. */
.mail-queue-other { min-height: 1.6em; min-height: 1lh; margin-block: .5rem 0; }
.mail-queue-zero { color: var(--muted); }
/* An unknown value's "—" carries its reason in a toggletip beside it (#1540), its "i" at the
   size it has elsewhere. The 1.75rem button is centred in the value's 2.1rem line from its top,
   so it never makes the line taller: a value that becomes unknown in place moves nothing. */
.stat-value .toggletip { vertical-align: top; line-height: 1; margin-top: .175rem; }
.stat-value .toggletip-button { font-size: 1rem; }
/* A tile's share bar (#720) sits at the tile's foot, so the bars of a row's tiles (stretched to one height) line up. */
.stat-bar { display: block; margin-top: auto; padding-top: .35rem; }
/* The empty track must read as the whole against the tile's --paper-soft:
   the shared track token (about 1.3:1 alone) plus a --control-border edge
   (above 3:1), so a 10% bar reads as a tenth of a bar, not a short line. */
.stat-bar progress { display: block; background: var(--track); border: 1px solid var(--control-border); }
.stat-bar progress::-webkit-progress-bar { background: var(--track); }

/* Key/value lists become two columns once there is room for them. */
dt { font-weight: 600; }
dd { margin: 0 0 .5rem; }
@media (min-width: 40rem) {
  dl { display: grid; grid-template-columns: minmax(6rem, max-content) minmax(0, 1fr); gap: .5rem 1.5rem; }
  dt { grid-column: 1; color: var(--muted); }
  dd { grid-column: 2; margin: 0; }
}

/* Forms */
label, legend { font-weight: 600; }
label { display: block; margin-block: 1rem .35rem; }
.help, .helptext { color: var(--muted); font-size: .925rem; }
label + .help, label + .helptext, .label-row + .help, .label-row + .helptext { margin-block: -.15rem .5rem; }
.errorlist { list-style: none; padding: 0; margin-block: .25rem .5rem; color: var(--error-ink); font-weight: 600; }
/* A field checked as it is typed keeps one line for its error, shown or not,
   so the message coming and going never moves the controls below (#944).
   The line takes its field's width but never widens it (width 0, at least
   the column): a short date field shares its row with Review on desktop,
   and a long message must not push that button onto the next line. */
.field-error-line { min-height: 1.6em; min-height: 1lh; margin-block: .25rem .5rem; width: 0; min-width: 100%; }
.field-error-line > .errorlist { margin: 0; }
/* A line that keeps room for a message shown live sizes itself by an
   invisible copy of it (.field-error-size), so the message never needs
   more room than the line has, however the reader's fonts wrap it. */
.field-error-line:has(> .field-error-size) { display: grid; }
.field-error-line:has(> .field-error-size) > * { grid-area: 1 / 1; }
.field-error-size { visibility: hidden; font-weight: 600; }
/* A sentence that another one replaces in place (a status region's swap)
   keeps the room of both: each is drawn over an invisible copy of the
   other, so the swap never moves what follows, however the reader's fonts
   wrap them (Home's Create the campaign reason, #1619). */
.sized-text { display: grid; }
.sized-text > * { grid-area: 1 / 1; }
.sized-text > [aria-hidden=true] { visibility: hidden; }
.error { color: var(--error-ink); font-weight: 600; }
/* Legends float inside the box so a fieldset reads as a titled card. */
fieldset { border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper); margin-block: 1.25rem; min-width: 0; padding: 1rem 1.25rem 1.25rem; }
fieldset > legend { float: left; width: 100%; padding: 0; margin-bottom: .5rem; font-size: var(--card-heading); }
/* Every sibling after the floated legend clears it, not just the next one:
   a hidden element (e.g. an error line) there would otherwise leave the
   first visible row flowing beside the float, so a checkbox label's text
   dropped below its absolutely positioned box. */
fieldset > legend ~ * { clear: both; }
/* A legend's "i" sits beside its words, as a label's does in its .label-row
   (field-tip.html's fieldset, a hand-drawn tip after a legend; #2144): the
   legend shrinks to its words, leaving the tip room on its first line even
   when the words wrap (a phone), and the tip floats after it. A
   legend must stay the fieldset's first child, so the tip cannot share a
   row element with it. Flex fieldsets (.choice-pair) ignore the floats. */
fieldset > legend:has(+ .toggletip) { width: auto; max-width: calc(100% - 2.15rem); margin-inline-end: .4rem; }
fieldset > legend + .toggletip { float: left; clear: none; }
fieldset.panel > legend { font-size: var(--heading-2); font-weight: var(--heading-weight); }
input, textarea, select, button { font: inherit; max-width: 100%; }
input:not([type=checkbox], [type=radio], [type=hidden]), textarea, select { display: block; width: 100%; min-height: 44px; padding: .65rem .85rem; border: 1px solid var(--control-border); border-radius: var(--radius-small); background: var(--paper); color: var(--ink); box-shadow: inset 0 1px 2px rgb(16 24 40 / 6%); transition: border-color .15s, box-shadow .15s; }
input:not([type=checkbox], [type=radio], [type=hidden]):hover, textarea:hover, select:hover { border-color: var(--ink); }
input:not([type=checkbox], [type=radio], [type=hidden]):focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input:not([type=checkbox], [type=radio], [type=hidden]):focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 2px; }
textarea { min-height: 8rem; resize: vertical; }
/* WebKit lets a long selected option overflow a width-constrained select, and
   Linux WebKit's native menulist ignores width: 100% and keeps the widest
   option's width, so drop a dropdown's native appearance and draw the arrow
   ourselves (a self-hosted file: the CSP admits no data: images). */
select { min-width: 0; }
select:not([multiple]):not([size]) { overflow: hidden; text-overflow: ellipsis; -webkit-appearance: none; appearance: none; padding-right: 2.5rem; background-image: url("select-arrow-v1.svg"); background-repeat: no-repeat; background-position: right .85rem center; background-size: 1rem; }
/* List boxes (multi-selects) keep their native look and a vertical scroll bar;
   a parish may offer hundreds of Ministries. Long option text is clipped
   rather than widening the page. */
select[multiple], select[size] { height: 12rem; overflow-x: hidden; overflow-y: auto; resize: vertical; padding: .35rem; }
@media (forced-colors: active) { select:not([multiple]):not([size]) { -webkit-appearance: auto; appearance: auto; background-image: none; } }
input:disabled, textarea:disabled, select:disabled { background: var(--paper-soft); color: var(--muted); cursor: not-allowed; }
input[type=checkbox], input[type=radio] { width: 1.5rem; height: 1.5rem; margin: 0; accent-color: var(--accent); cursor: pointer; }
/* A label wrapping its own checkbox or radio is a roomy, tappable row. The
   control is positioned rather than laid out with flexbox so the label text
   still wraps (an anonymous flex item may not shrink in every browser). */
label:has(> input[type=checkbox], > input[type=radio]) { position: relative; min-height: 44px; padding-block: .55rem; padding-inline-start: 2.2rem; margin-block: .25rem; font-weight: 450; cursor: pointer; }
label:has(> input[type=checkbox], > input[type=radio]) > input { position: absolute; inset-inline-start: 0; top: .6rem; }
label.changed:has(> input[type=checkbox], > input[type=radio]) { padding-inline-start: 2.95rem; }
label.changed:has(> input[type=checkbox], > input[type=radio]) > input { inset-inline-start: .75rem; }
input[aria-invalid=true], textarea[aria-invalid=true], select[aria-invalid=true] { border: 2px solid var(--error-border); }
/* A choice group (checkboxes or radios) with an unanswered required choice;
   only groups marked .choice-group, never a whole Member section or panel. */
fieldset.choice-group:has(> label > input:is([type=checkbox], [type=radio])[aria-invalid=true]) { border: 2px solid var(--error-border); }
/* The Mail message page's resolution question (#1563). Every answer of one
   question shares one grid cell (.choice-slot), so the cell is as tall as
   its tallest answer before anything is chosen, and choosing or changing an
   answer never moves what follows (no layout shift, #736). An answer not
   chosen keeps its space but is invisible (ui-v1.js also makes it inert);
   each answer's button sits at the bottom of the cell, a nested question's
   cell filling the rest of its answer. The note starts two lines tall and
   grows with what is typed, where the browser can. */
.choice-slot { display: grid; }
.choice-slot > [data-choice-panel] { grid-area: 1 / 1; display: flex; flex-direction: column; min-width: 0; margin: 0; }
.choice-slot > [data-choice-panel] > .choice-slot { flex: 1; }
[data-choice-panel][data-choice-hidden] { visibility: hidden; }
.choice-answer > .choice-submit { margin-top: auto; padding-top: .5rem; }
.choice-answer textarea { field-sizing: content; min-height: 3lh; max-height: 12lh; }
/* The questions are compact, so the reserved slot stays short: the
   answers sit side by side (wrapping on a phone) and a question inside the
   outcome panel draws no card of its own. */
.outcome-panel fieldset.choice-question { border: 0; background: none; padding: 0; margin-block: .75rem; }
.choice-question > .choice-options { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }

/* Field sizing. A field is only as wide as its content needs: dates, times
   and numbers are short, dropdowns medium, free text wider, and long text
   full width. Widgets may choose explicitly with the size-* classes (xs to l)
   when a field's content is shorter than its type suggests, such as a code. */
input:is([type=date], [type=time], [type=datetime-local], [type=month]) { max-width: 12rem; }
input[type=number] { max-width: 10rem; }
input:is([type=email], [type=url], [type=tel]) { max-width: 34rem; }
input:is([type=text], [type=search], [type=password], :not([type])) { max-width: 40rem; }
/* An address or link typed in a text box that asks for an email or URL
   keyboard (a shared format rule's field, #1577) is as wide as those types. */
input:is([inputmode=email], [inputmode=url]) { max-width: 34rem; }
/* A typed time of day (#631) is as short as a native time control; a list of
   times is medium. Its reading (ui-v1.js) sits under the box in the help
   style, and in the error style while the entry cannot be read; a visually
   hidden live region beside it announces the reading. The line keeps one
   line's height while empty, so a reading appearing does not move the
   controls below it. */
input[data-time-entry=time] { max-width: 12rem; }
input[data-time-entry=list] { max-width: 24rem; }
.time-reading { color: var(--muted); font-size: .925rem; margin: .25rem 0 0; min-height: 1.6em; min-height: 1lh; }
.time-reading.is-error { color: var(--error-ink); font-weight: 600; }
/* A complete gate's hint that keeps its space (data-complete-hint="reserve",
   ui-v1.js): one line's height while empty, so the hint coming and going
   never moves the content after it (#953, the System logs table). */
[data-complete-hint=reserve] { min-height: 1.6em; min-height: 1lh; }
/* Inside a filter bar (the Family directory) the hint takes a line of its
   own under the fields, not a place in their row (#563). */
.filter-bar > [data-complete-hint] { flex-basis: 100%; margin: 0; }
/* System logs shows the server's refusal of a filter (#1332) in its gate's
   reserved hint row, not in a line of its own, so the page is no taller
   for it: the message and the hint share one grid cell, at the hint's
   size, and the hint is hidden while the message shows (the two say the
   same words for the same rule). The message's line is drawn empty, and
   so takes no height, except on a refused page, where its invisible copy
   keeps the row's height once the message clears (No layout shift). */
.log-filter-messages { display: grid; margin-block: 0 1rem; font-size: .925rem; }
.log-filter-messages > * { grid-area: 1 / 1; margin: 0; }
.log-filter-messages > .field-error-line { min-height: 0; }
.log-filter-messages:has(> .field-error-line > .errorlist:not([hidden])) > [data-complete-hint] { visibility: hidden; }
/* The same for a form's own hint row (#1332, first made for the Follow-up
   packet's limit, removed by #2394; the filter bars below use it too): the
   server's message and the gate's hint share one cell. The row takes the hint's paragraph
   margin, and only while the hint shows or on a refused page, where the
   message's invisible copy keeps the row's height once it clears (No
   layout shift), so the margin collapses as the hint's alone did and an
   ordinary page lays out exactly as before. */
.hint-row-messages { display: grid; }
.hint-row-messages > * { grid-area: 1 / 1; margin: 0; }
.hint-row-messages > .field-error-line { min-height: 0; font-size: .925rem; }
.hint-row-messages > .field-error-line > .field-error-size:empty { display: none; }
/* Not in a filter bar, whose gap spaces its items (below, #1332). */
.hint-row-messages:not(.filter-bar > *):has(> [data-complete-hint]:not([hidden]), > .field-error-line > .field-error-size:not(:empty)) { margin-block: 0 1rem; }
.hint-row-messages:has(> .field-error-line > .errorlist:not([hidden])) > [data-complete-hint] { visibility: hidden; }
/* A form whose message line sits apart from its gate's reserved hint row
   (the Additional information queue's Submitted dates, #1469): the hint,
   in the server's words, is held hidden while the line shows them, so the
   form says it once. Both keep their room, so nothing moves either way and
   an unrefused page lays out as before. */
.filter-line-hides-hint:has(> .field-error-line > .errorlist:not([hidden])) > [data-complete-hint] { visibility: hidden; }
/* A reason line that keeps one line's height while empty, so its text
   coming or going never moves what follows (no layout shift; the Restore
   review's held-email rows, #537). */
.reserve-line { min-height: 1.6em; min-height: 1lh; }
/* An open preview the status has moved past (live-status-v1.js,
   data-live-stale; System health's Accept this change once, #530) says so
   on a reserved line (reserve-lines-wrap), in the error colour. */
[data-live-stale-note] { color: var(--error-ink); font-weight: 600; }
/* The answer to a row's action on a worklist (#528, Census changes and Roster
   changes to enter): two lines kept while empty, so the answer appearing
   never moves the table under the pointer. */
.action-status { min-height: 3.2em; min-height: 2lh; margin-block: .5rem; font-weight: 600; }
.action-status > p { margin: 0; }
/* A review worklist's notice (#1681) sits between its filters and its
   table and is one line, kept while empty (R38 finding 10): it answers the
   reader's own last decision, so it needs no second line, and its margins
   are the gap the table would have under the filters anyway. */
/* A longer notice (a long item name; Linux's wider fonts wrapped the
   overtaken-decision notice at 700 and 1024 px) is cut short with an
   ellipsis rather than taking another line, as .review-outcome is. The
   line is not a live region: the element still holds the whole text, so
   a screen reader reading it hears it whole, and the decision itself is
   announced by ui-v1.js's shared announce(). */
.action-status.worklist-notice { min-height: 1.6em; min-height: 1lh; margin-block: 0 .5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* On a phone a notice naming its item can wrap (Linux's wider fonts wrap
   it at 390 px), so the line keeps two lines there, still with no margin
   above it. */
@media (max-width: 40rem) { .action-status.worklist-notice { min-height: 3.2em; min-height: 2lh; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; white-space: normal; } }
/* A status line that wraps keeps the lines it can take (#757): two, or
   three on a phone, where a long sentence in a wide font needs a third. Its
   emptying then never moves the buttons below it. */
.reserve-lines-wrap { min-height: 3.2em; min-height: 2lh; }
@media (max-width: 40rem) { .reserve-lines-wrap { min-height: 4.8em; min-height: 3lh; } }
/* Take a backup now's offered form has the bottom margin the disabled
   button's paragraph has, so the button and the line under it keep their
   places as a request starts and ends. */
.backup-offer { margin-block: 0 1rem; }
/* Its held line (with the toggletip and the link) takes a fourth line on a
   phone, so every state of the line keeps four there. */
@media (max-width: 40rem) { .backup-line { min-height: 6.4em; min-height: 4lh; } }
select:not([multiple]):not([size]) { max-width: 26rem; }
select[multiple], select[size] { max-width: 40rem; }
textarea { max-width: 56rem; }
:is(input, select, textarea).size-xs { max-width: 7rem; }
:is(input, select, textarea).size-s { max-width: 12rem; }
:is(input, select, textarea).size-m { max-width: 20rem; }
:is(input, select, textarea).size-l { max-width: 34rem; }
:is(input, select, textarea).size-full { max-width: none; }
/* A Django field group (label, help, errors, control) shows its help text
   directly under the control, in the smaller muted help style. The help keeps
   its aria-describedby link, so the reading order for assistive technology is
   unchanged in meaning. */
:is(form, fieldset, :where(.field-pair)) > div:has(> .helptext):not(:has(> input[type=checkbox]):not(:has(> :is(select, textarea, input:not([type=checkbox], [type=hidden]))))) { display: flex; flex-direction: column; clear: both; }
:is(form, fieldset, :where(.field-pair)) > div:has(> .helptext):not(:has(> input[type=checkbox]):not(:has(> :is(select, textarea, input:not([type=checkbox], [type=hidden]))))) > .helptext { order: 1; margin: .35rem 0 0; }
/* A single yes/no checkbox sits beside its label, with any help below the
   label, instead of on a line of its own; so does each box of a group that
   needs one ticked (data-require-one, Campaign settings' modules, #2144), so
   every box of the group lines up, first, in the same place, and so does
   each box of campaign-fields.html where Copy campaign draws it in a
   .campaign-fields panel rather than straight in its form. */
:is(form, fieldset, :where([data-require-one], .campaign-fields)) > div:has(> input[type=checkbox]):not(:has(> :is(select, textarea, input:not([type=checkbox], [type=hidden])))) { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .65rem; align-items: center; margin-block: .85rem; clear: both; }
:is(form, fieldset, :where([data-require-one], .campaign-fields)) > div:has(> input[type=checkbox]):not(:has(> :is(select, textarea, input:not([type=checkbox], [type=hidden])))) > input[type=checkbox] { grid-column: 1; grid-row: 1; }
:is(form, fieldset, :where([data-require-one], .campaign-fields)) > div:has(> input[type=checkbox]):not(:has(> :is(select, textarea, input:not([type=checkbox], [type=hidden])))) > label { grid-column: 2; grid-row: 1; margin: 0; font-weight: 550; cursor: pointer; }
:is(form, fieldset, :where([data-require-one], .campaign-fields)) > div:has(> input[type=checkbox]):not(:has(> :is(select, textarea, input:not([type=checkbox], [type=hidden])))) > :is(.helptext, .errorlist) { grid-column: 2; margin: .2rem 0 0; }
/* One radio of a group, drawn as a div holding the radio and its own label
   (Edit scheduled email's Apply this edit to and Delete, #1656): the circle
   beside its words, as a lone checkbox is above, with that choice's help or
   unavailable reason under the words. The options read as answers, not
   questions, so their words keep the ordinary option weight. User roles
   (.choice) lay out their own. */
:is(form, fieldset) > div:not(.choice):has(> input[type=radio]):not(:has(> :is(select, textarea, input:not([type=radio], [type=hidden])))) { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .65rem; align-items: center; margin-block: .5rem; clear: both; }
:is(form, fieldset) > div:not(.choice):has(> input[type=radio]):not(:has(> :is(select, textarea, input:not([type=radio], [type=hidden])))) > input[type=radio] { grid-column: 1; grid-row: 1; }
:is(form, fieldset) > div:not(.choice):has(> input[type=radio]):not(:has(> :is(select, textarea, input:not([type=radio], [type=hidden])))) > label { grid-column: 2; grid-row: 1; margin: 0; font-weight: 450; cursor: pointer; }
:is(form, fieldset) > div:not(.choice):has(> input[type=radio]):not(:has(> :is(select, textarea, input:not([type=radio], [type=hidden])))) > :is(.help, .helptext, .errorlist) { grid-column: 2; margin: .2rem 0 0; }
/* A locked checkbox (Campaign settings, #1119) labels itself in a .label-row
   that also holds the "i" tip with why it is locked. The row takes the
   label's place. It must be exactly as tall as the open checkbox's plain
   label, with the box in the same place, so freeing the setting moves
   nothing (no layout shift, #1630): the box centres on the first line as
   an open one does, the row's "i" stays beside a long label (the label
   wraps, not the "i") and the row never gets the extra line a wrapped "i"
   would add. Opening the tip does not grow the row (its bubble floats). */
:is(form, fieldset, :where([data-require-one], .campaign-fields)) > div:has(> input[type=checkbox]):not(:has(> :is(select, textarea, input:not([type=checkbox], [type=hidden])))) > .label-row { grid-column: 2; grid-row: 1; margin: 0; flex-wrap: nowrap; }
:is(form, fieldset, :where([data-require-one], .campaign-fields)) > div:has(> input[type=checkbox]):not(:has(> :is(select, textarea, input:not([type=checkbox], [type=hidden])))) > .label-row > label { font-weight: 550; }
/* On desktop, consecutive short fields (dates, times, numbers) share a row.
   (!important: it must win over the help-text column rule above, whose
   selector is necessarily more specific.) */
@media (min-width: 48rem) {
  :is(form, fieldset, :where(.field-pair)) > div:has(> input:is([type=date], [type=time], [type=datetime-local], [type=month], [type=number], [data-time-entry=time])):not(:has(> :is(select, textarea))):not([hidden]) { display: inline-flex !important; flex-direction: column; vertical-align: top; min-width: 12rem; margin-inline-end: 1.5rem; }
  :is(form, fieldset, :where(.field-pair)) > div:has(> input:is([type=date], [type=time], [type=datetime-local], [type=month], [type=number], [data-time-entry=time])) > :is(input, .helptext, .time-reading) { max-width: 14rem; }
  /* A short field's reserved answer line (.field-error-line, drawn before
     the control) sits under its control, not above it, so every short field
     in a row (a date beside a time, which keeps its reading line below) puts
     its box at the same height under its label (#1851). The help
     follows it, as it follows a time's reading. */
  :is(form, fieldset, :where(.field-pair)) > div:has(> input:is([type=date], [type=time], [type=datetime-local], [type=month], [type=number], [data-time-entry=time])):not(:has(> :is(select, textarea))):not([hidden]) > .field-error-line { order: 1; }
  :is(form, fieldset, :where(.field-pair)) > div:has(> input:is([type=date], [type=time], [type=datetime-local], [type=month], [type=number], [data-time-entry=time])):not(:has(> :is(select, textarea))):not([hidden]) > .helptext { order: 2; }
  /* Two short fields that belong together (Campaign settings' start and
     end dates, #2144) always share one row on desktop. A date checked as it
     is typed whose answer line has no Review beside it (a live campaign's
     end date, .field-live, #1119) takes the rest of that row, so its
     reserved line holds the longest answer in as few lines as it can; the
     line never grows past that room. At phone width each takes its own
     row, as every short field does. */
  .field-pair { display: flex; align-items: start; }
  .field-pair > div.field-live:has(> input[type=date]):not([hidden]) { display: flex !important; flex: 1 1 0; margin-inline-end: 0; }
}
/* Forms read best at a comfortable measure; forms holding a table keep the
   page width. */
main form:not(:has(table)) { max-width: 60rem; }
/* A secret field and its Show/Hide control (SecretInput, Secret fields in
   the UX conventions spec, #1475) share one row at the text field's usual
   width. Both words sit in one grid cell with the unused one invisible, so
   the button keeps the longer word's width and pressing it moves nothing
   (no layout shift, #736). The field's visually hidden name in the button
   and the status line anchor to the row (position: relative). */
.secret-field { position: relative; display: flex; gap: .5rem; align-items: stretch; max-width: 40rem; }
.secret-field > input { flex: 1 1 auto; min-width: 0; max-width: none; }
.secret-field > .secret-reveal { flex: none; display: inline-grid; place-content: center; margin: 0; }
.secret-reveal > span { grid-area: 1 / 1; }
.secret-reveal[data-shown=true] > .secret-reveal-show, .secret-reveal:not([data-shown=true]) > .secret-reveal-hide { visibility: hidden; }

/* A money field (Money inputs in the UX conventions spec, #2192): its "$"
   sits attached before the field, in the field's usual border, colors and
   height, and the label spans both above. The container is a grid rather
   than a wrapper round the field, so every rule that styles a field as its
   div's direct child (filter panels, refused-field borders) still applies.
   The field fills the rest of the row up to its usual width, so the prefix
   never pushes it past a narrow screen. */
.money-input { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: stretch; }
.money-input > :not(.money-prefix, input) { grid-column: 1 / -1; }
.money-input > input { margin-block: 0; border-start-start-radius: 0; border-end-start-radius: 0; }
.money-prefix { display: flex; align-items: center; padding-inline: .7rem; border: 1px solid var(--control-border); border-inline-end: 0; border-start-start-radius: var(--radius-small); border-end-start-radius: var(--radius-small); background: var(--paper-soft); color: var(--muted); font-weight: 600; }
/* The "$" box follows its field's border color as the field is hovered,
   focused or refused (color only, so its width never changes). */
.money-input:has(> input:hover) > .money-prefix { border-color: var(--ink); }
.money-input:has(> input:focus) > .money-prefix { border-color: var(--accent); }
.money-input:has(> input[aria-invalid=true]) > .money-prefix { border-color: var(--error-border); }

/* Buttons: primary by default; secondary for cancel, back, paging and tools. */
button, .button { display: inline-block; vertical-align: middle; border: var(--button-border-width) solid var(--accent); border-radius: var(--radius-small); padding: var(--button-padding); min-height: var(--button-min-height); background: var(--accent); color: var(--paper); font-weight: var(--button-weight); line-height: 1.3; text-align: center; text-decoration: none; cursor: pointer; margin-block: 1rem .5rem; box-shadow: 0 1px 2px rgb(16 24 40 / 12%); transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s; }
/* A button's label never breaks inside a word (#614). main's overflow-wrap:
   anywhere let a narrow table cell squeeze "Revoke" into "Revok" / "e".
   With normal wrapping a one-word label cannot wrap at all, and its full
   width counts toward its table cell's minimum, so the cell grows (a wide
   table scrolls inside its .table-scroll region). A longer label may still
   wrap between words, so it never pushes a phone-width page sideways, as
   white-space: nowrap would. Sortable column headings follow the same
   rule whether they are POST buttons or GET links (.sort-link), so the two
   kinds of heading wrap alike. */
button, .button, .link-button, .sort-link, input[type=submit], input[type=button] { overflow-wrap: normal; word-break: normal; }
/* :where() keeps the aria-disabled exclusion at zero specificity, so the
   hover rule stays as weak as before and the per-class hover overrides
   (.button-danger, .icon-button-danger, .toggletip-button, .recipient-link)
   still win. */
button:not(:disabled):not(:where([aria-disabled=true])):hover, .button:not(:where([aria-disabled=true])):hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--paper); box-shadow: 0 2px 6px rgb(16 24 40 / 16%); }
button:not(:disabled):active { box-shadow: none; }
button:disabled { cursor: not-allowed; opacity: .55; box-shadow: none; }
/* The secondary look comes only from its class ({% button variant="secondary" %}
   or class "button-secondary" in script), never from where a button sits, so
   a button's look is decided where it is drawn (#732). */
.button-secondary { background: var(--paper); color: var(--accent); border-color: var(--accent); box-shadow: none; }
.button-secondary:not(:disabled):not(:where([aria-disabled=true])):hover { background: var(--accent-soft); color: var(--accent-strong); box-shadow: none; }
/* A decision toggle with a text label (UX conventions, "Decision toggles",
   #2131; so far the Ministry request page's Entered by hand): pressed, it
   is filled in the accent colour, so the state in force shows on the
   button itself; choosing it again undoes it. Only colours change, so the
   button keeps its size and place in both states. */
.toggle-button[aria-pressed=true], .toggle-button[aria-pressed=true]:not(:disabled):not(:where([aria-disabled=true])):hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.toggle-button[aria-pressed=true]:not(:disabled):not(:where([aria-disabled=true])):hover { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--accent); }
.actions { display: flex; gap: .75rem 1rem; flex-wrap: wrap; align-items: center; }
/* A button kept focusable but unavailable (aria-disabled; a stepping
   control at the end of its range, #1656) looks as a disabled one does:
   greyed, the not-allowed pointer, no hover change (the hover rules above
   skip it). The busy "progress" pointer is only for a request in flight:
   a submitted form's buttons (the form is aria-busy), the clicked one
   (is-busy) or a button marked aria-busy itself while its fetch runs; such
   a button keeps its colours, so it does not flash grey. */
button[aria-disabled=true], .button[aria-disabled=true], input[type=submit][aria-disabled=true] { cursor: not-allowed; opacity: .55; box-shadow: none; }
:is(button, .button, input[type=submit])[aria-disabled=true]:is(.is-busy, [aria-busy=true], [aria-busy=true] *) { cursor: progress; opacity: 1; }
/* A submitted form (ui-v1.js): its clicked button turns muted with a small
   spinner and the form ignores repeat clicks until the next page loads. With
   reduced motion the spinner stays still (see the rule at the end). */
button.is-busy[aria-disabled=true], .button.is-busy[aria-disabled=true], input[type=submit].is-busy[aria-disabled=true] { background: var(--muted); border-color: var(--muted); color: var(--paper); }
/* Apply filters and Clear filters (components/filter-actions.html, #1651)
   are placed by ui-conventions "Clear filters"' three steps (#1776):
   beside the fields' last row side by side, else stacked there if that
   row keeps its height, else side by side on a row of their own. ui-v1.js
   tries the steps in order and marks the one that fits on the pair
   (data-filter-place); these rules draw each. Before the script runs (and
   in a flex filter bar it is the same answer) the pair never shrinks or
   wraps inside itself, so the bar keeps it beside the last field when both
   buttons fit there and otherwise moves it, whole, to a new line. It is
   never wider than its line, so on a screen too narrow for both buttons
   Clear wraps under Apply instead of pushing the page sideways. Both
   buttons have a smaller inline padding than other buttons (.75rem, not
   1.25rem), so side by side they fit one 14rem-and-up Filters panel cell
   (about 288 px at 1280 px) with Linux's wider fonts too. While Clear has
   nothing to do it is greyed but focusable (aria-disabled,
   data-clear-unavailable, ui-v1.js), and its reason is a floating tip like
   an unavailable control's, so its state never moves anything (no layout
   shift). The pair's own rules name the form's id, so they outrank a
   page's rules for its filter-bar cells (Sent mail's grow from 6.5rem),
   which would otherwise size the pair as one more field. */
.filter-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .5rem; vertical-align: bottom; max-width: 100%; }
#table-filters .filter-actions { flex: 0 0 auto; align-self: end; min-width: 0; margin: 0; }
.filter-actions button { margin: 0; white-space: nowrap; padding-inline: .75rem; }
/* Step 1 in a Filters panel's grid whose cells are too narrow for both
   buttons side by side: two of the last row's empty cells. */
#table-filters .filter-actions[data-filter-wide] { grid-column: span 2; }
/* Step 2: Clear under Apply, both as wide as the wider, in the same cell. */
#table-filters .filter-actions[data-filter-place=stacked] { flex-direction: column; align-items: stretch; }
/* Step 3: a row of the form's own, at its foot: a full line of a filter
   bar, every column of a Filters panel's grid, or a block line of its own
   in a form with neither (Roster changes' one select). */
#table-filters .filter-actions[data-filter-place=row] { display: flex; width: max-content; flex-basis: 100%; grid-column: 1 / -1; justify-self: start; }
.filter-clear { position: relative; display: inline-block; }
button[data-clear-unavailable][aria-disabled=true], button[data-clear-unavailable][aria-disabled=true]:not(:disabled):hover { cursor: not-allowed; opacity: .55; background: var(--paper); color: var(--accent); box-shadow: none; }
/* The working spinner (ui-conventions "Working spinner", #1847): the ONE
   spinning icon of the portal, a ring with a quarter open. It is drawn
   by components/spinner.html (.spinner) or, on a button whose request is
   in flight, by the button's ::after (is-busy is a class ui-v1.js
   toggles, so the ring is a pseudo-element there). Both share this one
   rule and keyframes; test_spinner_guard.py fails on any other spinning
   rule. A context changes only its size, colour (--spinner-ink, the
   accent by default) or placement, in its own rule. Under reduced motion
   it stands still (the rule at the end of this file). */
.spinner, :is(button, .button).is-busy::after { display: inline-block; width: 1em; height: 1em; vertical-align: -.15em; border: 2px solid var(--spinner-ink, var(--accent)); border-inline-end-color: transparent; border-radius: 50%; animation: busy-spin .8s linear infinite; }
@keyframes busy-spin { to { transform: rotate(360deg); } }
/* A busy button: a slightly smaller ring after its label, in the
   label's own colour. */
:is(button, .button).is-busy::after { content: ""; --spinner-ink: currentColor; width: .85em; height: .85em; margin-inline-start: .5em; vertical-align: -.1em; }
/* Live status regions (live-status-v1.js, live-running.html): a still-running
   indicator that says so in words, and prominent finished/failed outcomes. */
.live-running { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .5rem; margin: 0 0 .75rem; }
.live-running .help { flex-basis: 100%; margin: 0; }
.live-running > .spinner { align-self: center; }
/* A binary choice whose re-read can take seconds (data-busy-control, a
   report's Families counted, #2324) keeps the spinner's space after its
   segments, hidden; it shows only while the read the reader started from
   that choice is under way (ui-v1.js marks it data-busy-working, and the
   region it re-reads is aria-busy), so nothing moves when it appears or
   goes. The choice may sit inside that region (the Response dashboard)
   or outside it, in a node each answer redraws (Financial stewardship's,
   beside its filters), so the rule asks only that some region is busy. */
[data-busy-control] > .spinner { align-self: center; visibility: hidden; }
:root:has([aria-busy="true"]) [data-busy-control][data-busy-working] > .spinner { visibility: visible; }
.live-done { color: var(--accent-strong); }
.live-failed { color: var(--error-ink); }
.live-status-problem { margin-top: .5rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[data-content-toolbar] { display: flex; flex-wrap: wrap; gap: .5rem; }
[data-content-toolbar] button { margin: 0; padding-inline: .9rem; font-size: .925rem; }

/* Notices keep a full border (visible in forced-colors mode) plus a status bar.
   Three kinds (ui-conventions "Shared visual style", #732): .notice alone is
   a warning, .notice-error a failure or refusal, and .notice-info neutral
   information with nothing to beware of, in the "Working" status look's
   tokens (test_design_tokens.py checks their contrast in both schemes). */
.notice { padding: 1rem 1.25rem; background: var(--warning-bg); border: 1px solid var(--warning-border); border-inline-start-width: .35rem; border-radius: var(--radius-small); margin-block: 1rem; }
.notice-error { background: var(--error-bg); border-color: var(--error-border); }
.notice-info { background: var(--accent-soft); border-color: var(--accent); }
.notice h2 { margin-top: 0; font-size: var(--heading-3); }
.notice ul { margin-bottom: 0; }
/* System health's problems: one notice per problem, without list bullets. */
.health-problems { list-style: none; padding: 0; }
.health-problems > li { margin-block: .5rem; }

/* System health's dashboard (#1214; admin-portal spec "Health dashboard").
   Every state look comes from the .status-* classes above, never a fixed
   colour. Nothing here changes size on a poll:
   - The overall line keeps one height: its counted and Not current forms
     are both drawn and one is shown (there is no Refresh button, #1586).
     Where the line is too narrow for the Not current form on one line (a
     phone, or a narrow window beside the menu), it wraps after its word,
     so that second line's height is reserved too. The line's width decides this
     (a container query), not the window's, because the menu takes part of
     a wide window. Nothing is clipped, so a focus ring or enlarged text
     still shows.
   - Every tile's summary row is two fixed lines (the name and state, then
     the summary, cut with an ellipsis by CSS only, so its accessible text
     stays whole), so the grid's rows line up and a poll never changes one.
   - The grid has as many columns at least 22rem wide as fit, at most three,
     in the fixed tile order. An open tile's details are a full-width band
     that dense placement puts after the row holding its tile (later tiles
     of that row move up beside it), so opening a tile moves nothing beside
     or above its toggle; only what follows the row moves. No script
     computes rows. */
.health-line-box { container-type: inline-size; margin-block: 1rem 0; }
.health-line { display: flex; align-items: center; gap: 0 1rem; height: 3rem; }
.health-overall { display: flex; align-items: center; height: 3rem; margin: 0; font-size: clamp(1.1rem, 4.6vw, 1.4rem); white-space: nowrap; }
.health-overall > span { display: inline-flex; align-items: center; gap: .5rem; color: var(--status-ink); }
.health-overall .level-icon { width: 1.5rem; height: 1.5rem; }
.health-last { font-weight: 400; font-size: .85em; }
.health-checked { margin-block: 0 1rem; }
/* On a narrow line the Not current form wraps after its word; the line
   reserves two lines of the heading (at most 1.4rem, line height 1.3) in
   every state. */
@container (max-width: 42rem) {
  .health-line { flex-wrap: wrap; height: 4rem; align-content: flex-start; }
  .health-overall { height: auto; min-height: 3rem; white-space: normal; line-height: 1.3; }
  .health-overall > span { flex-wrap: wrap; row-gap: 0; }
}
[data-health-dashboard]:not([data-not-current]) .health-unknown,
[data-health-dashboard][data-not-current] .health-counted { display: none !important; }

.health-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, max(22rem, calc((100% - 1.5rem) / 3))), 1fr)); grid-auto-flow: row dense; gap: .75rem; align-items: start; }
.health-tile { position: relative; min-width: 0; }
.health-band { grid-column: 1 / -1; min-width: 0; padding: 1rem 1.25rem; background: var(--paper); border: 1px solid var(--status-line, var(--border)); border-inline-start-width: calc(1px + var(--status-bar, 0rem)); border-radius: var(--radius-small); }
.health-band > :first-child, .health-band > :first-child > :first-child { margin-top: 0; }
.health-band > :last-child { margin-bottom: 0; }
/* The toggle is the whole summary row; the box inside it carries the look. */
button.health-toggle, button.health-toggle:not(:disabled):hover { display: block; width: 100%; margin: 0; padding: 0; min-height: 0; border: 0; border-radius: var(--radius-small); background: none; color: inherit; font-weight: 400; text-align: start; box-shadow: none; }
.health-summary { display: block; }
.health-box { display: grid; grid-template-rows: 1.5rem 1.5rem; row-gap: .25rem; height: 4.5rem; padding: .5rem .85rem; background: var(--status-bg); color: var(--status-ink); border: 1px solid var(--status-line); border-inline-start-width: calc(1px + var(--status-bar)); border-radius: var(--radius-small); }
button.health-toggle:hover .health-box { box-shadow: 0 2px 6px rgb(16 24 40 / 16%); }
.health-head, .health-line-two { display: flex; align-items: center; gap: .5rem; min-width: 0; white-space: nowrap; }
.health-head .level-icon { width: 1.25rem; height: 1.25rem; }
.health-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 650; }
.health-head .status-word { flex: none; }
.health-said { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: .925rem; }
.health-cue { flex: none; color: var(--link); font-size: .875rem; text-decoration: underline; }
[aria-expanded="true"] .health-cue-show, [aria-expanded="false"] .health-cue-hide { display: none; }
/* A band takes its tile's look, and the open tile's row points at it.
   While not current, the counted looks give way to the Not current one
   (the counted words stay in the page, hidden, so :has still sees them). */
:not([data-not-current]) > .health-grid > .health-tile:has(.health-counted.status-warning) + .health-band { --status-line: var(--warning-border); --status-bar: .35rem; }
:not([data-not-current]) > .health-grid > .health-tile:has(.health-counted.status-error) + .health-band { --status-line: var(--error-border); --status-bar: .6rem; }
:not([data-not-current]) > .health-grid > .health-tile:has(.health-counted.status-working) + .health-band { --status-line: var(--accent); }
[data-not-current] .health-band { --status-line: var(--control-border); --status-bar: 0rem; background: var(--paper-soft); }
.health-tile:has([aria-expanded="true"])::after { content: ""; position: absolute; inset-inline-start: 1.5rem; bottom: -.75rem; border: .45rem solid transparent; border-top-color: var(--status-line, var(--control-border)); }
:not([data-not-current]) > .health-grid > .health-tile:has(.health-counted.status-warning) { --status-line: var(--warning-border); }
:not([data-not-current]) > .health-grid > .health-tile:has(.health-counted.status-error) { --status-line: var(--error-border); }
:not([data-not-current]) > .health-grid > .health-tile:has(.health-counted.status-working) { --status-line: var(--accent); }
[data-not-current] .health-tile { --status-line: var(--control-border); }
.health-band .table-scroll { max-width: 100%; }
/* The LOCAL deployment's standing banner (#476): the "LOCAL" label and
   hatched edge make it recognizable without relying on color alone. */
.local-environment { padding: .5rem var(--gutter); background: var(--warning-bg); color: var(--warning-ink); border-bottom: .35rem solid; border-image: repeating-linear-gradient(135deg, var(--warning-border) 0 .75rem, var(--warning-bg) .75rem 1.5rem) 1; text-align: center; font-size: .95rem; }
.local-environment strong { letter-spacing: .08em; margin-inline-end: .5rem; }
.testing-indicator { display: inline-block; margin-block: 0 1rem; padding: .35rem .9rem; border: 1px solid var(--warning-border); border-radius: 999px; background: var(--warning-bg); color: var(--warning-ink); font-size: .9rem; }
.changed { border-inline-start: .3rem solid var(--accent); padding-inline-start: .75rem; background: var(--accent-soft); border-radius: 0 var(--radius-small) var(--radius-small) 0; }

/* Disclosure */
details { border: 1px solid var(--border); border-radius: var(--radius-small); background: var(--paper); padding: 0 1rem; margin-block: 1rem; }
details[open] { padding-bottom: 1rem; }
summary { display: list-item; min-height: 44px; padding-block: .6rem; color: var(--accent); font-weight: 600; cursor: pointer; }
summary:hover { color: var(--accent-strong); }
/* "About this page": a page's longer explanation, closed by default and
   remembered open per page type (ui-v1.js). The control is one quiet summary
   beside the page heading, and it stays exactly where it is when the help
   opens or closes (#602): the details element is inline and draws no box,
   the summary is an inline-flex control with a fixed-size chevron (a list
   marker would differ between engines and states), and the body is a block,
   so it starts on its own full-width line below the heading row (CSS
   block-in-inline layout). Only the body gets the soft accent surface that
   keeps the help visibly secondary to the page's task. */
details.about-page, details.about-page[open] { display: inline; padding: 0; border: 0; background: none; }
details.about-page > summary { display: inline-flex; align-items: center; gap: .5rem; list-style: none; vertical-align: baseline; }
details.about-page > summary::-webkit-details-marker { display: none; }
details.about-page > summary::before { content: ""; flex: none; width: .5rem; height: .5rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
details.about-page[open] > summary::before { transform: rotate(45deg); }
details.about-page > summary::after { content: "\24D8" / ""; font-weight: 400; }
.about-page-body { display: block; padding: .75rem 1rem; margin-block: 0 .75rem; border: 1px solid var(--accent-line); border-radius: var(--radius-small); background: var(--accent-soft); }
.about-page-body > :first-child { margin-top: 0; }
.about-page-body > :last-child { margin-bottom: 0; }
.about-page-body .panel { box-shadow: none; }

/* Tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-block: 1.25rem; background: var(--paper); }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
caption { text-align: start; font-weight: var(--heading-weight); font-size: var(--card-heading); padding: 1rem 1.25rem; }
th, td { text-align: start; padding: .75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
thead { background: var(--paper-soft); }
thead th { color: var(--muted); font-size: .875rem; font-weight: 650; letter-spacing: .01em; border-bottom-color: var(--rule-strong); }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:hover { background: var(--row-hover); }
tbody th { font-weight: 600; }
td > :last-child { margin-bottom: 0; }
/* Shared Admin tables (web/tables.py): a compact data grid for desktop use,
   a selection column, a bulk-action bar and a row navigator above and below. */
.data-table th, .data-table td { padding: .5rem .85rem; vertical-align: middle; }
/* A cell spanning rows (the Family hub pledge's Stage and Actions, #2064)
   sits beside its first row, which it belongs to. */
.data-table td[rowspan] { vertical-align: top; }
.data-table td > form, .data-table td > button { margin: 0; }
.data-table button { margin-block: 0; padding: .35rem .85rem; min-height: 36px; }
/* The held-email table's Actions cell (components/held-email-groups.html,
   #2342) stacks two text-button forms: they keep the full 44px target and
   a gap between them, so neither touches. */
.data-table [data-restore-group] td > form + form { margin-block-start: .5rem; }
.data-table [data-restore-group] button { min-height: var(--button-min-height); }
.data-table .select-col { width: 2.75rem; }
.data-table input[type=checkbox] { width: 1.2rem; height: 1.2rem; vertical-align: middle; }
.data-table .numeric { text-align: end; }
/* Readable data tables (#931). main's overflow-wrap: anywhere lets every
   cell's minimum width fall to one character, so a wide table was squeezed
   into the page and its dates and words broke mid-way. In a .whole-words
   table cells wrap only between words, so a table too wide for the screen
   scrolls inside its .table-scroll region instead (the page never does).
   Their rows often hold several lines, so cells align to the top and the
   padding is a little narrower, so a table fits beside the Admin menu.
   .nowrap keeps a date, time or short code on one line; .cell-line puts one
   of several values on its own line; .cell-detail is a muted secondary line
   under a cell's main value. A dl.cell-pairs lists several labelled values
   in one cell as an aligned grid at every width (the page-wide dl grid's
   zero-minimum value column would collapse in a table cell): muted labels,
   which may wrap between words, beside values that never wrap. .nowrap
   works in any table, as several plain tables (Signed-in sessions,
   Automation access, the directory) carry it too (#2179). */
.data-table.whole-words th, .data-table.whole-words td { overflow-wrap: normal; padding-inline: .6rem; }
.data-table.whole-words tbody th, .data-table.whole-words tbody td { vertical-align: top; }
table .nowrap, .data-table .cell-line { white-space: nowrap; }
/* An amount of money never breaks across lines (#2258): main's
   overflow-wrap: anywhere broke "$3,000.00" in the hub's pledge table when a
   long Share methods cell squeezed its column. The keep_money template
   filter wraps each amount in mixed or plain text in .money, so the words
   and names around it wrap first; a table too wide for a phone scrolls in
   its own table-scroll box, never the page. */
.money { white-space: nowrap; }
/* Every shown number stays on one line (ui-conventions "Numbers on one
   line", #2342): main's overflow-wrap: anywhere broke a seven-digit Member
   DUID six digits and one in the Users page's leaders table. A numeric cell
   holds one number (money, a count, a percentage, a DUID), so it never
   wraps in any table, data-table or plain; its heading may still wrap
   between words. A muted aside in the same cell (held mail's "(and 2 that
   would not be sent now)") and a toggletip bubble wrap as ordinary text.
   A DUID on its own line under a name is a .nowrap stack-line instead. A
   count in a cell's mixed text ("1,234 emails delivered", "3 out of 10
   (30%)") goes through the keep_numbers template filter, which puts each
   number in .num, so the words around it wrap first. */
table td.numeric, table tbody th.numeric, table tfoot th.numeric { white-space: nowrap; }
table td.numeric :is(.help, .toggletip-bubble) { white-space: normal; }
.num { white-space: nowrap; }
.data-table .cell-line { display: block; }
/* A Member's contact details (components/member-contact.html, #2398): one
   email or phone to a line, the phone's kind muted before its number, and
   a muted "No email or phone given" when there are none (#2414). */
.contact-line { display: block; }
.contact-kind, .contact-none { color: var(--muted); }
.data-table .cell-detail { display: block; color: var(--muted); font-size: .875rem; font-weight: 400; }
.data-table dl.cell-pairs { display: grid; grid-template-columns: auto max-content; gap: .1rem .6rem; margin: 0; }
.data-table dl.cell-pairs dt { grid-column: 1; color: var(--muted); font-weight: 400; }
.data-table dl.cell-pairs dd { grid-column: 2; margin: 0; white-space: nowrap; }
.data-table dl.cell-counts dd { text-align: end; }
/* Labelled values that may be long (Census changes' Values and Last
   recorded, #1472): each small muted label sits on its own line above its
   value, so no label column widens the cell. The values wrap, and a long
   address or email may break anywhere, but the list keeps a readable
   minimum width, so the table scrolls inside its box rather than squeezing
   the values into strips. A value with none says (blank), muted. */
.data-table dl.cell-pairs-wrap { display: block; min-width: 11rem; max-width: 17rem; }
.data-table dl.cell-pairs-wrap dt { font-size: .8125rem; line-height: 1.3; }
.data-table dl.cell-pairs-wrap dd { white-space: normal; overflow-wrap: anywhere; margin-block-end: .3rem; }
.data-table dl.cell-pairs-wrap dd:last-child { margin-block-end: 0; }
.data-table dl.cell-pairs-wrap dd.nowrap { white-space: nowrap; }
.cell-blank { color: var(--muted); }
/* A worklist acted on row by row (Census changes, #1472) keeps its Actions
   column in view at the table's end while the table scrolls sideways in
   its box, so a row's actions never scroll out of reach. The cell is opaque
   (the row's hover or selected tint painted over the paper), so the
   scrolled columns pass beneath it, and a line marks its edge. Its icons
   wrap two to a line, so it takes little of the box: the rows are already
   several lines tall with their labelled values. An empty table's one
   message cell (colspan) is left alone. The edge line is drawn by the
   cell's own ::before on its inline-start side (so a right-to-left page
   gets it on the correct side), not as a border, since the table's
   collapsed borders would not travel with the sticky cell. */
.sticky-actions > * > tr > :last-child:not([colspan]) { position: sticky; inset-inline-end: 0; z-index: 1; background: var(--paper); }
.sticky-actions > * > tr > :last-child:not([colspan])::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; border-inline-start: 1px solid var(--border); pointer-events: none; }
.sticky-actions > thead > tr > :last-child { background: var(--paper-soft); }
.sticky-actions > tbody > tr:hover > :last-child { background: linear-gradient(var(--row-hover), var(--row-hover)), var(--paper); }
.sticky-actions > tbody > tr:has(input[data-select-row]:checked) > :last-child { background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--paper); }
.sticky-actions .table-actions { white-space: normal; width: calc(2 * var(--button-min-height) + 1rem); min-width: calc(2 * var(--button-min-height) + 1rem); box-sizing: content-box; }
.sticky-actions .table-actions .icon-button { margin-block: 0 .35rem; }
/* A long name in a table cell (the Ministry follow-up queue's Member, #932,
   and the Users page, #952) is cut short with an ellipsis, so it never
   makes its row several lines tall; the whole value stays the cell's text
   (for screen readers and copying). The Users page shows it whole in its
   title; the queue in the clipped-name tip (admin-menu-v1.js). */
.cell-ellipsis { display: block; max-width: 18rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A list of names shown whole (the Users page's Ministries led, #2342):
   every name, comma-separated, wrapping only between names, so the row grows
   taller rather than cutting the list short. Each name is one .nowrap unit
   (its comma inside it, so no line starts with one); the minimum width keeps
   a squeezed table from wrapping it to one name a line. */
.name-list { display: block; min-width: 12rem; }
.name-list > .nowrap { white-space: nowrap; }
/* A name a reader scans to tell rows apart (the queue's Ministry, #1136)
   wraps instead, between words, to at most two lines; only a name too long
   for two lines ends in "…", whole in the clipped-name tip. The minimum
   width keeps a squeezed table from wrapping it to three lines and cutting
   a name of ordinary length: two lines of 14rem hold about 55 characters,
   and the longest Ministry name in use is under 50. */
.cell-clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: break-word; min-width: 14rem; max-width: 18rem; }
.data-table tbody tr:has(input[data-select-row]:checked) { background: var(--accent-soft); }
/* Scheduled emails (#448): an editable row opens its editor when chosen; a
   schedule that already sent is muted and has no control. */
.schedule-table tr[data-schedule-choose] { cursor: pointer; }
.schedule-table tr[data-schedule-choose]:hover { background: var(--accent-soft); }
.schedule-table tr.schedule-past, .calendar-sends tr.schedule-past { color: var(--muted); }
/* Campaign calendar's month navigation (#1656): Previous and Next; the
   grid's caption names the month (PR #2095). At an end the button
   stays in place, greyed but focusable (aria-disabled, the shared
   unavailable look above), and the reason line
   under them keeps one line's height while empty, so it moves nothing. */
.calendar-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.calendar-nav .button { margin: 0; }
.calendar-nav-reason { min-height: 1.5em; margin-block: .25rem .5rem; }
/* The View choice (#1808) sits in the row before Previous and Next, so its
   own bottom margin would push the reason line down; the week view's one
   row of days is taller, since it has room for a week's sends. */
.calendar-nav .segmented-choice { margin: 0; }
.calendar-month.calendar-week td { height: 9rem; }
/* Campaign calendar (#469): month grids drawn by calendar-v1.js. Each grid
   keeps a readable width and scrolls inside its .table-scroll region on a
   phone; days hold short lines (time and schedule name) that wrap between
   words. Today and the campaign's first and last days are named in words.
   A muted send (one that has run, or a digest day that has passed) is told
   apart by color in the grid, by its status read to screen readers there,
   and by its status in words in the table below. */
.calendar-months { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.calendar-month { width: 100%; min-width: 42rem; table-layout: fixed; border-collapse: collapse; }
.calendar-month caption { text-align: start; font-weight: var(--heading-weight); padding-block: .25rem; }
.calendar-month th, .calendar-month td { border: 1px solid var(--border); padding: .3rem .4rem; overflow-wrap: normal; }
/* Positioned, so the grid's visually hidden text (weekday names, a send's
   status) is clipped by its scrolling region instead of widening the page
   on a phone. */
.calendar-months .table-scroll { position: relative; }
.calendar-month td { height: 4.5rem; vertical-align: top; font-size: .875rem; }
.calendar-month td[aria-current="date"] { background: var(--accent-soft); }
.calendar-day { display: block; font-weight: 650; }
/* A campaign day's Add (#1521), a (+) icon (#1656), sits on the number's
   line, at its end, with a target at least 24px square (WCAG 2.2 SC 2.5.8).
   A month is drawn whole when it is shown, so it never moves anything
   later. */
.calendar-day-head { display: flex; justify-content: space-between; align-items: center; gap: .25rem; }
.calendar-add { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border: 1px solid var(--accent); border-radius: 50%; color: var(--accent); }
.calendar-add:hover { background: var(--accent-soft); color: var(--accent-strong); }
.calendar-add .action-icon { width: .9rem; height: .9rem; }
.calendar-marker { display: block; color: var(--accent-strong); font-weight: 600; }
.calendar-month ul { list-style: none; margin: 0; padding: 0; }
.calendar-month li { margin-block: .15rem; }
.calendar-month li.schedule-past { color: var(--muted); }
/* Operational events (#1808): muted, unlinked lines after a day's sends,
   with a rule between so they never read as sends; a send's notes about
   them sit under its link, muted, in the link's own box. */
.calendar-month ul.calendar-events { margin-block-start: .25rem; padding-block-start: .15rem; border-block-start: 1px dashed var(--border); color: var(--muted); font-size: .8125rem; }
.calendar-send-body { min-width: 0; }
.calendar-note { display: block; color: var(--muted); font-size: .8125rem; }
/* A movable send's Move… (#1521): an icon button after its link, at least
   24px square (WCAG 2.2 SC 2.5.8), drawn on every movable send from the
   start so nothing moves. While a send is dragged it is faded and the day
   under the pointer is outlined, never resized, so nothing moves either. */
.calendar-month li.calendar-movable { display: flex; align-items: flex-start; justify-content: space-between; gap: .25rem; }
.calendar-move { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: .25rem; background: transparent; color: var(--accent); cursor: pointer; }
.calendar-move:hover { background: var(--accent-soft); color: var(--accent-strong); }
.calendar-move .action-icon { width: .9rem; height: .9rem; }
.calendar-month li.calendar-dragging { opacity: .55; }
.calendar-month td.calendar-drop-target { outline: 2px dashed var(--accent); outline-offset: -3px; }
.calendar-drag-active, .calendar-drag-active * { cursor: grabbing; user-select: none; -webkit-user-select: none; }
/* A day a dragged send can't move to (PR #2095: already past for its time
   of day, outside the campaign, or at another Family email's moment) looks
   unavailable, titled with why, as every unavailable
   control does: greyed, with the not-allowed pointer. Only colours change,
   so nothing moves. */
.calendar-month td.calendar-drop-unavailable { background: var(--paper-soft); color: var(--unavailable); }
.calendar-drag-active td.calendar-drop-unavailable, .calendar-drag-active td.calendar-drop-unavailable * { cursor: not-allowed; }
/* The Move dialog's refusal line, after its buttons (the dialog is anchored
   at the top), so a refusal of any length moves no control; one line is
   kept so a short one does not resize the dialog. */
.calendar-move-refusal { min-height: 1lh; margin: .5rem 0 0; color: var(--error-ink); font-weight: 600; }
.calendar-month tbody tr:hover { background: none; }
.schedule-editing { color: var(--muted); font-weight: 400; }
/* The note keeps its space while idle, so showing it never re-wraps the cell
   and moves the row's button under the pointer (#736). */
.schedule-editing-idle { visibility: hidden; }
/* Why Review changes is unavailable while nothing has changed (#921): the
   line keeps its space while idle, so it never moves the page (#736). */
.unchanged-hint { margin-inline-start: .5rem; }
.unchanged-hint[data-idle] { visibility: hidden; }
/* A form with both the change gate and the complete gate (New and Edit
   scheduled email, #2025) says one reason at a time in one cell: the
   unchanged hint while the form is unchanged, else the complete gate's
   (reserved, so it only empties). The cell is as wide as the longer and
   follows the button, so neither moves the button; at a narrow width a
   longer reason may wrap onto another line. */
.gate-hints { display: inline-grid; margin-inline-start: .5rem; }
.gate-hints > * { grid-area: 1 / 1; margin: 0; }
.gate-hints:has(> [data-unchanged-hint]:not([data-idle])) > [data-complete-hint] { visibility: hidden; }
/* The chosen email under a schedule's email list (#446). */
.email-summary { margin-block-start: .35rem; }
.email-summary p { margin-block: .2rem; }
/* Send a test of this text (#446): its status line (.reserve-line) keeps one
   line while empty; a refusal reads as an error. */
.schedule-email-test-status.is-error { color: var(--error-ink); font-weight: 600; }
/* Send a test to me (#2036): the editor's status line keeps two lines (three
   on a phone, .reserve-lines-wrap), since a refusal names its fields, and
   the Report emails page writes the row's result to its one-line status
   line (.review-outcome); a refusal reads as an error in either. */
.report-test-status.is-error, .review-outcome.is-error { color: var(--error-ink); font-weight: 600; }
.status-badge { display: inline-block; padding: .1rem .6rem; border-radius: 999px; background: var(--paper-soft); border: 1px solid var(--border); font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.status-badge-on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-strong); }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-block: 1rem .5rem; }
.bulk-bar button { margin: 0; }
/* The shared bulk bar (table-selection.html) never changes size as rows are
   ticked (#563, #736, #879): the count reserves room for "100 selected" (no
   page shows more rows), the Select all button room for "Clear selection",
   and the reason line below the buttons stays in the layout, only made
   invisible (data-cleared) while a selection exists. */
.bulk-count { color: var(--muted); font-weight: 600; min-width: 12ch; min-height: 1.6em; min-height: 1lh; }
.bulk-bar [data-select-all-button] { min-width: calc(15ch + 2.5rem + 2 * var(--button-border-width)); }
.bulk-hint { flex-basis: 100%; margin: 0; min-height: 1.6em; min-height: 1lh; }
.bulk-hint[data-cleared] { visibility: hidden; }
main nav.table-nav { justify-content: space-between; margin-block: .75rem; font-size: .925rem; }
.table-nav .table-count { margin: 0; }
main nav.table-nav form { gap: .5rem .75rem; }
.table-nav label { display: inline-flex; align-items: center; gap: .5rem; margin: 0; font-weight: 500; }
.table-nav select, .table-nav input[type=number] { display: inline-block; width: auto; min-height: 36px; padding-block: .3rem; }
.table-nav select:not([multiple]):not([size]) { padding-right: 2.25rem; }
.table-nav input[type=number] { width: 5.5rem; }
.table-nav button { margin: 0; padding: .35rem .9rem; min-height: 36px; }
main nav.table-nav a, .table-nav-disabled { padding: .35rem .9rem; min-height: 36px; }
.table-nav-disabled { display: inline-block; border: 1px solid var(--border); border-radius: var(--radius-small); color: var(--muted); }
/* Report export status (report-export.html, report-exact.html). */
.export-live > :first-child { margin-top: 0; }
.export-state { font-size: 1.15rem; font-weight: 650; }
.export-state-ready { color: var(--accent-strong); }
/* A pending export's working spinner, before its words. */
.export-state > .spinner { margin-inline-end: .35em; }
/* A ready export's "until" line (#1398): its two sentences share one grid
   cell, so the line is as tall as the longer one from the start and the
   switch when the download window ends moves nothing (#736). */
.export-window { display: grid; }
.export-window > span { grid-area: 1 / 1; min-width: 0; }
.export-window > [data-window-off] { visibility: hidden; }
/* Stage boxes (components/stage-boxes.html, UX conventions "Stage boxes"):
   one box per major stage of a long piece of work, left to right, wrapping
   on a phone with no sideways scroll. The status word always carries the
   state; the mark (a bullet, the working spinner, a check, a cross or a
   pause) and the colour only reinforce it. Loading parish data and
   Finishing setup (setup wizard), Load ParishSoft data (Campaign setup)
   and a ParishSoft refresh's Background task status (#1579) draw it.
   Rows are natural height: a box is as tall as its content (and its
   reserve, below) needs. */
.stage-boxes { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr)); }
/* Finishing setup's list alone gives every row its tallest row's height
   (1fr rows, #2145), so a wrapped second row is never shorter than the
   first. Only while it runs: a failed setup's region (no in-place retry;
   a failure stops the updates) keeps natural rows, so the failure's long,
   unreserved explanation makes only its own row taller. The rule is not
   on every list: some (Load ParishSoft data) clear a failed box in place
   with Try again, and switching from natural to equal rows then would
   move the action row below (#736). */
.setup-finishing-region:not([data-finishing-state="failed"]) .stage-boxes { grid-auto-rows: 1fr; }
/* The status sits on its own line under the stage's name, so a box keeps
   its height when its status word changes (Not started, then Done). The
   box is one grid cell: its shown words (.stage-body) share it with
   invisible, aria-hidden copies of every form it can take while the
   work runs (.reserve-ghost, a stage's ``reserve``), so the box is as tall
   as its longest form at every width and engine's wrapping, and longer
   words never grow the box or its row (#1903). The mark and the spinner
   are absolutely placed, outside the cell. */
.stage-boxes > li {
  display: grid;
  padding: .45rem .6rem .45rem 2rem; position: relative; min-width: 0;
  border: 1px solid var(--border); border-radius: var(--radius-small);
}
.stage-boxes > li > .stage-body { grid-area: 1 / 1; display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
/* A reserved form: it keeps its space but is never seen or read. */
.reserve-ghost { visibility: hidden; }
.stage-boxes > li::before {
  position: absolute; left: .55rem; top: .5rem; width: 1rem; text-align: center;
  font-weight: 700; content: "\2022"; color: var(--muted);
}
/* State colours (Administrator, 2026-10-17): Not started keeps the page's
   own background, In progress is the attention yellow, Done the light
   accent green and Failed the error tone, each from the design tokens, so
   Dark mode takes their dark values (DARK_COLORS) with readable ink. Only
   colours change, never the font weight, padding or border width, so a
   box keeps its size as its state changes (no layout shift). */
.stage-boxes > .stage-done::before { content: "\2713"; color: var(--accent); }
.stage-boxes > .stage-done { background: var(--accent-soft); border-color: var(--accent-line); }
/* In progress shows the working spinner (components/spinner.html) in the
   mark's place: absolutely positioned in the same reserved slot as every
   state's mark (left .55rem, 1rem wide, centred on the label's first
   line), so its arrival or departure moves nothing (#1847). */
.stage-boxes > .stage-active::before { content: none; }
.stage-boxes > li > .spinner { --spinner-ink: var(--warning-ink); position: absolute; left: calc(.55rem + (1rem - 1em) / 2); top: calc(.5rem + (1.6em - 1em) / 2); top: calc(.5rem + (1lh - 1em) / 2); }
.stage-boxes > .stage-active { background: var(--warning-bg); border-color: var(--warning-border); }
.stage-boxes > .stage-waiting .stage-label { color: var(--muted); }
.stage-boxes > .stage-operator::before { content: "\23F8"; color: var(--ink); }
.stage-boxes > .stage-operator { background: var(--warning-bg); border-color: var(--warning-border); }
.stage-boxes > .stage-failed::before { content: "\2715"; color: var(--error-ink); }
.stage-boxes > .stage-failed { border-color: var(--error-border); background: var(--error-bg); }
.stage-boxes > .stage-uncertain::before { content: "?"; color: var(--ink); font-weight: 700; }
.stage-boxes > .stage-uncertain { border-style: dashed; border-color: var(--ink); }
.stage-status { font-size: .925rem; font-variant-numeric: tabular-nums; }
.stage-boxes li p { margin: .25rem 0 0; font-size: .925rem; }
/* Load ParishSoft data (campaign-load-status.html, #1404 PR 5): the line
   after the stage boxes (records checked, or the Family count) is reserved
   in every state, so its text coming and going moves nothing below it. */
.campaign-load-count { min-height: 1lh; }
/* While the load waits for a worker, that line says so (stages.QUEUED,
   #1916). It shares one grid cell with an invisible copy of that sentence,
   so the line is as tall as the sentence at every width in every state, and
   nothing below moves when the sentence gives way to the records checked. */
.campaign-load-count-slot { display: grid; margin-block: 0 1rem; }
.campaign-load-count-slot > * { grid-area: 1 / 1; margin: 0; }
/* Its summary line shares one grid cell with invisible, aria-hidden copies
   of every state's wording (with all its links), so the cell is as tall as
   the longest wording at every width, zoom and engine's text metrics, and
   the boxes below never move when the state changes. A fixed line count
   cannot do this: Firefox wraps the no-Families wording to six lines at
   320px where Chromium and WebKit wrap it to five (#1618). The cell keeps
   the paragraph's bottom margin; the summary stretches to fill the cell.
   Likewise the line after the boxes keeps two lines on a phone, where the
   Family count with the data's age wraps, so the action row below never
   moves down when the load ends. */
.campaign-load-summary-slot { display: grid; margin-block: 0 1rem; }
.campaign-load-summary-slot > * { grid-area: 1 / 1; margin: 0; }
.campaign-load-summary-ghost { visibility: hidden; }
@media (max-width: 40rem) { .campaign-load-count { min-height: 2lh; } }
/* Setup's load lines under the saved-record bar ("The load started: 3
   minutes ago", "Last sign of activity: ..."): their times grow as the load
   runs and can wrap on a phone (Firefox at 320 px), so a phone reserves two
   lines for each and nothing below moves (UX conventions "No layout shift"). */
@media (max-width: 40rem) { .setup-load-line { min-height: 3.2em; min-height: 2lh; } }
/* Its button's slot (source-refresh.html) is one grid cell holding the
   button, when there is one, over invisible copies of both its labels
   (Load and Try again), so it is as tall as the taller button at every width
   and zoom in every state: when the pressed button goes, the action row
   below it never moves up under the pointer (#1517 review, L1). The action
   row's Continue slot on the Load step holds the same kind of copy until
   Continue comes (campaign-step-actions.html). */
.campaign-load-action { display: grid; justify-items: start; }
.campaign-load-action > * { grid-area: 1 / 1; }
.campaign-load-action > form { display: flex; }
.campaign-load-ghost { visibility: hidden; }
.campaign-load-ghost::before { content: attr(data-label); }
.button-large { font-size: 1.1rem; padding: .8rem 1.75rem; }
/* Export actions (#1679, components/export-actions.html): one row of small
   outlined buttons, one per format, smaller and quieter than the primary
   green buttons, wrapping on a phone instead of widening the page. They are
   2.25rem tall, past the 24px minimum target size with .5rem between them.
   An export pane (.export-pane) is that row and, only while exporting is
   unavailable (other campaign work under way), the line saying why.
   System logs' "Times in" menu sits in the row at its own width. */
.export-pane { margin-block: 1rem; }
.export-pane > p, .export-pane > form > p { margin-block: .25rem; }
.export-actions, .export-buttons, .export-zone { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.export-actions { margin-block: .5rem; }
.button-small { min-height: 2.25rem; margin: 0; padding: .3rem .8rem; font-size: .9rem; font-weight: 600; }
.export-zone label { margin: 0; font-weight: 600; }
/* The menu grows when ui-v1.js adds "Zone (this browser)"; as a flex item it
   may shrink below that text, so a phone page never scrolls sideways. */
.export-zone { min-width: 0; max-width: 100%; }
.export-zone select { display: inline-block; flex: 0 1 auto; width: auto; min-width: 0; max-width: 100%; min-height: 2.25rem; padding-block: .25rem; }
/* The row's reserved status line (#1778): a slow export's waiting note or a
   refusal, said in place under the buttons (ui-v1.js). It keeps two lines'
   height while empty, three on a phone (.reserve-lines-wrap), and ui-v1.js
   says at most two sentences there, so its text never moves the page. */
.export-status { margin-block: 0 .25rem; }
/* A worklist's always-open Filters box (Census changes, #1682): the open
   disclosure's box, its title a heading the size and place of a disclosure's
   summary line, so the page reads as the other reports do with their panels
   open. */
section.filter-panel { border: 1px solid var(--border); border-radius: var(--radius-small); background: var(--paper); padding: 0 1rem 1rem; margin-block: 1rem; }
section.filter-panel > h2 { margin: 0; padding-block: .6rem; font-size: 1rem; line-height: 1.5; }
/* A report's Filters panel (#227, the filterpanel tag). At phone width its
   box gives up its side gutters and borders, so its filter bar keeps the
   full width it had before the panel and a label and its "i" keep one line. */
@media (max-width: 40rem) { :is(details, section).filter-panel { padding-inline: 0; border-inline: 0; border-radius: 0; } }
/* A long filter form in the panel is a grid (#1411), so it takes a few rows
   rather than one per field: one column on a phone, and from 40rem as many
   14rem columns as fit (two or three on a tablet, four on a laptop, where
   the form's 60rem cap stops it). Each field is a div cell with its label
   tight above its box, without the theme's 1rem gap above a label; cells
   align at the bottom, so the boxes line up when a label wraps. Apply takes
   the next cell, beside the last field when there is room. The reserved
   complete-gate hint and the time-zone note each take a full row, as
   before, so nothing moves when they fill. A range fieldset (Financial
   stewardship's dates and amounts) spans two columns, its two ends side by
   side, and on a phone stacks them; the theme floats a legend, which in a
   grid fieldset makes it a plain item, so it is given the fieldset's first
   row. A search keeps one cell, its long label wrapping, so the fields
   after it fill the row instead of leaving a hole at its end. The Family
   directory's form keeps its filter bar (.filter-bar, below): its short
   fields already share rows, and in the grid's equal columns it measured
   taller. */
:is(details, section).filter-panel > form:not(.filter-bar) { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem 1rem; align-items: end; margin-top: .25rem; }
:is(details, section).filter-panel > form:not(.filter-bar) label { margin: 0 0 .25rem; font-size: .925rem; }
:is(details, section).filter-panel > form:not(.filter-bar) > :is(p, [data-complete-hint]) { grid-column: 1 / -1; margin: 0; }
:is(details, section).filter-panel > form:not(.filter-bar) > button { justify-self: start; margin: 0; }
:is(details, section).filter-panel > form:not(.filter-bar) > fieldset { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem 1rem; align-items: end; margin: 0; padding: .5rem .75rem .75rem; }
:is(details, section).filter-panel > form:not(.filter-bar) > fieldset > legend { grid-column: 1 / -1; margin: 0; font-size: .925rem; }
/* A range's reserved message line (#1332) spans its fieldset after both
   ends, or the form after Apply when the range has no fieldset. */
:is(details, section).filter-panel > form:not(.filter-bar) > .field-error-line,
:is(details, section).filter-panel > form:not(.filter-bar) > fieldset > .field-error-line { grid-column: 1 / -1; margin: 0; }
/* A range whose message line sits in its fieldset, apart from the gate's
   reserved hint row (Financial stewardship's dates and amounts, #1469):
   the hint, in the server's words, is held hidden while a line shows them,
   so the form says it once. Both keep their room (visibility only), so
   nothing moves either way and an unrefused page lays out as before. The
   class is the one the Additional information queue's form uses for a
   line that is the form's own child. */
.filter-line-hides-hint:has(> fieldset > .field-error-line > .errorlist:not([hidden])) > [data-complete-hint] { visibility: hidden; }
/* The theme's short-field rule (a date's div, from 48rem, above) gives a
   date cell an end margin and caps its box at 14rem, which left the dates
   narrower than the selects beside them and ragged against the row above.
   The attribute selector outranks that rule, so every cell fills its
   track and every box fills its cell. */
:is(details, section).filter-panel[data-filter-panel] > form:not(.filter-bar) > div,
:is(details, section).filter-panel[data-filter-panel] > form:not(.filter-bar) > fieldset > div { margin: 0; }
:is(details, section).filter-panel[data-filter-panel] > form:not(.filter-bar) > div > input,
:is(details, section).filter-panel[data-filter-panel] > form:not(.filter-bar) > fieldset > div > input { max-width: none; }
@media (min-width: 40rem) {
  :is(details, section).filter-panel > form:not(.filter-bar) { grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
  :is(details, section).filter-panel > form:not(.filter-bar) > fieldset { grid-column: span 2; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Compact filter bars: short fields share one row on wider screens. */
.filter-bar { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem 1rem; }
.filter-bar label { margin: 0 0 .25rem; font-size: .925rem; }
/* A filter-bar label row is at least as tall as its "i" button (1.75rem), tip or not, so a cell whose tip comes and goes (the directory's Export timezone) never changes its row's height and shifts the end-aligned cells beside it. */
.filter-bar .label-row { min-height: 1.75rem; }
.filter-bar > div { flex: 0 1 26rem; min-width: 12rem; }
.filter-bar > div.short { flex: 0 1 9rem; }
/* A field as wide as its longest choice, so a long option reads whole
   (Limitations' Show, #227); it still shrinks to the row on a phone. */
.filter-bar > div.fit { flex: 0 1 auto; }
/* Sent mail's five filters share one row beside the Admin menu at desktop
   width (#1562): each grows from a short basis instead of starting at
   its widest choice. The bar takes the page's width, not the 60rem form
   cap, with a slightly smaller gap, so that on a 1366 px laptop Apply
   filters and Clear filters (#1651) fit beside the five filters even with
   Linux's wider fonts, and the first rows still start on the screen. */
.filter-bar.mail-filters { max-width: none; column-gap: .75rem; }
.filter-bar.mail-filters > div { flex: 1 1 6.5rem; min-width: 6.5rem; }
/* A field whose label row carries an "i" button (Recipient) is never
   narrower than that row: when the filters shrink toward their minimum to
   leave Apply filters and Clear filters room beside them, "Recipient", the
   gap and the button (about 113 px with Linux's wider fonts) no longer fit
   6.5rem, so the button wrapped and pushed that field's control below the
   others'. */
.filter-bar.mail-filters > div:not(.short):has(> .label-row) { min-width: 7.5rem; }
/* Sent mail's hint row (the gate's hint and a refused Recipient's message,
   #1562) keeps its own full-width line under the fields, as the plain hint
   paragraph did, rather than taking a field's share of the row. */
.filter-bar.mail-filters > .hint-row-messages { flex: 0 1 100%; }
/* From and Through are wide enough for the empty "mm/dd/yyyy" placeholder
   beside the calendar button, with Linux's wider fonts too. They drop the
   desktop short-field rule's end margin: the bar's gap spaces them, and
   that margin kept Apply off the row at 1280 px with those fonts. The
   Timeline's From and Through (#1570) are sized the same way, so its Kind,
   days, Apply filters and Clear filters (#1651) share one row at 1280 px. */
.filter-bar:is(.mail-filters, .timeline-filters) > div.short { flex: 0 1 10rem; min-width: 10rem; margin-inline-end: 0; }
/* The Timeline's Kind grows from a short basis into the row's room, as
   Sent mail's filters do, rather than starting at its widest choice: with
   "Census and Ministry requests" (#2023) and Linux's wider fonts, the
   widest-choice basis pushed Apply filters and Clear filters onto a second
   line at 1280 px. The smaller gap leaves Kind the room to show that
   choice whole there. */
.filter-bar.timeline-filters { column-gap: .75rem; }
.filter-bar.timeline-filters > div.fit { flex: 1 1 12rem; }
.filter-bar.timeline-filters > div.fit > select { width: 100%; }
.filter-bar.mail-filters > div > :is(input, select) { width: 100%; }
/* Every label sits on one line of the toggletip's height, and the fields
   line up at their tops, so Recipient's label (with its toggletip) and the
   plain labels share one baseline although a date control is a little
   taller than a text box; Apply still sits at the fields' foot. */
.filter-bar.mail-filters { align-items: start; }
.filter-bar.mail-filters > button { align-self: end; }
.filter-bar.mail-filters > div > :is(label, .label-row) { display: flex; align-items: center; min-height: 1.75rem; margin: 0 0 .25rem; }
/* Sent mail's Production / Testing choice sits at the end of the heading's
   line on a wider screen, out of the flow, so it takes no line of its own
   and the first rows start on a laptop screen (#227, #1562); the heading
   and its About summary are short enough to leave it the room. The line
   is at least the pair's height (its segments and their border), so the
   filter bar below never meets it. On a phone it keeps its own line under
   the heading. */
@media (min-width: 40rem) {
  .mail-title { position: relative; min-height: calc(var(--button-min-height) + 2 * var(--button-border-width)); }
  .mail-title > #delivery-mode { position: absolute; inset-block-start: 0; inset-inline-end: 0; }
  .mail-title > #delivery-mode .segmented-choice { margin: 0; }
}
/* A row's Recipient is a link-styled button posting the private recipient
   (#1562): it reads as a link in its cell, never as a portal button. The
   resting selector names .data-table so it outranks the table's compact
   button rule (.data-table button), as the hover selector outranks the
   portal hover: otherwise the rest look had that rule's padding and the
   hover look had none, and the name moved under the pointer (#736). */
.data-table .recipient-link, .recipient-link:not(:disabled):hover { min-height: 0; margin: 0; padding: 0; border: 0; vertical-align: baseline; background: none; box-shadow: none; color: var(--link); line-height: inherit; text-align: start; }
.filter-bar button { margin: 0; }
/* A filter bar's hint row with the server's refusal over the gate's hint
   (.hint-row-messages, the Family directory's Exact Family code, #1332)
   is the bar's last, full-width item with no margin of its own (the
   bar's gap spaces it), as its hint alone was, so an ordinary page lays
   out as before. */
.filter-bar > .hint-row-messages { flex: 0 1 100%; }
/* Short form fields side by side (the Ministry follow-up request, #1014).
   Unlike a filter bar the fields align at the top, since a time field keeps
   a reading line under its box; every label takes the height of a label
   with an "i" button, so the boxes line up; and a field's tip floats below
   its field, so opening it moves nothing. A .short field (a date) is
   narrower. At phone width each field takes its own row: one column. A
   textarea marked .compact takes the height its rows give rather than the
   theme's tall minimum. */
.field-row { display: flex; flex-wrap: wrap; align-items: start; gap: .5rem 1rem; margin-block: .75rem; }
.field-row > div { position: relative; flex: 0 1 16rem; min-width: 12rem; }
.field-row > div.short { flex-basis: 12rem; }
/* Wide enough for a time's reading ("Reads as 9:30 AM EDT") on one line. */
.field-row > div.field-time { flex-basis: 14rem; }
.field-row > div > label, .field-row > div > .label-row { display: flex; align-items: center; min-height: 1.75rem; margin: 0 0 .25rem; }
@media (max-width: 40rem) { .field-row > div { flex-basis: 100%; } }
textarea.compact { min-height: 0; }

/* Progress */
progress { width: 100%; height: .85rem; appearance: none; border: 0; border-radius: 999px; background: var(--progress-track); color: var(--accent); accent-color: var(--accent); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--progress-track); border-radius: 999px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }

/* Log levels: the icon's shape carries meaning; color only reinforces it. The
   icons are one matched set (components/level-icon.html): a blue "i", an amber
   warning triangle, a red cross and, for CRITICAL, a dark red stop sign on a
   highlighted row; audit records, which have no level, are a purple
   clipboard (#601). The Show choices show each icon beside its word; the
   table's Level column shows the icon alone (its word is screen-reader text
   and a tooltip), shrunk to its content so it stays a narrow column. main's
   overflow-wrap: anywhere would then let "Level" break mid-word, so the
   column wraps only between words. */
.log-level-cell { width: 1%; overflow-wrap: normal; }
/* The Timelines' What happened column (Family hub and user, #2197): main's
   overflow-wrap: anywhere let the long Details column squeeze it until its
   heading and its lines' first words (Submissions, Reminder, Invitation)
   broke mid-word. Its cells wrap only between words, and the column keeps a
   minimum width (the widest of those words in bold, with padding); on a
   phone the table scrolls inside its box, never the page. */
.timeline-table .timeline-what, .timeline-table tbody th { overflow-wrap: normal; }
.timeline-table .timeline-what { min-width: 9rem; }
/* A short share label's full name is .visually-hidden (position: absolute), whose
   containing block was the page: in a table wider than a phone it sat beyond the
   page's edge and made the page scroll sideways in Chromium (#2198 on #2197). The
   table's box contains it, so it is clipped there. */
.table-scroll:has(.timeline-table) { position: relative; }
/* The When column is as wide as its longest one-line date and time and no
   wider (#2251): its cells never wrap (.nowrap), but an auto-layout table
   wider than its content shares the spare room among every column in
   proportion, so When grew well past its dates. A width of 1% asks for the
   least the content allows (as .log-level-cell does), leaving the room to
   What happened and Details. The empty-state cell spans all columns, so it
   is left alone. */
.timeline-table tr > :first-child:not([colspan]) { width: 1%; }
.log-level { display: inline-flex; padding-top: .15rem; }
.log-level .level-icon { width: 1.25rem; height: 1.25rem; }
.level-icon { flex: none; width: 1rem; height: 1rem; vertical-align: -.15em; }
.level-icon-debug { color: var(--muted); }
.level-icon-info { color: var(--level-info); }
.level-icon-warning { color: var(--warning-border); }
.level-icon-error { color: var(--error-border); }
.level-icon-critical { color: var(--level-critical); }
.level-icon-audit { color: var(--level-audit); }
.level-icon-ok { color: var(--accent); }
.level-icon-unknown { color: var(--control-border); }
.log-row-critical > th, .log-row-critical > td { background: var(--error-bg); }
.log-row-critical > th:first-child { box-shadow: inset .35rem 0 0 var(--level-critical); }

/* Status indicators (ui-conventions "Status indicators", #1214): a status
   that says whether something works shows a word, an icon whose shape
   differs per state (components/level-icon.html: ok, warning, error,
   unknown) and these colours, never colour alone. Each state class sets
   the custom properties a component reads: text, icon and border, the
   background, and the start bar's width, so an Error stands out more than a
   Warning. test_design_tokens.py checks every pair's contrast. Not current
   takes --control-border for its icon and border: --border is too faint
   against --paper-soft for the 3:1 non-text minimum. */
.status-working { --status-ink: var(--ink); --status-line: var(--accent); --status-bg: var(--accent-soft); --status-bar: 0rem; }
.status-warning { --status-ink: var(--warning-ink); --status-line: var(--warning-border); --status-bg: var(--warning-bg); --status-bar: .35rem; }
.status-error { --status-ink: var(--error-ink); --status-line: var(--error-border); --status-bg: var(--error-bg); --status-bar: .6rem; }
.status-unknown { --status-ink: var(--muted); --status-line: var(--control-border); --status-bg: var(--paper-soft); --status-bar: 0rem; }
.status-working .level-icon, .status-warning .level-icon, .status-error .level-icon, .status-unknown .level-icon { color: var(--status-line); }
.status-error .status-word { font-weight: 700; }
.log-table th, .log-table td { vertical-align: top; }
/* The Level cell's visually-hidden name is absolutely positioned. Nothing
   positioned lies between it and the page, so the .table-scroll box would not
   clip it, and once the Time cell stopped wrapping (#2179) its place lay past
   the viewport at 320 px and widened the page. A positioned cell is its
   containing block, so the box clips it. */
.log-table .log-level-cell { position: relative; }
/* Column widths (#2280). main's overflow-wrap: anywhere let the auto
   layout squeeze Type, Actor and Recorded detail to a few letters wide, so
   a user's "Last, First" Name took three lines and the detail's values
   broke letter by letter. Type now wraps only between words. Recorded
   detail keeps anywhere, so a long checksum or identifier value still
   breaks rather than widening every row, but has a minimum width. Actor
   has a set width that keeps a typical Name on one line,
   wraps a longer one between words and still breaks a long address. Related
   is only as wide as its icon slots (width: 1px lets the auto layout give
   it no extra width). Neither takes spare width, so Recorded detail and
   Type share the rest, and the detail's labelled values keep a readable
   width (the page-wide dl grid's zero-minimum value column would collapse
   in a cell). Below these minimums the table scrolls inside its
   .table-scroll region, never the page. */
/* The whole-words tables' narrower side padding, so the six columns fit
   the Admin page's box at 1280 px. */
.log-table th, .log-table td { padding-inline: .6rem; }
.log-table .log-type-cell { overflow-wrap: break-word; }
/* A stacked time (date-format-v1.js) shows its day above its clock time,
   each on one line, so Time is as narrow as its longer part (#2280). */
time[data-stacked] > span { display: block; white-space: nowrap; }
/* width alone gives way to the min-content of an address that may break
   anywhere when the table is too wide for its box; min-width holds it. */
.log-table .log-actor-cell { width: 11rem; min-width: 11rem; }
.log-table .log-links { width: 1px; }
.log-table .log-detail-cell { min-width: 14rem; }
.log-table .log-detail-cell dl { grid-template-columns: max-content minmax(5rem, 1fr); gap: .25rem .75rem; }
.log-filters { margin-block: 1rem; }
.log-level-choices { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; margin: 0; padding: 0; border: 0; }
.log-level-choices legend { float: left; margin: 0 .5rem 0 0; padding: 0; font-size: .925rem; font-weight: 600; }
.log-level-choices label { display: inline-flex; align-items: center; gap: .35rem; margin: 0; font-weight: 400; }
details.log-more-filters { margin-block: .75rem 0; }
details.log-more-filters > .filter-bar { margin-top: .5rem; }
/* System logs' cross-link icons (#1065): the row-action icon buttons'
   height and look, a little narrower, in five fixed slots (related, actor,
   subject, campaign, task) so each kind lines up down the column and an
   absent icon leaves its slot empty. The slots are three across and two
   down (#2280: five across left too little width for the table to fit at
   1280 px), each kind in its own cell, so the column keeps one width; a
   row is two icons tall only when it has a campaign or task icon. */
.log-link-slots { display: grid; grid-template-columns: repeat(3, 2.25rem); gap: .25rem; }
/* A form slot lays its button out as a flex item, not on a text line whose
   baseline would drop it below the task link beside it. */
.log-link-slots > form { display: flex; }
.log-link-related { grid-area: 1 / 1; }
.log-link-actor { grid-area: 1 / 2; }
.log-link-subject { grid-area: 1 / 3; }
.log-link-campaign { grid-area: 2 / 1; }
.log-link-task { grid-area: 2 / 2; }
.data-table .log-link-slots .icon-button { width: 2.25rem; margin: 0; }
details.inline-help { margin: .35rem 0 0; padding: 0; border: 0; background: none; font-size: .875rem; }
details.inline-help[open] { padding-bottom: 0; }

[hidden] { display: none !important; }
.content-editor { min-height: 12rem; overflow-wrap: anywhere; }
/* While the HTML source is being re-sanitized, the visual pane dims but stays visible. */
[data-visual-content][aria-busy="true"] .content-editor { opacity: .55; }
/* An HTML source error is marked at the visual editor too, as a field's (#563). */
.content-editor[aria-invalid="true"] { border: 2px solid var(--error-border); }
/* Greyed in place, as a disabled textarea is, while "Remove this selected content" is ticked (#563, #750). */
.content-editor[aria-disabled="true"] { background: var(--paper-soft); color: var(--muted); cursor: not-allowed; }
.content-sample, pre { overflow-wrap: anywhere; white-space: pre-wrap; }
.light-card { background: var(--paper); color: var(--ink); }
.content-sample { padding: 1rem; border: 1px dashed var(--control-border); border-radius: var(--radius-small); background: var(--paper); }
/* A report email's saved copy keeps the email as it was sent (#1946). The
   page's style policy drops the email's inline styles, so its closing button
   (a bgcolor cell holding a link) takes the portal button's colours, which
   keep their contrast in both themes; the cell's bgcolor alone would leave the
   link in the page's link colour on dark teal. Only the button's cell: the
   email's share bars are bgcolor cells too, and each segment keeps its own
   colour, so a bar never looks full. */
.report-email-copy td[bgcolor]:has(> a) { background: var(--accent); }
.report-email-copy td[bgcolor] > a { display: inline-block; padding: var(--button-padding); color: var(--paper); font-weight: var(--button-weight); text-decoration: none; }


/* Toggletips (ui-v1.js): a small round "i" button beside a label that opens
   one short help bubble on click or tap. Every bubble floats, wherever its
   button sits (a label row, a filter bar, a table heading, beside a
   checkbox, on Family or Admin pages): fixed to the viewport, it is outside
   every box's flow and overflow, so opening it never moves a label or
   control, never grows a field or a table's .table-scroll box and never
   scrolls anything (UI conventions, Field help; #1289). ui-v1.js places it
   below its button, or above when only there it fits, inside the viewport;
   the max-width already fits a phone. */
.label-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-block: 1rem .35rem; }
.label-row > label, .label-row > legend { margin: 0; }
.toggletip { display: inline-block; vertical-align: middle; }
/* In a label row the button is the row's own flex item, centred on the
   label's line. */
.label-row > .toggletip { display: contents; }
/* The 1.75rem circle is taller than the label's 1.6 line (1.6rem), so beside a
   label it would make this row 1-2px taller than the same label drawn
   alone, and freeing a locked Campaign setting (which drops its "i") would
   shift the fields below it (#1630). Trimming .1rem off each side of its
   margin box keeps the circle (and its touch target) as drawn but lets the
   row be exactly as tall as its label; a wrapped "i" on a line of its own
   still gets its full 1.55rem line. */
.label-row > .toggletip > .toggletip-button { margin-block: -.1rem; }
.toggletip-button { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; min-height: 0; margin: 0; padding: 0; border: 2px solid var(--accent); border-radius: 50%; background: var(--paper); color: var(--accent); font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 700; line-height: 1; box-shadow: none; position: relative; }
/* A 44px touch target around the 28px circle, without enlarging the icon. */
.toggletip-button::before { content: ""; position: absolute; inset: -.5rem; }
.toggletip-button:not(:disabled):hover, .toggletip-button[aria-expanded=true] { background: var(--accent); color: var(--paper); box-shadow: none; }
.toggletip-bubble { position: fixed; inset: auto; z-index: 3; display: block; width: max-content; max-width: min(20rem, calc(100vw - 2rem)); padding: .6rem .8rem; border: 1px solid var(--border); border-inline-start: .3rem solid var(--accent); border-radius: var(--radius-small); background: var(--paper-soft, var(--paper)); color: var(--ink); font-size: .925rem; font-weight: 450; font-style: normal; line-height: 1.4; box-shadow: var(--shadow); }

/* A Member's section groups fields without a second box around them. */
fieldset.member-section { border: 0; border-radius: 0; background: none; padding: 0; margin: 0; }

/* Family response pages: one page at a time with Back/Next navigation. */
#family-flow > h2 { font-size: clamp(1.45rem, 5vw, 1.9rem); margin-bottom: .25rem; }
.family-step { color: var(--muted); font-weight: 600; margin: 0 0 .35rem; }
.family-page > h3 { margin-top: .5rem; }
/* Optional campaign images (#248): a small icon above each page heading (on
   Welcome, below the returning-Family notice); it scales down on phones. The
   wide banner is used in emails only. */
.family-page-icon { display: block; width: 6rem; height: auto; margin: .25rem 0 0; }
.artwork-banner { max-width: 100%; height: auto; }
.artwork-section { width: 6rem; height: auto; }
/* Campaign images (#750): each slot's image box keeps its size with or
   without an image, and the removal line keeps its space, so an applied
   change never changes a slot's height or moves what is below it. */
.artwork-frame { margin: 0 0 .5rem; }
.artwork-box { display: block; position: relative; max-width: 100%; }
.artwork-box-banner { width: 1024px; aspect-ratio: 1024 / 217; }
.artwork-box-section { width: 6rem; aspect-ratio: 1; }
.artwork-box > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
/* The removal line holds Remove this image, a text-styled button in a form
   of its own (#750); the line keeps the button's full touch height whether
   or not it is drawn, and the button never looks filled, on hover or while
   its Review is prepared (it then keeps its text style, with the busy
   spinner after it). */
.artwork-remove { min-height: var(--button-min-height); margin-block: .5rem; }
.artwork-remove .link-button, .artwork-remove .link-button:not(:disabled):hover, .artwork-remove .link-button.is-busy[aria-disabled=true] { margin: 0; min-height: var(--button-min-height); background: none; box-shadow: none; color: var(--link); }
/* A slot's upload controls sit in a plain fieldset only so a slot whose
   Family page the campaign never shows can grey them all at once (#563). */
fieldset.artwork-upload { border: 0; border-radius: 0; background: none; padding: 0; margin: 0; }
/* A slot's status line (review-outcome.html) also says why an upload was
   refused (#1410), which can be longer than one line. So it wraps, whole
   and readable, in lines kept whether or not it says anything: two, or
   three on a phone, enough for a file that is no usable image (the common
   refusal), so neither it nor the one-line "Applied" status moves the
   slots below. A longer message (a stale page's unavailable reason, on a
   phone) grows the line rather than being cut short. */
.artwork-slot .review-outcome { white-space: normal; min-height: 2lh; }
@media (max-width: 40rem) { .artwork-slot .review-outcome { min-height: 3lh; } }
/* Backup encryption key's status line also says why a code was refused
   (#750), a sentence or two. It ends the page's content, so it wraps,
   whole, instead of being cut short: growing moves nothing but the
   footer. */
#backup-key-outcome { white-space: normal; }
.family-summary .family-name { font-size: 1.2rem; font-weight: 650; }
.family-nav { position: sticky; bottom: 0; z-index: 1; background: var(--paper-soft, var(--paper)); padding-block: .75rem max(.75rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--border); margin-top: 1.5rem; }
.family-nav > button { margin-block: 0; }
/* The bar's three fixed slots (ui-conventions "Stepper button row", #1933):
   Back left, the action (Cancel and sign out, or Submit on Review) centered,
   Next right. Each button names its slot (data-nav-slot); a slot whose button
   is hidden keeps its space, so nothing moves from step to step. The two side
   columns share the free space equally, which keeps the action centered.
   Each has the same fixed minimum, wide enough for Back to edit (about
   8.5rem): a minimum sized from each column's own button would make Review's
   Back column wider than its empty Next column and push a long Submit (a
   long parish name) off center, so that Submit wraps instead. The buttons
   align to the line's top, so a wrapped Submit moves no other button.
   Rows have no gap: the note's own margin spaces it, so its row takes no
   height while the note is hidden. */
.family-nav { display: grid; grid-template-columns: minmax(10rem, 1fr) auto minmax(10rem, 1fr); grid-template-areas: "note note note" "back action next"; align-items: start; column-gap: 1rem; row-gap: 0; }
.family-nav > [data-nav-slot="back"] { grid-area: back; justify-self: start; }
.family-nav > [data-nav-slot="action"] { grid-area: action; justify-self: center; }
.family-nav > [data-nav-slot="next"] { grid-area: next; justify-self: end; }
/* Only the centered action may wrap (a long parish name in Submit): Back to
   edit breaking onto two lines would look broken. */
.family-nav > [data-nav-slot="back"], .family-nav > [data-nav-slot="next"] { white-space: nowrap; }
/* A phone keeps the same one line (#1933): tighter spacing, and each long
   label shows only its first word ("Back · Cancel · Next", "Back · Submit").
   family-v1.js keeps the full label as the button's accessible name. One
   44px-tall line keeps the bar short, so it covers little of the screen and
   a Member page's first control stays above it (#292). The short labels
   leave plenty of room, so the side columns need no fixed minimum here. */
@media (max-width: 40rem) {
  .family-nav { grid-template-columns: 1fr auto 1fr; column-gap: .5rem; }
  .family-nav > button { padding-inline: .75rem; white-space: nowrap; }
  .family-nav-long { display: none; }
}
/* Why Next or Review didn't advance: a full-width line above the buttons. */
.family-nav-error { grid-area: note; margin: 0 0 .75rem; }
/* On a phone the note must not crowd out the form under the sticky bar. */
@media (max-width: 40rem) { .family-nav-error { padding: .5rem .75rem; font-size: .9rem; } }
/* A note for screen readers only (the field shows its own error line): the
   note's padding, margin and border would otherwise undo .visually-hidden. */
.family-nav-error.visually-hidden { padding: 0; border: 0; margin: -1px; }
/* Keep a field that receives focus (Next to an error, Tab) clear of the
   sticky bar instead of scrolling it underneath. */
html:has(.family-nav) { scroll-padding-bottom: 6rem; }
/* The bar is always along the bottom of the screen (ui-conventions "Stepper
   button row", #2063). Sticky alone holds it there only on a page taller
   than the screen; a shorter page would leave it right under the content.
   So the page fills at least the screen (dvh: a phone's browser toolbars
   are not counted), main is a flex column, and the flow above the bar
   grows to take the free space, which puts the bar at the screen's bottom.
   family-v1.js draws the bar in #family-actions, main's last child, rather
   than inside the form: as a child of main it sticks over the whole page,
   and only main needs to be a flex column. Making the boxes between main
   and the form flex columns would stop the margins of the content inside
   them from collapsing, which would change the spacing of every page.
   #family-actions itself makes no box, so main lays out the bar. main's
   bottom padding goes, so the bar also ends at the screen's bottom at the
   page's end. The flow's ::after keeps the gap above the bar the larger of
   1.5rem and the content's own bottom margin, which collapse together, as
   when the bar followed the content. Pure CSS: nothing is measured, so
   nothing moves after the first paint. */
body:has(.family-nav) { min-height: 100dvh; }
main:has(> #family-actions > .family-nav) { display: flex; flex-direction: column; padding-bottom: 0; }
main:has(> #family-actions > .family-nav) > .flow { flex: 1 0 auto; width: 100%; }
main:has(> #family-actions > .family-nav) > .flow::after { content: ""; display: block; margin-top: 1.5rem; }
#family-actions { display: contents; }
/* Pages whose button row is pinned to the screen's bottom (the Family
   form's steps, #2063, and the Admin review wizard) have no site footer
   (ui-conventions "Site footer"): the row must end at the screen's bottom
   at the page's end too, and a footer below it would lift it there. */
body:has(.family-nav, .review-wizard-nav-bottom) > .site-footer { display: none; }
#family-actions > .family-nav { margin: 0 auto; width: 100%; max-width: 42rem; }
/* Step bars (ui-conventions "Step bars", #1402): the Family step bar and the
   Admin steppers' bar (stepper-steps.html, for the setup wizard and Campaign
   setup) share these segment rules. Each segment is a 44px-tall control (a
   button on the Family form, a link to its page in the Admin) drawing a slim
   bar, with a tooltip on hover and keyboard focus. Color is never the only
   signal: the "Step N of M" line and aria-current name the current step. The
   Family selectors are unchanged; the Admin ones only join them. */
/* The shared theme lays out every main nav as a wrapping flex row, which
   would shrink this list to nothing; the bar spans the full width instead. */
main nav.family-track { display: block; margin: 0; }
.family-track ol { display: flex; gap: 3px; list-style: none; margin: .25rem 0 1rem; padding: 0; }
.family-track li, .setup-track li { flex: 1 1 0; min-width: 0; margin: 0; position: relative; }
.family-track ol.family-track-dense { gap: 0; }
.family-track-dense button::before { border-radius: 0; }
.family-track button, .setup-track a { display: block; width: 100%; min-height: 44px; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; cursor: pointer; position: relative; }
.family-track button::before, .setup-track a::before { content: ""; position: absolute; inset-inline: 0; top: 50%; height: .45rem; transform: translateY(-50%); border-radius: 999px; background: var(--track); }
.family-track .family-track-done::before, .setup-track .setup-track-done::before { background: var(--accent); }
.family-track .family-track-current::before, .setup-track .setup-track-current::before { background: var(--gold); height: .6rem; }
.family-track button::after, .setup-track a::after { content: attr(data-tip); position: absolute; top: calc(100% + .1rem); z-index: 2; display: none; width: max-content; max-width: min(16rem, 60vw); padding: .35rem .6rem; border-radius: .4rem; background: var(--ink); color: var(--paper); font-size: .875rem; font-weight: 600; line-height: 1.3; text-align: start; white-space: normal; pointer-events: none; }
/* Anchor each tooltip by where its segment sits (first, middle or last third)
   so, at no more than 60% of the viewport wide, it never runs off a phone. */
.family-track .family-tip-start::after, .setup-track .setup-tip-start::after { inset-inline-start: 0; }
.family-track .family-tip-middle::after, .setup-track .setup-tip-middle::after { left: 50%; transform: translateX(-50%); }
.family-track .family-tip-end::after, .setup-track .setup-tip-end::after { inset-inline-end: 0; }
.family-track button:hover::after, .family-track button:focus::after,
.setup-track a:hover::after, .setup-track a:focus::after { display: block; }
/* The tooltip is visual only: its text is already the segment's name (and,
   when not yet available, its description), so an empty alternative keeps it
   out of the accessible name. Browsers without alternative text for generated
   content ignore the second declaration and keep the first. */
.family-track button::after, .setup-track a::after { content: attr(data-tip); content: attr(data-tip) / ""; }
/* A step not available yet (aria-disabled: one the Family has not reached,
   #330, or an Admin step whose prerequisites are missing, #1402): the
   not-allowed pointer, but drawn by its own track colours rather than the
   shared unavailable button's dimming, which would also dim its tip. */
.family-track button[aria-disabled=true], .setup-track a[aria-disabled=true] { cursor: not-allowed; opacity: 1; }
.family-submitted { margin-block: 0 1rem; }
.financial-conditional { border: 0; padding: 0; margin: 0; background: none; }
/* Limitation checkboxes ("cannot attend", "cannot participate", "cannot
   contribute") stand apart from ordinary choices, since they hide or lock
   other answers. */
label.limitation { display: block; margin-block: 1rem; font-weight: 600; }
.financial-pledge { border: 0; padding: 0; margin: 0; background: none; }
/* Room between the pledge, frequency and per-payment lines, so a focused
   field's outline doesn't run into the line above or below it. */
.financial-pledge input, .financial-pledge select { margin-block-end: .75rem; }
.financial-pledge label { display: block; margin-block-start: 1rem; }
/* The annual pledge's money row keeps that room below it, not below its
   field, so the "$" stays the field's height. */
.financial-pledge .money-input { margin-block-end: .75rem; }
.financial-pledge .money-input > input { margin-block-end: 0; }
#financial-installment { margin-block: .75rem 1rem; }
/* Locked choices read as unavailable through color that still meets
   contrast (never opacity), a dashed outline and a not-allowed cursor. */
.ministry-choices.is-locked { color: var(--muted); border-inline-start: 3px dashed var(--muted); padding-inline-start: .75rem; }
.ministry-choices.is-locked :is(label, .ministry-join > summary) { cursor: not-allowed; }
/* Ministry rows: the ministry name, then the choice, stated once. */
.ministry-row { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.25rem; padding: .6rem .9rem; margin-block: .5rem; }
.ministry-row > legend { float: none; width: auto; flex: 1 1 100%; font-weight: var(--heading-weight); margin: 0; }
/* The choice labels are long ("Stop participating in this ministry"): let them
   wrap inside the row on a phone, keeping the radio beside the first line. */
.ministry-row > label { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; margin: 0; min-width: 0; max-width: 100%; }
.ministry-row > label > input { flex-shrink: 0; }
.ministry-row.changed { border-inline-start-width: .3rem; }
/* A ministry the Member is stopping, in the attention colour (not green). */
.stopping { border-inline-start: .3rem solid var(--warning-border); padding-inline-start: .75rem; background: var(--warning-bg); border-radius: 0 var(--radius-small) var(--radius-small) 0; }
.ministry-joining p, .stopping > p, .ministry-continuing > p { margin-block: 0 .25rem; }
.ministry-joining ul, .stopping > ul, .ministry-continuing > ul { margin-block: 0; }
/* The join list is collapsed by default; make the disclosure look actionable. */
.ministry-join > summary { list-style: none; display: inline-flex; align-items: center; gap: .5rem; }
.ministry-join > summary::-webkit-details-marker { display: none; }
.ministry-join > summary::before { content: ""; width: .5rem; height: .5rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.ministry-join[open] > summary::before { transform: rotate(45deg); }
.ministry-join > label, .ministry-join [role=group] > label { display: flex; align-items: center; gap: .5rem; min-height: 44px; }

@media (max-width: 36rem) {
  main { padding-top: 1.25rem; }
  .actions > button { flex: 1 1 auto; }
  th, td { padding: .6rem .7rem; }
  caption { padding: .85rem .7rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print {
  button, .skip-link, .site-header::before, .admin-sidebar, nav.breadcrumbs, .appearance-switch, .family-nav { display: none; }
  .admin-shell { display: block; }
  body { background: white; }
  main { padding: 0; }
  .site-header { box-shadow: none; }
  .panel, .table-scroll { box-shadow: none; border-color: #999; }
  .table-scroll { overflow: visible; }
}

/* A compact form rendered inline in table cells (e.g. "Show related entries"
   on System logs), with its submit button styled as a text link. */
.inline-form { display: inline; margin: 0; }
.link-button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--link);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

/* The Financial stewardship report's Family table (#1544, ui-conventions
   "Table fit and row height"): short rows that fit beside the Admin menu
   at laptop width. The table
   is a .data-table.whole-words (#931), which already gives it the .nowrap
   and .numeric cell classes and between-word wrapping, so a table wider than
   the screen scrolls in its .table-scroll box. Only what is specific to
   this report is here: one-line rows are centred vertically (the shared
   table aligns to the top for multi-line rows) with tighter padding and a
   slightly smaller body, so typical rows fit beside the Admin menu; a tip's
   bubble inside a no-wrap cell wraps its own text again; cells are
   positioned so the Staff chip's absolutely placed screen-reader text stays
   inside its cell and the scroll box, never widening the page (as in #933). */
.financial-table.data-table th, .financial-table.data-table td,
.financial-table.data-table tbody th, .financial-table.data-table tbody td { position: relative; padding: .45rem .5rem; vertical-align: middle; }
.financial-table tbody { font-size: .9375rem; }
.financial-table .toggletip-bubble { white-space: normal; }

/* Two related values stacked in one table cell, each on its own line
   (ui-conventions "Table fit and row height", #1544), with the heading
   naming them in the same order on its own stacked lines. */
.data-table .stack-line { display: block; }

/* Family codes are short fixed-length tokens; never wrap one mid-code. */
td.family-code, td.family-code code { white-space: nowrap; }
/* The Open form link's screen-reader text is positioned absolutely; keep it
   inside its cell, so a wide table scrolls in its region instead of widening
   the page when the code column is off-screen (#933). */
td.family-code { position: relative; }
/* Contact details open inside the last column. The two-column dl grid used
   elsewhere gives its value column a zero minimum, so in an auto-width table
   cell the long labels took all the room and the values collapsed to zero
   width. Stack label and value here, and keep the column from collapsing. */
td.contact-details { min-width: 16rem; }
/* The visually hidden Family names are absolutely positioned; anchor them to
   the summary so they cannot widen the page (#1654). */
td.contact-details summary { position: relative; }
td.contact-details dl { display: block; }
td.contact-details dd { margin: 0 0 .5rem; }

/* Hosted files (#346): images in parish content fit their column, and the
   library's placeholder fields are wide enough to read. */
.content-block img, .content-sample img { max-width: 100%; height: auto; }
.hosted-file-thumbnail { width: 48px; height: auto; }
.hosted-file-copy { width: 18rem; max-width: 100%; font-family: monospace; }

/* Sortable column headings (the sort_heading template tag): the heading
   text is the control, a link or a POST button styled as one. The arrow is
   decoration; aria-sort and hidden text carry the meaning. */
.table-nav-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.table-nav-controls form { margin: 0; }
th .sort-form { display: inline; margin: 0; }
th .sort-link, th button.sort-link { position: relative; display: inline-flex; align-items: center; gap: .3rem; min-height: 0; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: none; cursor: pointer; }
th .sort-link:hover, th .sort-link:focus-visible { color: var(--accent-strong); text-decoration: underline; }
th[aria-sort] .sort-link { color: var(--ink); }
.sort-indicator { font-size: .75em; }
th:not([aria-sort]) .sort-indicator { opacity: .45; }
/* While ui-v1.js re-sorts or re-pages a table in place (#478), the rows dim but stay readable. */
[data-table-region][aria-busy="true"], [data-in-place-region][aria-busy="true"] { cursor: progress; }
/* A repeat rule's date list awaiting a newer answer (#2092): muted in place,
   in the help text's color, which keeps its contrast (no opacity). */
[data-repeat-preview][aria-busy="true"], [data-repeat-preview][aria-busy="true"] * { color: var(--muted); cursor: progress; }
[data-table-region][aria-busy="true"] table { opacity: .55; }
/* A review withdrawn by a later edit stays in place (#532, #736), greyed
   out through a colour that still meets contrast (never opacity), except
   its note saying to review again. */
[data-review-stale] > :not([data-review-note]) { color: var(--muted); }

/* Compact Admin pages (#227): the page's data should start within a laptop
   screen (about 768px tall) with help collapsed. Scoped to Admin pages, so
   the Family portal keeps its roomier, phone-first spacing. :where() keeps
   these rules at element-level specificity, so they tighten only the shared
   defaults and every more specific rule above (inline help, data
   tables, filter bars, .flow panels) still wins. */
:where(.admin-body) main { padding-top: 1rem; }
:where(.admin-body) main nav.breadcrumbs { margin-bottom: .5rem; }
:where(.admin-body) .flow-steps { margin-bottom: .75rem; }
:where(.admin-body) h1 { font-size: clamp(1.5rem, 2.5vw, 1.9rem); margin-block: 0 .5rem; }
:where(.admin-body) h2 { margin-block: 1.25rem .5rem; }
:where(.admin-body) .panel { padding: clamp(.85rem, 2vw, 1.25rem); margin-block: .85rem; }
/* A region that holds its height (ui-v1.js heldHeight, #736) is a flow
   root, so its children's margins stay inside it from page load: a margin
   escaping through it would let the first hold pull the page up. Its first
   child's top margin is dropped, so the space above the region matches the
   collapsed spacing it had before it became a flow root. */
[data-keep-height] { display: flow-root; }
[data-keep-height] > :first-child { margin-top: 0; }
:where(.admin-body main) details { margin-block: .75rem; }
:where(.admin-body main) details[open] { padding-bottom: .75rem; }
:where(.admin-body) .table-scroll { margin-block: .75rem; }
:where(.admin-body) caption { padding: .6rem 1rem; }
:where(.admin-body) th, :where(.admin-body) td { padding: .5rem .85rem; }
/* Narrower filter fields, so a short filter form fits on one row. */
:where(.admin-body) .filter-bar > div { flex-basis: 18rem; }
/* The Ministry follow-up queue (#1064). Its six filters take two rows at
   laptop widths, Search the widest; the fields grow to fill each row, and
   at phone width each takes its own. Its table keeps rows short: the cells
   that are not names never wrap (.nowrap), the Member name is one line, a
   little narrower than elsewhere so the table fits beside the Admin menu
   at laptop width, and the Ministry name takes at most two (#1136), its
   "Removed" badge beside it. */
.followup-filters > div { flex: 1 1 12rem; }
.followup-filters > div.followup-search { flex: 2 1 26rem; }
.followup-table .cell-ellipsis { max-width: 13rem; }
/* Ministry requests' By Ministry counts (#1133): a long scope scrolls inside
   its own box, with its column headings kept in view, so the queue table
   below stays near; a scope of a few Ministries never reaches the limit. */
.by-ministry-scroll { max-height: 18rem; overflow-y: auto; }
.by-ministry-scroll thead th { position: sticky; top: 0; background: var(--paper-soft); }
/* By Ministry's Leaders cell (#1594): a small status indicator, its word
   and icon on its state's background, so the token pairs the contrast test
   checks are the ones drawn. One line, so the row keeps its height. */
.leader-status { display: inline-flex; align-items: center; gap: .3rem; padding: 0 .4rem; border-radius: .25rem; color: var(--status-ink); background: var(--status-bg); white-space: nowrap; }
.cell-with-badge { position: relative; display: flex; align-items: center; gap: .4rem; }
.cell-with-badge > .cell-ellipsis { min-width: 0; }
.cell-with-badge > .cell-clamp { flex: 0 1 auto; }
.cell-with-badge > .status-badge { flex: none; }
/* Keep the phone-width cell padding from the narrow-screen rules above,
   which the compact rule just before would otherwise override. */
@media (max-width: 36rem) {
  :where(.admin-body) th, :where(.admin-body) td { padding: .6rem .7rem; }
  :where(.admin-body) caption { padding: .85rem .7rem; }
}
/* Standing notices stay prominent but shorter; the Testing banner reads as
   one line: its label, then the recipient and the configuration link. */
:where(.admin-body) .notice { padding: .6rem 1rem; margin-block: .75rem; }
.testing-banner > strong { margin-inline-end: .5rem; }
.testing-banner > p { display: inline; }
/* The About control sits beside the page heading rather than on its own
   line, open or closed (#602). Not scoped to .admin-body: the setup wizard
   has no Admin chrome, and the About panel exists only on staff pages.
   Templates keep the panel directly after the h1 (test_admin_help_guards
   checks it). */
h1:has(+ details.about-page) { display: inline-block; margin-inline-end: 1.25rem; }

/* The repeat rule's weekdays (#469): the seven choices wrap side by side
   instead of a tall single column; each keeps its 44px touch target. */
.repeat-days { display: flex; flex-wrap: wrap; column-gap: 1.25rem; }
.repeat-days > label { display: inline-block; }
/* No weekday chosen, once the reader has reached the days (#1915): the
   group is outlined in the error colour, which takes no room, so the mark
   moves nothing; its message is in the reserved line after the group. */
.repeat-days:has(> label > input[aria-invalid=true]) { outline: 2px solid var(--error-border); outline-offset: .25rem; border-radius: .25rem; }
/* The New schedule pane's Send time reading (#1117, #1944) reserves two
   lines, so a refusal such as "“9xx” isn't a time. Try 2:00 PM, …"
   appearing moves nothing below it (the pane's line). On desktop it takes
   the field's full width, not the short-field 14rem, whose selector it must
   outrank (R45: at 14rem the refusal wrapped to a third line). */
.schedule-pane .time-reading { min-height: 3.2em; min-height: 2lh; }
@media (min-width: 48rem) {
  .schedule-pane div:has(> input[data-time-entry=time]) > .time-reading { max-width: none; }
}
/* Repeating (New scheduled email, the date-change review's New schedule;
   pk-local R48): on desktop From, Until and Send time share one row, as
   other short fields do (the row rule above). From and Until are the repeat
   rule's, inside its panel, and Send time is the schedule row's own field,
   so the panel and rule boxes are dissolved (display: contents) while shown
   and the three boxes sit in one line, wrapping where they do not fit; the
   hidden Send date between them takes no place. The markup is unchanged,
   so labels, help, errors and tab order (From, Until, Send time) stay as
   they were. Below 48rem everything stacks as before. While Repeating, the
   time's reading wraps inside its box (it never widens it, which would push
   it to a line of its own as a refusal appears) and reserves three lines,
   so a refusal moves nothing. */
@media (min-width: 48rem) {
  [data-schedule-row] :is([data-repeat-panel], [data-repeat-rule]):not([hidden]) { display: contents; }
  [data-schedule-row] .field:has(> input:is([data-repeat=from], [data-repeat=until])) { display: inline-flex; flex-direction: column; vertical-align: top; min-width: 12rem; margin-inline-end: 1.5rem; }
  [data-schedule-row] .field > input:is([data-repeat=from], [data-repeat=until]) { max-width: 14rem; }
  [data-schedule-row]:has([data-repeat-panel]:not([hidden]) [data-repeat=from]):not(:has([data-repeat-rule][hidden])) [data-schedule-field=time] .time-reading { width: 0; min-width: 100%; max-width: none; min-height: 4.8em; min-height: 3lh; }
}
/* The repeat summary reserves two lines, so its text appearing, changing or
   wrapping on a phone never moves the Add button below it (#469). */
.repeat-summary { min-height: 3.2em; min-height: 2lh; margin-block: .5rem 0; font-weight: 600; }

/* Action tables (#879, components/table-actions.html and confirm-dialog.html).
   Each row action is a square icon button with the 44px touch target; the
   icon is decoration (the button carries the name and tooltip). Delete keeps
   the secondary look with the error colour, so it stands apart from Edit by
   shape and colour. The confirmation dialog is anchored near the top, not
   centred, so its error line appearing below the buttons never moves them. */
.table-actions { white-space: nowrap; }
.table-actions .icon-button { margin: 0 .5rem 0 0; }
.table-actions .icon-button:last-child { margin-inline-end: 0; }
/* A row action that posts in place (a worklist's Entered by hand) sits in
   its own form, inline, so it lines up as a lone button does. */
.table-actions form { display: inline; margin: 0; }
/* A worklist whose table fits its box only by wrapping its text columns
   (Pledges, #2131) holds its Actions cell's icons two to a line: four
   44px decision toggles on one line took the room its Family's answer
   needed, wrapping it onto one more line, so the first row ended below a
   laptop's window. Its rows are already several lines tall, so two lines
   of icons fit them. The width is two icons and their two .5rem end
   margins (the second's is dropped, but the line still fits it), so the
   pairs never re-break; the row gap matches the icons' gap. */
.table-actions.paired-actions { white-space: normal; width: calc(2 * var(--button-min-height) + 1rem); min-width: calc(2 * var(--button-min-height) + 1rem); box-sizing: content-box; }
.table-actions.paired-actions .icon-button:nth-child(even) { margin-inline-end: 0; }
.table-actions.paired-actions .icon-button:nth-child(n+3) { margin-block-start: .5rem; }
/* A fixed square, not a minimum: a link (Edit) and a <button> (Delete) must
   draw the same size, and the `.data-table button` rule's smaller padding and
   min-height would otherwise shrink only the button. The doubled-up selector
   outranks it. */
.icon-button, .data-table .icon-button { display: inline-flex; align-items: center; justify-content: center; width: var(--button-min-height); height: var(--button-min-height); min-width: 0; min-height: 0; padding: 0; line-height: 1; }
.icon-button .action-icon { width: 1.15rem; height: 1.15rem; }
.icon-button-danger { color: var(--error-ink); border-color: var(--error-border); }
.icon-button-danger:not(:disabled):hover { background: var(--error-bg); color: var(--error-ink); }
/* The review worklist (#1681; UX conventions, "Row actions and
   confirmation"): the icon of a decision or mark in force is drawn selected,
   filled with its status look's line colour (.status-working for an
   accepted decision or a mark, .status-unknown for Ignored) with the glyph
   in --paper (white on the light scheme, dark on the dark one, so it keeps
   its contrast). It is a toggle (UX conventions, "Decision toggles",
   #2131): the pressed icon that is the row's undo takes the pointer and,
   on hover, a ring drawn outside it (a box shadow, so nothing moves); a
   pressed icon waiting for a later undo is aria-disabled and keeps the
   ordinary pointer and no hover. */
.icon-button.is-selected, .icon-button.is-selected:not(:disabled):hover { background: var(--status-line); border-color: var(--status-line); color: var(--paper); cursor: default; }
.icon-button.is-selected:not(:disabled):not([aria-disabled=true]) { cursor: pointer; }
.icon-button.is-selected:not(:disabled):not([aria-disabled=true]):hover { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--status-line); }
/* The Stage column's chip: a plain badge, or for a needs-correction stage
   (Entered incorrectly) and the Not seen in ParishSoft flag the Error and
   Warning looks with their icon (UX conventions, "Status indicators"). */
.stage-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .55rem; border: 1px solid var(--border); border-radius: 999px; background: var(--paper-soft); color: var(--ink); font-size: .8125rem; font-weight: 600; white-space: nowrap; }
/* A status badge in the Warning look (a Paused report email, #1966) takes
   the same border, background and ink as a stage chip in that look; its
   icon and word carry the state, not the colour. */
.stage-chip:is(.status-error, .status-warning), .status-badge.status-warning { border-color: var(--status-line); background: var(--status-bg); color: var(--status-ink); }
/* A review region's item someone else changed (#2174) says so beside its
   stage in a small accent notice with the info icon: easy to spot, but in
   the calm accent look, not a warning, so it reads as news, not as a stage
   or a problem. It is drawn hidden with every item and shown only on a
   redrawn one. */
.live-changed { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .45rem; border: 1px solid var(--accent); border-radius: var(--radius-small); background: var(--accent-soft); color: var(--accent-strong); font-size: .8125rem; font-weight: 700; }
/* In a table cell it goes under the stage as a block that fills the cell
   and wraps its words, and contain: inline-size keeps its width out of the
   table's column sizing: a tag that counted would widen the Stage column
   of a table laid out without it, re-wrapping the headings and moving
   every row (Firefox). The block ends its line itself, so the <br> before
   a worklist row's decision label would leave a blank line. */
td > .live-changed { display: flex; contain: inline-size; margin-block-start: .25rem; }
td > .live-changed:not([hidden]) + br { display: none; }
.live-changed .level-icon { color: var(--accent); }
/* A worklist's filters are always open (no Filters disclosure), on one
   compact row that wraps only when the window is too narrow for it
   (#1653), so a laptop window (1366 px, Admin menu beside) holds a
   stream's fields and Apply filters and Clear filters on one row and its
   first rows show on the first screen. A select's cell starts at 8rem and
   shares the row's spare room up to 11rem, so a choice such as "All my
   Ministries" reads whole when there is room; a search's cell is a fixed
   10.5rem (24rem when Stage is the only other field, below), its long
   label wrapping above it rather than being cut. Only the selects grow,
   and their labels are short, so the fields' row keeps its height with
   Apply and Clear beside it or not, which the shared placement's
   measurement needs. The form takes the content's whole width (not the
   60rem of other forms), the cells' gap is narrower, and a select's inner
   padding is slimmer. The fields line up along the row's foot. Apply
   filters and Clear filters (.filter-actions) are placed by the shared
   three-step rule like every filter form's (#table-filters rules above,
   ui-conventions "Clear filters"): beside the last field, or Clear under
   Apply when a two-line label already makes the row that tall (Ministry
   requests' five fields). A wrapping row, not the Filters panel's equal
   grid columns, because a grid cell can be narrower than the pair with
   Linux's or WebKit's wider fonts. On a phone each field takes the whole
   row. The reserved hint takes its own row. */
.worklist-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem; max-width: none; margin-block: .5rem; }
.worklist-filters label { margin: 0 0 .25rem; font-size: .925rem; }
.worklist-filters > div:not(.filter-actions) { flex: 1 1 8rem; min-width: 0; max-width: 11rem; margin: 0; }
.worklist-filters > div:has(> input[name=search]) { flex: 0 0 10.5rem; max-width: none; }
/* With Stage and a search alone (Additional information, Pledges), the row
   has room to spare, so the search takes 24rem and its long label one or
   two lines rather than three. The form's divs are then Stage, the search
   and the buttons' pair: no fourth. */
.worklist-filters:not(:has(> div:nth-of-type(4))) > div:has(> input[name=search]) { flex-basis: 24rem; }
.worklist-filters select:not([multiple]):not([size]) { padding-inline: .6rem 2rem; background-position: right .6rem center; }
.worklist-filters > div > :is(input, select) { width: 100%; max-width: none; }
.worklist-filters > :is(p, [data-complete-hint]) { flex-basis: 100%; margin: 0; }
/* A worklist filter whose choices are long phrases (Limitations' Show,
   #1685) starts at two cells and their gap, and grows further, so its
   chosen text reads whole; on a phone it takes the whole row like every
   field (below). */
.worklist-filters > div.wide { flex-basis: 16.5rem; max-width: 24rem; }
/* The search's own widths name the form, so their phone rule does too. */
@media (max-width: 40rem) { .worklist-filters > div:not(.filter-actions), .worklist-filters > div:has(> input[name=search]), .worklist-filters:not(:has(> div:nth-of-type(4))) > div:has(> input[name=search]) { flex-basis: 100%; max-width: none; } }
/* The review worklist's first row on a laptop's first screen (#1950).
   The filter form's reserved complete-gate hint is drawn on the notice's
   reserved line just below the form, not on a line of its own: it stays
   in the form (the gate finds it there, and Apply filters names it) but is
   taken out of the row's flow. A decision's notice wins the line: while
   the notice has words the hint is not drawn, even if the filters are
   held, since a row's icons and the bulk buttons sit outside the form and
   keep working then, and their answer (an overtaken decision among them)
   must be read. Apply filters is still unavailable and still names the
   hint in aria-describedby, which reads a hidden element's words, so the
   reason reaches assistive technology. With no notice the hint shows
   there while the filters are held. Both lines stay reserved, so neither
   appearing ever moves the table (ui-conventions, No layout shift). */
.worklist-filters { position: relative; }
.worklist-filters > [data-complete-hint] { position: absolute; inset-inline: 0; top: calc(100% + .5rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.worklist-filters:has(+ .worklist-notice > p) > [data-complete-hint] { visibility: hidden; }
/* On a phone the notice keeps two lines, so the hint may wrap onto both. */
@media (max-width: 40rem) { .worklist-filters > [data-complete-hint] { white-space: normal; } }
/* The table region's spacing is tighter than other tables': the bulk
   buttons' gap is the filters' 0.5rem and their side padding 0.875rem,
   so at 1366 px the selected count stays on the buttons' line instead of
   wrapping onto one of its own, even with Linux's wider fonts (Census
   changes and Ministry requests have six buttons). Select all still
   reserves its longer text, Clear selection, at that padding (#563); the
   count keeps its reserved width. The top navigator, the bulk bar and the
   table sit closer, and the caption keeps its words and style with
   slimmer padding. */
.worklist-table .bulk-bar { gap: .5rem; margin-block: .5rem; }
.worklist-table .bulk-bar button { padding-inline: .875rem; }
.worklist-table .bulk-bar [data-select-all-button] { min-width: calc(15ch + 1.75rem + 2 * var(--button-border-width)); }
.worklist-table > nav.table-nav:first-child { margin-block: 0 .5rem; }
.worklist-table .table-scroll { margin-block: .5rem .75rem; }
.worklist-table caption { padding-block: .3rem; }
/* Review work tables (ui-conventions "Review work tables", #2124): every
   stream's review worklist, drawn once by components/review-worklist.html.
   Names, fields and stages keep a minimum width and wrap only between words
   (break-word breaks a word only when it alone is wider than the cell,
   never letter by letter as main's overflow-wrap: anywhere did); free text
   wraps at word boundaries first. The Actions cell holds its icons two to a
   line. The table's own box is a size container, so the rows stack as cards
   whenever it is narrower than 57rem (912 px), whatever the window:
   the Admin menu takes part of a wide window, none of a narrow one. Only
   that box: a container around the row dialogs moved their fields as they
   changed in WebKit. */
.worklist-table .table-scroll { container: review-worklist / inline-size; }
.review-table { width: 100%; }
.review-table th, .review-table td { overflow-wrap: break-word; word-break: normal; }
/* Less side padding than other whole-word tables, so the widest (Ministry
   requests, with long names) keeps its table at a 1280 px window with the
   Admin menu open, even in Linux's wider DejaVu Sans (#2181). */
.data-table.review-table th, .data-table.review-table td { padding-inline: .375rem; }
.review-table .name-cell, .review-table tbody th[scope=row] { min-width: 7rem; }
.review-table .field-cell { min-width: 6rem; }
/* A stage's longest word ("interested", in "Declined / no longer
   interested") is about 75 px in DejaVu Sans, so 5.75rem keeps it whole.
   A short answer with its marker, "Leave (cannot participate)", wraps
   between words onto two lines (#2181); 8.5rem keeps "Leave (cannot"
   (about 114 px in DejaVu Sans) on the first, so the value never needs a
   third line, which its two-line clamp would hide. DejaVu Sans is the
   widest of the fonts the tests use, so do not tighten these on a
   narrower one. */
.review-table .stage-cell { min-width: 5.75rem; }
.review-table .values-cell { min-width: 8.5rem; max-width: 18rem; }
.review-table .dates-cell { min-width: 9rem; }
/* Names are cut short last (ui-conventions "Table fit and row height",
   cut-short values): a Family or Member name (name-clamp) and a Ministry
   name wrap between words to two lines, then clamp, whole in their tip
   (#1136); a badge beside a name or a Ministry wraps under it, its own
   words wrapping too, rather than widening the column. The Ministry's
   13rem holds a name as long as any in use whole on two lines even in
   Linux's wider DejaVu Sans ("Hospitality and welcome" is about 197 px
   there); 12rem cut it to a third line at 1280 px. */
.review-table .cell-clamp { min-width: 13rem; max-width: 16rem; }
.review-table .cell-clamp.name-clamp { min-width: 6rem; max-width: 10rem; }
.review-table .cell-with-badge { flex-wrap: wrap; gap: .2rem .4rem; }
.review-table .status-badge { white-space: normal; }
.review-table .cell-detail, .review-table .value-old,
.review-table .value-label { color: var(--muted); }
.review-table .cell-detail { font-size: .875rem; font-variant-numeric: tabular-nums; }
.review-table .value-label { display: block; font-size: .8125rem; line-height: 1.3; margin-block-start: .25rem; }
/* A Ministry request's Member contact lines (#2398), under the name and
   its DUID in the Member cell: each email and phone on its own small line.
   An email, one long word, may break anywhere rather than widen the
   column; a phone number stays on one line (its kind wraps above it, and
   an extension under it, where the column is narrow), so the narrowest
   column only grows to the number's width, which the small type keeps
   short enough for Ministry requests to keep its table at a 1280 px window
   beside the Admin menu. Where the table has room (a box of 62rem, a
   1366 px laptop window), the lines take 12.5rem, enough for a typical
   "Mobile: +1 (502) 555-0123" with its kind on one line, and the name
   above them may use that width too, the column being that wide already:
   wrapped at the name's 10rem, each would take another line and push a
   laptop's first row out of its window (#1950). The lines, and the
   name and DUID above them in that cell, are set tighter than other
   text: that is the room that keeps a typical Member's first row (one
   email, which wraps once with its label, and two phones) well inside a
   laptop's window in every engine. Each line keeps its visible kind, so
   its link stays inline in text (axe target-size). */
.review-table .member-contact { display: block; max-width: 12.5rem; font-size: .8125rem; line-height: 1.15; font-weight: 400; }
.review-table th:has(> .member-contact) { line-height: 1.3; }
.review-table .member-contact .contact-email { overflow-wrap: anywhere; }
@container review-worklist (width >= 62rem) {
  .review-table .member-contact { min-width: 12.5rem; }
  .review-table th:has(> .member-contact) .cell-clamp.name-clamp { max-width: 12.5rem; }
}
/* The two sort controls of a stacked heading keep 24px targets
   (WCAG 2.2 target size). */
.review-table .stacked-heading .sort-link { display: inline-flex; align-items: center; min-height: 24px; }
/* A long value that two lines hold after all keeps its Show all's line
   but hides it (ui-v1.js), so no row changes height. */
.review-table .cell-more-unneeded { visibility: hidden; }
.review-table .value-new { display: flex; gap: .3rem; align-items: baseline; }
.review-table .value-new > :not(.value-arrow) { min-width: 0; }
.review-table .stage-cell .stage-chip { white-space: normal; }
.review-table .review-actions { white-space: normal; width: calc(2 * var(--button-min-height) + .5rem); min-width: calc(2 * var(--button-min-height) + .5rem); box-sizing: content-box; }
.review-table .review-actions .icon-button { margin-block: 0 .35rem; }
.review-table .review-actions .icon-button:nth-of-type(2n) { margin-inline-end: 0; }
/* A value clamped to two lines; its Show all (a toggletip styled as a link)
   sits under it, and its bubble floats over the page, so it moves nothing. */
.review-table .value-clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.review-table .clamped, .review-table .cell-more { display: block; }
.review-table .toggletip-button.cell-more-button { display: inline; width: auto; height: auto; min-height: 0; border: 0; border-radius: 0; background: none; color: var(--link); font: inherit; font-size: .875rem; font-style: normal; font-weight: 400; text-decoration: underline; }
.review-table .toggletip-button.cell-more-button::before { inset: -.25rem; }
.review-table .toggletip-button.cell-more-button:not(:disabled):hover, .review-table .toggletip-button.cell-more-button[aria-expanded=true] { background: none; color: var(--link); }
.review-table .cell-more-bubble { max-width: min(30rem, calc(100vw - 2rem)); max-height: 50vh; overflow: auto; white-space: pre-line; overflow-wrap: break-word; }
/* The card layout: each row a card of label/value pairs, its name first
   between its selection box and its actions (on the card's first line, so
   a decision that adds lines to the card never moves them), then the other
   cells, flowing side by side where the card has room; the headings a row
   of sort controls above the cards. */
@container review-worklist (width < 57rem) {
  .review-table, .review-table > tbody, .review-table > tbody > tr,
  .review-table > tbody > tr > * { display: block; }
  .review-table > thead > tr { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; padding: .4rem .6rem; }
  .review-table > thead > tr > th { padding: 0; border: 0; background: none; }
  .review-table > thead > tr > th:not(.select-col):not([data-sort-column]) { display: none; }
  .review-table > thead .stacked-heading { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
  .review-table > thead .stacked-heading > .stack-line:not(:has(.sort-link)) { display: none; }
  .review-table > tbody > tr { display: flex; flex-wrap: wrap; gap: .5rem 1rem; padding: .6rem; border-block-start: 1px solid var(--border); }
  .review-table > tbody > tr > * { flex: 1 1 11rem; min-width: 0; max-width: none; width: auto; padding: 0; border: 0; text-align: start; }
  .review-table > tbody > tr > * { order: 2; }
  .review-table > tbody > tr > :is(.select-col, th[scope=row], .review-actions) { order: 1; }
  .review-table > tbody > tr::after { content: ""; order: 1; flex-basis: 100%; }
  .review-table > tbody > tr > .select-col { flex: 0 0 auto; }
  .review-table > tbody > tr > th[scope=row] { flex: 1 1 0; }
  .review-table > tbody > tr > [colspan] { flex-basis: 100%; }
  .review-table > tbody > tr > .review-actions { flex: 0 0 auto; }
  .review-table > tbody > tr > td.review-actions[data-label]::before { content: none; }
  .review-table > tbody > tr > [data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: .8125rem; font-weight: 400; line-height: 1.3; }
  .review-table .review-actions { width: calc(2 * var(--button-min-height) + .5rem); }
  .review-table .cell-clamp.name-clamp { max-width: 100%; }
  .review-table .member-contact { max-width: 100%; }
}
/* Ministry requests' By Ministry counts (#1133, #1653): a closed
   disclosure whose control sits on the heading's line after About this
   page, drawn like it (a quiet summary with a fixed chevron), so the
   counts cost the page no line until the reader opens them and the
   worklist starts on a laptop's first screen; each browser remembers it
   open (remember-open-v1.js). Its summary holds the section's h2, drawn
   at the summary's size. */
details.by-ministry, details.by-ministry[open] { margin: 0; padding: 0; border: 0; background: none; }
details.by-ministry > summary { display: inline-flex; align-items: center; gap: .5rem; margin-inline-start: 1.25rem; list-style: none; }
details.by-ministry > summary::-webkit-details-marker { display: none; }
details.by-ministry > summary::before { content: ""; flex: none; width: .5rem; height: .5rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
details.by-ministry[open] > summary::before { transform: rotate(45deg); }
details.by-ministry > summary > h2 { display: inline; margin: 0; font: inherit; color: inherit; }
details.by-ministry > section { display: block; margin-block: 0 .5rem; }
/* A heading with two disclosures (Ministry requests: About this page and
   By Ministry) is a grid, as the System health tiles are: the h1 and both
   controls share the first row, and each disclosure's content takes a
   full-width row of its own below it, About's first. The details elements
   draw no box (display: contents), so their summaries and contents are
   the grid's cells. Opening either one, while the page is read or when
   ui-v1.js reopens a remembered About after the page shows, then moves
   only what follows the controls' row, never the other control (UX
   conventions, "No layout shift" and "Disclosures"). A closed content box
   is empty and has no height. On a phone the h1 takes the first row and
   the two controls the second. */
.heading-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "heading about other" "about-body about-body about-body" "other-body other-body other-body"; align-items: baseline; }
.heading-row > h1 { grid-area: heading; }
.heading-row > details, .heading-row > details[open] { display: contents; }
.heading-row > details.about-page > summary { grid-area: about; }
.heading-row > details.about-page::details-content { grid-area: about-body; }
.heading-row > details:not(.about-page) > summary { grid-area: other; justify-self: start; }
.heading-row > details:not(.about-page)::details-content { grid-area: other-body; }
.heading-row > details::details-content { align-self: start; }
@media (max-width: 40rem) { .heading-row { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "heading heading" "about other" "about-body about-body" "other-body other-body"; } }
.button-danger { background: var(--error-border); border-color: var(--error-border); color: var(--paper); }
.button-danger:not(:disabled):hover { background: var(--error-ink); border-color: var(--error-ink); }
.confirm-dialog { margin: 12vh auto auto; width: min(34rem, calc(100vw - 2rem)); padding: 1.25rem 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.confirm-dialog::backdrop { background: rgb(16 24 40 / 45%); }
.confirm-dialog h2 { margin-top: 0; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.dialog-actions button { margin: 0; }
.dialog-status { min-height: 1.6em; margin: .5rem 0 0; color: var(--muted); }
/* A confirmation dialog with fields (confirm-dialog.html fields_template:
   the follow-up queue's bulk outcomes, #1131) is wider, for the contact
   attempt's How, Date and Time row, and scrolls inside the window on a
   short screen rather than past it. */
.confirm-dialog:has(.dialog-fields) { width: min(42rem, calc(100vw - 2rem)); max-height: 84vh; overflow-y: auto; }
.dialog-fields { margin-block: 1rem .5rem; }
/* The review dialog of Admin editors (#750, confirm-dialog.html with
   review=True). It fits the window at every width: its title, buttons,
   status line and refusal stay in view while a long review scrolls in its
   body. Apply never shows the busy spinner (ui-v1.js), whose width would
   move Cancel, and a recorded change's Apply goes, keeping its space, so
   Cancel never moves. dvh follows a phone's changing toolbar; vh is the
   fallback. The status line it ends with on the page (review-outcome.html)
   keeps one line of space whether or not it says anything, and cuts a long
   line short, so it never moves a control.
   A refusal below the buttons never moves them either (#1482): a long
   review stops short of the height limit by the refusal's room, and once a
   refusal shows, ui-v1.js holds the body at its height and the limit rises
   by that room, so the dialog grows downwards into it. A refusal taller
   than the room (a long one on a phone) is never cut short: it squeezes
   the body (min-height: 0), so the buttons rise only by what does not fit
   in the room. */
.review-dialog { --refusal-room: min(7rem, 20vh); --refusal-room: min(7rem, 20dvh); margin-top: 5vh; margin-top: 5dvh; width: min(44rem, calc(100vw - 2rem)); max-height: calc(90vh - var(--refusal-room)); max-height: calc(90dvh - var(--refusal-room)); }
.review-dialog:has(> [data-confirm-error]:not([hidden])) { max-height: 90vh; max-height: 90dvh; }
.review-dialog[open] { display: flex; flex-direction: column; }
.review-dialog > * { flex: none; }
.review-dialog .dialog-body { flex: 1 1 auto; min-height: 0; overflow: auto; margin-bottom: 1rem; }
.review-dialog .dialog-body > :first-child { margin-top: 0; }
.review-dialog [data-confirm-accept][data-recorded] { visibility: hidden; }
/* A report email's Preview (#2035): wide enough for the email's desktop
   layout where the window allows; the body scrolls both ways, and the plain
   text keeps its lines, wrapping only what is too long. The pair of buttons
   between them follow the segmented pair's look (Binary choices). */
.review-dialog:has([data-report-preview]) { width: min(64rem, calc(100vw - 2rem)); }
/* The email's panel is the email's white page in either scheme, as a
   recipient sees it: it is a .light-card, which re-declares the light
   tokens on itself. The page's style policy drops the email's inline
   colours, so its headings, links and table headers read those tokens, and
   without them would take the dark scheme's light text on the white panel.
   The plain text follows the page's scheme. */
.review-dialog [data-preview-email] { padding: 1rem; border-radius: var(--radius-small); }
.report-preview-text { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); margin: 0; }
.report-preview-recipients { margin-block: 0 1rem; }
/* A compact review (#1356, components/compact-review.html): one line per
   changed field, "Field: old → new"; a long label or value wraps. */
.compact-review { padding-left: 1.25rem; overflow-wrap: anywhere; }
.compact-review li + li { margin-top: 0.25rem; }
.compact-review-field { font-weight: 600; }
.review-outcome { min-height: 1.6em; margin: .5rem 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The one segmented-pair look (ui-conventions spec, "Binary choices",
   #1535): a visible label and two segments, the chosen one filled. A binary
   choice (components/segmented-choice.html) draws its segments as links,
   or, on a page whose filters are private POST state, as one button in
   each of two small forms, the chosen one aria-current="page"; the Basic /
   Advanced mode toggle (#1121, components/editor-mode.html) draws them as
   radios, each covering its segment, invisible, so the native radio group
   keeps its keyboard behaviour (arrow keys) and its accessible name. Both
   segments are always
   bold and fixed in size, so choosing one changes only colours and never
   moves anything (no layout shift).
   A stored two-way setting of a form (components/choice-pair.html: a
   report email's Sends, As of and Frequency) draws the same radios; its
   segments share the row equally and their words may wrap, so a long
   choice fits a phone. A segment that can't be chosen now is greyed. */
fieldset:is(.editor-mode, .choice-pair), .segmented-choice { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-block: 0 1rem; }
fieldset:is(.editor-mode, .choice-pair) { padding: 0; border: 0; border-radius: 0; background: none; }
fieldset:is(.editor-mode, .choice-pair) > legend { float: none; width: auto; margin: 0; padding: 0; font-size: 1rem; }
:is(.editor-mode-options, .choice-pair-options), .segmented-choice-options { display: inline-flex; border: var(--button-border-width) solid var(--accent); border-radius: var(--radius-small); overflow: hidden; }
:is(.editor-mode-options, .choice-pair-options) label:has(> input[type=radio]), .segmented-choice-options :is(a, button) { display: inline-flex; align-items: center; min-height: var(--button-min-height); margin: 0; padding: .5rem 1.25rem; color: var(--accent); font-weight: 650; text-decoration: none; }
:is(.editor-mode-options, .choice-pair-options) label + label, .segmented-choice-options a + a, .segmented-choice-options form + form > button { border-inline-start: var(--button-border-width) solid var(--accent); }
:is(.editor-mode-options, .choice-pair-options) label:has(> input[type=radio]) > input { inset: 0; width: 100%; height: 100%; opacity: 0; }
:is(.editor-mode-options, .choice-pair-options) label:has(> input:checked), .segmented-choice-options :is(a, button)[aria-current=page], .segmented-choice-options button:is([aria-current=page], [aria-pressed=true]):not(:disabled):hover, .segmented-choice-options button[aria-pressed=true] { background: var(--accent); color: var(--paper); }
:is(.editor-mode-options, .choice-pair-options) label:has(> input:focus-visible), .segmented-choice-options :is(a, button):focus-visible { outline: 3px solid var(--focus); outline-offset: -6px; }
/* The ring sits inside the segment, so on the chosen (accent) segment it
   is drawn in --paper, which keeps 3:1 on --accent in both schemes (#1264). */
:is(.editor-mode-options, .choice-pair-options) label:has(> input:checked:focus-visible), .segmented-choice-options :is(a, button)[aria-current=page]:focus-visible, .segmented-choice-options button[aria-pressed=true]:focus-visible { outline-color: var(--paper); }
/* A POST segment's form gives way to its button, which drops the shared
   button look (radius, shadow, its own border and hover colours): only the
   pair's outline and divider frame it, as they frame a link. */
.segmented-choice-options form { display: contents; }
.segmented-choice-options button { border: 0; border-radius: 0; background: none; box-shadow: none; line-height: inherit; }
.segmented-choice-options button:not(:disabled):hover:not([aria-current=page], [aria-pressed=true]) { background: none; border-color: var(--accent); color: var(--accent); box-shadow: none; }
/* Tabs (ui-conventions "Tabs", #1712; components/tabs.html): a row of tabs
   above one panel area, the chosen tab filled in the accent colour (a
   selected state, independent of any primary button, #1713). Every tab is
   bold and the same size whether chosen or not, so choosing one changes
   only colours and moves nothing (no layout shift). The row never wraps
   and never widens the page: on a narrow screen it scrolls sideways inside
   its own box (min-width: 0 lets it shrink inside a flex or grid parent).
   The colours are theme tokens, so the row follows the dark scheme. */
.tabs { min-width: 0; margin-block: 0 1rem; }
.tabs-list { display: flex; gap: .25rem; min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; border-bottom: var(--button-border-width) solid var(--accent); }
.tabs-tab { flex: none; display: inline-flex; align-items: center; gap: .4rem; min-height: var(--button-min-height); padding: .5rem 1.1rem; border: var(--button-border-width) solid transparent; border-bottom: 0; border-radius: var(--radius-small) var(--radius-small) 0 0; color: var(--accent); font-weight: 650; text-decoration: none; white-space: nowrap; }
.tabs-tab[href]:hover { background: var(--accent-soft); color: var(--accent-strong); }
.tabs-tab[aria-selected=true], .tabs-tab[aria-selected=true]:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.tabs-tab:focus-visible { outline: 3px solid var(--focus); outline-offset: -6px; }
/* The ring sits inside the tab, so on the chosen (accent) tab it is drawn
   in --paper, which keeps 3:1 on --accent in both schemes, as on a
   binary choice's chosen segment. */
.tabs-tab[aria-selected=true]:focus-visible { outline-color: var(--paper); }
.tabs-tab[aria-disabled=true] { color: var(--unavailable); cursor: not-allowed; }
.tabs-count { display: inline-block; min-width: 1.5em; padding: 0 .4em; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: .85em; text-align: center; }
.tabs-tab[aria-selected=true] .tabs-count { background: var(--paper); color: var(--accent); }
.tabs-tab[aria-disabled=true] .tabs-count { background: var(--paper-soft); color: var(--unavailable); }
/* The panel area is a flow root, so its panels' margins count in the
   height ui-v1.js holds when a shorter panel replaces a taller one. */
.tabs-panels { display: flow-root; }
.tabs-panel { padding-top: 1rem; }
.tabs-panel:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (forced-colors: active) {
  .tabs-tab[aria-selected=true] { forced-color-adjust: none; background: Highlight; border-color: Highlight; color: HighlightText; }
  .tabs-tab[aria-selected=true] .tabs-count { background: HighlightText; color: Highlight; }
}
/* A review-pipeline stage's chip (the Family hub's census tabs, #1678): a
   plain badge, or for a needs-correction stage (Entered incorrectly) the
   Error look with its icon (UX conventions, "Status indicators"). The same
   rule as the review worklist's Stage column (#1683); whichever of the two
   lands second keeps one copy. */
.stage-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .55rem; border: 1px solid var(--border); border-radius: 999px; background: var(--paper-soft); color: var(--ink); font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.stage-chip:is(.status-error, .status-warning) { border-color: var(--status-line); background: var(--status-bg); color: var(--status-ink); }
/* The hub's Show unchanged disclosure: its table opens below the toggle,
   which stays put (no layout shift above it). */
details.hub-unchanged { margin-block: 1rem; }
details.hub-unchanged > .table-scroll { margin-top: .5rem; }
/* The Basic panel is a <fieldset> so one disabled attribute keeps its
   controls unsent while Advanced is shown; it draws no box of its own. */
fieldset.editor-mode-panel { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; }
.campaign-dates { margin-block: .25rem .5rem; }
/* The scheduled emails table keeps readable columns on a phone: it scrolls
   sideways inside its .table-scroll region rather than breaking words. */
.schedule-table { min-width: 46rem; }
/* So do the wizard's Suggested report emails (#2038), whose What it sends
   column would otherwise be a word wide on a phone. Their region is
   positioned, as the calendar's is, so each time field's visually hidden
   live region is clipped by it instead of widening the page. */
.suggested-reports-table { min-width: 46rem; }
.table-scroll:has(> .suggested-reports-table) { position: relative; }
.schedule-table :is(th, td) { overflow-wrap: normal; }
/* A series reminder's Repeats chip (#2234) holds its rule as visually
   hidden text, which is absolutely positioned: positioned on the chip, it
   is clipped by the table's scroll box instead of widening a phone's page. */
.schedule-table .series-chip { position: relative; }
/* The wizard's Suggested report emails (#2038): each Time cell is at least
   the short-field width, its cells sit at the top of their row
   (.whole-words), and its shared time-entry reading takes the cell's width
   without widening the column, breaking an echoed entry with no spaces
   rather than spilling into Status. The reading reserves four lines: the
   longest refusal of an entry of at most 32 characters ("… has seconds:
   these times are to the minute, …") wraps to that in this narrow cell,
   where the Repeat panel's (#1117) two lines have its field's full width.
   A "Reads as" line or a refusal appearing as the Admin types then moves
   neither its own field, the next row nor Add (#736). */
.suggested-reports-table td:has(> .field > input[data-time-entry]) { width: 14rem; min-width: 14rem; }
.suggested-reports-table .time-reading { min-height: 6.4em; min-height: 4lh; width: 0; min-width: 100%; overflow-wrap: anywhere; }

/* The ParishSoft refresh schedule editor (#632). A row's controls read as a
   sentence ("every 2 hours from 08:00 to 18:00") and wrap on narrow
   screens; "from" and "to" sit beside their fields, and each time's reading
   line stays under its own field. Remove ends the line (on its own line on
   narrow screens). Each row keeps room for one line of messages, the line
   beside Save for two lines, and the "not checked" note and the "Edit as
   text" error (after its button) for one, so a message that comes or goes
   moves nothing under the pointer (#736). */
.schedule-row { padding: .75rem 1rem 1rem; margin-block: .75rem; }
.schedule-row > legend { font-size: .95rem; }
.schedule-row-fields > .schedule-row-remove { margin-inline-start: auto; }
.schedule-row-fields { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: flex-start; }
.schedule-row-fields > div { display: flex; flex-direction: column; min-width: 0; }
.schedule-row-fields > div[hidden] { display: none; }
.schedule-row-fields > .schedule-labelled { display: grid; grid-template-columns: auto auto; column-gap: .4rem; align-items: center; }
.schedule-labelled > label { grid-row: 1; margin: 0; font-weight: 400; }
.schedule-labelled > .time-reading { grid-column: 2; }
.schedule-row-fields select { width: auto; }
.schedule-row-fields input[type=text] { width: 7.5rem; }
/* An invalid row control keeps its size: the second pixel of its error
   border is drawn as a shadow, so marking it moves nothing (#736). A
   .field-row input (the follow-up contact Date and Time, #1014) and a
   live-checked date (Campaign settings' end date, #1119) are taller
   than their minimum height, so a thicker border would grow them too; so
   would a Campaign images slot's file field, moving every slot below it
   (#1410; its scope is in :where(), so the list keeps its specificity),
   and so would a report filter's range ends, refused in place (#1332),
   a System logs filter field (#1332), and the Campaign calendar Move
   dialog's date, whose buttons sit under it (#1521), and a repeat rule's
   boxes, whose Until has the summary and Add below it (#1915), on New and
   on Edit's Change the repeat (#2235); so would
   the wizard's suggested report times, with the next row below (#2038).
   A select is held at its minimum height and keeps the global 2px border. */
:is(.schedule-row-fields :is(input, select), .field-row input, .field-live > input, :where(.artwork-upload) input[type=file], :where(.calendar-move-dialog) input, :where([data-repeat-panel], [data-series-rule], .suggested-reports-table) input, :where(:is(details, section).filter-panel > form > div, :is(details, section).filter-panel > form > fieldset > div, .log-filters .filter-bar > div) > input)[aria-invalid=true] { border-width: 1px; box-shadow: inset 0 0 0 1px var(--error-border); }
:is(.schedule-row-fields :is(input, select), .field-row input, .field-live > input, :where(.artwork-upload) input[type=file], :where(.calendar-move-dialog) input, :where([data-repeat-panel], [data-series-rule], .suggested-reports-table) input, :where(:is(details, section).filter-panel > form > div, :is(details, section).filter-panel > form > fieldset > div, .log-filters .filter-bar > div) > input)[aria-invalid=true]:focus { box-shadow: inset 0 0 0 1px var(--error-border), 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
/* Forced colors draw no shadow: an outline inside the border marks it,
   except under keyboard focus, where the global 3px focus ring shows. */
@media (forced-colors: active) {
  :is(.schedule-row-fields :is(input, select), .field-row input, .field-live > input, :where(.artwork-upload) input[type=file], :where(.calendar-move-dialog) input, :where([data-repeat-panel], [data-series-rule], .suggested-reports-table) input, :where(:is(details, section).filter-panel > form > div, :is(details, section).filter-panel > form > fieldset > div, .log-filters .filter-bar > div) > input)[aria-invalid=true]:not(:focus-visible) { outline: 1px solid CanvasText; outline-offset: -2px; }
}
.schedule-row-messages { padding-top: .5rem; min-height: calc(1lh + .5rem); }
.schedule-row-messages > * { margin: 0; }
.schedule-row-messages > * + * { margin-top: .25rem; }
/* Its Basic choices (#1122): one radio per line, its plain-words
   description under it; "Every [hours] hours" keeps its list on the line. */
.schedule-basic-list { list-style: none; padding: 0; display: grid; gap: .75rem; }
.schedule-basic-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; }
.schedule-basic-list label { display: inline; margin: 0; }
.schedule-basic-list select { width: auto; }
.schedule-basic-list .help { flex-basis: 100%; margin: 0; padding-inline-start: 1.75rem; }
.schedule-switch { margin-block: 1.25rem; }
.schedule-switch label { display: inline; margin: 0; }
.schedule-text textarea { min-height: 3.5rem; }
/* Each Edit as text list with its time reading (#1117) keeps a paragraph's
   spacing and holds its margins, as a region refresh-schedule-v1.js steadies. */
.schedule-text > div { display: flow-root; margin-block: 0 1rem; }
.schedule-stale, .schedule-text-error { min-height: 1lh; }
/* What refresh-schedule-v1.js redraws or resizes holds its children's
   margins, so its box's height is all the room it takes: the script keeps
   the page steady by those heights (#736). An edge child's margin that a
   plain block would have merged into a larger one beside it is dropped,
   so the spacing is a plain block's: the first child's top margin (each
   follows text with a larger bottom margin) and the summary's last
   child's bottom margin (the heading after it has a larger top margin).
   The rows' and the seven-day list's last bottom margins stay, as nothing
   after them has one. The browser's scroll anchoring skips these regions,
   which the script steadies itself, but still anchors the page against
   changes elsewhere (the header's notes). */
[data-schedule-part], [data-schedule-rows], [data-row-messages] { display: flow-root; }
:is([data-schedule-part], [data-schedule-rows], [data-row-messages]) > :first-child { margin-top: 0; }
[data-schedule-part="summary"] > :last-child { margin-bottom: 0; }
:is([data-schedule-part], [data-schedule-rows], .schedule-save, [data-schedule-stale], [data-schedule-text-error]) { overflow-anchor: none; }
.schedule-day-times { list-style: none; padding: 0; margin: 0; columns: 14rem auto; }
.schedule-day-times s { color: var(--muted); }
.schedule-time-full { font-weight: 600; }
/* The refresh schedule's seven-day grid (#632 slice 4). Each day is its own
   grid row: the day label, then 96 quarter-hour cells, with a faint line at
   each hour and a darker one every third hour. Marks and shadings are drawn
   by class (the page's policy forbids inline styles): a full refresh is a
   tall bar;
   Family email windows and the missing hour when clocks go forward
   are patterns the legend names; the current quarter hour has a bar at its
   left edge. Below about 600 pixels the grid keeps its minimum width and
   scrolls inside its own box, with the day labels held at its left edge.
   Forced-colours mode keeps the authored colours, as the patterns are the
   only way the shadings differ. */
.schedule-grid-scroll { overflow-x: auto; margin-block: 0 .75rem; }
.schedule-grid { min-width: 36rem; forced-color-adjust: none; }
.schedule-grid-row { display: grid; grid-template-columns: 7.5rem repeat(96, minmax(0, 1fr)); min-height: 2.25rem; border-top: 1px solid var(--paper); }
.schedule-grid-row > span { position: relative; background: var(--paper-soft); }
.schedule-grid-row > span:nth-child(4n+2) { border-left: 1px solid var(--border); }
.schedule-grid-row > span:nth-child(12n+2) { border-left-color: var(--control-border); }
.schedule-grid-hours { min-height: 0; }
.schedule-grid-hours > span.schedule-grid-hour { grid-column: span 12; background: none; border-left: 1px solid var(--control-border); padding-inline-start: .2rem; font-size: .75rem; color: var(--muted); }
.schedule-grid-row > .schedule-grid-day { position: sticky; left: 0; z-index: 1; background: var(--paper); border: 0; padding-inline-end: .5rem; font-size: .85rem; line-height: 1.2; align-self: center; }
.schedule-grid-day small { display: block; color: var(--muted); font-size: .75rem; }
.grid-full::before { content: ""; position: absolute; inset: 15% 20%; background: var(--accent-strong); border-radius: 1px; }
:is(.schedule-grid-row > span, .grid-swatch).grid-reminder_preparing { background: repeating-linear-gradient(135deg, var(--warning-bg) 0 3px, var(--warning-border) 3px 4px); }
:is(.schedule-grid-row > span, .grid-swatch).grid-reminder_sending { background: repeating-linear-gradient(0deg, var(--warning-border) 0 2px, var(--warning-bg) 2px 5px); }
:is(.schedule-grid-row > span, .grid-swatch).grid-initial_sending { background: radial-gradient(var(--error-border) 1px, var(--error-bg) 1.5px) 0 0 / 4px 4px; }
:is(.schedule-grid-row > span, .grid-swatch).grid-gap { background: repeating-linear-gradient(45deg, var(--control-border) 0 1px, var(--paper) 1px 4px); }
:is(.schedule-grid-row > span, .grid-swatch).grid-now { box-shadow: inset 3px 0 0 var(--focus); }
.schedule-grid-legend { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font-size: .85rem; }
.schedule-grid-legend li { display: flex; align-items: center; gap: .4rem; }
.grid-swatch { position: relative; display: inline-block; width: 1rem; height: 1.25rem; background: var(--paper-soft); border: 1px solid var(--border); forced-color-adjust: none; }
.schedule-save { align-items: flex-start; }
.schedule-status { flex: 1 1 18rem; margin: 0; min-height: 2lh; }
/* The Users page (#952). Each row is one line: a long email or Name is cut
   short with an ellipsis (.cell-ellipsis, above) and shown whole in its
   title (the recorded exception to "Table fit and row height"); the text
   stays whole for screen readers and copying. A narrow screen scrolls the
   table in its region.
   The reason line under the table and under Edit user's roles is reserved
   while empty, so the reason appearing never moves a control (#736). On
   Edit user, each role's plain-language line sits under its radio button. */
.users-table th, .users-table td { white-space: nowrap; vertical-align: middle; }
#users-only-administrator, #user-roles-reason { min-height: 1.6em; min-height: 1lh; }
/* Email Ministry leaders (#1592): the review lists each leader's Ministries
   and open requests one per line, with no list markers. */
.leader-emails-review ul { list-style: none; margin: 0; padding: 0; }
/* The never-signed-in count under the table can wrap to two lines on a phone
   while the empty text fits one, so a narrow screen reserves two lines and
   the line never changes height between those forms (#1593, #736). */
@media (max-width: 40rem) { #users-never-signed-in { min-height: 3.2em; min-height: 2lh; } }
/* New user's Name help line says what the lookup found (#952). It is one
   line high in every state, cut short with an ellipsis (whole in its title
   and to screen readers), so a long answer never moves the Role choices
   under the pointer (#736). */
.user-entry .names-help { height: 1.6em; height: 1lh; margin-block: .25rem 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* The Email error line the lookup fills is cut short the same way: on a
   phone-width screen "This address is already a user." would wrap to a
   second line and push the Role choices down. The whole message is in the
   item's title and, through aria-describedby, read to screen readers. */
.user-entry [data-email-error] > li { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* Email marked invalid by the lookup keeps its size, as invalid schedule
   row controls do: the second pixel of its error border is a shadow. */
.user-entry input[aria-invalid=true] { border-width: 1px; box-shadow: inset 0 0 0 1px var(--error-border); }
.user-entry input[aria-invalid=true]:focus { box-shadow: inset 0 0 0 1px var(--error-border), 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
/* A previewed file field's refusal is marked inside its border, not with a
   thicker one, so the refusal does not push what follows down (#2270). */
input[type=file][data-preview-target][aria-invalid=true] { border-width: 1px; box-shadow: inset 0 0 0 1px var(--error-border); }
input[type=file][data-preview-target][aria-invalid=true]:focus { box-shadow: inset 0 0 0 1px var(--error-border), 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
@media (forced-colors: active) { input[type=file][data-preview-target][aria-invalid=true]:not(:focus-visible) { outline: 1px solid CanvasText; outline-offset: -2px; } }
@media (forced-colors: active) {
  .user-entry input[aria-invalid=true]:not(:focus-visible) { outline: 1px solid CanvasText; outline-offset: -2px; }
}
.user-entry .field-label { margin-bottom: .25rem; font-weight: 600; }
.user-entry .user-email { margin-top: 0; }
.user-roles .choice { margin-block: .5rem; }
.user-roles .choice label { display: inline; font-weight: 600; }
.user-roles .choice .help { margin: .1rem 0 0 1.75rem; }
/* A field with a shared format rule (web/field_rules.py, #1577) is marked
   as the Admin leaves it, often by clicking the next field: its error
   border keeps the field's size, as invalid schedule row controls do (the
   second pixel is a shadow), so the click never lands on moved content. */
input[data-field-rule][aria-invalid=true] { border-width: 1px; box-shadow: inset 0 0 0 1px var(--error-border); }
input[data-field-rule][aria-invalid=true]:focus { box-shadow: inset 0 0 0 1px var(--error-border), 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
@media (forced-colors: active) {
  input[data-field-rule][aria-invalid=true]:not(:focus-visible) { outline: 1px solid CanvasText; outline-offset: -2px; }
}

/* New and Edit report email (#1786, report-email-entry.html). The picker's
   text box and Add share a row that wraps on a phone; chips and block rows
   are plain lists. The schedule preview keeps room for its five sends, so
   redrawing it as the fields change never moves what follows (no layout
   shift). */
.report-picker { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.report-picker > input, .report-picker > select { flex: 1 1 14rem; min-width: 0; }
.report-chips { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.report-chips > li { display: inline-flex; align-items: center; gap: .5rem; padding: .25rem .5rem; border: 1px solid var(--border); border-radius: 999px; background: var(--paper-soft); max-width: 100%; }
.report-chips > li > span { overflow-wrap: anywhere; }
.report-blocks { padding-left: 1.5rem; }
.report-block { padding: .5rem 0; border-bottom: 1px solid var(--border); }
.report-block-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .25rem 0; }
.report-schedule-preview { min-height: 9.5em; }
.report-review-table td, .report-review-table th { vertical-align: top; }
.choice-pair-options { flex: 1 1 auto; max-width: 100%; }
.choice-pair-options > label:has(> input[type=radio]) { flex: 1 1 0; justify-content: center; text-align: center; position: relative; }
.choice-pair-options > label:has(> input[type=radio]) > input { position: absolute; margin: 0; }
.choice-pair-options > label:has(> input:disabled) { color: var(--muted); cursor: not-allowed; }
.choice-pair-options > label:has(> input:disabled) > input { cursor: not-allowed; }
fieldset.choice-pair:has(input[aria-invalid=true]) > .choice-pair-options { border-color: var(--error-border); box-shadow: 0 0 0 1px var(--error-border); }
.choice-pair + .help { margin-top: -.5rem; }
/* Words wrap only between words in a pair's segments and in the report
   review table's labels (#1974). main's overflow-wrap: anywhere let a
   segment or a label cell shrink below its longest word, so a 320 px phone
   read "Repeatin" / "g" and "Settin" / "g". With normal wrapping each word's
   width counts toward its box's minimum: a long label wraps between words,
   and a review table too wide for the phone scrolls inside its own region.
   The review's value cells keep the page's wrapping, so a long address
   still breaks rather than widening the table. */
.choice-pair-options > label, .report-review-table th { overflow-wrap: normal; word-break: normal; }
/* New report email's Start from (#2037) has three segments, not a pair's
   two: on a phone each takes narrower side padding, so "Weekly report"
   wraps between its words inside its frame rather than overflowing it. */
@media (max-width: 40rem) { .report-start .choice-pair-options > label:has(> input[type=radio]) { padding-inline: .5rem; } }

/* Create the campaign's Families in this campaign (#1393): each preset's
   description sits under its radio, and the count preview keeps room for
   three lines, so its answer changing never moves what follows. */
.choice-with-help .help { margin: 0 0 0.5rem 1.75rem; }
.families-preview { min-height: calc(3 * 1.5em); }
