/* One stylesheet for every page. Mobile first; no script is needed.
   Colours are chosen for at least 4.5:1 contrast for text and 3:1 for
   focus indicators and control borders (WCAG 2.2 AA), in both schemes.

   The look is plain and sturdy: eucalypt green on white, square edges, a
   typeface drawn for readers with low vision. A coloured left edge and a
   worded chip say what state a record is in; colour is never the only
   signal. See docs/architecture.typ, "Interface". */

/* Atkinson Hyperlegible, SIL Open Font License; see static/fonts/OFL.txt.
   Served by this application. A changed file is given a new name. */
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/static/fonts/atkinson-hyperlegible-400.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("/static/fonts/atkinson-hyperlegible-700.woff2") format("woff2");
}

:root {
  color-scheme: light dark;

  /* Colour */
  --bg: #ffffff;
  --surface: #eef3f0;
  --text: #14201b;
  --muted: #4d5b55;
  --border: #5d6b65;      /* control borders: 3:1 or better on --bg */
  --line: #c9d3ce;        /* separators between rows */
  --link: #14503f;
  --accent: #1b5846;
  --accent-text: #ffffff;
  --bar: #1b5846;         /* the header bar */
  --bar-text: #ffffff;
  --focus: #b35900;
  --error: #8f1d17;
  --error-bg: #fbe3e1;
  --success: #1b5846;
  --success-bg: #d6ecdf;
  --success-text: #0f3d2b;
  --warning-edge: #a86f00;
  --warning-bg: #ffe9b8;
  --warning-text: #4a3000;

  /* Space and shape */
  --radius: 3px;
  --gap-1: 0.25rem;
  --gap-2: 0.5rem;
  --gap-3: 0.75rem;
  --gap-4: 1rem;
  --gap-5: 1.5rem;
  --gap-6: 2rem;
  --edge: 6px;            /* the state edge on notices and records */

  /* Type: a 1.2 scale from 1.125rem */
  --font: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --size-small: 0.9375rem;
  --size-body: 1.125rem;
  --size-h3: 1.2rem;
  --size-h2: 1.375rem;
  --size-h1: 1.875rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101815;
    --surface: #1a2622;
    --text: #edf3f0;
    --muted: #a9b8b1;
    --border: #8a9a93;
    --line: #33443d;
    --link: #a5e0c8;
    --accent: #8fd4b8;
    --accent-text: #0b1a14;
    --bar: #17221e;
    --bar-text: #edf3f0;
    --focus: #ffb454;
    --error: #ffaaa3;
    --error-bg: #4a1b18;
    --success: #8fd4b8;
    --success-bg: #173a2b;
    --success-text: #c4ecd8;
    --warning-edge: #d9a021;
    --warning-bg: #4a3500;
    --warning-text: #ffe3a3;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 100%; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--size-body);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap { max-width: 44rem; margin: 0 auto; padding: 0 var(--gap-4); }

main { flex: 1; padding: var(--gap-5) 0 3rem; }
main:focus { outline: none; }

h1 { font-size: var(--size-h1); line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 var(--gap-4); }
h2 { font-size: var(--size-h2); line-height: 1.3; margin: var(--gap-6) 0 var(--gap-3); }
h3 { font-size: var(--size-h3); line-height: 1.3; margin: var(--gap-5) 0 var(--gap-2); }
p, ul, ol { margin: 0 0 var(--gap-4); max-width: 38rem; }
.lead { font-size: 1.25rem; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.15em; }

/* A focus indicator that is always visible, on every interactive element. */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  color: var(--link);
  font-weight: 700;
  z-index: 10;
}
.skip-link:focus { top: 0.5rem; }

/* The top of a signed-out page: the logo, dark on the page's own
   background. The logo is an SVG that takes the text's colour. */
.site-header { color: var(--text); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; min-height: 4.5rem; }
.site-name { display: inline-block; color: inherit; text-decoration: none; padding: 0.75rem 0; }
.wordmark { display: block; height: 1.3rem; width: auto; }
.site-header .wordmark { height: 2rem; }

/* The operator area wears the product's own style. Its sign-in page
   carries the word "operator" beside the name. */
.operator .site-name { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap-2) var(--gap-3); margin: 0; max-width: none; }
.operator-mark { border: 1px solid currentColor; border-radius: var(--radius); padding: 0.1rem 0.45rem; font-size: var(--size-small); line-height: 1.3; margin-top: 0.2rem; }
.operator .rail .nav-person p { margin: 0; padding: 0.5rem var(--gap-4) 0 calc(var(--gap-4) + var(--edge)); max-width: none; font-size: var(--size-small); font-weight: 700; overflow-wrap: anywhere; }
.operator .scroll { max-width: none; position: relative; }
.operator table.plain .when { white-space: nowrap; font-variant-numeric: tabular-nums; }
.operator table.plain .detail { overflow-wrap: anywhere; }
.operator main form + form { margin-top: var(--gap-3); }
.operator table.plain .act { white-space: nowrap; }
.operator table.plain .act .button, .operator table.plain .act button { margin: 0; padding: 0.35rem 0.8rem; min-height: 0; }
.operator table.plain .hint { display: block; margin: 0; }
.operator table.plain td { overflow-wrap: normal; }
.operator table.plain .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.operator table.plain .act form { display: inline-block; margin: 0 var(--gap-2) 0 0; }
.operator table.plain .barcell { width: 9rem; padding-right: var(--gap-4); }
.operator .barline { display: block; width: 100%; height: 0.9rem; margin-top: 0.3rem; fill: var(--accent); }
.operator h1 + .hint { margin-top: calc(-1 * var(--gap-2)); }
.operator .figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0 var(--gap-5); margin: 0 0 var(--gap-5); padding: 0; border-top: 3px solid var(--text); max-width: 60rem; }
.operator .figures > div { padding: var(--gap-3) 0; border-bottom: 1px solid var(--line); }
.operator .figures dt { color: var(--muted); font-size: var(--size-small); }
.operator .figures dd { margin: 0; font-size: 1.75rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.operator .figures dd .hint { display: block; font-size: var(--size-small); font-weight: 400; margin: 0; }
.operator .figures dd .when { font-size: var(--size-body); }
.operator .attention { list-style: none; margin: 0 0 var(--gap-5); padding: 0; max-width: 44rem; border-top: 3px solid var(--text); }
.operator .attention li { padding: var(--gap-3) 0 var(--gap-3) var(--gap-4); border-bottom: 1px solid var(--line); border-left: var(--edge) solid var(--warning-edge); }
.operator .attention li.fine { border-left-color: var(--success); }
.operator .attention p { margin: 0; }
.operator .attention .what { font-weight: 700; }
.operator .filter { display: flex; flex-wrap: wrap; gap: var(--gap-3); align-items: end; margin: 0 0 var(--gap-4); }
.operator .filter .field, .operator .filter button { margin: 0; }
@media (min-width: 50rem) {
  table.settings { table-layout: fixed; }
  table.settings thead th:nth-child(1) { width: 44%; }
  table.settings thead th:nth-child(2) { width: 15%; }
  table.settings thead th:nth-child(4) { width: 7rem; }
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--gap-4) 0;
  color: var(--muted);
  font-size: var(--size-small);
}
.site-footer p { margin: 0; max-width: none; }

/* Forms: a visible label above each field, hints and errors tied to the
   field, and controls at least 44px tall for touch. */
.field { margin: 0 0 1.25rem; max-width: 26rem; }
.field label, legend { display: block; font-weight: 700; margin-bottom: var(--gap-1); }
.hint { display: block; color: var(--muted); font-size: var(--size-small); margin-bottom: 0.35rem; }

input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="number"], select, textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.65rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
}

.field-error { display: block; color: var(--error); font-weight: 700; margin-bottom: 0.35rem; }
.field.has-error input, .field.has-error select, .field.has-error textarea {
  border-color: var(--error);
}

/* Notices. Four kinds, told apart by their words as well as their colour:
   information (the plain one), success, warning, and a problem (the error
   summary, which has its own heading). */
.error-summary {
  border-left: var(--edge) solid var(--error);
  background: var(--error-bg);
  padding: var(--gap-4);
  margin: 0 0 var(--gap-5);
}
.error-summary h2 { margin: 0 0 var(--gap-2); font-size: var(--size-h3); }
.error-summary ul { margin: 0; padding-left: 1.25rem; }

.notice {
  border-left: var(--edge) solid var(--border);
  background: var(--surface);
  padding: var(--gap-4);
  margin: 0 0 var(--gap-5);
}
.notice p:last-child { margin-bottom: 0; }
.notice.success { border-left-color: var(--success); background: var(--success-bg); color: var(--success-text); }
.notice.warning { border-left-color: var(--warning-edge); background: var(--warning-bg); color: var(--warning-text); }
.notice.success a, .notice.warning a { color: inherit; font-weight: 700; }

/* Buttons. One filled button on a page says what to do next; the rest are
   outlined, and an undo or a way out is a plain link. */
button, .button {
  display: inline-block;
  min-height: 2.75rem;
  padding: 0.6rem 1.25rem;
  font: inherit;
  font-weight: 700;
  color: var(--accent-text);
  background: var(--accent);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
}
button:hover, .button:hover { filter: brightness(1.1); }
button.secondary, .button.secondary {
  color: var(--link);
  background: transparent;
  border-color: var(--link);
}

/* A worded state: "14 days left", "Claimed 2 November". */
.chip {
  display: inline-block;
  padding: 0.1rem 0.6rem;
  font-size: var(--size-small);
  font-weight: 700;
  white-space: nowrap;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}
.chip.urgent { background: var(--warning-bg); color: var(--warning-text); }
.chip.done { background: var(--success-bg); color: var(--success-text); }

code, .code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1em;
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Text for screen readers only. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.field.checkbox { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.75rem; align-items: center; }
.field.checkbox .field-error { grid-column: 1 / -1; }
.field.checkbox label { margin: 0; font-weight: 400; }
input[type="checkbox"] { width: 1.75rem; height: 1.75rem; margin: 0; accent-color: var(--accent); }

.qr { background: #ffffff; display: inline-block; padding: 0.75rem; border: 1px solid var(--border); margin: 0 0 1rem; }
.qr svg { display: block; width: 13.75rem; max-width: 100%; height: auto; }

.key { font-size: 1.15rem; letter-spacing: 0.03em; }

.codes { list-style: none; padding: 1rem; margin: 0 0 1.5rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.5rem 1rem; max-width: 26rem; }
.codes code { font-size: 1.15rem; }

ol { padding-left: 1.5rem; }
ol li { margin-bottom: 0.5rem; }

/* Signed-in pages. Every destination is listed in a rail down the left
   on a wide screen. On a narrow one the same list is behind one Menu
   button, a details element, which opens without script. */
.shell { flex: 1; display: flex; flex-direction: column; }
.shell main .wrap, .shell .site-footer .wrap { max-width: 62rem; margin: 0; padding: 0 var(--gap-4); }
.rail { background: var(--bar); color: var(--bar-text); }
.rail :focus-visible { outline-color: var(--bar-text); }
.rail-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--gap-4); padding: var(--gap-2) var(--gap-4); }
.rail .site-name { display: inline-block; width: auto; min-height: 0; padding: 0.6rem 0; border-left: 0; }
.rail ul { list-style: none; margin: 0; padding: 0; max-width: none; }
.rail a, .rail button.link {
  display: flex; justify-content: space-between; align-items: center; gap: var(--gap-3);
  width: 100%; min-height: 2.75rem; padding: 0.5rem var(--gap-4);
  color: inherit; text-decoration: none; text-align: left;
  border-left: var(--edge) solid transparent;
}
.rail .nav-work a { font-weight: 700; }
.rail a:hover, .rail button.link:hover { text-decoration: underline; }
.rail a[aria-current] { background: var(--bg); color: var(--text); border-left-color: var(--warning-edge); }
.rail a[aria-current]:focus-visible { outline-color: var(--focus); }
.rail .count { background: var(--warning-bg); color: var(--warning-text); padding: 0 0.45rem; border-radius: var(--radius); font-weight: 700; font-variant-numeric: tabular-nums; }
.nav-account { margin: var(--gap-4) 0 var(--gap-1); padding: var(--gap-4) var(--gap-4) 0 calc(var(--gap-4) + var(--edge)); border-top: 1px solid color-mix(in srgb, currentColor 35%, transparent); font-size: var(--size-small); max-width: none; overflow-wrap: anywhere; }
.nav-account { font-weight: 700; }
/* The signed-in person heads a group of their own, as the Account does. */
.nav-who { margin: var(--gap-4) 0 var(--gap-1); padding: var(--gap-4) var(--gap-4) 0 calc(var(--gap-4) + var(--edge)); border-top: 1px solid color-mix(in srgb, currentColor 35%, transparent); font-size: var(--size-small); max-width: none; overflow-wrap: anywhere; }
.rail .switcher { margin: 0 var(--gap-4) var(--gap-3) calc(var(--gap-4) + var(--edge)); background: transparent; border-color: color-mix(in srgb, currentColor 35%, transparent); }
.rail .switcher button.secondary { color: inherit; border-color: currentColor; }
.menu { margin-left: auto; }
.menu summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--gap-2);
  min-height: 2.75rem; padding: 0.4rem 0.8rem; font-weight: 700;
  border: 2px solid currentColor; border-radius: var(--radius);
}
.menu summary::-webkit-details-marker { display: none; }
.bars { width: 1.1rem; height: 0.85rem; border-block: 2px solid currentColor; position: relative; }
.bars::after { content: ""; position: absolute; inset: 0; margin: auto; height: 2px; background: currentColor; }
.menu[open] { flex-basis: 100%; }
.menu[open] summary { width: max-content; margin-left: auto; margin-top: -2.75rem; }
.menu nav { margin: var(--gap-3) calc(-1 * var(--gap-4)) 0; padding-bottom: var(--gap-2); border-top: 1px solid color-mix(in srgb, currentColor 35%, transparent); }
.rail-nav { display: none; }
@media (min-width: 60rem) {
  .shell { display: grid; grid-template-columns: 15rem minmax(0, 1fr); grid-template-rows: 1fr auto; }
  .rail { grid-row: 1 / 3; }
  .rail-inner { position: sticky; top: 0; display: block; padding: var(--gap-4) 0; max-height: 100vh; overflow-y: auto; }
  .rail .site-name { display: block; padding: var(--gap-2) var(--gap-4) var(--gap-4) calc(var(--gap-4) + var(--edge)); }
  .rail .wordmark { height: 1.5rem; }
  .menu { display: none; }
  .rail-nav { display: block; }
  .shell main .wrap, .shell .site-footer .wrap { padding: 0 var(--gap-6); }
}
/* The Claims sheet: one claim a row, with everything the portal asks for
   and the claim ID field on the row. Each row is a list of labelled
   values, so it reads the same to a screen reader at any width; on a wide
   screen the labels move to a heading row and the values line up. */
.shell main .wrap.wide { max-width: 96rem; }
.filters ul { list-style: none; display: flex; flex-wrap: wrap; gap: var(--gap-2); margin: 0 0 var(--gap-5); padding: 0; max-width: none; }
main .filters li > a:only-child { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 var(--gap-4); border: 2px solid var(--border); border-radius: var(--radius); color: var(--text); text-decoration: none; font-weight: 700; }
.filters a:hover { text-decoration: underline; }
main .filters li > a[aria-current]:only-child { background: var(--text); border-color: var(--text); color: var(--bg); }
h2 > .hint { display: inline-block; margin: 0 0 0 var(--gap-2); font-weight: 400; white-space: nowrap; }
.sheet-head { display: none; }
.sheet { list-style: none; margin: 0 0 var(--gap-5); padding: 0; max-width: 34rem; border-top: 3px solid var(--text); }
.sheet > li { border-bottom: 1px solid var(--line); border-left: var(--edge) solid var(--line); padding: var(--gap-3) 0 var(--gap-4) var(--gap-3); }
.sheet > li.urgent { border-left-color: var(--warning-edge); }
.sheet > li.done { border-left-color: var(--success); }
.sheet dl { margin: 0; }
.sheet .chip, .records .chip { white-space: normal; width: fit-content; }
.sheet dl > div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0 var(--gap-3); padding: 0.2rem 0; }
.sheet dt { color: var(--muted); font-size: var(--size-small); }
.sheet dd { margin: 0; overflow-wrap: anywhere; }
.sheet dd .hint { margin: 0; }
.sheet dd a { font-weight: 700; }
.sheet .money dd { font-weight: 700; font-variant-numeric: tabular-nums; }
.sheet form { margin-top: var(--gap-3); }
.sheet form label { display: block; font-weight: 700; margin-bottom: var(--gap-1); }
.sheet form.has-error { border-left: 4px solid var(--error); padding-left: var(--gap-3); }
.sheet form.has-error input { border-color: var(--error); }
.sheet .save { display: flex; gap: var(--gap-2); }
.sheet .save input { flex: 1; min-width: 0; margin: 0; }
.sheet .save button { margin: 0; flex: none; }
@media (min-width: 80rem) {
  .sheet-head, .sheet > li { display: grid; grid-template-columns: 1.4fr 1.1fr 1fr 1.3fr 6rem 7rem 12.5rem; gap: 0 var(--gap-4); }
  .sheet dd { overflow-wrap: break-word; }
  .sheet-head { padding: 0 0 var(--gap-2) calc(var(--gap-3) + var(--edge)); color: var(--muted); font-size: var(--size-small); font-weight: 700; }
  .sheet-head .money { text-align: right; }
  .sheet { max-width: none; }
  .sheet > li { align-items: start; padding-block: var(--gap-3); }
  .sheet dl, .sheet dl > div { display: contents; }
  .sheet dt, .sheet form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .sheet .money dd { text-align: right; }
  .sheet form { margin: 0; grid-column: 7; }
  .sheet form.has-error { border: 0; padding: 0; }
}
button.link { display: inline-block; padding: 0.6rem 0; min-height: 2.75rem; }
button.link { background: none; border: 0; color: var(--link); font-weight: 400; text-decoration: underline; text-underline-offset: 0.18em; }
.session-note { margin-top: 3rem; }
form + h2 { margin-top: 2.5rem; }

dialog { color: var(--text); background: var(--bg); border: 2px solid var(--border); border-radius: var(--radius); padding: 1.5rem; max-width: min(30rem, calc(100vw - 2rem)); }
dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
dialog h2 { margin-top: 0; }

/* Records: a list of things, one to a row. Each row has an edge that
   takes the colour of its state when it carries a chip. */
.records { list-style: none; padding: 0; margin: 0 0 1.5rem; max-width: 26rem; border-top: 3px solid var(--text); }
.records li { border-bottom: 1px solid var(--line); border-left: var(--edge) solid var(--line); padding: 0.4rem 0 0.4rem 0.8rem; }
.records li:has(.chip.urgent) { border-left-color: var(--warning-edge); }
.records li:has(.chip.done) { border-left-color: var(--success); }
.records a { display: inline-block; padding: 0.5rem 0; font-weight: 700; }
.records .hint { margin: 0; }
fieldset.field { border: 0; padding: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 0.5rem; }
/* Choices sit apart, so that neighbouring labels do not run together. */
.choice { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: center; min-height: 2.75rem; }
.choice + .choice { margin-top: var(--gap-2); }
.choice label { font-weight: 400; margin: 0; }
input[type="radio"] { width: 1.75rem; height: 1.75rem; margin: 0; accent-color: var(--accent); }
.field.checkbox .hint { grid-column: 1 / -1; }
fieldset.field.has-error { border-left: 4px solid var(--error); padding-left: 0.75rem; }
.facts { margin: 0 0 1.5rem; }
.facts dt { font-weight: 400; color: var(--muted); font-size: var(--size-small); }
.facts dd { margin: 0 0 0.75rem; font-weight: 700; }
button.danger { background: var(--error); border-color: var(--error); color: var(--bg); }

/* A link that stands alone (not inside a sentence) is a target at least
   24px tall (WCAG 2.2, target size). */
main p > a:only-child:not(.button), main li > a:only-child, .error-summary a {
  display: inline-block;
  padding: 0.3rem 0;
}

/* People in an Account. */
.records.providers { max-width: 38rem; }
.records.providers li { padding-block: 0.5rem; overflow-wrap: anywhere; }
.records.providers .hint { display: block; }
.facts dd { overflow-wrap: anywhere; }
.facts dd .hint { margin: 0; font-weight: 400; }
.records.people { max-width: 38rem; }
.records.people li { padding-block: 0.75rem; }
.records.people .who { margin: 0; overflow-wrap: anywhere; }
.records.people .hint { display: block; }
.records.people .actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.records.people .actions a { font-size: inherit; padding: 0.6rem 1.25rem; }

/* Choosing a file. The control sits in a box of its own and its button
   is a full-size target. */
input[type="file"] {
  display: block; width: 100%; min-height: 2.75rem; padding: var(--gap-3);
  font: inherit; color: var(--text);
  background: var(--surface); border: 2px dashed var(--border); border-radius: var(--radius);
}
input[type="file"]::file-selector-button {
  min-height: 2.25rem;
  margin-right: 0.75rem;
  padding: 0.4rem 1rem;
  font: inherit;
  font-weight: 700;
  color: var(--link);
  background: var(--bg);
  border: 2px solid var(--link);
  border-radius: var(--radius);
  cursor: pointer;
}

/* Documents. */
.records.documents { max-width: 38rem; }
.records.documents li { padding-block: 0.5rem; }
.records.documents .hint { display: block; }
img.evidence { display: block; max-width: 100%; height: auto; border: 1px solid var(--border); }
/* Entering a document's details: on a wide screen the document sits
   beside the form, and a photo stays in view while the form scrolls. */
@media (min-width: 76rem) {
  .beside { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap-6); align-items: start; }
  .beside-document.photo { position: sticky; top: var(--gap-4); }
  .beside-document.photo img.evidence { max-height: calc(100vh - 10rem); width: auto; }
  .beside h2:first-child { margin-top: 0; }
}
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0 0 1.5rem; }
.actions form { margin: 0; }

/* Claims and the claim-ready page. */
.records.items { max-width: 38rem; }
.records.items li { padding-block: 0.5rem; overflow-wrap: anywhere; }
.records.items .hint { display: block; }
/* The sheet of what to type into the portal. */
.portal { margin: 0 0 1.5rem; max-width: 38rem; border: 2px solid var(--text); padding: 0 0.9rem; }
.portal > div { padding: 0.75rem 0; border-top: 1px solid var(--line); }
.portal > div:first-child { border-top: 0; }
.portal dt { color: var(--muted); font-size: var(--size-small); }
.portal dd { margin: 0; overflow-wrap: anywhere; }
.portal .value { display: block; font-size: 1.25rem; font-weight: 700; user-select: all; }
.portal .hint { margin: 0; }
.portal button.copy { margin: 0.5rem 0 0; min-width: 6rem; }
.portal .fix a { display: inline-block; padding: 0.3rem 0; }

/* A Participant's inbound email address. */
.address { display: block; max-width: 38rem; font-weight: 700; overflow-wrap: anywhere; user-select: all; }
.address + button.copy { margin: 0.5rem 0 0; min-width: 6rem; }

/* A Participant's mail and approved senders. */
.records.mail { max-width: 38rem; }
.records.mail li { padding-block: 0.5rem; overflow-wrap: anywhere; }
.records.mail .hint { display: block; }
.records.senders { max-width: 38rem; }
.records.senders li { padding-block: 0.5rem; }
.records.senders form { margin: 0.5rem 0 0; }
.records.exports { max-width: 38rem; }
.records.exports li { padding-block: 0.75rem; }
.records.exports .hint { display: block; }
.records.exports .button { margin: 0.5rem 0 0; padding: 0.6rem 1.25rem; }

/* Switching between Accounts. */
.switcher { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center; margin: 0 0 1.5rem; padding: 0.75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.switcher label { margin: 0; }
.switcher select { width: auto; max-width: 100%; flex: 1 1 12rem; }

/* The lines read from an invoice. The table scrolls inside its own box
   on a narrow screen, so the page itself never scrolls sideways. */
.scroll { overflow-x: auto; margin: 0 0 1.5rem; max-width: 100%; }
.scroll:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
table.lines { border-collapse: collapse; width: 100%; font-size: var(--size-small); }
table.lines caption { text-align: left; color: var(--muted); padding-bottom: 0.5rem; }
table.lines th, table.lines td { text-align: left; vertical-align: top; padding: 0.5rem 0.75rem 0.5rem 0; border-bottom: 1px solid var(--line); }
table.lines th { color: var(--muted); }
table.lines .number { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* The interface of issue 37: one list of what needs someone, and pages
   with one job (docs/architecture.typ, "Interface"). */

/* In the navigation: each Participant under Participants, and the
   signed-in person's name as the way to their own page. */
.rail .nav-work .nav-sub a { font-weight: 400; padding-left: calc(var(--gap-4) + var(--edge) + var(--gap-4)); overflow-wrap: anywhere; }
.rail .nav-person { margin-top: var(--gap-4); padding-top: var(--gap-3); border-top: 1px solid color-mix(in srgb, currentColor 35%, transparent); }
.rail .nav-person a { font-weight: 700; overflow-wrap: anywhere; }

/* Where a page is, above its heading. */
.where { margin: 0 0 var(--gap-3); font-size: var(--size-small); color: var(--muted); }

/* Home: what needs someone, the most urgent first. An entry is what it
   is, where it stands, and one button for the next step. */
.queue { list-style: none; margin: 0 0 var(--gap-5); padding: 0; max-width: 40rem; border-top: 3px solid var(--text); }
.queue > li { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap-1); padding: var(--gap-4) 0 var(--gap-4) var(--gap-4); border-bottom: 1px solid var(--line); border-left: var(--edge) solid var(--line); }
.queue > li.urgent { border-left-color: var(--warning-edge); }
.queue .what { margin: 0; font-weight: 700; font-size: var(--size-h3); overflow-wrap: anywhere; }
.queue .hint { margin: 0; }
.queue .chip { width: fit-content; white-space: normal; margin: var(--gap-1) 0; }
.queue .button { width: fit-content; margin: var(--gap-2) 0 0; }
@media (min-width: 40rem) {
  .queue > li { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--gap-5); align-items: center; }
  .queue > li > :not(.button) { grid-column: 1; }
  .queue .button { grid-column: 2; grid-row: 1 / span 3; margin: 0; }
}

/* Narrowing a list: a choice and its button on one line. */
.tools { display: flex; flex-wrap: wrap; align-items: end; gap: var(--gap-3) var(--gap-5); margin: 0 0 var(--gap-4); }
.tools .field { margin: 0; }
.tools select, .tools input { margin: 0; min-width: 12rem; }
.tools button { margin: 0; }

/* A few things of one kind, each a block with its own heading. */
.cards { list-style: none; margin: 0 0 var(--gap-5); padding: 0; max-width: 40rem; display: grid; gap: var(--gap-4); }
.cards > li { border: 1px solid var(--line); border-top: 3px solid var(--text); padding: var(--gap-4); }
.cards h2 { margin: 0 0 var(--gap-2); font-size: var(--size-h3); }
.cards p:last-child { margin-bottom: 0; }
.address-line .address { display: inline; }

/* The steps of one job, in order: done, the one to do now, and those
   still to come. */
.steps { list-style: none; margin: 0 0 var(--gap-5); padding: 0; max-width: 38rem; counter-reset: step; }
.steps > li { position: relative; padding: 0 0 var(--gap-4) 2.75rem; border-left: 2px solid var(--line); margin-left: 0.9rem; counter-increment: step; }
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before { content: counter(step); position: absolute; left: -0.95rem; top: -0.1rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 2px solid var(--border); font-weight: 700; font-size: var(--size-small); }
.steps > li.done::before { content: "\2713"; background: var(--success); border-color: var(--success); color: var(--bg); }
.steps > li.now::before { background: var(--text); border-color: var(--text); color: var(--bg); }
.steps h2 { margin: 0 0 var(--gap-1); font-size: var(--size-body); }
.steps p { margin: 0 0 var(--gap-2); }
.steps .hint { margin: 0; }
.steps form { margin: 0; }

/* Values to copy into my NDIS, one to a line, each with its button. */
.copy-list { margin: 0 0 var(--gap-3); max-width: 38rem; border-top: 1px solid var(--line); }
.copy-list > div { padding: var(--gap-2) 0; border-bottom: 1px solid var(--line); }
.copy-list dt { color: var(--muted); font-size: var(--size-small); }
.copy-list dd { margin: 0; display: flex; justify-content: space-between; align-items: center; gap: var(--gap-3); }
.copy-list .value { min-width: 0; overflow-wrap: anywhere; font-weight: 700; user-select: all; }
.copy-list .value .hint { display: block; margin: 0; font-weight: 400; user-select: none; }
.copy-list button.copy { flex: none; margin: 0; padding: 0.4rem 0.9rem; }
.copy-list .fix a { display: inline-block; padding: 0.3rem 0; }

/* What a record holds, to read. */
.summary { margin: 0 0 var(--gap-4); max-width: 38rem; border-top: 1px solid var(--line); }
.summary > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 var(--gap-3); padding: var(--gap-2) 0; border-bottom: 1px solid var(--line); }
.summary dt { color: var(--muted); font-size: var(--size-small); }
.summary dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.summary dd .hint { display: block; margin: 0; font-weight: 400; }
@media (min-width: 40rem) {
  .summary > div { grid-template-columns: 11rem minmax(0, 1fr); }
}

/* Buttons side by side, and the seldom-used ones at the foot of a page. */
.manage .actions, .row { display: flex; flex-wrap: wrap; gap: var(--gap-2); margin: 0; align-items: center; }
.manage .actions .button, .manage .actions button, .manage .actions form, .row .button, .row button { margin: 0; }
/* A form that stands above a summary, as "Keep subscription" does. */
form.before-summary { margin-bottom: var(--gap-4); }
.manage { max-width: 38rem; margin-top: var(--gap-5); padding-top: var(--gap-4); border-top: 1px solid var(--line); }
/* A read-only account (lapsed or closing): what would add or change
   something is not offered. The server refuses it whatever is shown. */
main.read-only form[method="post"]:not(.always),
main.read-only a.button:not(.stays):not([download]):not(.queue a) { display: none; }
.button.caution { background: var(--bg); border-color: var(--error); color: var(--error); }
.button.caution:hover { background: var(--error-bg); }

/* A Participant's pages: tabs under their name, Providers as cards, and
   Settings as sections. */
.tabs ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 var(--gap-5); margin: 0 0 var(--gap-5); padding: 0; max-width: none; border-bottom: 2px solid var(--line); }
main .tabs li > a { display: inline-flex; align-items: center; min-height: 2.75rem; margin-bottom: -2px; border-bottom: 5px solid transparent; color: var(--muted); text-decoration: none; font-weight: 700; }
main .tabs li > a:hover { color: var(--text); border-bottom-color: var(--line); }
main .tabs li > a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }
.cards .summary { margin-bottom: var(--gap-3); border-top: 0; }
.cards .actions { display: flex; flex-wrap: wrap; gap: var(--gap-2); margin: 0; align-items: center; }
.cards .actions .button { margin: 0; }
.settings section { max-width: 38rem; padding: var(--gap-5) 0; border-top: 1px solid var(--line); }
.settings section:first-of-type { border-top: 0; padding-top: 0; }
.settings h2 { margin: 0 0 var(--gap-2); }
.settings .records.senders li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--gap-2); }
.settings .records.senders form, .settings .records.senders button { margin: 0; }

/* History: the one table. It keeps its columns on a narrow screen and
   scrolls sideways inside its region. */
table.plain { border-collapse: collapse; width: 100%; min-width: 34rem; border-top: 3px solid var(--text); }
table.plain th, table.plain td { text-align: left; vertical-align: top; padding: 0.6rem 0.9rem 0.6rem 0; border-bottom: 1px solid var(--line); }
table.plain thead th { color: var(--muted); font-size: var(--size-small); white-space: nowrap; }
table.plain tbody th { font-weight: 700; }
table.plain .money { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.plain .hint { display: block; margin: 0; font-weight: 400; }
