/* =============================================================================
   NSET Awards Portal - design system
   =============================================================================
   Everything visual is a custom property. Two themes are defined here and the
   theme is chosen on <html data-theme>, set server-side from a cookie, so a page
   never flashes the wrong one and no inline script is needed to avoid it.

   The identity is unchanged - the trust's navy and green - but the greys are
   warmer, the type has a real scale, cards sit on elevation rather than inside a
   hairline box, and every interactive thing has a state you can see.
   ========================================================================== */

:root {
  color-scheme: light;

  /* --- brand ------------------------------------------------------------- */
  --navy-900:#0d243c; --navy-800:#12304f; --navy-700:#1a3a5c; --navy-600:#2b5077;
  --green-700:#0b5c48; --green-600:#0F6E56; --green-500:#158a6c; --green-100:#dcf2e9;
  --blue-600:#1565c0;  --blue-100:#e3eefb;
  --amber-700:#8a4b00; --amber-100:#fdf0dd;
  --red-600:#c0392b;   --red-100:#fdeae7;

  /* --- surfaces ---------------------------------------------------------- */
  --page:#f2f5f8;
  --surface:#ffffff;
  --surface-2:#f7f9fc;
  --surface-3:#eef2f7;
  --line:#e2e8f0;
  --line-strong:#cbd5e1;

  /* --- ink --------------------------------------------------------------- */
  --ink:#132135;
  --ink-2:#475569;
  --ink-3:#5f6d7e;
  --on-brand:#ffffff;

  /* --- accents ----------------------------------------------------------- */
  --brand:var(--navy-700);
  --brand-ink:#ffffff;
  --accent:var(--green-600);
  --accent-hover:var(--green-500);
  --accent-soft:var(--green-100);
  --accent-ink:var(--green-700);
  --info:var(--blue-600);   --info-soft:var(--blue-100);
  --warn:var(--amber-700);  --warn-soft:var(--amber-100);
  --danger:var(--red-600);  --danger-soft:var(--red-100);
  --focus:#2f7fe0;
  --badge-red:#c0392b; --badge-warn:#8a4b00; --badge-ink:#ffffff;

  /* --- shape and depth --------------------------------------------------- */
  --r-sm:8px; --r-md:12px; --r-lg:16px; --r-xl:22px; --r-pill:999px;
  --sh-1:0 1px 2px rgba(15,32,53,.06), 0 1px 3px rgba(15,32,53,.05);
  --sh-2:0 2px 4px rgba(15,32,53,.05), 0 6px 16px rgba(15,32,53,.07);
  --sh-3:0 8px 30px rgba(15,32,53,.12);
  --ring:0 0 0 3px rgba(47,127,224,.28);

  /* --- rhythm ------------------------------------------------------------ */
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:22px; --s6:30px; --s7:42px;
  --sidebar:236px;
  --ease:cubic-bezier(.2,.7,.3,1);
}

/* The dark theme is not an inversion. Surfaces lift as they come forward, the
   navy becomes the page rather than the bar, and the green is brightened so it
   still passes contrast on a dark ground. */
:root[data-theme="dark"] {
  color-scheme: dark;

  --page:#17222f;
  --surface:#1f2a39;
  --surface-2:#253242;
  --surface-3:#2a3746;
  --line:#2f4055;
  --line-strong:#40536b;

  --ink:#e8eef6;
  --ink-2:#a7b6c8;
  --ink-3:#9cabbe;

  --brand:#1b2634;
  --brand-ink:#e8eef6;
  --accent:#3fbf97;
  --accent-hover:#57d2ab;
  --accent-soft:#164539;
  --accent-ink:#7ee0bd;
  --info:#6cb0f5;   --info-soft:#1a3c5a;
  --warn:#e8ae62;   --warn-soft:#48351c;
  --danger:#f0857a; --danger-soft:#4b2a26;
  --focus:#6cb0f5;
  --badge-red:#f0857a; --badge-warn:#e8ae62; --badge-ink:#1b1206;

  --sh-1:0 1px 2px rgba(0,0,0,.4);
  --sh-2:0 2px 6px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --sh-3:0 12px 40px rgba(0,0,0,.5);
  --ring:0 0 0 3px rgba(108,176,245,.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page:#17222f; --surface:#1f2a39; --surface-2:#253242; --surface-3:#2a3746;
    --line:#2f4055; --line-strong:#40536b;
    --ink:#e8eef6; --ink-2:#a7b6c8; --ink-3:#9cabbe;
    --brand:#1b2634; --brand-ink:#e8eef6;
    --accent:#3fbf97; --accent-hover:#57d2ab; --accent-soft:#164539; --accent-ink:#7ee0bd;
    --info:#6cb0f5; --info-soft:#1a3c5a;
    --warn:#e8ae62; --warn-soft:#48351c;
    --danger:#f0857a; --danger-soft:#4b2a26;
    --focus:#6cb0f5;
    --badge-red:#f0857a; --badge-warn:#e8ae62; --badge-ink:#1b1206;
    --sh-1:0 1px 2px rgba(0,0,0,.4);
    --sh-2:0 2px 6px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    --sh-3:0 12px 40px rgba(0,0,0,.5);
    --ring:0 0 0 3px rgba(108,176,245,.35);
  }
}

/* ============================== foundations ============================== */
*, *::before, *::after { box-sizing:border-box }

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

body {
  margin:0;
  background:var(--page);
  color:var(--ink);
  font-size:15px;
  line-height:1.55;
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;
  font-feature-settings:'cv05' 1,'ss01' 1;
  -webkit-font-smoothing:antialiased;
}

a { color:var(--accent); text-underline-offset:2px }
a:hover { color:var(--accent-hover) }
button { font:inherit; cursor:pointer }
code, kbd { font-family:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,monospace;
  font-size:.92em; background:var(--surface-3); padding:1px 5px; border-radius:5px; color:var(--ink-2) }

h1 { font-size:26px; line-height:1.22; letter-spacing:-.022em; font-weight:800;
     margin:0 0 var(--s1); color:var(--ink) }
h2 { font-size:18px; line-height:1.3; letter-spacing:-.012em; font-weight:700; margin:0 0 var(--s1) }
h3 { font-size:15px; font-weight:700; margin:0 0 var(--s1) }

.lead { font-size:14.5px; color:var(--ink-2); margin:0 0 var(--s5); max-width:70ch }
.help { font-size:12.5px; color:var(--ink-3); line-height:1.55; margin-top:var(--s1) }
.muted { color:var(--ink-3) }
.hr { border:0; border-top:1px solid var(--line); margin:var(--s4) 0 }

.lbl { font-size:10.5px; font-weight:800; text-transform:uppercase; letter-spacing:.08em;
  color:var(--ink-3); margin-bottom:var(--s2) }

@media (prefers-reduced-motion:no-preference) {
  .btn, .chip, .card--link, .nav a, .tile { transition:all .16s var(--ease) }
}

/* ================================ shell ================================== */
.demobar {
  background-color:#8a4b00;
  background-image:linear-gradient(90deg,var(--amber-700),#a35c07);
  color:#fff; font-size:12px; text-align:center; padding:6px 14px;
  letter-spacing:.015em; font-weight:600;
}

.shell { display:grid; grid-template-columns:var(--sidebar) 1fr; min-height:100vh;
  min-height:100dvh; align-items:start }

/* --- the side rail (desktop) --- */
.rail {
  position:sticky; top:0; align-self:start; height:100vh; height:100dvh;
  background:var(--brand); color:var(--brand-ink);
  display:flex; flex-direction:column; gap:var(--s2);
  padding:var(--s5) var(--s3) var(--s4);
  border-right:1px solid rgba(255,255,255,.06);
}
.rail .brand { display:flex; align-items:baseline; gap:var(--s2); padding:0 var(--s3) var(--s2);
  text-decoration:none }
.rail .brand b { font-size:20px; font-weight:800; letter-spacing:-.01em; color:var(--brand-ink) }
.rail .brand span { font-size:11.5px; color:rgba(255,255,255,.62); font-weight:500 }
:root[data-theme="dark"] .rail .brand span { color:var(--ink-3) }

.nav { display:flex; flex-direction:column; gap:2px; overflow-y:auto; flex:1; margin-top:var(--s2) }
.nav a {
  display:flex; align-items:center; gap:var(--s3);
  padding:9px var(--s3); border-radius:var(--r-sm);
  font-size:13.5px; font-weight:500; text-decoration:none;
  color:rgba(255,255,255,.72); white-space:nowrap;
}
:root[data-theme="dark"] .nav a { color:var(--ink-2) }
.nav a .dot { width:6px; height:6px; border-radius:50%; background:currentColor; opacity:.32; flex:0 0 6px }
.nav a:hover { background:rgba(255,255,255,.08); color:#fff }
:root[data-theme="dark"] .nav a:hover { background:var(--surface-2); color:var(--ink) }
.nav a.on { background:rgba(255,255,255,.14); color:#fff; font-weight:700 }
:root[data-theme="dark"] .nav a.on { background:var(--surface-3); color:var(--ink) }
.nav a.on .dot { background:var(--accent); opacity:1; box-shadow:0 0 0 3px rgba(63,191,151,.22) }

.railfoot { border-top:1px solid rgba(255,255,255,.1); padding-top:var(--s3); font-size:12px }
:root[data-theme="dark"] .railfoot { border-top-color:var(--line) }
.railfoot .me { display:flex; align-items:center; gap:var(--s2); padding:0 var(--s3) var(--s2);
  color:rgba(255,255,255,.8) }
:root[data-theme="dark"] .railfoot .me { color:var(--ink-2) }
.avatar { width:26px; height:26px; border-radius:50%; background:var(--accent); color:#fff;
  display:grid; place-items:center; font-size:11px; font-weight:800; flex:0 0 26px }
:root[data-theme="dark"] .avatar { color:#06231a }
.railfoot .me small { display:block; font-size:10.5px; color:rgba(255,255,255,.5);
  text-transform:capitalize }
:root[data-theme="dark"] .railfoot .me small { color:var(--ink-3) }
.railfoot a { color:rgba(255,255,255,.7); text-decoration:none; font-size:12px;
  padding:5px var(--s3); display:inline-block; border-radius:var(--r-sm) }
.railfoot a:hover { color:#fff; background:rgba(255,255,255,.08) }
:root[data-theme="dark"] .railfoot a { color:var(--ink-2) }

/* --- the theme switch --- */
.themeswitch { display:flex; gap:2px; background:rgba(255,255,255,.09); border-radius:var(--r-pill);
  padding:3px; margin:0 var(--s3) var(--s3) }
:root[data-theme="dark"] .themeswitch { background:var(--surface-2) }
.themeswitch button {
  flex:1; border:0; background:none; border-radius:var(--r-pill); padding:5px 0;
  font-size:11px; font-weight:700; color:rgba(255,255,255,.6);
}
:root[data-theme="dark"] .themeswitch button { color:var(--ink-2) }
.themeswitch button:hover { color:#fff }
:root[data-theme="dark"] .themeswitch button:hover { color:var(--ink) }
.themeswitch button[aria-pressed="true"] { background:rgba(255,255,255,.9); color:var(--navy-800) }
:root[data-theme="dark"] .themeswitch button[aria-pressed="true"] {
  background:var(--surface-3); color:var(--ink) }

/* --- the top bar (0.21.0): on every screen, on a computer and on a phone ---
   Where you are on the left; Alerts, Help and the name on the right. On a
   computer it sits above the work area on the page colour. On a phone it is
   the navy bar. The colours are local tokens, so one rule set serves both. */
.topbar {
  --tb-bg:var(--surface); --tb-ink:var(--ink); --tb-ink-2:var(--ink-2); --tb-hover:var(--surface-3);
  display:flex; justify-content:space-between; align-items:center; gap:var(--s3);
  background:var(--tb-bg); color:var(--tb-ink); border-bottom:1px solid var(--line);
  padding:var(--s2) var(--s5); position:sticky; top:0; z-index:20; min-height:52px;
}
.topbar .brand { display:none }
.topbar .where { font-size:13px; font-weight:600; color:var(--tb-ink-2); min-width:0;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.topbar .tools { display:flex; align-items:center; gap:var(--s1); flex:0 0 auto }
.tbtn, .namemenu summary {
  display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:var(--r-pill);
  font-size:13px; font-weight:600; color:var(--tb-ink); text-decoration:none; cursor:pointer;
  background:none; border:0; list-style:none; min-height:36px }
.namemenu summary::-webkit-details-marker { display:none }
.tbtn:hover, .namemenu summary:hover, .tbtn[aria-expanded="true"], .namemenu[open] summary {
  background:var(--tb-hover) }
.tbtn .ico { width:18px; height:18px; flex:0 0 18px }
.tbtn .qm { width:18px; height:18px; border-radius:50%; border:1.6px solid currentColor;
  display:grid; place-items:center; font-size:11px; font-weight:800; line-height:1 }
.tbtn .count { min-width:20px; height:20px; padding:0 6px; border-radius:var(--r-pill);
  display:inline-grid; place-items:center; font-size:11.5px; font-weight:800;
  background:var(--surface-3); color:var(--ink-2) }
.tbtn .count.some { background:var(--badge-warn); color:var(--badge-ink) }
.tbtn .count.urgent { background:var(--badge-red); color:var(--badge-ink) }
/* 0.25.6 (item 9c): the trap field of the sign-in form. Off the screen, no Tab
   stop, not read aloud. A person never fills it in; a simple bot does. */
.trapfld { position:absolute; left:-10000px; top:auto; width:1px; height:1px; overflow:hidden }
.vh { position:absolute !important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0 }

/* the name menu */
.namemenu { position:relative }
.namemenu .menu { position:absolute; right:0; top:calc(100% + 6px); z-index:30; min-width:220px;
  background:var(--surface); color:var(--ink); border:1px solid var(--line);
  border-radius:var(--r-md); box-shadow:var(--sh-3); padding:var(--s3);
  display:flex; flex-direction:column; gap:var(--s1) }
.namemenu .menu b { font-size:14px }
.namemenu .menu small { font-size:12px; color:var(--ink-3) }
.themeswitch.inmenu { margin:var(--s2) 0; background:var(--surface-3) }
.themeswitch.inmenu button { color:var(--ink-2) }
.themeswitch.inmenu button[aria-pressed="true"] { background:var(--surface); color:var(--ink) }
.themeswitch.inmenu button:hover { color:var(--ink) }
.namemenu .signout { color:var(--info); font-size:13px; font-weight:600; padding:6px 0 }
/* 0.25.7: Sign out is a button in a form; it still looks like the link it was. */
.namemenu .signoutform { margin:0 }
.namemenu button.signout { background:none; border:0; cursor:pointer; font-family:inherit; text-align:left; text-decoration:underline }

/* the alerts list: a panel under the bar, and the /alerts page */
.alertpanel { position:absolute; right:var(--s4); top:calc(100% + 4px); z-index:30;
  width:min(420px, calc(100vw - 2 * var(--s4))); max-height:75vh; overflow:auto;
  background:var(--surface); color:var(--ink); border:1px solid var(--line);
  border-radius:var(--r-md); box-shadow:var(--sh-3); padding:var(--s3) var(--s4) var(--s2) }
.alertpanel[hidden] { display:none }
.alhead { font-weight:800; font-size:14px; margin-bottom:var(--s2) }
.agrp { border-top:1px solid var(--line) }
.agrp > summary, .agrp.zero { display:flex; align-items:center; gap:var(--s2);
  padding:10px 2px; font-size:13.5px; font-weight:700; cursor:pointer; list-style:none }
.agrp > summary::-webkit-details-marker { display:none }
.agrp > summary::before { content:'\25B8'; color:var(--ink-3); width:12px }
.agrp[open] > summary::before { content:'\25BE' }
.agrp.zero { cursor:default; color:var(--ink-3) }
.agrp.zero::before { content:''; width:12px }
.agrp .glabel { flex:1 }
.agrp .gsum { font-size:12px; font-weight:500; color:var(--ink-3) }
.agrp .gcount { min-width:22px; height:22px; border-radius:var(--r-pill); padding:0 7px;
  display:inline-grid; place-items:center; font-size:12px; background:var(--warn-soft);
  color:var(--warn) }
.agrp.zero .gcount { background:var(--surface-3); color:var(--ink-3) }
.agrp .urgent { width:9px; height:9px; border-radius:50%; background:var(--danger) }
.allist { list-style:none; margin:0; padding:0 0 var(--s2) }
.al { display:flex; align-items:flex-start; gap:var(--s2); padding:8px 0; font-size:13px;
  line-height:1.5; border-top:1px dashed var(--line) }
.allist .al:first-child { border-top:0 }
.al .dot { margin-top:6px }
.al .altext { flex:1; min-width:0 }
.al .altext small { display:block; font-size:12px; color:var(--ink-3) }
.alnone { font-size:13.5px; color:var(--ink-2); margin:var(--s2) 0 }
.alfoot { font-size:12px; color:var(--ink-3); margin:var(--s2) 0 0; padding-top:var(--s2);
  border-top:1px solid var(--line) }
.alfoot a { color:var(--info) }
.alpage .agrp:first-child { border-top:0 }
.setgrp table { margin-bottom:var(--s3) }

.mobilenav { display:none }

.main { min-width:0; display:flex; flex-direction:column; min-height:100vh; min-height:100dvh }
.wrap { width:100%; max-width:820px; margin:0 auto; padding:var(--s6) var(--s5) var(--s7); flex:1 }
.wrap.wide { max-width:1140px }
.foot { max-width:1140px; margin:0 auto; width:100%;
  padding:0 var(--s5) var(--s6); font-size:11.5px; color:var(--ink-3) }

.switcher {
  background:var(--surface); border-bottom:1px solid var(--line);
  padding:var(--s2) var(--s5); font-size:12px; color:var(--ink-3);
  display:flex; gap:var(--s3); align-items:center; flex-wrap:wrap;
}
.switcher a, .linkish { color:var(--info); background:none; border:0; padding:0; font-size:12px }
.linkish { text-decoration:underline }

/* --- below 900px the rail becomes a top bar and a scrolling nav strip --- */
@media (max-width:900px) {
  .shell { grid-template-columns:1fr }
  .rail { display:none }
  .topbar { --tb-bg:var(--brand); --tb-ink:var(--brand-ink); --tb-ink-2:rgba(255,255,255,.8);
    --tb-hover:rgba(255,255,255,.12); padding:var(--s2) var(--s3) var(--s2) var(--s4);
    border-bottom:0 }
  .topbar .brand { display:flex; align-items:baseline; gap:var(--s2); text-decoration:none; min-width:0 }
  .topbar .brand b { font-size:17px; font-weight:800; color:var(--brand-ink) }
  .topbar .brand span { font-size:11px; color:var(--tb-ink-2); overflow:hidden; text-overflow:ellipsis;
    white-space:nowrap }
  .topbar .where { display:none }
  .topbar .tlabel { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0);
    white-space:nowrap }
  .tbhelp .tlabel { position:static; width:auto; height:auto; overflow:visible; clip:auto }
  .tbtn, .namemenu summary { padding:6px 8px }
  .alertpanel { left:var(--s2); right:var(--s2); width:auto }
  .namemenu { position:static }
  .namemenu .menu { right:var(--s2); top:calc(100% + 4px); max-width:calc(100vw - 2 * var(--s2)) }
  .mobilenav {
    display:flex; gap:var(--s1); overflow-x:auto; background:var(--surface);
    border-bottom:1px solid var(--line); padding:var(--s2) var(--s4);
    position:sticky; top:52px; z-index:19; scrollbar-width:none;
  }
  .mobilenav::-webkit-scrollbar { display:none }
  .mobilenav a {
    padding:6px 12px; border-radius:var(--r-pill); font-size:12.5px; font-weight:600;
    color:var(--ink-2); text-decoration:none; white-space:nowrap; background:var(--surface-3);
  }
  .mobilenav a.on { background:var(--accent); color:#fff }
  :root[data-theme="dark"] .mobilenav a.on { color:#06231a }
  .wrap { padding:var(--s5) var(--s4) var(--s7) }
  .foot { padding:0 var(--s4) var(--s5) }
  h1 { font-size:22px }
}

/* ================================ cards ================================== */
.card {
  background:var(--surface); border-radius:var(--r-lg); padding:var(--s5);
  margin-bottom:var(--s4); box-shadow:var(--sh-1);
  border:1px solid transparent;
}
:root[data-theme="dark"] .card { border-color:var(--line) }
.card--link:hover { box-shadow:var(--sh-2); transform:translateY(-1px) }
.card--flush { padding:0; overflow:hidden }
.card > :first-child { margin-top:0 }

/* ============================ statistic tiles ============================ */
.tiles { display:grid; gap:var(--s3); grid-template-columns:repeat(auto-fit,minmax(148px,1fr));
  margin-bottom:var(--s4) }
.tile {
  background:var(--surface); border-radius:var(--r-md); padding:var(--s4);
  box-shadow:var(--sh-1); border:1px solid transparent;
  display:flex; flex-direction:column; gap:2px;
}
:root[data-theme="dark"] .tile { border-color:var(--line) }
.tile b { font-size:27px; font-weight:800; letter-spacing:-.028em; line-height:1.1;
  font-variant-numeric:tabular-nums; color:var(--ink) }
.tile span { font-size:11.5px; color:var(--ink-3); line-height:1.4 }
.tile--accent { background:var(--accent-soft) } .tile--accent b { color:var(--accent-ink) }
.tile--info   { background:var(--info-soft) }   .tile--info b   { color:var(--info) }
.tile--warn   { background:var(--warn-soft) }   .tile--warn b   { color:var(--warn) }
.tile--danger { background:var(--danger-soft) } .tile--danger b { color:var(--danger) }
.tile--accent span, .tile--info span, .tile--warn span, .tile--danger span { opacity:.85 }

/* ============================== controls ================================= */
.fld {
  border:1px solid var(--line-strong); border-radius:var(--r-sm);
  padding:10px 12px; font-size:14px; width:100%; font-family:inherit;
  background:var(--surface); color:var(--ink);
}
.fld::placeholder { color:var(--ink-3) }
.fld:hover { border-color:var(--ink-3) }
.fld:focus { outline:none; border-color:var(--focus); box-shadow:var(--ring) }
textarea.fld { min-height:180px; resize:vertical; line-height:1.65 }
input[type=number].fld { font-variant-numeric:tabular-nums }
input[type=file] { color:var(--ink-2) }
input[type=checkbox], input[type=radio] { accent-color:var(--accent); width:16px; height:16px }

.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:var(--s2);
  background:var(--accent); color:#fff; border:1px solid transparent;
  border-radius:var(--r-sm); padding:10px 18px;
  font-size:13.5px; font-weight:650; text-decoration:none; letter-spacing:.005em;
  box-shadow:var(--sh-1);
}
:root[data-theme="dark"] .btn:not(.ghost):not(.danger) { color:#06231a }
.btn:hover { background:var(--accent-hover); color:#fff; box-shadow:var(--sh-2);
  transform:translateY(-1px) }
:root[data-theme="dark"] .btn:not(.ghost):not(.danger):hover { color:#06231a }
.btn:active { transform:translateY(0); box-shadow:var(--sh-1) }
.btn.ghost { background:var(--surface); color:var(--ink); border-color:var(--line-strong);
  font-weight:600; box-shadow:none }
.btn.ghost:hover { background:var(--surface-2); color:var(--ink); border-color:var(--ink-3);
  box-shadow:var(--sh-1) }
.btn.danger { background:var(--danger); color:#fff }
.btn.danger:hover { background:var(--danger); filter:brightness(1.08); color:#fff }
.btn[disabled], .btn.off { opacity:.42; cursor:not-allowed; transform:none; box-shadow:none }
.btn[disabled]:hover { background:var(--accent); transform:none; box-shadow:none }
.btnrow { display:flex; gap:var(--s2); flex-wrap:wrap; margin-top:var(--s4); align-items:center }

/* ------- chips (formerly pills) - a dot carries the state, not just colour */
.pill, .chip {
  display:inline-flex; align-items:center; gap:6px;
  font-size:11.5px; font-weight:650; border-radius:var(--r-pill); padding:4px 11px;
  border:1px solid var(--line); color:var(--ink-2); background:var(--surface-2);
  margin:0 var(--s1) var(--s1) 0; text-decoration:none; white-space:nowrap;
}
/* The dot marks a state. An action - Print, Continue, Yes - is not a state, so
   only the status variants carry one. */
.pill.ok::before, .pill.on::before, .pill.no::before,
.chip.ok::before, .chip.on::before, .chip.no::before {
  content:""; width:6px; height:6px; border-radius:50%; background:currentColor;
  flex:0 0 6px;
}
.pill.nodot::before, .chip.nodot::before { display:none }
.pill.ok   { background:var(--accent-soft); border-color:transparent; color:var(--accent-ink) }
.pill.on   { background:var(--warn-soft);   border-color:transparent; color:var(--warn) }
.pill.no   { background:var(--danger-soft); border-color:transparent; color:var(--danger) }
.pill.info { background:var(--info-soft);   border-color:transparent; color:var(--info) }
button.pill, a.pill { cursor:pointer }
button.pill:hover, a.pill:hover { border-color:var(--ink-3); color:var(--ink);
  transform:translateY(-1px) }
a.pill.info:hover, button.pill.info:hover { color:var(--info) }

/* ================================ tables ================================= */
.tablewrap { position:relative; overflow-x:auto; border-radius:var(--r-md); border:1px solid var(--line) }
table { border-collapse:separate; border-spacing:0; width:100%; font-size:13.5px }
th, td { padding:11px var(--s3); text-align:left; vertical-align:middle;
  border-bottom:1px solid var(--line) }
th {
  font-size:10.5px; text-transform:uppercase; letter-spacing:.07em; font-weight:800;
  color:var(--ink-3); background:var(--surface-2);
  position:sticky; top:0; z-index:1;
}
tbody tr:last-child td, tr:last-child td { border-bottom:0 }
tr:hover td { background:var(--surface-2) }
td.n, th.n { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap }
tr.warn td { background:var(--warn-soft) }
table caption { text-align:left; caption-side:top }

/* The read-only Roles view on the People page (0.18.0). */
table.roles th[scope="row"] { font-size:13.5px; text-transform:none; letter-spacing:0;
  font-weight:650; color:var(--ink); background:var(--surface); position:static; min-width:220px }
table.roles th[scope="row"] .help { font-weight:400; margin:3px 0 0 }
table.roles tr.area th { position:static; color:var(--ink-2) }
table.roles th.c, table.roles td.c-yes, table.roles td.c-no { text-align:center; white-space:nowrap }
table.roles td.c-yes { color:var(--accent-ink); font-weight:800 }
table.roles td.c-yes small { display:block; font-weight:600; font-size:11px; color:var(--ink-2) }
table.roles tr.unused th[scope="row"] { color:var(--ink-2) }

/* Permission editing (0.22.0, part A2). Tokens only, so the dark theme follows. */
table.roles td.c-yes a.pcell, table.roles td.c-no a.pcell { display:block; color:inherit;
  text-decoration:none; border-radius:6px; padding:2px 4px; border:1px dashed transparent }
table.roles a.pcell:hover { border-color:var(--line-strong); background:var(--surface-2) }
table.roles a.pcell:focus-visible { outline:none; box-shadow:var(--ring) }
table.roles td.p-chg { background:var(--info-soft) }
table.roles td.p-chg, table.roles td.p-chg small { color:var(--info) }
table.roles td.p-wait { background:var(--warn-soft) }
table.roles td.p-wait small { color:var(--warn) }
table.roles tr.prot-diff th[scope="row"] { box-shadow:inset 4px 0 0 var(--danger) }
.chal { border-left:4px solid var(--warn) }
.chal.prot { border-left-color:var(--danger) }
.chal textarea.fld { min-height:84px }
.chrow { display:flex; flex-wrap:wrap; gap:6px; align-items:center }
.chrow form { display:inline-flex; flex-wrap:wrap; gap:6px; align-items:center; margin:0 }
.chrow .fld { max-width:230px; padding-top:6px; padding-bottom:6px }

/* ============================ score entry rows =========================== */
.srow { display:flex; align-items:center; gap:var(--s3); padding:10px 0;
  border-bottom:1px solid var(--line); font-size:13.5px }
.srow:last-of-type { border-bottom:0 }
.srow .nm { flex:1; min-width:120px; color:var(--ink-2) }
.srow input[type=range] { flex:0 0 130px; accent-color:var(--accent) }
.srow .v { width:52px; text-align:right; font-variant-numeric:tabular-nums;
  font-weight:700; color:var(--ink-3); font-size:12.5px }
.tot { display:flex; justify-content:space-between; align-items:baseline;
  border-top:2px solid var(--line-strong); margin-top:var(--s3);
  padding-top:var(--s3); font-weight:800; font-size:16px }
.tot span:last-child { font-variant-numeric:tabular-nums; letter-spacing:-.02em }

.bar { height:7px; border-radius:var(--r-pill); background:var(--surface-3); overflow:hidden }
.bar i { display:block; height:100%; background:var(--accent); border-radius:var(--r-pill) }

/* ================================ notes ================================== */
.note {
  border-radius:var(--r-md); padding:12px 14px; font-size:13px; line-height:1.6;
  margin:var(--s3) 0; border:1px solid transparent;
  border-left-width:3px; border-left-style:solid;
  /* A note with no tone still has to be visible. Without this it renders as bare
     text on the page background and reads as though it were not a panel at all. */
  background:var(--surface-2); border-left-color:var(--line-strong); color:var(--ink-2);
}
.note.ok   { background:var(--accent-soft); border-left-color:var(--accent);
             color:var(--accent-ink) }
.note.warn { background:var(--warn-soft);   border-left-color:var(--warn);   color:var(--warn) }
.note.err  { background:var(--danger-soft); border-left-color:var(--danger); color:var(--danger) }
.note.info { background:var(--info-soft);   border-left-color:var(--info);   color:var(--info) }
.note code { background:rgba(0,0,0,.06) }
:root[data-theme="dark"] .note code { background:rgba(255,255,255,.08) }

/* ============================= empty states ============================== */
.empty { text-align:center; padding:var(--s7) var(--s4); color:var(--ink-3) }
.empty .ic { font-size:34px; opacity:.5; line-height:1 }
.empty h2 { font-size:16px; color:var(--ink-2); margin:var(--s3) 0 var(--s1) }
.empty p { font-size:13px; margin:0 auto; max-width:46ch; line-height:1.6 }

/* ============================== misc pieces ============================== */
.seclist a { display:flex; align-items:center; gap:var(--s2); padding:9px 11px;
  border-radius:var(--r-sm); text-decoration:none; color:var(--ink-2); font-size:13.5px }
.seclist a.on { background:var(--info-soft); color:var(--info); font-weight:700 }
.seclist a:hover { background:var(--surface-2) }

.two { display:grid; grid-template-columns:220px 1fr; gap:var(--s5) }
.two.lead-left { grid-template-columns:1.3fr 1fr }
@media (max-width:860px) { .two, .two.lead-left { grid-template-columns:1fr } }

.docrow { display:flex; justify-content:space-between; align-items:center; gap:var(--s3);
  flex-wrap:wrap; padding:10px 0; border-bottom:1px solid var(--line) }
.docrow:last-child { border-bottom:0 }
.docrow form { display:flex; gap:var(--s2); align-items:center; flex-wrap:wrap; max-width:100% }
.docrow input[type=file] { font-size:11.5px; max-width:100%; min-width:0 }
@media (max-width:430px) {
  .docrow { align-items:flex-start }
  .docrow input[type=file] { max-width:170px }
}

ul.plain { margin:var(--s2) 0 0; padding-left:20px; font-size:13.5px; line-height:1.8;
  color:var(--ink-2) }
ul.plain li { margin-bottom:var(--s1) }
ul.plain li::marker { color:var(--accent) }

.inviteform { display:flex; gap:var(--s2); flex-wrap:wrap; align-items:center }
.inviteform .fld { flex:1 1 190px; min-width:0 }

.rolechip { background:rgba(255,255,255,.16); border-radius:var(--r-pill); padding:2px 9px;
  font-size:11px }

/* ============================ accessibility ============================== */
.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 }
.skip { position:absolute; left:-9999px; top:0; z-index:100; background:var(--accent);
  color:#fff; padding:10px 16px; border-radius:0 0 var(--r-sm) 0; font-size:13px;
  font-weight:700; text-decoration:none }
:root[data-theme="dark"] .skip { color:#06231a }
.skip:focus { left:0 }
:focus-visible { outline:2px solid var(--focus); outline-offset:2px; border-radius:4px }
.btn:focus-visible, .pill:focus-visible { outline-offset:3px }

@media print {
  .rail, .topbar, .mobilenav, .switcher, .demobar, .foot, .btnrow { display:none !important }
  .shell { display:block }
  body { background:#fff }
  .card { box-shadow:none; border:1px solid #ddd }
}

/* =============================================================================
   Design pass revision 2 — components introduced by the approved mockup.
   Everything below is built from the tokens above, so both themes follow.
   ========================================================================== */

/* ---- page header row: breadcrumb / title on the left, pager on the right --- */
.hdr { display:flex; align-items:center; gap:var(--s3); flex-wrap:wrap; margin-bottom:var(--s2) }
.hdr h1, .hdr h2 { margin:0 }
.crumb { font-size:12px; color:var(--ink-3) }
.crumb a { color:var(--ink-3); text-decoration:none }
.crumb a:hover { color:var(--accent) }
.crumb b { color:var(--ink) }

/* ---- pager: step to the previous or next record without going back --------- */
.pager { display:flex; align-items:center; gap:var(--s2); margin-left:auto;
  font-size:12.5px; color:var(--ink-3) }
.pager .count { font-variant-numeric:tabular-nums; white-space:nowrap }
.pager a, .pager span.step {
  display:inline-flex; align-items:center; justify-content:center;
  width:28px; height:28px; border-radius:var(--r-sm);
  border:1px solid var(--line-strong); background:var(--surface);
  color:var(--ink); text-decoration:none; font-size:13px; line-height:1;
}
.pager a:hover { border-color:var(--accent); color:var(--accent); background:var(--surface-2) }
.pager span.step { opacity:.35; cursor:not-allowed }

/* ---- round map (0.25.0, part G; mockup "Round map v7") ----------------------
   The step line on the Dashboard replaces the 7-stage rail. Every colour is a
   token, so both themes follow without a rule of their own. */
.rmnum { display:inline-flex; align-items:center; justify-content:center; flex:none;
  width:22px; height:22px; border-radius:50%; font-size:11px; font-weight:800;
  border:2px solid var(--line-strong); background:var(--surface); color:var(--ink-3) }
.rmnum.done { background:var(--ink); border-color:var(--ink); color:var(--surface) }
.rmnum.now { border-color:var(--accent); color:var(--accent-ink); box-shadow:0 0 0 3px var(--accent-soft) }
.rmlate { color:var(--warn); font-weight:750; font-style:normal }
.rmlinehd { display:flex; align-items:baseline; gap:var(--s3); flex-wrap:wrap }
.rmlinehd a { margin-left:auto; font-size:13px; font-weight:650 }
.stepline { display:flex; align-items:flex-start; margin:var(--s3) 0 var(--s3) }
.stepline > a, .stepline > span { flex:1 1 0; min-width:0; display:flex; flex-direction:column;
  align-items:center; text-align:center; gap:3px; position:relative; text-decoration:none;
  color:var(--ink-2); font-size:11.5px; line-height:1.3; padding:0 2px }
.stepline > a::after, .stepline > span::after { content:""; position:absolute; top:11px;
  left:calc(50% + 13px); right:calc(-50% + 13px); height:2px; background:var(--line) }
.stepline > :last-child::after { display:none }
.stepline > .done::after { background:var(--accent) }
.stepline b { font-weight:650; color:var(--ink) }
.stepline small { color:var(--ink-3); font-size:10.5px }
.stepline .cur b { color:var(--accent-ink); font-weight:800 }
.stepline > a:hover b { color:var(--accent) }
.rmnowbox { border:1px solid var(--accent); background:var(--accent-soft); border-radius:var(--r-md);
  padding:var(--s3) var(--s4); font-size:13.5px; color:var(--ink) }
.rmnowbox.late { border-color:var(--warn); background:var(--warn-soft) }
.rmnowbox ul { margin:6px 0 0; padding-left:0; list-style:none }
.rmnowbox .btnrow { margin-top:var(--s2) }
@media (max-width:640px) {
  .stepline { flex-wrap:wrap; gap:var(--s2) var(--s1) }
  .stepline > a, .stepline > span { flex:1 1 22% }
  .stepline > a::after, .stepline > span::after { display:none }
}

.rmtools { display:flex; align-items:center; gap:var(--s2) var(--s3); flex-wrap:wrap; margin:0 0 var(--s1) }
/* 0.25.1: the page name, the tabs, Print and the key stay under the top bar
   (55 px, its real height). The chart scrolls in its own area under them, so the header of the
   chart is always on the screen. */
.rmhead { position:sticky; top:55px; z-index:15; background:var(--page); padding:var(--s2) 0 6px;
  margin:calc(-1 * var(--s4)) 0 var(--s2); border-bottom:1px solid var(--line) }
.rmhead .rmlegend { margin:0 }
.rmname { font-size:20px; line-height:1.2; margin:0 }
.rmwhere { font-size:12.5px; color:var(--ink-2); flex:1 1 0; min-width:0; white-space:nowrap;
  overflow:hidden; text-overflow:ellipsis }
.rmhead .rmtabs a { padding:4px 11px }
.rmarea { overflow:auto; max-height:calc(100vh - 136px); max-height:calc(100dvh - 136px); min-height:320px }
.rmcal.rmarea { min-height:0 }
.rmtools .btn { margin-left:auto }
.rmlegend { display:flex; flex-wrap:wrap; gap:var(--s1) var(--s4); font-size:11.5px; color:var(--ink-2);
  margin:0 0 var(--s3) }
.rmlegend i { font-style:normal }
.rmbadge { display:inline-block; font-size:10px; font-weight:800; line-height:1; padding:3px 7px;
  border-radius:var(--r-pill); white-space:nowrap; font-style:normal }
.rmbadge.done { background:var(--surface-3); color:var(--ink); border:1px solid var(--line-strong) }
.rmbadge.now { background:var(--accent-soft); color:var(--accent-ink); border:1px solid var(--accent) }
.rmlatekey, .rmlatemark { display:inline-flex; align-items:center; justify-content:center;
  width:16px; height:16px; border-radius:50%; background:var(--warn-soft); color:var(--warn);
  border:1px solid var(--warn); font-weight:800; font-size:11px; font-style:normal }
.rmtodokey { display:inline-block; width:20px; height:12px; border:1px dashed var(--line-strong);
  border-radius:4px; vertical-align:middle }
.rmhandkey, .rmhand { color:var(--info); font-style:normal }

/* Flowchart: lanes are columns, the steps are bands. The boxes and the arrows
   share one coordinate space, so the chart scrolls sideways as one piece. */
.rmscroll { overflow-x:auto; border:1px solid var(--line); border-radius:var(--r-md);
  background:var(--surface); margin-bottom:var(--s4) }
.rmflow { position:relative; font-size:11px }
.rmlane { position:absolute; top:0; border-left:1px solid var(--line) }
.rmlane.l-applicant, .rmlane.l-coordinator, .rmlane.l-committee { background:var(--surface-2) }
.rmlanehd { position:sticky; top:0; z-index:3; height:46px; padding:6px 4px; text-align:center;
  border-bottom:1px solid var(--line); background:var(--surface-3) }
.rmcorner { position:sticky; top:0; left:0; z-index:4; width:120px; height:46px; padding:14px 8px;
  font-size:11.5px; font-weight:700; color:var(--ink-2); background:var(--surface-3);
  border-bottom:1px solid var(--line); border-right:1px solid var(--line) }
.rmlanehd b { display:block; font-size:11.5px; color:var(--ink) }
.rmlanehd small { display:block; font-size:10px; color:var(--ink-3) }
.rmband { position:absolute; left:0; right:0; border-top:1px dashed var(--line-strong) }
.rmband.cur { background:var(--accent-soft) }
.rmsteplbl { position:sticky; left:0; z-index:2; width:120px; height:100%; padding:8px 8px; display:flex;
  flex-direction:column; gap:3px; text-decoration:none; color:var(--ink); background:var(--surface);
  border-right:1px solid var(--line) }
.rmband.cur .rmsteplbl { background:var(--accent-soft) }
.rmsteplbl b { font-size:11.5px; line-height:1.25 }
.rmsteplbl small { color:var(--ink-3); font-size:10px }
.rmsteplbl em { font-style:normal; font-size:10.5px; font-weight:700; color:var(--accent-ink) }
.rmsteplbl em.rmlate { color:var(--warn) }
.rmsvg { position:absolute; left:0; top:0; pointer-events:none }
.rmedge { fill:none; stroke:var(--ink-2); stroke-width:1.4 }
.rmedge.dim { stroke:var(--line-strong); stroke-dasharray:4 3 }
.rmarrowhead { fill:var(--ink-2) }
.rmlbl { font-size:9.5px; fill:var(--ink-2); paint-order:stroke; stroke:var(--surface); stroke-width:3px }
.rmbox { position:absolute; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:2px; padding:4px 6px; text-align:center; text-decoration:none; color:var(--ink);
  background:var(--surface); border:1.5px solid var(--ink-2); border-radius:7px; line-height:1.2;
  font-size:10.5px; box-shadow:var(--sh-1) }
.rmbox:hover { border-color:var(--accent); color:var(--ink) }
.rmbox .rmbadge { position:absolute; top:-9px; left:50%; transform:translateX(-50%); max-width:112px;
  overflow:hidden; text-overflow:ellipsis }
.rmbox.todo { border-style:dashed; border-color:var(--line-strong); color:var(--ink-3); box-shadow:none }
.rmbox.now { border:2px solid var(--accent) }
.rmbox.late { border-color:var(--warn) }
.rmbox.sel { box-shadow:var(--ring) }
.rmbox.k-start, .rmbox.k-end { border-radius:var(--r-pill); background:var(--brand); color:var(--brand-ink);
  border-color:var(--brand); font-weight:750 }
.rmbox.k-end.todo { background:var(--surface-3); color:var(--ink-3); border-color:var(--line-strong) }
.rmbox.k-decision { border-radius:14px; border-width:2px }
.rmwith { font-size:9px; color:var(--ink-3); font-style:italic }
.rmcount { font-size:9.5px; font-weight:750; color:var(--accent-ink) }
.rmbox.late .rmcount { color:var(--warn) }
.rmbox .rmlatemark { position:absolute; right:-8px; top:-8px }

/* Swimlanes and the calendar */
.rmswim table { font-size:11.5px }
.rmswim th small { display:block; font-weight:400; color:var(--ink-3); font-size:10.5px }
.rmswim th a { text-decoration:none; color:var(--ink); display:inline-flex; gap:5px; align-items:center }
.rmswim td, .rmswim th { vertical-align:top; min-width:104px }
/* The step row stays at the top and the role column at the left. Each row
   header is sticky to the left only (the table rule makes each th sticky to
   the top). */
.rmarea th[scope="row"] { position:sticky; top:auto; left:0; z-index:2; background:var(--surface);
  border-right:1px solid var(--line) }
.rmarea tr:first-child th { z-index:3; box-shadow:0 1px 0 var(--line-strong) }
.rmarea tr:first-child th:first-child { left:0; z-index:4 }
.rmswim .cur { background:var(--accent-soft) }
.rmchip { display:block; margin:0 0 5px; padding:4px 6px; border:1px solid var(--line-strong);
  border-left:3px solid var(--ink-2); border-radius:5px; text-decoration:none; color:var(--ink);
  background:var(--surface); line-height:1.3 }
.rmchip.todo { border-style:dashed; color:var(--ink-3); border-left-color:var(--line-strong) }
.rmchip.now { border-color:var(--accent); border-left-color:var(--accent) }
.rmchip.late { border-left-color:var(--warn) }
.rmchip.sel { box-shadow:var(--ring) }
.rmcal th[scope="row"] { white-space:nowrap; font-size:12px; width:210px }
.rmcal td { width:100% }
.rmaxis { position:relative; height:18px; font-size:10.5px; color:var(--ink-3) }
.rmaxis span { position:absolute; top:0; transform:translateX(2px); white-space:nowrap }
.rmtrack { position:relative; height:20px; background:var(--surface-2); border-radius:4px }
.rmbar { position:absolute; top:3px; height:14px; border-radius:4px; display:inline-block }
.rmbar.plan { border:1px dashed var(--ink-3); background:transparent; top:1px; height:18px }
.rmbar.done { background:var(--ink-2) }
.rmbar.now { background:var(--accent) }
.rmbar.late { background:var(--warn) }
.rmbar.todo { display:none }
.rmtoday { position:absolute; top:0; border-left:2px solid var(--danger); height:18px; padding-left:3px }
.rmtoday b { color:var(--danger); font-size:10px }
.rmcalkey { display:flex; gap:var(--s4); flex-wrap:wrap; font-size:12px; color:var(--ink-2);
  margin:0 0 var(--s4) }
.rmcalkey .rmbar { position:static; width:22px; vertical-align:middle }

/* The detail of a step, and the phone cards */
.rmdetail h2 { margin:0; font-size:18px }
.rmdhead { display:flex; align-items:center; gap:var(--s3); flex-wrap:wrap; margin-bottom:var(--s2) }
.rmstate { display:inline-block; font-size:11px; font-weight:800; padding:2px 8px; border-radius:var(--r-pill);
  background:var(--surface-3); color:var(--ink-2) }
.rmstate.done { background:var(--surface-3); color:var(--ink) }
.rmstate.now { background:var(--accent-soft); color:var(--accent-ink) }
.rmdetail tr.sel td { background:var(--surface-3) }
.rmsteps { display:flex; gap:6px; flex-wrap:wrap; margin:0 0 var(--s3) }
.rmsteps a { text-decoration:none; border-radius:50%; padding:2px }
.rmsteps a.on { box-shadow:var(--ring) }
.rmtick { display:flex; gap:6px; align-items:center; flex-wrap:wrap; margin-top:6px }
.rmtick .fld { max-width:160px; padding:3px 6px }
.rmcards { display:none }
.rmcard { border:1px dashed var(--line-strong); border-radius:var(--r-md); padding:var(--s3);
  margin:0 0 var(--s2); background:var(--surface); font-size:13.5px }
.rmcard.now { border:2px solid var(--accent) }
.rmcard.late { border-color:var(--warn) }
.rmcard.done { border-style:solid }
.rmcard summary { cursor:pointer; font-weight:650 }
.rmcard ul { margin:6px 0 0; padding-left:18px }
.rmcardhd { display:flex; align-items:center; gap:var(--s2); margin-bottom:4px }
.rmcardhd .pill { margin-left:auto }
@media (max-width:900px) {
  .rmpanel, .rmtools .rmtabs, .rmlegend { display:none }
  .rmhead { position:static; border-bottom:0 }
  .rmwhere { flex-basis:100%; white-space:normal; overflow:visible }
  .rmcards { display:block }
}
@media print {
  .rmhead, .rmcards, .rmsteps, .rmtick { display:none !important }
  /* 0.25.1: a printed page is narrower than 900 px, so the phone rule hid the
     chart in 0.25.0. Paper always gets the chart, not the cards. */
  .rmpanel { display:block !important }
  .rmscroll { overflow:visible; border:none }
  .rmarea { overflow:visible; max-height:none }
  .rmarea th, .rmcorner, .rmsteplbl, .rmlanehd { position:static }
  .rmflow { zoom:.66 }
  .rmband.cur { background:transparent }
}

/* ---- record ribbon: where THIS applicant has got to ------------------------ */
.ribbon { display:flex; gap:2px; flex-wrap:wrap; margin:0 0 var(--s4) }
.ribbon span {
  font-size:10.5px; font-weight:800; text-transform:uppercase; letter-spacing:.05em;
  color:var(--ink-3); background:var(--surface); border:1px solid var(--line);
  padding:6px 16px 6px 20px;
  clip-path:polygon(0 0,calc(100% - 9px) 0,100% 50%,calc(100% - 9px) 100%,0 100%,9px 50%);
}
.ribbon span:first-child { padding-left:14px; border-radius:var(--r-sm) 0 0 var(--r-sm);
  clip-path:polygon(0 0,calc(100% - 9px) 0,100% 50%,calc(100% - 9px) 100%,0 100%) }
.ribbon span.done { color:var(--accent-ink); background:var(--accent-soft); border-color:transparent }
.ribbon span.now { color:#fff; background:var(--accent); border-color:transparent }
:root[data-theme="dark"] .ribbon span.now { color:#06231a }

/* ---- smart buttons: a count, and the way in ------------------------------- */
.smart { display:flex; gap:var(--s2); flex-wrap:wrap; margin-bottom:var(--s4) }
.smart a, .smart div {
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-md);
  padding:9px 14px; text-decoration:none; min-width:82px; display:block;
}
.smart a:hover { border-color:var(--accent); box-shadow:var(--sh-1); transform:translateY(-1px) }
.smart b { display:block; font-size:18px; font-weight:800; color:var(--ink);
  letter-spacing:-.02em; line-height:1.15; font-variant-numeric:tabular-nums }
.smart span { display:block; font-size:9.5px; color:var(--ink-3); text-transform:uppercase;
  letter-spacing:.06em; margin-top:3px }

/* ---- view switcher and search facets -------------------------------------- */
.vsw { display:inline-flex; border:1px solid var(--line-strong); border-radius:var(--r-sm);
  overflow:hidden }
.vsw a { font-size:12px; font-weight:650; padding:6px 13px; background:var(--surface);
  color:var(--ink-2); text-decoration:none }
.vsw a:hover { background:var(--surface-2); color:var(--ink) }
.vsw a.on { background:var(--brand); color:var(--brand-ink) }
:root[data-theme="dark"] .vsw a.on { background:var(--surface-3); color:var(--ink) }

.search { display:flex; align-items:center; gap:var(--s2); background:var(--surface);
  border:1px solid var(--line-strong); border-radius:var(--r-sm); padding:7px 10px;
  flex-wrap:wrap; margin-bottom:var(--s3) }
.search .grow { flex:1; min-width:110px }
.search .grow input { border:0; outline:0; background:none; font:inherit; font-size:13px;
  color:var(--ink); width:100% }
.search .grow input::placeholder { color:var(--ink-3) }
.search .drops { display:flex; gap:var(--s2); border-left:1px solid var(--line);
  padding-left:var(--s3); flex-wrap:wrap; min-width:0 }
.search .drops select { border:0; background:none; font:inherit; font-size:12px;
  color:var(--ink-2); cursor:pointer; max-width:150px; min-width:0 }
.facet { display:inline-flex; align-items:stretch; font-size:11px; font-weight:700;
  border-radius:var(--r-sm); overflow:hidden; text-decoration:none }
.facet b { background:var(--info); color:#fff; padding:3px 7px; font-weight:800;
  text-transform:uppercase; letter-spacing:.04em; font-size:9.5px; display:flex; align-items:center }
:root[data-theme="dark"] .facet b { color:#08243c }
.facet em { font-style:normal; background:var(--info-soft); color:var(--info);
  padding:3px 7px; display:flex; align-items:center }
.facet u { text-decoration:none; background:var(--info-soft); color:var(--info);
  padding:3px 8px 3px 2px; display:flex; align-items:center; font-size:12px }
.facet:hover u { color:var(--danger) }

/* ---- kanban board --------------------------------------------------------- */
.kb { display:flex; gap:var(--s3); overflow-x:auto; padding-bottom:var(--s2);
  align-items:flex-start }
.kcol { flex:1 1 0; min-width:170px }
.kcol .kh { display:flex; justify-content:space-between; align-items:center;
  font-size:10.5px; font-weight:800; text-transform:uppercase; letter-spacing:.07em;
  color:var(--ink-3); padding:0 var(--s1) var(--s2) }
.kcol .kh i { font-style:normal; background:var(--surface-3); color:var(--ink-2);
  border-radius:var(--r-pill); padding:1px 8px; font-size:10.5px }
.kcol .kbody { background:var(--surface-2); border-radius:var(--r-md); padding:var(--s2);
  min-height:70px }
/* In light the tray is grey and the cards are white, so a card sits forward. Keep
   that relationship on dark: the tray recedes to the page, the cards come up. */
:root[data-theme="dark"] .kcol .kbody { background:var(--page); border:1px solid var(--line) }
.kcard { display:block; background:var(--surface); border:1px solid var(--line);
  border-left:3px solid var(--line-strong); border-radius:var(--r-sm);
  padding:9px 11px; margin-bottom:var(--s2); text-decoration:none }
.kcard:last-child { margin-bottom:0 }
.kcard:hover { border-color:var(--accent); border-left-color:var(--accent);
  box-shadow:var(--sh-2); transform:translateY(-1px) }
.kcard.ok { border-left-color:var(--accent) }
.kcard.on { border-left-color:var(--warn) }
.kcard.no { border-left-color:var(--danger) }
.kcard b { display:block; font-size:13px; color:var(--ink); font-weight:700 }
.kcard span { display:block; font-size:11.5px; color:var(--ink-3); line-height:1.4; margin-top:2px }
.kcard .kf { display:flex; gap:var(--s1); flex-wrap:wrap; margin-top:var(--s2) }
.kcol .empty { padding:var(--s4) var(--s2); font-size:11.5px }
/* On a phone five side-by-side columns mean sideways scrolling, and the row is as
   tall as its fullest column, so short columns sit above a screenful of nothing.
   Stack them instead: same columns, same order, read top to bottom. */
@media (max-width:640px) {
  .kb { display:block; overflow-x:visible }
  .kcol { min-width:0; margin-bottom:var(--s4) }
  .kcol:last-child { margin-bottom:0 }
}

/* ---- "needs you" attention rows ------------------------------------------- */
.att { display:flex; align-items:center; gap:var(--s3); padding:10px 0;
  border-bottom:1px solid var(--line); font-size:13.5px }
.att:last-child { border-bottom:0 }
.att .dot { width:9px; height:9px; border-radius:50%; flex:0 0 9px }
.att .dot.no { background:var(--danger) }
.att .dot.on { background:var(--warn) }
.att .dot.ok { background:var(--accent) }
.att .go { margin-left:auto }

/* ---- section stepper: named, and ticked as you go ------------------------- */
.step { display:flex; gap:var(--s2); flex-wrap:wrap }
.step a { flex:1 1 0; min-width:78px; text-decoration:none; border:1px solid var(--line);
  border-radius:var(--r-sm); padding:8px 7px; background:var(--surface); text-align:center }
.step a:hover { border-color:var(--accent); box-shadow:var(--sh-1) }
.step a.on { border-color:var(--accent); background:var(--accent-soft) }
.step a b { display:block; font-size:12.5px; color:var(--ink); font-weight:700 }
.step a span { display:block; font-size:10px; color:var(--ink-3); margin-top:2px; line-height:1.3 }
.step a.on span, .step a.on b { color:var(--accent-ink) }
.step a i { font-style:normal; font-size:11px; color:var(--accent); display:block; line-height:1 }
.step a .pend { color:var(--ink-3); opacity:.5 }

/* ---- rail cards: the side rail earning its space for single-role users ----- */
.railcard { background:rgba(255,255,255,.09); border-radius:var(--r-sm);
  padding:10px 11px; margin:var(--s2) var(--s1) 0 }
:root[data-theme="dark"] .railcard { background:var(--surface-2) }
.railcard b { display:block; font-size:21px; font-weight:800; line-height:1.1;
  letter-spacing:-.02em; color:#fff; font-variant-numeric:tabular-nums }
:root[data-theme="dark"] .railcard b { color:var(--ink) }
.railcard b small { font-size:12px; font-weight:700; opacity:.55 }
.railcard span { display:block; font-size:10.5px; color:rgba(255,255,255,.62);
  line-height:1.4; margin-top:3px }
:root[data-theme="dark"] .railcard span { color:var(--ink-3) }
.railcard .rbar { height:5px; border-radius:var(--r-pill); background:rgba(255,255,255,.18);
  overflow:hidden; margin-top:7px }
:root[data-theme="dark"] .railcard .rbar { background:var(--surface-3) }
.railcard .rbar i { display:block; height:100%; background:var(--accent);
  border-radius:var(--r-pill) }
.railcard.note-card { background:rgba(255,255,255,.14) }
:root[data-theme="dark"] .railcard.note-card { background:var(--surface-3) }
.railcard.note-card span { color:rgba(255,255,255,.85); margin-top:0 }
:root[data-theme="dark"] .railcard.note-card span { color:var(--ink-2) }
.railcard.warn b { color:#ffd08a }
:root[data-theme="dark"] .railcard.warn b { color:var(--warn) }
@media (max-width:900px) { .railcard { display:none } }

/* A grid item's automatic minimum size is its content, so a wide child inside one
   column widens the whole page instead of wrapping. Both of these grids hold
   things that can be wide (a seven-step stepper, a long figure). */
.two > *, .tiles > * { min-width:0 }
.stagerail div { min-width:0; overflow-wrap:anywhere }

/* ---- the four steps of an application ------------------------------------- */
.steps { display:flex; flex-wrap:wrap; gap:var(--s2); list-style:none; margin:0 0 var(--s4);
  padding:0 }
.steps li { flex:1 1 0; min-width:120px }
.steps li > a, .steps li > span {
  display:flex; align-items:center; gap:var(--s2); text-decoration:none;
  padding:8px 10px; border-radius:var(--r-sm); background:var(--surface-2);
  border:1px solid transparent; color:var(--ink-2); font-size:12.5px;
}
.steps li > a:hover { border-color:var(--line-strong); color:var(--ink) }
.steps li.here > span { background:var(--info-soft); color:var(--info); font-weight:700 }
.steps li.done > a, .steps li.done > span { color:var(--accent-ink) }
.steps li.shut > span { opacity:.55 }
.steps .sn { flex:0 0 20px; height:20px; border-radius:50%; background:var(--surface-3);
  color:var(--ink-2); font-size:11px; font-weight:800; display:flex;
  align-items:center; justify-content:center }
.steps li.done .sn { background:var(--accent); color:#fff }
:root[data-theme="dark"] .steps li.done .sn { color:#06231a }
.steps li.here .sn { background:var(--info); color:#fff }
:root[data-theme="dark"] .steps li.here .sn { color:#08243c }
.steps .sl { min-width:0; overflow-wrap:anywhere }

.steplist { margin-top:var(--s2) }
.steprow { display:flex; align-items:center; gap:var(--s3); padding:12px 0;
  border-bottom:1px solid var(--line) }
.steprow:last-child { border-bottom:0 }
.steprow.shut { opacity:.6 }
.steprow .sn { flex:0 0 26px; height:26px; border-radius:50%; background:var(--surface-3);
  color:var(--ink-2); font-size:12px; font-weight:800; display:flex;
  align-items:center; justify-content:center }
.steprow .sw { flex:1; min-width:0 }
.steprow .sw b { display:block; font-size:13.5px; color:var(--ink) }
.steprow .sw span { display:block; font-size:11.5px; color:var(--ink-3) }
.steprow .sg { flex:0 0 auto }

/* a plain label/value line, used on the check-and-send page */
.kv { display:flex; gap:var(--s3); padding:8px 0; border-bottom:1px solid var(--line);
  font-size:13px }
.kv:last-of-type { border-bottom:0 }
.kv > span:first-child { flex:0 0 130px; color:var(--ink-3) }
.kv > span:last-child { flex:1; min-width:0; color:var(--ink); overflow-wrap:anywhere;
  white-space:pre-line }

.rev { padding:10px 0; border-bottom:1px solid var(--line) }
.rev:last-of-type { border-bottom:0 }
.rev b { font-size:13px; color:var(--ink) }
.rev p { margin:4px 0 4px; font-size:13px; color:var(--ink-2); line-height:1.6 }

@media (max-width:640px) {
  .steps li { flex:1 1 100% }
}

/* who the application belongs to - the coordinator's view only */
.who { background:var(--surface-2); border-radius:var(--r-md); padding:10px 13px;
  margin:0 0 var(--s4); font-size:13px; color:var(--ink-2) }
.who b { display:block; font-size:15px; color:var(--ink); margin-bottom:2px }
.who .help { margin-top:6px }

/* what a scorer is looking for, from the trust's own guide */
.crit ul { margin:var(--s2) 0 0; padding-left:18px }
.crit li { font-size:13px; color:var(--ink-2); line-height:1.55; margin:0 0 6px }
.crit li::marker { color:var(--accent) }

/* one question and its criteria, on the settings page */
.qblk { border:1px solid var(--line); border-radius:var(--r-sm); padding:10px 12px;
  margin:0 0 var(--s2) }
.qblk b { display:block; font-size:12.5px; color:var(--ink); margin-bottom:6px }
/* textarea.fld is 180px tall for writing an application in. These hold a sentence
   and a few bullets, and seven of them at that height is a page nobody scrolls. */
.qblk textarea { margin-bottom:6px; min-height:58px }
.qblk textarea + textarea { min-height:86px }
.qblk textarea:last-child { margin-bottom:0 }

.over { color:var(--warn); font-weight:700 }

/* a setting and the control that changes it */
.setrow { display:flex; justify-content:space-between; align-items:center; gap:var(--s3);
  flex-wrap:wrap; padding:9px 0; border-bottom:1px solid var(--line) }
.setrow:last-child { border-bottom:0 }
.setname { font-size:13px; color:var(--ink-2); flex:1; min-width:190px }
label.rowlbl { cursor:pointer }
label.rowlbl:hover { color:var(--ink) }

/* ===================== Auto: the same dark rules again =====================
   A browser cannot be asked for its colour scheme inside a selector, so every
   rule keyed on data-theme="dark" is inert when Appearance is Auto and the
   device is set to dark - the tokens switch over but the component treatments
   do not. These are those same rules, guarded by the media query instead.
   GENERATED FROM THE RULES ABOVE - edit the original, never this copy.
   Regenerate with /tmp/mirror.py. Check G24 fails if the two fall out of step. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .rail .brand span { color:var(--ink-3) }
  :root:not([data-theme="light"]) .nav a { color:var(--ink-2) }
  :root:not([data-theme="light"]) .nav a:hover { background:var(--surface-2); color:var(--ink) }
  :root:not([data-theme="light"]) .nav a.on { background:var(--surface-3); color:var(--ink) }
  :root:not([data-theme="light"]) .railfoot { border-top-color:var(--line) }
  :root:not([data-theme="light"]) .railfoot .me { color:var(--ink-2) }
  :root:not([data-theme="light"]) .avatar { color:#06231a }
  :root:not([data-theme="light"]) .railfoot .me small { color:var(--ink-3) }
  :root:not([data-theme="light"]) .railfoot a { color:var(--ink-2) }
  :root:not([data-theme="light"]) .themeswitch { background:var(--surface-2) }
  :root:not([data-theme="light"]) .themeswitch button { color:var(--ink-2) }
  :root:not([data-theme="light"]) .themeswitch button:hover { color:var(--ink) }
  :root:not([data-theme="light"]) .themeswitch button[aria-pressed="true"] { background:var(--surface-3); color:var(--ink) }
  :root:not([data-theme="light"]) .card { border-color:var(--line) }
  :root:not([data-theme="light"]) .tile { border-color:var(--line) }
  :root:not([data-theme="light"]) .btn:not(.ghost):not(.danger) { color:#06231a }
  :root:not([data-theme="light"]) .btn:not(.ghost):not(.danger):hover { color:#06231a }
  :root:not([data-theme="light"]) .note code { background:rgba(255,255,255,.08) }
  :root:not([data-theme="light"]) .skip { color:#06231a }
  :root:not([data-theme="light"]) .ribbon span.now { color:#06231a }
  :root:not([data-theme="light"]) .vsw a.on { background:var(--surface-3); color:var(--ink) }
  :root:not([data-theme="light"]) .facet b { color:#08243c }
  :root:not([data-theme="light"]) .kcol .kbody { background:var(--page); border:1px solid var(--line) }
  :root:not([data-theme="light"]) .railcard { background:var(--surface-2) }
  :root:not([data-theme="light"]) .railcard b { color:var(--ink) }
  :root:not([data-theme="light"]) .railcard span { color:var(--ink-3) }
  :root:not([data-theme="light"]) .railcard .rbar { background:var(--surface-3) }
  :root:not([data-theme="light"]) .railcard.note-card { background:var(--surface-3) }
  :root:not([data-theme="light"]) .railcard.note-card span { color:var(--ink-2) }
  :root:not([data-theme="light"]) .railcard.warn b { color:var(--warn) }
  :root:not([data-theme="light"]) .steps li.done .sn { color:#06231a }
  :root:not([data-theme="light"]) .steps li.here .sn { color:#08243c }
}

@media (max-width:900px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mobilenav a.on { color:#06231a }
}

/* =============================================================================
   0.23.0 (part C): the help. Mockup "Help and alerts v6", sections 1, 3 to 6.
   Tokens only, so both themes follow without a dark rule of their own.
   ========================================================================== */
.btn.sm { padding:5px 10px; font-size:12.5px; min-height:0 }

/* the panel under the top bar, opened by the Help button (public/app.js) */
.helppanel { position:absolute; right:var(--s4); top:calc(100% + 4px); z-index:30;
  width:min(440px, calc(100vw - 2 * var(--s4))); max-height:78vh; overflow:auto;
  background:var(--surface); color:var(--ink); border:1px solid var(--line);
  border-radius:var(--r-md); box-shadow:var(--sh-3); padding:var(--s3) var(--s4) var(--s4);
  font-size:13.5px; line-height:1.55 }
.helppanel[hidden] { display:none }
.hphead { display:flex; align-items:center; gap:var(--s2); flex-wrap:wrap;
  padding-bottom:var(--s2); margin-bottom:var(--s2); border-bottom:1px solid var(--line) }
.hphead b { flex:1; font-size:13px }
.hpclose { background:none; border:0; color:var(--ink-2); font-size:15px; cursor:pointer;
  min-width:32px; min-height:32px; border-radius:var(--r-pill) }
.hpclose:hover { background:var(--surface-3); color:var(--ink) }
.hpbody h2 { font-size:16px; margin:var(--s2) 0 }
.hpbody h3 { font-size:13.5px; margin:var(--s3) 0 var(--s1) }
.hpbody ol, .hpbody ul { padding-left:20px; margin:0 0 var(--s2) }

/* the parts of an article, in every view */
.hq { border-top:1px dashed var(--line); padding:6px 0 }
.hq > summary { cursor:pointer; font-weight:600 }
.hq > p { margin:var(--s1) 0 0 var(--s4); color:var(--ink-2) }
.hnote { background:var(--info-soft); color:var(--ink); border-radius:var(--r-sm);
  padding:var(--s2) var(--s3); margin:var(--s3) 0 }
.hnote b { display:block; font-size:12px; color:var(--info) }
.hnote p { margin:var(--s1) 0 0 }
.hstuck { font-size:13px; color:var(--ink-2); margin:var(--s3) 0 }
.hstuck a { color:var(--info) }
.hdraft { font-size:12px; color:var(--warn); background:var(--warn-soft); display:inline-block;
  padding:2px 8px; border-radius:var(--r-pill); margin:var(--s2) 0 0 }
.hpart { font-size:12px; color:var(--ink-3); font-weight:600 }

/* the Help page: views, search, topics */
.helptabs { display:inline-flex; gap:2px; background:var(--surface-3); border-radius:var(--r-pill);
  padding:3px; margin:0 0 var(--s4) }
.helptabs a { padding:6px 14px; border-radius:var(--r-pill); font-size:13px; font-weight:600;
  color:var(--ink-2); text-decoration:none }
.helptabs a[aria-current="page"] { background:var(--surface); color:var(--ink); box-shadow:var(--sh-1) }
.helpsearch { display:flex; gap:var(--s2); flex-wrap:wrap; margin:0 0 var(--s4) }
.helpsearch .fld { flex:1 1 220px; min-width:0 }
.hgrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:var(--s3) }
.hgroup ul, .hstart ol { margin:0; padding-left:20px; line-height:1.9 }
.hgroup a, .hstart a, .hlist a { color:var(--info) }
.hghead { display:flex; align-items:baseline; justify-content:space-between; gap:var(--s2) }
.hghead h2, .hstart h2, .hresults h2 { font-size:15px; margin:0 0 var(--s2) }
.hprint { font-size:12px; color:var(--info) }
.hlist { list-style:none; margin:0; padding:0 }
.hlist li { padding:var(--s2) 0; border-top:1px solid var(--line) }
.hlist li:first-child { border-top:0 }
.hlist small { display:block; color:var(--ink-3); font-size:12.5px }
.hart { margin-bottom:var(--s4) }
.hart h1 { margin-top:var(--s2) }

/* the Full guide */
.guidehead { font-size:13px; color:var(--ink-2); margin:0 0 var(--s3) }
.guidehead a { color:var(--info) }
.gsum { background:var(--surface-2); border:1px solid var(--line); border-radius:var(--r-md);
  padding:var(--s2) var(--s3); margin:0 0 var(--s3); font-size:13.5px }
.gsum p { margin:var(--s1) 0 }
.gsumlinks a, .gnav a { color:var(--info); margin-right:var(--s3) }
.guide { display:grid; grid-template-columns:240px minmax(0, 1fr); gap:var(--s5); align-items:start }
.gtoc { position:sticky; top:64px; font-size:13px; max-height:calc(100vh - 80px); overflow:auto }
.gtoc ol { list-style:none; margin:var(--s1) 0 0; padding:0 }
.gtoc ol ol { padding-left:var(--s3); margin:0 0 var(--s2) }
.gtoc a { color:var(--ink-2); text-decoration:none; display:block; padding:2px 0 }
.gtoc a:hover { color:var(--info) }
.gn { color:var(--ink-3); font-variant-numeric:tabular-nums; margin-right:4px }
.gcnt { display:inline-grid; place-items:center; min-width:18px; height:18px; padding:0 5px;
  border-radius:var(--r-pill); background:var(--warn-soft); color:var(--warn); font-size:11px;
  font-weight:800 }
.gpart > h2 { font-size:18px; margin:var(--s5) 0 var(--s2); padding-bottom:var(--s1);
  border-bottom:1px solid var(--line) }
.gpart:first-child > h2 { margin-top:0 }
.gart { padding:var(--s2) 0 var(--s3); scroll-margin-top:64px }
.gart h3 { font-size:15px; margin:var(--s2) 0 var(--s1) }
.gart h4 { font-size:13.5px; margin:var(--s3) 0 var(--s1) }
.gpage { font-size:12.5px; color:var(--ink-3); margin:0 0 var(--s2) }
.gpage a { color:var(--info) }
mark { background:var(--warn-soft); color:var(--ink); border-radius:3px; padding:0 1px }
mark.on { outline:2px solid var(--warn) }

/* Settings > Help */
.hroles { border:0; padding:0; margin:var(--s2) 0; display:flex; flex-wrap:wrap; gap:var(--s3);
  font-size:13px }
.hroles legend { font-weight:600; margin-bottom:var(--s1) }

@media (max-width:900px) {
  /* On a phone the help slides up over the page (mockup v6, section 5). */
  .helppanel { position:fixed; left:0; right:0; bottom:0; top:auto; width:auto; max-height:80vh;
    border-radius:var(--r-lg) var(--r-lg) 0 0 }
  .guide { grid-template-columns:1fr }
  .gtoc { position:static; max-height:none }
}

@media print {
  .helptabs, .helpsearch, .gtools, .gnav, .helppanel, .hstuck { display:none !important }
  /* The printed guide keeps its contents list, then the parts, with page numbers. */
  .guide { display:block }
  .gtoc { position:static; max-height:none; overflow:visible; margin-bottom:var(--s5) }
  .gpart { break-before:page }
  .gpart:first-child { break-before:auto }
  mark { background:none; outline:0 }
  @page { @bottom-center { content:counter(page); font-size:10px } }
}

/* 0.25.3 (H): a phone or a touch screen gets 16 px text in each field, so the
   iPhone does not zoom in at each tap. "screen" keeps it off the printed page.
   !important: this must win over every field rule above, at any specificity. */
@media screen and (max-width:900px), (pointer:coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=hidden]):not([type=file]),
  select, textarea { font-size:16px !important }
}

/* 0.25.7 (items 10 and 13): a message beside a box that the server refused. */
.fielderr { color:var(--danger); font-size:13px; font-weight:600; margin-top:4px; text-align:left; white-space:normal }
.fld[aria-invalid="true"] { border-color:var(--danger); box-shadow:0 0 0 1px var(--danger) }

/* 0.25.7 (items 1 and 2): the details cards and the referee cards. */
.cardh { font-size:17px; margin:0; color:var(--ink) }
.optional { color:var(--ink-3); font-weight:400; text-transform:none; letter-spacing:0 }
fieldset.radios { border:0; padding:0; margin:12px 0 0 }
fieldset.radios label { display:inline-flex; gap:6px; align-items:center; margin:6px 18px 0 0; min-height:32px }
.refgrid { display:grid; grid-template-columns:repeat(auto-fit, minmax(300px, 1fr)); gap:14px; margin-top:12px }
fieldset.refcard { margin:0; border:1px solid var(--line); min-width:0 }
fieldset.refcard legend { padding:0 6px }

/* 0.25.7 (item 15): the declaration above the Send button. */
fieldset.decl { border:1px solid var(--line); border-radius:12px; padding:12px 16px; margin:14px 0 0 }
fieldset.decl legend { padding:0 6px }
label.declrow { display:flex; gap:10px; align-items:flex-start; margin:8px 0; cursor:pointer }
label.declrow input { margin-top:4px; width:20px; height:20px; flex:none }

/* 0.25.7 (items 4 and 20): an email shown before it goes. */
.mailbody { white-space:pre-wrap; line-height:1.55; border-top:1px solid var(--line); margin-top:10px; padding-top:10px }

/* 0.25.7 (item 18): the override, closed until she opens it. */
details.override { margin-top:10px }
details.override summary { cursor:pointer; font-weight:600; min-height:32px }
details.override form { margin-top:8px }

/* 0.25.7 (item 6): the privacy statement. */
.privacy .pvh { font-size:17px; margin:18px 0 4px }
.privacy .pvh:first-child { margin-top:0 }
.privacy .pvp { margin:4px 0 }
.privacy .pvl { margin:4px 0 0 20px; padding:0 }
.privacy .gap { color:var(--warn) }
.foot a { color:inherit }

/* 0.25.7 (item 17): the activity log. */
.logmain { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:10px 14px; align-items:end }
.logtoggles { display:flex; gap:18px; flex-wrap:wrap; align-items:center; margin-top:12px }
.logtoggles label { display:inline-flex; gap:6px; align-items:center; min-height:32px }
.logtable .colf .fld { padding:6px 8px; font-size:14px; min-width:84px; height:38px }
.logtable .colf input[type=date] { min-width:150px }
.logtable .colf .cause { min-width:60px; width:64px }
.logtable .dates { display:grid; gap:4px }
.logtable .nowrap { white-space:nowrap }
