/* Care Plans additions on top of the shared suite styles. */
.note { border: 1px solid var(--rule, #d9d4c8); border-radius: 8px; padding: 1rem 1.1rem; background: #fff; }
.note + .note { margin-top: .75rem; }
.note-meta { color: var(--muted, #5a6b6e); font-size: .9rem; margin: 0 0 .4rem; }
.note-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-void { background: #f6f3ee; }
.note-void .note-body { text-decoration: line-through; color: var(--muted, #5a6b6e); }
.note-void-reason { margin: .6rem 0 0; font-weight: 600; }
.person-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .75rem 1.5rem; margin: 1rem 0; }
.person-facts dt { font-size: .85rem; color: var(--muted, #5a6b6e); }
.person-facts dd { margin: 0; font-weight: 600; }
.audit-ok { border-left: 0; }
.status-line { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
details.void-form { margin-top: .6rem; }
details.void-form summary { cursor: pointer; color: var(--brand, #0d2b2e); text-decoration: underline; }
.link-out { overflow-wrap: anywhere; }
textarea.tall { min-height: 8rem; }

/* Public home page: the drawn notes in the hero */
.mock-note { border-top: 1px solid #d9d4c8; padding: .7rem 0 .2rem; }
.mock-note p { margin: 0 0 .35rem; font-size: .95rem; }
.mock-note .mock-meta { font-size: .78rem; color: #3d5558; }
.mock-void .strike { text-decoration: line-through; color: #5a6b6e; }
.mock-void .mock-reason { font-weight: 600; font-size: .85rem; }
.demo-cta { display: flex; flex-wrap: wrap; gap: .75rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.strike { text-decoration: line-through; color: #5a6b6e; }
@media print { .no-print, header, footer, .session-notice { display: none !important; } body { background: #fff; } }

/* "My plan": the person's own page. Larger type, short lines, black on white, nothing decorative. */
.myplan { max-width: 40rem; font-size: 1.25rem; line-height: 1.6; background: #fff; color: #111; padding: 1.5rem; border: 1px solid #ccc; border-radius: 6px; }
.myplan h1 { font-size: 2.2rem; margin: 0 0 .25rem; }
.myplan h2 { font-size: 1.5rem; margin: 1.75rem 0 .4rem; }
.myplan-name { font-size: 1.4rem; margin: 0; }
.myplan-label { font-weight: 600; margin-bottom: 0; }
.myplan-ask, .myplan-old, .myplan-foot { font-size: 1rem; color: #333; }
.myplan-old { border: 2px solid #111; padding: .5rem .75rem; }
.myplan ul { padding-left: 1.25rem; }
@media print { .myplan { border: 0; padding: 0; max-width: none; } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.prose td { text-align: center; }
.prose nav ul { columns: 2; }

/* Charts (server-drawn SVG). One series, one hue, thin marks, recessive grid; no good or bad colours. Light mode only. */
.chart-card { margin: 1.5rem 0; }
.chart { margin: .5rem 0; }
.chart-svg { width: 100%; height: auto; max-width: 720px; display: block; }
.chart-svg .grid { stroke: var(--rule-soft); stroke-width: 1; }
.chart-svg .base { stroke: var(--field-border); stroke-width: 1; }
.chart-svg .ax { fill: var(--muted); font-size: 14px; font-family: inherit; }
.chart-svg .mark { fill: var(--brand); }
.chart-svg .hit { fill: transparent; }
.chart-svg .col:hover .mark, .chart-svg .col:hover .dot { fill: var(--brand-deep); }
.chart-svg .col:hover .hit { fill: var(--brand-tint); opacity: .6; }
.chart-svg .line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-svg .rng { stroke: var(--brand); stroke-width: 2; stroke-linecap: round; }
.chart-svg .dot { fill: var(--brand); stroke: var(--surface); stroke-width: 2; }
.chart figcaption { margin-top: .25rem; }
.chart details { margin-top: .5rem; }
@media print { .chart-svg .mark, .chart-svg .dot { fill: #000; } .chart-svg .line, .chart-svg .rng { stroke: #000; } }

/* Today and "About" pages: single column, large tap targets, readable on a phone held in one hand. */
.glance-safety { border: 2px solid var(--ink); background: var(--surface); padding: 1rem 1.25rem; margin: 1rem 0; border-radius: 6px; }
.glance-safety h2 { margin-top: 0; font-size: 1.1rem; }
.glance-safety p { margin: .4rem 0; }
.glance-grid { display: grid; gap: .75rem; grid-template-columns: 1fr; margin: 1rem 0; }
@media (min-width: 48rem) { .glance-grid { grid-template-columns: 1fr 1fr; } }
.glance-card h2 { font-size: 1rem; margin: 0 0 .35rem; }
.glance-card p { margin: 0; font-size: 1.05rem; line-height: 1.5; }
.today-list { list-style: none; padding: 0; margin: .5rem 0 1.5rem; display: grid; gap: .6rem; }
.today-item { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: .8rem 1rem; display: grid; gap: .6rem; }
.today-late { border-color: var(--ink); border-width: 2px; }
.today-time { font-weight: 700; font-size: 1.15rem; margin-right: .4rem; }
.today-person { font-weight: 600; font-size: 1.1rem; }
.today-what { margin: .25rem 0 0; font-size: 1.05rem; }
.today-act .btn { min-height: 2.75rem; padding: .6rem 1.1rem; }
.today-act details { margin-top: .5rem; }
.today-act summary { min-height: 2.75rem; display: flex; align-items: center; cursor: pointer; }
@media (min-width: 48rem) { .today-item { grid-template-columns: 1fr auto; align-items: center; } }

/* ── Menu: groups, and a Menu button on a phone ─────────────────────────────────────────────────────────────────────────────────────────── */
.nav-collapse { display: contents; }
.nav-toggle { display: none; }
.nav-menu > li { position: relative; }
.nav-group > summary { list-style: none; cursor: pointer; display: inline-block; padding: .5rem .8rem; min-height: 44px; line-height: 1.7; color: rgba(255,255,255,0.88); border-radius: var(--radius, 4px); user-select: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after { content: ""; display: inline-block; margin-left: .45rem; width: .45rem; height: .45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-.15rem) rotate(45deg); }
.nav-group[open] > summary, .nav-group > summary:hover { background: rgba(255,255,255,0.12); color: #fff; }
.nav-group.is-current > summary { color: #fff; box-shadow: inset 0 -2px 0 #fff; border-radius: 0; }
.nav-group > summary:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.nav-sub { position: absolute; left: 0; top: calc(100% + 2px); z-index: 60; min-width: 16rem; list-style: none; margin: 0; padding: .35rem; background: var(--ink); border: 1px solid rgba(255,255,255,0.25); border-radius: 6px; }
.nav-menu > li:last-child .nav-sub { left: auto; right: 0; }
.nav-sub a { display: block; padding: .65rem .8rem; min-height: 44px; }
.nav-sub a[aria-current="page"] { box-shadow: inset 3px 0 0 #fff; text-decoration: none; }

@media (max-width: 48rem) {
  .bar { flex-wrap: wrap; }
  .js .nav-toggle { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.6); border-radius: 6px; font: inherit; font-weight: 600; cursor: pointer; }
  .js .nav-toggle[aria-expanded="true"] { background: rgba(255,255,255,0.14); }
  .nav-collapse { display: block; width: 100%; }
  .js .nav-collapse { display: none; }
  .js .nav-collapse.nav-open { display: block; }
  .nav-menu { flex-direction: column; gap: 0; width: 100%; }
  .nav-menu a { display: block; }
  .nav-group > summary { display: block; padding: .8rem .8rem .2rem; min-height: 0; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,0.7); cursor: default; pointer-events: none; }
  .nav-group > summary::after { display: none; }
  .nav-group.is-current > summary { box-shadow: none; }
  .nav-sub { position: static; min-width: 0; padding: 0; background: transparent; border: 0; }
  .nav-menu > li:last-child .nav-sub { right: auto; }
  .who { padding: .75rem .8rem 1rem; border-top: 1px solid rgba(255,255,255,0.2); margin-top: .5rem; }
}

/* ── Offline notice, restored-draft note, and the offline page ──────────────────────────────────────────────────────────────────────────── */
.offline-banner { background: var(--gold-tint, #f8f0dc); color: var(--warn-ink, #5a4313); border-bottom: 2px solid var(--gold-deep, #7a5a14); padding: .6rem 1rem; font-weight: 600; text-align: center; }
.offline-banner[hidden] { display: none; }
.draft-note { margin: 0 0 .5rem; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; min-height: 44px; }
.offline-page { max-width: 40rem; padding-block: 2rem; }

/* ── Phone pass: larger touch targets, no zoom on focus, nothing wider than the screen ────────────────────────────────────────────────── */
@media (max-width: 40rem) {
  input, select, textarea { font-size: 16px; }   /* anything smaller makes iPhones zoom in when a field is tapped */
  .btn, button.btn, a.btn { min-height: 44px; }
  .btn-sm { min-height: 44px; padding-inline: 1rem; }
  label.check { display: flex; align-items: center; gap: .6rem; min-height: 44px; }
  input[type="checkbox"], input[type="radio"] { width: 1.5rem; height: 1.5rem; }
  .page-head.row.between { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .row { flex-wrap: wrap; }
  .toolbar { display: flex; flex-wrap: wrap; gap: .5rem; }
  .card { padding: 1rem; }
  .container { padding-inline: 1rem; }
  table { font-size: .92rem; }
  img, svg, video { max-width: 100%; height: auto; }
  main { overflow-wrap: anywhere; }
  .chart-svg { max-width: 100%; }
}
@media (hover: none) { .col:hover .mark { fill: var(--brand); } }   /* a finger leaves no hover; do not leave a bar highlighted after a tap */

/* ── The person's own screen (/people/{id}/me): large, calm, one column, no staff menu ─────────────────────────────────────────────────── */
.me-note { color: rgba(255,255,255,0.85); font-size: .95rem; }
.me { max-width: 46rem; margin: 0 auto; padding-bottom: 3rem; font-size: 1.25rem; line-height: 1.6; }
.me-size-1 { font-size: 1.1rem; } .me-size-3 { font-size: 1.6rem; }
.me h1 { font-size: 2.2em; margin: .5rem 0; } .me h2 { font-size: 1.5em; margin: 2rem 0 .5rem; } .me h3 { font-size: 1.1em; margin: 0 0 .25rem; }
.me-lead { font-size: 1.1em; }
.me-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: .75rem 0; }
.me-jump { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.me-jump a { display: inline-block; padding: .6rem 1rem; min-height: 44px; border: 2px solid var(--ink); border-radius: 6px; text-decoration: none; font-weight: 600; color: var(--ink); background: var(--surface); }
.me-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 1rem 1.25rem; margin: .6rem 0; }
.me-card p { margin: 0; }
.me-list { list-style: none; padding: 0; display: grid; gap: .6rem; }
.me-list li { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: .8rem 1rem; }
.me-time { margin-right: .5rem; }
.me-form select, .me-form textarea, .me-form input { font-size: 1em; }
.me-staff { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: 1rem; }
@media print { .me { font-size: 1.1rem; } }

/* ── Design pass 1 (21 Nov 2026): headings that read as headings, a person page that works as a hub, calmer Today cards ────────────────── */
/* The shared "survey sheet" style turned every section heading into a tiny uppercase label, which made the sub-headings under it look more
   important than the heading itself. In Care Plans a section heading is a heading. */
section > h2, h2.sec { font-size: 1.4rem; letter-spacing: -0.01em; text-transform: none; font-weight: 700; border-bottom: 0; padding-bottom: 0; margin: 2rem 0 .75rem; }
.card section > h2 { font-size: 1.3rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.card section:first-of-type > h2 { border-top: 0; padding-top: 0; margin-top: .5rem; }
.card section > h3 { font-size: 1rem; font-weight: 700; margin: 1rem 0 .15rem; color: var(--ink-soft); }
.card section > p { margin: 0 0 .25rem; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--brand-tint); color: var(--brand-deep); font-size: 1rem; font-weight: 700; margin-right: .6rem; vertical-align: middle; }
.hub { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); margin: 1rem 0 1.5rem; }
.hub-tile { display: block; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; text-decoration: none; color: var(--ink); min-height: 5.5rem; }
.hub-tile strong { display: block; font-size: 1.1rem; margin-bottom: .2rem; }
.hub-tile span { color: var(--ink-soft); }
.hub-tile:hover { border-color: var(--ink); }
.hub-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.hub-primary span { color: rgba(255,255,255,0.88); }
.today-late { border-color: var(--gold); background: var(--gold-tint); border-width: 1px; }
.today-late .badge { background: #fff; }

/* ══ Care Plans look and feel (21 Nov 2026) ═══════════════════════════════════════════════════════════════════════════════════════════════════
   Chosen for the people who use it: carers on phones and tablets, often tired and in a hurry, and older people reading about themselves.
   - Atkinson Hyperlegible (Braille Institute, SIL Open Font License, self-hosted): letters built to be told apart, including 0 and O and 1, l and I,
     which matters for doses and times. Its zero has a slash on purpose.
   - A white header and a cool light background, so the page is calm and the white cards stand out without heavy borders.
   - One marker for the page you are on in the menu (a bar under it), never two.
   Light mode only. The grade colours are still reserved for grades. */
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/atkinson-hyperlegible-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/atkinson-hyperlegible-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/atkinson-hyperlegible-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/atkinson-hyperlegible-700-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: italic; font-weight: 400; font-display: swap; src: url('/assets/fonts/atkinson-hyperlegible-400i-latin.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: italic; font-weight: 400; font-display: swap; src: url('/assets/fonts/atkinson-hyperlegible-400i-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: italic; font-weight: 700; font-display: swap; src: url('/assets/fonts/atkinson-hyperlegible-700i-latin.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Atkinson Hyperlegible'; font-style: italic; font-weight: 700; font-display: swap; src: url('/assets/fonts/atkinson-hyperlegible-700i-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --font-body: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: var(--font-body);
  --paper: #f4f7f7; --surface: #ffffff; --rule: #d5dee0; --rule-soft: #e6eced;
  --field-border: #6b7f82;   /* 4.2:1 on white: form fields and outlined buttons */
  --ink-soft: #32494c; --muted: #51666a;
  --brand-tint: #e3f0ee;
  --radius: 8px; --radius-lg: 12px;
}
html { font-size: 112.5%; }   /* 18px: a comfortable reading size on a phone held at arm's length */
body { line-height: 1.6; }
h1, h2, h3, h4 { letter-spacing: 0; font-weight: 700; }
em, i { font-style: italic; }

/* header: white, with the page you are on marked once */
header, .navbar { background: #fff; color: var(--ink); border-bottom: 1px solid var(--rule); }
.navbar a, header a { color: var(--ink); }
.navbar .logo, .logo { color: var(--ink); letter-spacing: 0; font-size: 1.3rem; font-weight: 700; }
.nav-menu a, .nav-group > summary { color: var(--ink-soft); }
.nav-menu a:hover, .nav-group > summary:hover, .nav-group[open] > summary { background: var(--brand-tint); color: var(--ink); }
.nav-menu a[aria-current="page"], .nav-menu a.active { color: var(--ink); font-weight: 700; box-shadow: inset 0 -3px 0 var(--brand); border-radius: 0; text-decoration: none; }
.nav-group.is-current > summary { color: var(--ink); font-weight: 700; box-shadow: inset 0 -3px 0 var(--brand); border-radius: 0; }
.nav-sub { background: #fff; border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 12px 28px rgba(13, 43, 46, 0.14); }
.nav-sub a { color: var(--ink); border-radius: 6px; }
.nav-sub a:hover { background: var(--brand-tint); }
.nav-sub a[aria-current="page"] { background: var(--brand-tint); font-weight: 700; box-shadow: none; }
.navbar a:focus-visible, header a:focus-visible, .nav-toggle:focus-visible, .nav-group > summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; box-shadow: none; }
.who a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; }
.who a:not(.btn):hover { text-decoration: underline; }
.me-note { color: var(--muted); }
.demo-bar { background: #eef0f6; }

/* buttons: teal for the main action, outlined for the rest */
.btn-primary, .hub-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover, .hub-primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
/* "button.btn" in the shared styles is more specific than ".btn-secondary", which is why outlined buttons never showed their outline: say it twice */
.btn.btn-secondary { background: #fff; color: var(--ink); border: 1.5px solid var(--field-border); }
.btn.btn-secondary:hover { background: var(--brand-tint); color: var(--ink); border-color: var(--ink); }
.hub-primary span, .hub-primary:hover span { color: #fff; }

/* softer, rounder surfaces */
.card, .today-item, .hub-tile, .me-card, .me-list li, .glance-safety, .info-box { border-radius: var(--radius-lg); }
.glance-safety { border-width: 2px; }
input, select, textarea { border-radius: var(--radius); }

/* footer: light, to match */
footer, .site-footer { background: #fff; color: var(--ink-soft); border-top: 1px solid var(--rule); }
footer a, .footer-section a { color: var(--ink); text-decoration: underline; }

@media (max-width: 48rem) {
  .js .nav-toggle { color: var(--ink); background: #fff; border: 1.5px solid var(--field-border); }
  .js .nav-toggle[aria-expanded="true"] { background: var(--brand-tint); }
  .nav-group > summary { color: var(--muted); }
  .nav-group > summary:hover, .nav-group[open] > summary { background: transparent; }
  .nav-group.is-current > summary { box-shadow: none; color: var(--muted); font-weight: 400; }
  .nav-sub { background: transparent; border: 0; box-shadow: none; }
  .who { border-top-color: var(--rule); }
}

.page-head { border-bottom: 1px solid var(--rule); }
.me-worry { background: var(--gold-tint); border: 1px solid var(--gold); border-radius: var(--radius-lg); padding: .8rem 1rem; }
.hnote-must_read, .hnote-urgent { border-color: var(--ink); border-width: 2px; }
.hnote-urgent { background: var(--gold-tint); }
.hnote-body { font-size: 1.05rem; margin: 0; }

/* ══ Tables (21 Nov 2026) ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════
   Every data table sits in a .table-wrap. The shared ".table" class was never put on them, so they drew with the browser's bare defaults. Numbers are
   right-aligned under right-aligned headings, a count of nothing is a quiet dash so the figures that matter stand out, names do not wrap, and the first
   column stays put when the table scrolls sideways on a phone. */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius-lg); background: var(--surface); margin: .75rem 0 1.25rem; }
.table-wrap table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .95rem; line-height: 1.4; }
.table-wrap th, .table-wrap td { padding: .65rem .85rem; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--rule-soft); }
.table-wrap tbody tr:last-child > th, .table-wrap tbody tr:last-child > td { border-bottom: 0; }
.table-wrap thead th { background: var(--paper); color: var(--ink-soft); font-size: .82rem; font-weight: 700; letter-spacing: 0; text-transform: none; border-bottom: 2px solid var(--rule); white-space: nowrap; vertical-align: bottom; }
.table-wrap thead tr.groups th { text-align: center; font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--rule); padding-bottom: .35rem; }
.table-wrap thead tr.groups th + th { border-left: 1px solid var(--rule); }
.table-wrap thead tr.groups + tr th { border-top: 0; }
.table-wrap tbody tr:hover > th, .table-wrap tbody tr:hover > td { background: var(--brand-tint); }
.table-wrap th[scope="row"] { font-weight: 700; white-space: nowrap; background: var(--surface); position: sticky; left: 0; z-index: 1; }
.table-wrap tbody tr:hover > th[scope="row"] { background: var(--brand-tint); }
.table-wrap td.num, .table-wrap th.num { text-align: right; white-space: nowrap; }
.table-wrap td.plan { white-space: nowrap; }
.table-wrap td.gap, .table-wrap th.gap { border-left: 1px solid var(--rule-soft); }
.table-wrap a { text-decoration: none; }
.table-wrap a:hover, .table-wrap a:focus-visible { text-decoration: underline; }
.zero { color: var(--muted); opacity: .6; }
.table-wrap .badge { white-space: nowrap; }
.table-wrap caption.sr-only { position: absolute; }
@media print { .table-wrap { overflow: visible; border: 1px solid #999; } .table-wrap th[scope="row"] { position: static; } .zero { opacity: 1; } }
.table-wrap thead th.left { text-align: left; }
/* a column of dates, times or names takes only the room it needs; the column of words takes the rest */
.table-wrap td.nowrap { white-space: nowrap; width: 1%; }
.table-wrap td.num, .table-wrap td.plan { width: 1%; }

/* ══ Report sections: each one is its own panel, so it is clear where one ends and the next begins ═══════════════════════════════════════════ */
.report-jump { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 0; }
.report-jump a { display: inline-block; padding: .5rem .9rem; min-height: 44px; line-height: 1.7; border: 1.5px solid var(--field-border); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; }
.report-jump a:hover { background: var(--brand-tint); border-color: var(--ink); }
.rsec { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem 1.5rem; margin: 1.75rem 0; scroll-margin-top: 1rem; }
.rsec-head { margin: 0 0 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--rule); }
.rsec-head h2 { margin: 0 0 .2rem; font-size: 1.4rem; padding: 0; border: 0; }
.rsec-head p { margin: 0; max-width: 70ch; }
.rsec .table-wrap { margin: 0; border-radius: 10px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.stat { display: flex; flex-direction: column; gap: .15rem; background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: .85rem 1rem; }
.stat-label { font-size: .88rem; color: var(--ink-soft); line-height: 1.3; }
.stat-value { font-size: 2.1rem; font-weight: 700; line-height: 1.1; color: var(--ink); }
.stat-note { font-size: .85rem; color: var(--muted); }
.facts { margin: 0; display: grid; border-top: 1px solid var(--rule); }
.facts > div { display: grid; grid-template-columns: minmax(11rem, 17rem) 1fr; gap: .5rem 1.5rem; padding: .75rem 0; border-bottom: 1px solid var(--rule-soft); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { font-weight: 700; color: var(--ink-soft); margin: 0; }
.facts dd { margin: 0; }
.count-chip { display: inline-block; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 999px; padding: .15rem .7rem; margin: 0 .35rem .35rem 0; font-size: .92rem; }
.chart-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }
.chart-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 1rem 1.15rem; }
.rsec .chart-card { background: var(--paper); margin: 0; }
.chart-card h3 { font-size: 1.05rem; margin: 0 0 .1rem; }
.chart-card p { margin: 0 0 .5rem; }
@media (max-width: 40rem) { .rsec { padding: 1rem; } .facts > div { grid-template-columns: 1fr; gap: .15rem; } .stat-value { font-size: 1.8rem; } .chart-grid { grid-template-columns: 1fr; } }
@media print { .rsec { border: 1px solid #999; break-inside: avoid; } .stat { background: #fff; } }

/* Fieldsets: no browser-default boxes; a grouped question is a quiet ruled block that stays inside its card. */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: flow-root; }
fieldset > legend { display: block; width: 100%; padding: 0; margin: 0 0 .5rem; font-weight: 600; }
fieldset.card { padding: 1.25rem; }
fieldset.card > legend { font-size: 1.25rem; margin-bottom: .75rem; }
fieldset.card fieldset.form-group { border-top: 1px solid var(--rule); padding-top: 1rem; margin-top: .5rem; }
fieldset.card fieldset.form-group:first-of-type { border-top: 0; padding-top: 0; }

/* Review attendees: one ruled block per person, fields side by side when there is room. */
.att-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .75rem 1rem; padding-top: 1rem; border-top: 1px solid var(--rule); align-items: end; }
.att-row:first-of-type { border-top: 0; padding-top: 0; }

/* Disclosure summaries ("Check or change", "Void", "This happened earlier") are tap targets: give them a proper height and a visible focus. */
details > summary { cursor: pointer; min-height: 44px; padding: .6rem 0; display: list-item; }
details > summary:focus-visible { outline: 3px solid var(--thistle); outline-offset: 2px; }

/* Home: the people as cards, and the "needs attention" alerts kept together. */
.people-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .75rem; }
.person-card { display: grid; gap: .25rem; padding: 1rem; min-height: 44px; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); color: var(--ink); text-decoration: none; }
.person-card:hover, .person-card:focus-visible { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand) inset; }
.attention { margin: 1.25rem 0; }
.attention:empty { display: none; }
.hub-h { font-size: 1.05rem; margin: 1.25rem 0 .5rem; color: var(--muted); font-weight: 600; letter-spacing: .01em; }
.hub-day { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.menu-dish { display: grid; gap: .15rem; }
.menu-dish .dish-facts { font-size: .9rem; color: var(--muted); }
/* A card made from a fieldset: draw the border as an inner shadow so the legend sits inside the card instead of cutting through its top edge. */
fieldset.card { border: 0; box-shadow: inset 0 0 0 1px var(--rule); }
fieldset.card > legend { float: none; padding: 0; margin: 0 0 .75rem; }
/* A list whose items are cards: no bullet, no indent. */
ul.stack:has(> li.card) { list-style: none; padding-left: 0; margin-left: 0; }
ul.stack > li.card::marker { content: ''; }

/* A sticky menu: the header's own box would end the stickiness as soon as it scrolled away, so the header disappears from layout and the menu itself sticks to the top of the page. */
body > header { display: contents; }
.navbar { position: sticky; top: 0; z-index: 40; }
html { scroll-padding-top: 5rem; }
@media print { .navbar, .mk-nav { position: static; } }
