/* MACTM505 course admin: one small stylesheet; tables, not cards; light and dark; phone friendly (ledger U1, U5).
   Theme (author, 2026-11-19, "I am a blue themed person"): a white page, a royal navy title bar, and every chip,
   tile, notice, banner and toast drawn from one blue family, so nothing clashes. States are told apart by shade
   (sky for done, periwinkle for waiting, slate for closed); a soft rose is kept only for errors and failures.
   Text on every surface keeps at least WCAG AA contrast. Each person picks one of six blue palettes and light, dark
   or the device's setting (U11, 2026-11-19); every rule below takes its colours from these tokens. */
/* Palettes (ledger U11): Royal is the default; data-palette picks another. Light unless data-mode is dark, or
   is system (or missing) on a device set to dark. Generated from the checked swatch values; every text pair is
   at least 4.5:1 (tests/test_appearance.py). Edit all six together. */
:root { --bg: #ffffff; --panel: #ffffff; --ink: #10234d; --muted: #4a5b82; --line: #d3def4; --head: #e6eefc; --head-ink: #102f75; --zebra: #f6f9ff; --brand: #1f4fc4; --brand-ink: #ffffff; --brand-soft: #edf3ff; --bar: #0e2a6b; --bar-ink: #ffffff; --pill: #ffffff; --pill-ink: #0e2a6b; --chip: #e3ecfd; --chip-ink: #173f9c; --chip-strong: #c9dafa; --chip-strong-ink: #0e2a6b; --ok: #0a5a7a; --ok-soft: #dcf1fa; --warn: #3b3a9a; --warn-soft: #e9e8fc; --bad: #9c2340; --bad-soft: #fbe8ed; --slate: #44506b; --slate-soft: #e9edf4; --toast: #173f9c; --hover: #eff3fb; --toast-ok: #0a5a7a; --toast-bad: #9c2340; --shadow: 0 1px 3px rgba(16, 35, 77, .07); --act: #3a2b8f; --view: #1f5aa8; --series-1: #1f4fc4; --cta: #0e2a6b; --cta-hover: #1f4fc4; --nav-hover: rgba(255, 255, 255, .16); color-scheme: light; }
:root[data-palette="cornflower"] { --bg: #fbfcff; --panel: #ffffff; --ink: #1b2a4a; --muted: #55658a; --line: #dbe4f5; --head: #edf2fc; --head-ink: #24427f; --zebra: #f7f9fe; --brand: #2f5fc8; --brand-ink: #ffffff; --brand-soft: #eef3fd; --bar: #2f4f94; --bar-ink: #ffffff; --pill: #ffffff; --pill-ink: #2f4f94; --chip: #e8eefb; --chip-ink: #284a99; --chip-strong: #d4e0f8; --chip-strong-ink: #1d3a7c; --ok: #1a6478; --ok-soft: #e1f2f7; --warn: #4848a8; --warn-soft: #ecebfa; --bad: #a13a55; --bad-soft: #fbecf0; --slate: #4f5a72; --slate-soft: #edf0f5; --toast: #2f4f94; --hover: #edf1fb; --toast-ok: #1a6478; --toast-bad: #a13a55; --shadow: 0 1px 3px rgba(16, 35, 77, .07); --act: #3a2b8f; --view: #1f5aa8; --series-1: #2f5fc8; --cta: #2f4f94; --cta-hover: #2f5fc8; --nav-hover: rgba(255, 255, 255, .16); color-scheme: light; }
:root[data-palette="harbour"] { --bg: #f8fafc; --panel: #ffffff; --ink: #1d2b3a; --muted: #56677a; --line: #dbe3ec; --head: #eaf0f6; --head-ink: #23405e; --zebra: #f5f8fb; --brand: #2c6497; --brand-ink: #ffffff; --brand-soft: #edf3f9; --bar: #263f5c; --bar-ink: #ffffff; --pill: #ffffff; --pill-ink: #263f5c; --chip: #e5edf5; --chip-ink: #2a4e74; --chip-strong: #cfdeec; --chip-strong-ink: #1d3a58; --ok: #1f6660; --ok-soft: #e0f1ee; --warn: #4c5294; --warn-soft: #ebecf7; --bad: #9a3b4b; --bad-soft: #f8eaed; --slate: #525d6b; --slate-soft: #eceff3; --toast: #263f5c; --hover: #eaf0f5; --toast-ok: #1f6660; --toast-bad: #9a3b4b; --shadow: 0 1px 3px rgba(16, 35, 77, .07); --act: #3a2b8f; --view: #1f5aa8; --series-1: #2c6497; --cta: #263f5c; --cta-hover: #2c6497; --nav-hover: rgba(255, 255, 255, .16); color-scheme: light; }
:root[data-palette="lagoon"] { --bg: #f9fcfd; --panel: #ffffff; --ink: #12303d; --muted: #4d6874; --line: #d4e6ec; --head: #e6f3f7; --head-ink: #0f4a5f; --zebra: #f4fafc; --brand: #0f6f96; --brand-ink: #ffffff; --brand-soft: #e9f5f9; --bar: #0d4a63; --bar-ink: #ffffff; --pill: #ffffff; --pill-ink: #0d4a63; --chip: #e0f0f6; --chip-ink: #11597a; --chip-strong: #c8e3ee; --chip-strong-ink: #0b3d52; --ok: #1b6b55; --ok-soft: #e0f3ec; --warn: #3d55a3; --warn-soft: #e8ecf9; --bad: #a33a4a; --bad-soft: #fbebee; --slate: #4c5d66; --slate-soft: #eaf0f2; --toast: #0d4a63; --hover: #e9f2f6; --toast-ok: #1b6b55; --toast-bad: #a33a4a; --shadow: 0 1px 3px rgba(16, 35, 77, .07); --act: #3a2b8f; --view: #1f5aa8; --series-1: #0f6f96; --cta: #0d4a63; --cta-hover: #0f6f96; --nav-hover: rgba(255, 255, 255, .16); color-scheme: light; }
:root[data-palette="periwinkle"] { --bg: #fbfbff; --panel: #ffffff; --ink: #1f2347; --muted: #5a5f88; --line: #e0e1f5; --head: #eff0fc; --head-ink: #2e3480; --zebra: #f8f8fe; --brand: #4652c8; --brand-ink: #ffffff; --brand-soft: #f0f1fd; --bar: #2f3580; --bar-ink: #ffffff; --pill: #ffffff; --pill-ink: #2f3580; --chip: #ebedfc; --chip-ink: #3a43a6; --chip-strong: #d8dbf8; --chip-strong-ink: #262c72; --ok: #1f6577; --ok-soft: #e2f2f6; --warn: #6a3f9e; --warn-soft: #f1eafa; --bad: #a53a58; --bad-soft: #fbecf1; --slate: #555a70; --slate-soft: #eeeff4; --toast: #2f3580; --hover: #eeeffb; --toast-ok: #1f6577; --toast-bad: #a53a58; --shadow: 0 1px 3px rgba(16, 35, 77, .07); --act: #3a2b8f; --view: #1f5aa8; --series-1: #4652c8; --cta: #2f3580; --cta-hover: #4652c8; --nav-hover: rgba(255, 255, 255, .16); color-scheme: light; }
:root[data-palette="daylight"] { --bg: #ffffff; --panel: #ffffff; --ink: #172b4d; --muted: #52617e; --line: #dce5f3; --head: #eef3fb; --head-ink: #1d3f80; --zebra: #f8faff; --brand: #2563d8; --brand-ink: #ffffff; --brand-soft: #eef4fe; --bar: #e4edfc; --bar-ink: #143a80; --pill: #2563d8; --pill-ink: #ffffff; --chip: #e7effc; --chip-ink: #1f4fa8; --chip-strong: #d2e1fa; --chip-strong-ink: #143a80; --ok: #13667a; --ok-soft: #e0f2f7; --warn: #4545a8; --warn-soft: #ebebfa; --bad: #a3364f; --bad-soft: #fbebef; --slate: #4e5970; --slate-soft: #edf0f5; --toast: #1d3f80; --hover: #f0f4fc; --toast-ok: #13667a; --toast-bad: #a3364f; --shadow: 0 1px 3px rgba(16, 35, 77, .07); --act: #3a2b8f; --view: #1f5aa8; --series-1: #2563d8; --cta: #1d3f80; --cta-hover: #2563d8; --nav-hover: rgba(20, 58, 128, .10); color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"]) { --bg: #0a1330; --panel: #101b3c; --ink: #eaf0ff; --muted: #aebde3; --line: #263a6c; --head: #172a5c; --head-ink: #dce7ff; --zebra: #13204a; --brand: #9dbcff; --brand-ink: #0a1330; --brand-soft: #172a5c; --bar: #0e2a6b; --bar-ink: #ffffff; --pill: #ffffff; --pill-ink: #0e2a6b; --chip: #1d3170; --chip-ink: #cfdcff; --chip-strong: #2a4291; --chip-strong-ink: #ffffff; --ok: #8fd6f2; --ok-soft: #10354a; --warn: #c3c1ff; --warn-soft: #25245c; --bad: #ffa3b6; --bad-soft: #43162a; --slate: #c2cbe0; --slate-soft: #222c47; --toast: #2a4291; --hover: #1c2749; --toast-ok: #0a5a7a; --toast-bad: #9c2340; --shadow: none; --act: #3a2b8f; --view: #1f5aa8; --series-1: #9dbcff; --cta: #0e2a6b; --cta-hover: #2a4291; --nav-hover: rgba(255, 255, 255, .16); color-scheme: dark; }
  :root[data-palette="cornflower"]:not([data-mode="light"]) { --bg: #111a30; --panel: #16213b; --ink: #e6ecfa; --muted: #a9b6d4; --line: #2a3a5f; --head: #1c2a4c; --head-ink: #d6e1fb; --zebra: #141f38; --brand: #94b3f5; --brand-ink: #111a30; --brand-soft: #1c2a4c; --bar: #22396e; --bar-ink: #ffffff; --pill: #ffffff; --pill-ink: #22396e; --chip: #233765; --chip-ink: #d0dcfa; --chip-strong: #2f4886; --chip-strong-ink: #ffffff; --ok: #8fd3e4; --ok-soft: #133846; --warn: #c0bff7; --warn-soft: #29295a; --bad: #f4a7b9; --bad-soft: #42192a; --slate: #c3cbdd; --slate-soft: #232d45; --toast: #2f4886; --hover: #212c48; --toast-ok: #1a6478; --toast-bad: #a13a55; --shadow: none; --act: #3a2b8f; --view: #1f5aa8; --series-1: #94b3f5; --cta: #22396e; --cta-hover: #2f4886; --nav-hover: rgba(255, 255, 255, .16); color-scheme: dark; }
  :root[data-palette="harbour"]:not([data-mode="light"]) { --bg: #101923; --panel: #15212e; --ink: #e4ebf2; --muted: #a6b4c3; --line: #2a3a4c; --head: #1b2a3b; --head-ink: #d3e1ef; --zebra: #13202c; --brand: #8ab6df; --brand-ink: #101923; --brand-soft: #1b2a3b; --bar: #1d3249; --bar-ink: #ffffff; --pill: #ffffff; --pill-ink: #1d3249; --chip: #213549; --chip-ink: #cbdcec; --chip-strong: #2d4660; --chip-strong-ink: #ffffff; --ok: #8fd0c6; --ok-soft: #143832; --warn: #bcc0f0; --warn-soft: #282b50; --bad: #eba5b1; --bad-soft: #3d1c24; --slate: #c1cad5; --slate-soft: #222c37; --toast: #2d4660; --hover: #1f2c3a; --toast-ok: #1f6660; --toast-bad: #9a3b4b; --shadow: none; --act: #3a2b8f; --view: #1f5aa8; --series-1: #8ab6df; --cta: #1d3249; --cta-hover: #2d4660; --nav-hover: rgba(255, 255, 255, .16); color-scheme: dark; }
  :root[data-palette="lagoon"]:not([data-mode="light"]) { --bg: #0b1b22; --panel: #10242d; --ink: #e2f1f6; --muted: #a1bfca; --line: #21414e; --head: #13303c; --head-ink: #cfe8f1; --zebra: #0e2029; --brand: #7fcbe6; --brand-ink: #0b1b22; --brand-soft: #13303c; --bar: #0d3b4f; --bar-ink: #ffffff; --pill: #ffffff; --pill-ink: #0d3b4f; --chip: #17394a; --chip-ink: #c6e6f2; --chip-strong: #1f4d62; --chip-strong-ink: #ffffff; --ok: #8fdcc2; --ok-soft: #12392e; --warn: #b6c4f4; --warn-soft: #232d52; --bad: #f0a6b3; --bad-soft: #3e1a22; --slate: #bccbd1; --slate-soft: #1f2d33; --toast: #1f4d62; --hover: #19303a; --toast-ok: #1b6b55; --toast-bad: #a33a4a; --shadow: none; --act: #3a2b8f; --view: #1f5aa8; --series-1: #7fcbe6; --cta: #0d3b4f; --cta-hover: #1f4d62; --nav-hover: rgba(255, 255, 255, .16); color-scheme: dark; }
  :root[data-palette="periwinkle"]:not([data-mode="light"]) { --bg: #121429; --panel: #181b36; --ink: #e8e9fb; --muted: #b0b3dc; --line: #2e3260; --head: #1f2350; --head-ink: #dadcfb; --zebra: #151834; --brand: #a6adfa; --brand-ink: #121429; --brand-soft: #1f2350; --bar: #262b6a; --bar-ink: #ffffff; --pill: #ffffff; --pill-ink: #262b6a; --chip: #262b5e; --chip-ink: #d4d7fb; --chip-strong: #343a80; --chip-strong-ink: #ffffff; --ok: #92d3e3; --ok-soft: #143845; --warn: #d3baf5; --warn-soft: #2f2152; --bad: #f5a8bd; --bad-soft: #43192b; --slate: #c5c8dc; --slate-soft: #24273d; --toast: #343a80; --hover: #242642; --toast-ok: #1f6577; --toast-bad: #a53a58; --shadow: none; --act: #3a2b8f; --view: #1f5aa8; --series-1: #a6adfa; --cta: #262b6a; --cta-hover: #343a80; --nav-hover: rgba(255, 255, 255, .16); color-scheme: dark; }
  :root[data-palette="daylight"]:not([data-mode="light"]) { --bg: #0f1a2e; --panel: #142139; --ink: #e5ecfa; --muted: #a8b6d2; --line: #283a5c; --head: #1a2a49; --head-ink: #d3e0fa; --zebra: #122039; --brand: #8fb2f7; --brand-ink: #0f1a2e; --brand-soft: #1a2a49; --bar: #1a2a49; --bar-ink: #dbe6fd; --pill: #8fb2f7; --pill-ink: #0f1a2e; --chip: #20345c; --chip-ink: #cfdcfa; --chip-strong: #2b4478; --chip-strong-ink: #ffffff; --ok: #8dd3e4; --ok-soft: #12384a; --warn: #c1c0f7; --warn-soft: #27285a; --bad: #f3a6b8; --bad-soft: #41192a; --slate: #c1cadc; --slate-soft: #222c42; --toast: #2b4478; --hover: #1e2c46; --toast-ok: #13667a; --toast-bad: #a3364f; --shadow: none; --act: #3a2b8f; --view: #1f5aa8; --series-1: #8fb2f7; --cta: #1a2a49; --cta-hover: #2b4478; --nav-hover: rgba(255, 255, 255, .16); color-scheme: dark; }
}
:root[data-mode="dark"] { --bg: #0a1330; --panel: #101b3c; --ink: #eaf0ff; --muted: #aebde3; --line: #263a6c; --head: #172a5c; --head-ink: #dce7ff; --zebra: #13204a; --brand: #9dbcff; --brand-ink: #0a1330; --brand-soft: #172a5c; --bar: #0e2a6b; --bar-ink: #ffffff; --pill: #ffffff; --pill-ink: #0e2a6b; --chip: #1d3170; --chip-ink: #cfdcff; --chip-strong: #2a4291; --chip-strong-ink: #ffffff; --ok: #8fd6f2; --ok-soft: #10354a; --warn: #c3c1ff; --warn-soft: #25245c; --bad: #ffa3b6; --bad-soft: #43162a; --slate: #c2cbe0; --slate-soft: #222c47; --toast: #2a4291; --hover: #1c2749; --toast-ok: #0a5a7a; --toast-bad: #9c2340; --shadow: none; --act: #3a2b8f; --view: #1f5aa8; --series-1: #9dbcff; --cta: #0e2a6b; --cta-hover: #2a4291; --nav-hover: rgba(255, 255, 255, .16); color-scheme: dark; }
:root[data-mode="dark"][data-palette="cornflower"] { --bg: #111a30; --panel: #16213b; --ink: #e6ecfa; --muted: #a9b6d4; --line: #2a3a5f; --head: #1c2a4c; --head-ink: #d6e1fb; --zebra: #141f38; --brand: #94b3f5; --brand-ink: #111a30; --brand-soft: #1c2a4c; --bar: #22396e; --bar-ink: #ffffff; --pill: #ffffff; --pill-ink: #22396e; --chip: #233765; --chip-ink: #d0dcfa; --chip-strong: #2f4886; --chip-strong-ink: #ffffff; --ok: #8fd3e4; --ok-soft: #133846; --warn: #c0bff7; --warn-soft: #29295a; --bad: #f4a7b9; --bad-soft: #42192a; --slate: #c3cbdd; --slate-soft: #232d45; --toast: #2f4886; --hover: #212c48; --toast-ok: #1a6478; --toast-bad: #a13a55; --shadow: none; --act: #3a2b8f; --view: #1f5aa8; --series-1: #94b3f5; --cta: #22396e; --cta-hover: #2f4886; --nav-hover: rgba(255, 255, 255, .16); color-scheme: dark; }
:root[data-mode="dark"][data-palette="harbour"] { --bg: #101923; --panel: #15212e; --ink: #e4ebf2; --muted: #a6b4c3; --line: #2a3a4c; --head: #1b2a3b; --head-ink: #d3e1ef; --zebra: #13202c; --brand: #8ab6df; --brand-ink: #101923; --brand-soft: #1b2a3b; --bar: #1d3249; --bar-ink: #ffffff; --pill: #ffffff; --pill-ink: #1d3249; --chip: #213549; --chip-ink: #cbdcec; --chip-strong: #2d4660; --chip-strong-ink: #ffffff; --ok: #8fd0c6; --ok-soft: #143832; --warn: #bcc0f0; --warn-soft: #282b50; --bad: #eba5b1; --bad-soft: #3d1c24; --slate: #c1cad5; --slate-soft: #222c37; --toast: #2d4660; --hover: #1f2c3a; --toast-ok: #1f6660; --toast-bad: #9a3b4b; --shadow: none; --act: #3a2b8f; --view: #1f5aa8; --series-1: #8ab6df; --cta: #1d3249; --cta-hover: #2d4660; --nav-hover: rgba(255, 255, 255, .16); color-scheme: dark; }
:root[data-mode="dark"][data-palette="lagoon"] { --bg: #0b1b22; --panel: #10242d; --ink: #e2f1f6; --muted: #a1bfca; --line: #21414e; --head: #13303c; --head-ink: #cfe8f1; --zebra: #0e2029; --brand: #7fcbe6; --brand-ink: #0b1b22; --brand-soft: #13303c; --bar: #0d3b4f; --bar-ink: #ffffff; --pill: #ffffff; --pill-ink: #0d3b4f; --chip: #17394a; --chip-ink: #c6e6f2; --chip-strong: #1f4d62; --chip-strong-ink: #ffffff; --ok: #8fdcc2; --ok-soft: #12392e; --warn: #b6c4f4; --warn-soft: #232d52; --bad: #f0a6b3; --bad-soft: #3e1a22; --slate: #bccbd1; --slate-soft: #1f2d33; --toast: #1f4d62; --hover: #19303a; --toast-ok: #1b6b55; --toast-bad: #a33a4a; --shadow: none; --act: #3a2b8f; --view: #1f5aa8; --series-1: #7fcbe6; --cta: #0d3b4f; --cta-hover: #1f4d62; --nav-hover: rgba(255, 255, 255, .16); color-scheme: dark; }
:root[data-mode="dark"][data-palette="periwinkle"] { --bg: #121429; --panel: #181b36; --ink: #e8e9fb; --muted: #b0b3dc; --line: #2e3260; --head: #1f2350; --head-ink: #dadcfb; --zebra: #151834; --brand: #a6adfa; --brand-ink: #121429; --brand-soft: #1f2350; --bar: #262b6a; --bar-ink: #ffffff; --pill: #ffffff; --pill-ink: #262b6a; --chip: #262b5e; --chip-ink: #d4d7fb; --chip-strong: #343a80; --chip-strong-ink: #ffffff; --ok: #92d3e3; --ok-soft: #143845; --warn: #d3baf5; --warn-soft: #2f2152; --bad: #f5a8bd; --bad-soft: #43192b; --slate: #c5c8dc; --slate-soft: #24273d; --toast: #343a80; --hover: #242642; --toast-ok: #1f6577; --toast-bad: #a53a58; --shadow: none; --act: #3a2b8f; --view: #1f5aa8; --series-1: #a6adfa; --cta: #262b6a; --cta-hover: #343a80; --nav-hover: rgba(255, 255, 255, .16); color-scheme: dark; }
:root[data-mode="dark"][data-palette="daylight"] { --bg: #0f1a2e; --panel: #142139; --ink: #e5ecfa; --muted: #a8b6d2; --line: #283a5c; --head: #1a2a49; --head-ink: #d3e0fa; --zebra: #122039; --brand: #8fb2f7; --brand-ink: #0f1a2e; --brand-soft: #1a2a49; --bar: #1a2a49; --bar-ink: #dbe6fd; --pill: #8fb2f7; --pill-ink: #0f1a2e; --chip: #20345c; --chip-ink: #cfdcfa; --chip-strong: #2b4478; --chip-strong-ink: #ffffff; --ok: #8dd3e4; --ok-soft: #12384a; --warn: #c1c0f7; --warn-soft: #27285a; --bad: #f3a6b8; --bad-soft: #41192a; --slate: #c1cadc; --slate-soft: #222c42; --toast: #2b4478; --hover: #1e2c46; --toast-ok: #13667a; --toast-bad: #a3364f; --shadow: none; --act: #3a2b8f; --view: #1f5aa8; --series-1: #8fb2f7; --cta: #1a2a49; --cta-hover: #2b4478; --nav-hover: rgba(255, 255, 255, .16); color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* Header bar: solid deep blue, white text. */
.bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
       padding: 10px 20px; background: var(--bar); color: var(--bar-ink); position: sticky; top: 0; z-index: 5;
       box-shadow: 0 2px 6px rgba(16, 35, 77, .2); }
.brand { font-weight: 800; text-decoration: none; color: var(--bar-ink); letter-spacing: .2px; }
.brand span { font-weight: 400; color: var(--bar-ink); opacity: .85; }
nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
nav a, nav button.link { color: var(--bar-ink); text-decoration: none; padding: 4px 10px; border-radius: 999px; }
nav a:hover, nav button.link:hover { background: var(--nav-hover); }
nav .pill { background: var(--pill); color: var(--pill-ink); }

main { max-width: 1200px; margin: 0 auto; padding: 20px 16px 40px; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 20px; }
h1 { font-size: 25px; margin: 8px 0 4px; color: var(--head-ink); }
h2 { font-size: 17px; margin: 0 0 10px; color: var(--head-ink); }
section { margin: 22px 0; }
section.narrow { max-width: 440px; margin: 40px auto; }
.muted { color: var(--muted); }

/* Tables: pastel blue header, zebra rows, clear hover. */
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
              box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--head); color: var(--head-ink); font-size: 13px; font-weight: 700; position: sticky; top: 0; }
tbody tr:nth-child(even) > td, tbody tr:nth-child(even) > th { background: var(--zebra); }
tbody tr:hover > td, tbody tr:hover > th { background: var(--hover); }
tbody tr:last-child > td, tbody tr:last-child > th { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
table.kv th { width: 9em; background: var(--head); color: var(--head-ink); font-size: 13px; }
table.report th a { color: var(--head-ink); text-decoration: none; }
tr.filters th { padding: 4px 6px; background: var(--brand-soft); }
tr.filters input { padding: 4px 6px; font-size: 12px; margin: 0; }
tr.others > td { background: var(--warn-soft); }

/* Forms and buttons. */
label { display: block; margin: 10px 0; font-weight: 600; }
input, select { display: block; width: 100%; margin-top: 4px; padding: 9px 10px; font: inherit; color: var(--ink);
        background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
input:focus, select:focus { border-color: var(--brand); }
input[type=checkbox], input[type=radio] { width: auto; margin: 0; accent-color: var(--brand); }
form.inline { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
form.inline input, form.inline select { flex: 1 1 220px; margin: 0; }
form.inline label { margin: 0; }
form.compact { margin: 0; flex-wrap: nowrap; }
form.compact input { flex: 0 0 70px; width: 70px; padding: 4px 6px; }
form.filter select { flex: 0 1 360px; }
form.stack { max-width: 640px; }
button { font: inherit; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--brand); background: var(--brand-soft);
         color: var(--brand); font-weight: 600; cursor: pointer; }
button:hover { background: var(--hover); }
button.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); margin-top: 10px; }
button.primary:hover { filter: brightness(1.08); }
button.danger { color: var(--bad); border-color: var(--bad); background: var(--bad-soft); }
button.small { padding: 4px 10px; font-size: 13px; }
button.link { border: 0; background: none; color: var(--brand); padding: 0; text-decoration: underline; font-weight: 400; }
button.busy { opacity: .6; cursor: progress; }
.button-link { display: inline-block; padding: 3px 10px; margin-left: 6px; border: 1px solid var(--brand); border-radius: 8px;
               background: var(--brand-soft); color: var(--brand); text-decoration: none; font-size: 13px; font-weight: 600; }
.button-link:hover { background: var(--hover); }
.actions { white-space: nowrap; }
fieldset { border: 1px solid var(--line); border-radius: 10px; margin: 10px 0; padding: 6px 12px 10px; background: var(--panel); }
legend { font-weight: 700; padding: 0 4px; color: var(--head-ink); }
details { margin: 8px 0; }
details input[type=date] { margin: 6px 0; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
label.check input { width: auto; margin: 0; }

/* Tags (chips): one blue family; the state shows by shade, never by a clashing hue. */
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 999px;
       background: var(--chip); color: var(--chip-ink); }
.tag.lead { background: var(--chip-strong); color: var(--chip-strong-ink); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.ok-tag { background: var(--ok-soft); color: var(--ok); }
.tag.s-scheduled { background: var(--ok-soft); color: var(--ok); }
.tag.s-pending { background: var(--warn-soft); color: var(--warn); }
.tag.s-failed { background: var(--bad-soft); color: var(--bad); }
.tag.s-closed, .tag.s-cancelled { background: var(--slate-soft); color: var(--slate); }
.pill { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--chip-strong);
        font-size: 12px; text-align: center; color: var(--chip-strong-ink); font-weight: 700; }

/* Progress and status. */
.progress { height: 8px; background: var(--brand-soft); border-radius: 4px; overflow: hidden; min-width: 120px; }
.progress div { height: 100%; background: var(--brand); transition: width .4s ease; }
.progress.big { height: 14px; margin: 10px 0; }
.status { font-size: 13px; font-weight: 700; }
.s-succeeded { color: var(--ok); } .s-failed, .s-interrupted { color: var(--bad); }
.s-running, .s-queued { color: var(--warn); }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }

/* Panels, notices, banners, toasts. */
pre { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; overflow-x: auto;
      white-space: pre-wrap; font-size: 13px; }
code.token { display: block; word-break: break-all; padding: 8px; background: var(--brand-soft); border-radius: 8px; }
.panel { background: var(--brand-soft); border: 1px solid var(--line); border-left: 4px solid var(--brand);
         border-radius: 8px; padding: 10px 14px; }
.panel h3 { margin: 0 0 6px; font-size: 16px; color: var(--head-ink); }
.error-panel h1 { color: var(--bad); font-size: 20px; }
.notice { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
          padding: 10px 14px; margin-bottom: 14px; border: 1px solid var(--line); border-left: 4px solid var(--brand);
          border-radius: 8px; background: var(--brand-soft); }
#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 20;
          max-width: min(420px, calc(100vw - 32px)); }
.toast { padding: 10px 14px; border-radius: 10px; color: #fff; background: var(--toast); box-shadow: 0 4px 14px rgba(16,35,77,.2); }
.toast.ok { background: var(--toast-ok); } .toast.error { background: var(--toast-bad); }
.as-banner { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
             padding: 10px 20px; background: var(--act); color: #fff; position: sticky; top: 0; z-index: 10; }
.as-banner.view { background: var(--view); }
.as-banner .primary { margin: 0; background: #fff; color: #1a2240; border-color: #fff; }
.swagger-host { background: #fff; border-radius: 8px; padding: 8px; }

/* Charts (data-viz spec): one series hue, light and dark steps; recessive axis and tick text in muted ink. */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.viz { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.viz svg { width: 100%; height: auto; display: block; }
.viz path { fill: var(--series-1); }
.viz .axis { stroke: var(--line); stroke-width: 1; }
.viz .tick { fill: var(--muted); font-size: 11px; }
.viz .hit { fill: transparent; }
.viz .col:hover path, .viz .col:focus path { opacity: .75; }
.viz .col:focus { outline: none; }
.table-tools { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; }
.pager { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }

/* Meeting records: one row per session, a download per file. */
.dl { white-space: nowrap; }
.dl small { color: var(--muted); }
.missing { color: var(--muted); font-style: italic; font-size: 13px; }

/* Page heading with its main action, and the call-to-action button. */
.page-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.cta { display: inline-block; padding: 10px 20px; border-radius: 10px; background: var(--cta); color: #ffffff;
       font-weight: 700; font-size: 16px; text-decoration: none; box-shadow: 0 2px 8px rgba(14, 42, 107, .3); }
.cta:hover { background: var(--cta-hover); text-decoration: none; }

/* Sort by ... then by ... */
.sorter { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sorter label { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; font-size: 13px; margin: 0; }
form.inline .sorter select, .sorter select { flex: 0 1 auto; width: auto; margin: 0; padding: 5px 8px; font-size: 13px; }

/* Column filters: a "contains" box and a pick-list of values with type-to-find. */
.fcell { display: flex; gap: 4px; align-items: center; }
details.colfilter { position: relative; }
details.colfilter > summary { list-style: none; cursor: pointer; padding: 3px 8px; border: 1px solid var(--brand);
                              border-radius: 6px; background: var(--panel); color: var(--brand); font-size: 12px;
                              font-weight: 700; white-space: nowrap; }
details.colfilter > summary::-webkit-details-marker { display: none; }
details.colfilter.on > summary { background: var(--brand); color: var(--brand-ink); }
details.colfilter .menu { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; width: 270px; max-height: 360px;
                          overflow: auto; padding: 8px; background: var(--panel); color: var(--ink); text-align: left;
                          border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(16, 35, 77, .18);
                          font-weight: 400; }
.menu input[type=search] { margin: 0 0 6px; padding: 6px 8px; font-size: 13px; }
.menu-tools { margin: 0 0 6px; font-size: 12px; }
.vlist label.check { margin: 2px 0; font-size: 13px; }
.vlist label.check small { color: var(--muted); margin-left: auto; }
.table-wrap:has(details[open]) { overflow: visible; }

/* Mail senders. */
.sender-on > td { box-shadow: inset 4px 0 0 var(--brand); }
/* Theme switch (U11): a dark/light button and a menu of the six palettes, in the title bar. */
nav button.mode-toggle { color: var(--bar-ink); padding: 4px 10px; border-radius: 999px; text-decoration: none; }
details.theme-menu { position: relative; }
details.theme-menu > summary { list-style: none; cursor: pointer; color: var(--bar-ink); padding: 4px 10px; border-radius: 999px; }
details.theme-menu > summary::-webkit-details-marker { display: none; }
details.theme-menu > summary:hover, details.theme-menu[open] > summary { background: var(--nav-hover); }
.theme-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: min(330px, calc(100vw - 32px));
               max-height: calc(100vh - 90px); overflow: auto; padding: 10px 12px; background: var(--panel); color: var(--ink);
               border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(16, 35, 77, .22); }
.theme-panel fieldset { margin: 0 0 10px; padding: 4px 10px 8px; }
.theme-panel label.check { margin: 4px 0; color: var(--ink); }
.theme-panel label.pal { align-items: center; padding: 4px 6px; border-radius: 8px; }
.theme-panel label.pal:hover { background: var(--hover); }
.theme-panel label.pal small { display: block; color: var(--muted); font-size: 12px; }
.theme-panel .sw { display: inline-flex; flex: none; }
.theme-panel .sw i { width: 16px; height: 16px; border-radius: 50%; margin-left: -4px; border: 2px solid var(--panel); }
.theme-panel .sw i:first-child { margin-left: 0; }
