/* The console's one stylesheet: ZipRail's design system (designsystem.md, on rn/redesign), navy
   and signal yellow like a departure board. Served from /assets because the Content-Security-Policy
   allows no inline style.

   Colours are the design system's names in kebab case (chip.late.text -> --chip-late-text): light
   in :root, dark under prefers-color-scheme, and both again under [data-theme], which the theme
   switch sets (assets/ui.js). The dark values are the ones designsystem.md still marks
   "proposed".

   Signal yellow is for one thing a screen: its main action or its headline figure. Status uses the
   chip colours, never yellow. Every pair of text and ground here is at least 4.5:1, and anything
   pressed is at least 44 px. */

@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/SpaceGrotesk-Variable.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #F3F4F6;
  --card: #FFFFFF;
  --navy: #0E1320;
  --navy-raised: #1C2438;
  --board: #161D2E;
  --signal: #FFD23F;
  --on-navy: #FFFFFF;
  --on-navy-muted: #C9CED8;
  --on-navy-label: #9AA3B2;
  --line: #E3E6EB;
  --soft-line: #EEF0F3;
  --dashed: #C9CED6;
  --outline: #D6DAE0;
  --muted: #5B6472;
  --chevron: #B0B7C3;
  --tab-off: #7A8392;
  --tile-quiet: #E7EAEE;
  --link: #2A44B0;
  --live: #3DD68C;
  --on-signal-muted: #4A3A00;
  --tip-background: #E6ECFF;
  --tip-text: #1F3590;
  --chip-late-background: #FFE3DC;
  --chip-late-text: #A3261A;
  --chip-quiet-background: #EDEFF2;
  --chip-quiet-text: #3D4552;
  --chip-draft-background: #FFF1CC;
  --chip-draft-text: #6B4700;
  --chip-paid-background: #DDF5EA;
  --chip-paid-text: #0B6B47;
  --chip-submitted-background: #E6ECFF;
  --chip-submitted-text: #2A44B0;
  --chip-refused-background: #FFE3DC;
  --chip-refused-text: #A3261A;
  --tick: #0B6B47;
  --danger: #A3261A;
  --switch-on: #0B6B47;

  /* Not rows of the design system's table: how it says to use the names above. */
  --text: #0E1320;          /* "navy: text in light" */
  --navy-button: #0E1320;   /* the accent button */
  --hero: #0E1320;
  --hero-tile: #1C2438;
  --shadow: 0 1px 2px rgba(14, 19, 32, 0.06), 0 8px 24px rgba(14, 19, 32, 0.06);
  --shadow-lift: 0 2px 4px rgba(14, 19, 32, 0.08), 0 16px 40px rgba(14, 19, 32, 0.12);
  --focus: #2A44B0;
  --hover: rgba(14, 19, 32, 0.04);
  --pressed: rgba(14, 19, 32, 0.08);

  /* Chart series: a harmonised categorical set around the link blue, red-free (red means an error
     or a refusal, and is only ever a status colour). Each is at least 3:1 on a card. Never a TfL
     line colour (#125). */
  --series-1: #2A44B0;
  --series-2: #0E7C86;
  --series-3: #7A3FB0;
  --series-4: #A15C00;
  --series-5: #5B6472;
  --series-6: #7A8392;

  --face-display: "Space Grotesk", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --face-text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --face-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-chip: 999px;
  --radius-tile: 12px;
  --radius-field: 14px;
  --radius-tip: 14px;
  --radius-button: 16px;
  --radius-card: 20px;
  --radius-panel: 24px;
  --radius-hero: 28px;

  --gutter: 16px;
  --rail: 264px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0B0F19;
    --card: #161D2E;
    --navy: #1C2438;
    --navy-raised: #262F47;
    --board: #0E1320;
    --line: #2A3244;
    --soft-line: #222A3A;
    --dashed: #3A4356;
    --outline: #3A4356;
    --muted: #A3ABB9;
    --chevron: #5B6472;
    --tab-off: #8A93A3;
    --tile-quiet: #222A3A;
    --link: #9DB0FF;
    --tip-background: #1F2A4D;
    --tip-text: #C9D4FF;
    --chip-late-background: #4A1D17;
    --chip-late-text: #FFB4A8;
    --chip-quiet-background: #262D3B;
    --chip-quiet-text: #D3D8E0;
    --chip-draft-background: #3D3110;
    --chip-draft-text: #FFD98A;
    --chip-paid-background: #12392A;
    --chip-paid-text: #8BE3BC;
    --chip-submitted-background: #1F2A4D;
    --chip-submitted-text: #B8C6FF;
    --chip-refused-background: #4A1D17;
    --chip-refused-text: #FFB4A8;
    --tick: #3DD68C;
    --danger: #FF8A7A;
    --switch-on: #2FA673;
    --text: #F3F4F6;
    --navy-button: #F3F4F6;
    --hero: #1C2438;
    --hero-tile: #262F47;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.5), 0 16px 40px rgba(0, 0, 0, 0.4);
    --focus: #9DB0FF;
    --hover: rgba(243, 244, 246, 0.05);
    --pressed: rgba(243, 244, 246, 0.1);
    --series-1: #9DB0FF;
    --series-2: #5FD3D9;
    --series-3: #D9B8FF;
    --series-4: #FFC26B;
    --series-5: #A3ABB9;
    --series-6: #6B7488;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #0B0F19;
  --card: #161D2E;
  --navy: #1C2438;
  --navy-raised: #262F47;
  --board: #0E1320;
  --line: #2A3244;
  --soft-line: #222A3A;
  --dashed: #3A4356;
  --outline: #3A4356;
  --muted: #A3ABB9;
  --chevron: #5B6472;
  --tab-off: #8A93A3;
  --tile-quiet: #222A3A;
  --link: #9DB0FF;
  --tip-background: #1F2A4D;
  --tip-text: #C9D4FF;
  --chip-late-background: #4A1D17;
  --chip-late-text: #FFB4A8;
  --chip-quiet-background: #262D3B;
  --chip-quiet-text: #D3D8E0;
  --chip-draft-background: #3D3110;
  --chip-draft-text: #FFD98A;
  --chip-paid-background: #12392A;
  --chip-paid-text: #8BE3BC;
  --chip-submitted-background: #1F2A4D;
  --chip-submitted-text: #B8C6FF;
  --chip-refused-background: #4A1D17;
  --chip-refused-text: #FFB4A8;
  --tick: #3DD68C;
  --danger: #FF8A7A;
  --switch-on: #2FA673;
  --text: #F3F4F6;
  --navy-button: #F3F4F6;
  --hero: #1C2438;
  --hero-tile: #262F47;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.5), 0 16px 40px rgba(0, 0, 0, 0.4);
  --focus: #9DB0FF;
  --hover: rgba(243, 244, 246, 0.05);
  --pressed: rgba(243, 244, 246, 0.1);
  --series-1: #9DB0FF;
  --series-2: #5FD3D9;
  --series-3: #D9B8FF;
  --series-4: #FFC26B;
  --series-5: #A3ABB9;
  --series-6: #6B7488;
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font: 400 15px/1.55 var(--face-text);
  color: var(--text);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
h1, h2, h3 { font-family: var(--face-display); color: var(--text); letter-spacing: -0.01em; }
h1 { font-size: 30px; line-height: 34px; font-weight: 700; margin: 0 0 8px; }
h2 { font-size: 20px; line-height: 25px; font-weight: 700; margin: 32px 0 12px; }
h3 { font-size: 16px; line-height: 22px; font-weight: 600; margin: 20px 0 8px; }
p { margin: 0 0 12px; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
code, kbd, pre { font-family: var(--face-mono); font-size: 0.86em; }
code { background: var(--tile-quiet); color: var(--text); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
ul, ol { padding-left: 20px; margin: 0 0 12px; }
li { margin: 4px 0; }
strong { font-weight: 650; }
svg { flex: none; }
.icon { width: 20px; height: 20px; }
.icon-sm { width: 16px; height: 16px; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.num, .fig { font-variant-numeric: tabular-nums; }
.wrap { overflow-wrap: anywhere; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: #FFD23F; color: #0E1320; padding: 12px 16px; border-radius: 12px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

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

/* ------------------------------------------------------------------ the shell */

.brand { display: inline-flex; align-items: center; gap: 12px; color: #FFFFFF; text-decoration: none; min-height: 44px; border-radius: 12px; }
.brand:hover { text-decoration: none; }
.mark { width: 38px; height: 38px; border-radius: 11px; }
.wordmark { display: flex; flex-direction: column; line-height: 1; }
.wordmark b { font: 700 22px/1 var(--face-display); letter-spacing: -0.02em; }
.wordmark small { font: 600 11px/1.2 var(--face-text); color: #9AA3B2; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 4px; }

.badge { display: inline-flex; align-items: center; gap: 6px; font: 700 12px/1 var(--face-text); padding: 6px 10px; border-radius: var(--radius-chip); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
/* On the board the light chip colours read as a lit lamp, in either theme. */
.badge-staging { background: #FFF1CC; color: #6B4700; }
.badge-production { background: #FFE3DC; color: #A3261A; }
.badge-local { background: #262F47; color: #C9CED8; }

.rail {
  position: fixed; inset: 0 auto 0 0; width: var(--rail); z-index: 20;
  display: flex; flex-direction: column; gap: 8px;
  padding: 20px 16px 16px;
  background: #0E1320; color: #C9CED8;
  border-right: 1px solid #1C2438;
  overflow-y: auto;
}
.rail-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 0 4px 8px; }
.rail-nav { display: flex; flex-direction: column; gap: 2px; }
.rail-label { font: 600 11px/1 var(--face-text); letter-spacing: 0.08em; text-transform: uppercase; color: #9AA3B2; padding: 16px 12px 8px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px;
  border-radius: 12px; color: #C9CED8; text-decoration: none; font-weight: 550;
  transition: background-color 120ms ease, color 120ms ease;
}
.nav-item:hover { background: #1C2438; color: #FFFFFF; text-decoration: none; }
.nav-item:active { background: #262F47; }
.nav-item[aria-current="page"] { background: #1C2438; color: #FFFFFF; }
.nav-item[aria-current="page"]::before { content: ""; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: #FFFFFF; }
.nav-item[aria-current="page"] .icon { color: #FFFFFF; }
.nav-item .icon { color: #9AA3B2; }
.rail :focus-visible, .topbar :focus-visible, .bare :focus-visible { outline-color: #9DB0FF; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding-top: 16px; border-top: 1px solid #1C2438; }

.account { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #262F47; color: #FFFFFF; flex: none; }
.account-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.account-who { font: 600 13px/1.3 var(--face-mono); color: #FFFFFF; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-until { font-size: 12px; color: #9AA3B2; }
.account form { margin: 0; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 12px;
  border: 0; background: transparent; color: inherit; cursor: pointer;
}
.rail .icon-btn, .topbar .icon-btn { color: #C9CED8; background: transparent; }
.rail .icon-btn:hover, .topbar .icon-btn:hover { background: #1C2438; color: #FFFFFF; }
.rail .icon-btn:active, .topbar .icon-btn:active { background: #262F47; transform: none; }

.theme-switch { display: inline-flex; padding: 3px; gap: 2px; border-radius: 14px; background: #161D2E; border: 1px solid #262F47; align-self: flex-start; }
.theme-switch button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; min-width: 44px; justify-content: center; padding: 0 10px;
  border: 0; border-radius: 11px; background: transparent; color: #C9CED8; font: 600 12px/1 var(--face-text); cursor: pointer;
}
.theme-switch button:hover { color: #FFFFFF; background: #1C2438; border: 0; }
.theme-switch button:active { transform: none; }
.theme-switch button[aria-pressed="true"] { background: #262F47; color: #FFFFFF; }
.theme-switch .icon { width: 16px; height: 16px; }

.page { margin-left: var(--rail); min-height: 100vh; display: flex; flex-direction: column; }
.main { width: 100%; max-width: 1240px; padding: 32px 40px 24px; flex: 1; }
.foot { max-width: 1240px; width: 100%; padding: 8px 40px 32px; }
.audit-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px 10px 16px;
  border: 1px dashed var(--dashed); border-radius: var(--radius-tile); color: var(--muted); font-size: 13px;
}
.audit-head > .icon { color: var(--muted); }
.audit-head code { font-size: 12px; }
.audit-head .grow { flex: 1 1 280px; min-width: 0; }
.audit-head .copy { margin-left: auto; }

.topbar, .tabbar { display: none; }

/* An icon rail on a tablet or a narrow window. */
@media (max-width: 1099px) and (min-width: 760px) {
  :root { --rail: 84px; }
  .rail { padding: 16px 12px; align-items: center; }
  .rail .wordmark, .rail-label, .nav-item span, .account-text, .theme-switch span { display: none; }
  .rail-top { flex-direction: column; padding: 0 0 8px; }
  .rail .badge { padding: 6px 8px; font-size: 11px; }
  .nav-item { justify-content: center; width: 52px; padding: 12px; }
  .nav-item[aria-current="page"]::before { left: -12px; }
  .rail-foot { align-items: center; }
  .account { flex-direction: column; }
  .theme-switch { flex-direction: column; align-self: center; }
  .main { padding: 28px 28px 20px; }
  .foot { padding: 8px 28px 28px; }
}

/* The phone: a top bar, stacked cards and bottom tabs with More. */
@media (max-width: 759px) {
  .rail { display: none; }
  .page { margin-left: 0; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .main { padding: 20px var(--gutter) 16px; }
  .foot { padding: 4px var(--gutter) 24px; }
  .topbar {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
    padding: calc(8px + env(safe-area-inset-top)) 8px 8px var(--gutter); min-height: 60px;
    background: #0E1320; color: #FFFFFF;
  }
  .topbar .mark { width: 32px; height: 32px; border-radius: 9px; }
  .topbar .wordmark b { font-size: 20px; }
  .topbar .wordmark small { display: none; }
  .topbar .grow { flex: 1; }
  .tabbar {
    position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    background: var(--card); border-top: 1px solid var(--line);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }
  h1 { font-size: 26px; line-height: 30px; }
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px;
  border-radius: 12px; color: var(--muted); text-decoration: none; font: 600 11px/1.1 var(--face-text);
  list-style: none; cursor: pointer; text-align: center; padding: 0 2px;
}
.tab::-webkit-details-marker { display: none; }
.tab:hover { text-decoration: none; background: var(--hover); }
.tab:active { background: var(--pressed); }
.tab .icon { width: 24px; height: 24px; }
.tab[aria-current="page"], .more[open] > .tab, .more.current > .tab { color: var(--text); }
.tab[aria-current="page"] .icon, .more.current > .tab .icon { color: var(--link); }
.tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Menus that open without a script: the phone's More sheet and its account menu. */
.more, .menu { position: relative; }
.more > summary, .menu > summary { list-style: none; }
.more > summary::-webkit-details-marker, .menu > summary::-webkit-details-marker { display: none; }
.sheet {
  position: fixed; left: 8px; right: 8px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 40;
  background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-panel);
  box-shadow: var(--shadow-lift); padding: 8px; max-height: 72vh; overflow-y: auto;
}
.sheet-title { font: 600 12px/1 var(--face-text); color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; padding: 12px 12px 8px; }
.sheet a, .sheet button.row-btn {
  display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 8px 12px; border-radius: 14px;
  color: var(--text); text-decoration: none; font: 550 16px/1.2 var(--face-text); width: 100%; border: 0; background: none; cursor: pointer; text-align: left; justify-content: flex-start;
}
.sheet a:hover, .sheet button.row-btn:hover { background: var(--hover); text-decoration: none; }
.sheet a[aria-current="page"] { background: var(--tile-quiet); }
.sheet a .icon, .sheet button.row-btn .icon { color: var(--muted); }
.sheet form { margin: 0; }
.sheet .theme-switch { margin: 8px 12px 6px; background: var(--ground); border-color: var(--line); }
.sheet .theme-switch button { color: var(--muted); }
.sheet .theme-switch button:hover { background: var(--hover); color: var(--text); }
.sheet .theme-switch button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(14, 19, 32, 0.12); }
.sheet hr { border: 0; border-top: 1px solid var(--soft-line); margin: 6px 4px; }
.menu .sheet { position: absolute; left: auto; right: 0; top: calc(100% + 8px); bottom: auto; width: min(320px, calc(100vw - 24px)); }
.sheet-who { display: flex; gap: 12px; align-items: center; padding: 12px; border-bottom: 1px solid var(--soft-line); margin-bottom: 4px; }
.sheet-who .avatar { background: var(--tile-quiet); color: var(--text); }
.sheet-who code { background: none; padding: 0; font-weight: 600; }
.sheet-who .muted { font-size: 13px; }

/* Signed out: one calm card on the board. */
.bare { display: grid; place-items: center; padding: 24px var(--gutter); background: #0E1320; }
.bare-wrap { width: 100%; max-width: 460px; }
.bare-brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.bare .card { padding: 28px; border-radius: var(--radius-panel); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35); border: 0; }
.bare-foot { color: #9AA3B2; font-size: 13px; text-align: center; margin-top: 18px; }
.bare-foot a { color: #C9CED8; }
.bare h1 { font-size: 28px; line-height: 32px; }

/* ------------------------------------------------------------------ page parts */

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head > div:first-child { min-width: 0; flex: 1 1 360px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 12px/1 var(--face-text); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.lede { color: var(--muted); max-width: 72ch; margin: 0; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* A local screen's page: its first heading and paragraph read as the page's head. */
.local > h1:first-child { margin-bottom: 8px; }
.local > h1:first-child + p.muted { max-width: 80ch; margin-bottom: 24px; }
.local > h2 { padding-top: 24px; border-top: 1px solid var(--line); }
.local > h1 + p + h2, .local > h1 + p + p + h2 { border-top: 0; padding-top: 0; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 20px; box-shadow: var(--shadow); min-width: 0;
}
.card + .card, .card + .grid, .grid + .card, .grid + .grid, .hero + .card, .hero + .grid, .notice + .card, .notice + .grid { margin-top: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; font-size: 18px; line-height: 24px; display: flex; align-items: center; gap: 10px; }
.card-head h2 .icon, .card-head h3 .icon { color: var(--muted); }
.card-sub { color: var(--muted); font-size: 13px; margin: -8px 0 14px; }
.card > :last-child { margin-bottom: 0; }
.card-foot { margin: 14px 0 0; color: var(--muted); font-size: 13px; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
.grid > * { grid-column: span 12; }
.grid > .card + .card { margin-top: 0; }
@media (min-width: 1000px) {
  .grid > .span-4 { grid-column: span 4; }
  .grid > .span-5 { grid-column: span 5; }
  .grid > .span-6 { grid-column: span 6; }
  .grid > .span-7 { grid-column: span 7; }
  .grid > .span-8 { grid-column: span 8; }
}
@media (min-width: 760px) and (max-width: 999px) {
  .grid > .span-4, .grid > .span-6 { grid-column: span 6; }
}
.stack-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.stack-col > .card + .card { margin-top: 0; }

/* The navy hero, with its tiles. */
.hero {
  position: relative; overflow: hidden; background: var(--hero); color: #FFFFFF; border-radius: var(--radius-hero);
  padding: 28px; margin-bottom: 20px;
}
.hero::after {
  /* A faint lamp ring, from the departure board. */
  content: ""; position: absolute; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%;
  border: 40px solid rgba(255, 255, 255, 0.035); pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero h1, .hero h2 { color: #FFFFFF; }
.hero h1 { font-size: 32px; line-height: 36px; margin-bottom: 6px; }
.hero-sub { color: #C9CED8; margin: 0 0 22px; max-width: 70ch; }
.hero .eyebrow { color: #9AA3B2; }
.hero-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hero a { color: #FFFFFF; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0; }
.kpi { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 14px; border-radius: var(--radius-card); background: var(--hero-tile); min-width: 0; }
.kpi dt { font: 600 13px/1.3 var(--face-text); color: #9AA3B2; order: 1; }
.kpi dd { margin: 0; font: 700 40px/44px var(--face-display); font-variant-numeric: tabular-nums; color: #FFFFFF; letter-spacing: -0.02em; order: 2; }
.kpi .kpi-note { order: 3; margin: 0; font-size: 12px; color: #C9CED8; }
.kpi .spark { order: 4; height: 28px; width: 100%; color: #9DB0FF; margin-top: 4px; }
.kpi.headline dd { color: #FFD23F; }
.kpi.headline .spark { color: #FFD23F; }

/* Light tiles, for figures that sit on a card rather than the hero. */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--radius-tile); background: var(--ground); border: 1px solid var(--soft-line); min-width: 0; }
.stat dt { font-size: 13px; color: var(--muted); order: 1; display: flex; align-items: center; gap: 8px; }
.stat dd { margin: 0; font: 700 28px/32px var(--face-display); font-variant-numeric: tabular-nums; order: 2; }

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: currentColor; flex: none; }
.s1 { color: var(--series-1); } .s2 { color: var(--series-2); } .s3 { color: var(--series-3); }
.s4 { color: var(--series-4); } .s5 { color: var(--series-5); } .s6 { color: var(--series-6); }

/* ------------------------------------------------------------------ chips, notices, tips */

.chip {
  display: inline-flex; align-items: center; gap: 5px; font: 600 12px/1 var(--face-text); padding: 5px 10px;
  border-radius: var(--radius-chip); white-space: nowrap; vertical-align: 1px;
  background: var(--chip-quiet-background); color: var(--chip-quiet-text);
}
.chip-late { background: var(--chip-late-background); color: var(--chip-late-text); }
.chip-draft { background: var(--chip-draft-background); color: var(--chip-draft-text); }
.chip-paid { background: var(--chip-paid-background); color: var(--chip-paid-text); }
.chip-submitted { background: var(--chip-submitted-background); color: var(--chip-submitted-text); }
.chip-refused { background: var(--chip-refused-background); color: var(--chip-refused-text); }
.chip-mono { font-family: var(--face-mono); font-weight: 500; }
.chip .icon-sm { width: 13px; height: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hero .chip-quiet-on-navy { background: #262F47; color: #C9CED8; }

/* The notice: caution = draft, go = paid, stop = late, info = tip. `.note` and `.flash` are the
   older names the local screens use, kept. */
.notice, p.note, div.note, .flash {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-tile);
  background: var(--chip-draft-background); color: var(--chip-draft-text); margin: 0 0 16px;
}
p.note, div.note { display: block; }
.notice > .icon, .flash > .icon { margin-top: 1px; }
.notice > div { min-width: 0; }
.notice > div > :last-child, div.note > :last-child { margin-bottom: 0; }
.notice a, .note a, .flash a { color: inherit; font-weight: 650; }
.notice code, .note code, .flash code { background: rgba(127, 127, 127, 0.16); color: inherit; }
.notice-go, .flash { background: var(--chip-paid-background); color: var(--chip-paid-text); }
.notice-stop { background: var(--chip-late-background); color: var(--chip-late-text); }
.notice-info { background: var(--tip-background); color: var(--tip-text); }
/* The one notice that is the screen's headline: signal yellow. */
.notice-signal { background: #FFD23F; color: #0E1320; align-items: center; }
.notice-signal .notice-sub { color: #4A3A00; }
.notice-signal a { color: #0E1320; }
.notice-signal .button { background: #0E1320; color: #FFFFFF; border-color: #0E1320; margin-left: auto; }
.notice-title { font-weight: 700; }
span.note, td.note { background: var(--chip-draft-background); color: var(--chip-draft-text); }
span.note { padding: 2px 8px; border-radius: var(--radius-chip); font-size: 13px; font-weight: 600; }
strong.note { background: var(--chip-draft-background); color: var(--chip-draft-text); padding: 2px 8px; border-radius: var(--radius-chip); font-size: 13px; }

.tip { margin: 0 0 16px; }
.tip > summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; color: var(--link);
  font-weight: 600; list-style: none; border-radius: 10px; padding: 0 4px;
}
.tip > summary::-webkit-details-marker { display: none; }
.tip > summary::before {
  content: "i"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid currentColor; font: italic 700 13px/1 Georgia, serif;
}
.tip[open] > summary::before { background: var(--link); color: var(--card); border-color: var(--link); }
.tip-body { background: var(--tip-background); color: var(--tip-text); border-radius: var(--radius-tip); padding: 14px 16px; max-width: 86ch; font-size: 14px; }
.tip-body > :last-child { margin-bottom: 0; }
.tip-body code { background: rgba(127, 127, 127, 0.16); color: inherit; }
.hero .tip > summary { color: #C9CED8; }
.hero .tip[open] > summary::before { background: #C9CED8; color: #0E1320; border-color: #C9CED8; }

/* ------------------------------------------------------------------ buttons and fields */

button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  font: 700 15px/1.1 var(--face-text); border-radius: var(--radius-button); border: 1px solid var(--outline);
  background: var(--card); color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 60ms ease;
}
button:hover, .button:hover { background: var(--ground); border-color: var(--chevron); text-decoration: none; }
button:active, .button:active { transform: translateY(1px); background: var(--tile-quiet); }
button:disabled { opacity: 0.55; cursor: not-allowed; }
/* The one main action of a screen. */
button.primary, .button.primary { background: #FFD23F; border-color: #FFD23F; color: #0E1320; }
button.primary:hover, .button.primary:hover { background: #FFDA5E; border-color: #FFDA5E; box-shadow: 0 6px 18px rgba(255, 210, 63, 0.35); }
button.primary:active, .button.primary:active { background: #F2C52E; }
/* A second action that still matters. */
button.accent, .button.accent { background: var(--navy-button); border-color: var(--navy-button); color: var(--card); }
button.accent:hover, .button.accent:hover { background: var(--navy-button); border-color: var(--navy-button); opacity: 0.88; }
/* Anything that reaches every phone, or stops something. */
button.stop, .button.stop { background: var(--card); border-color: var(--danger); color: var(--danger); }
button.stop:hover, .button.stop:hover { background: var(--chip-late-background); border-color: var(--danger); }
button.stop-solid { background: #A3261A; border-color: #A3261A; color: #FFFFFF; }
button.stop-solid:hover { background: #8C1F15; border-color: #8C1F15; }
button.ghost, .button.ghost { background: transparent; }
button.plain, .button.plain { background: transparent; border-color: transparent; color: var(--link); padding: 0 10px; }
button.plain:hover, .button.plain:hover { background: var(--hover); border-color: transparent; }
button.small, .button.small { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 12px; }
button.wide, .button.wide { width: 100%; min-height: 56px; font-size: 17px; }
.copy { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.copy.done { color: var(--tick); border-color: var(--tick); }

input, select, textarea {
  font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--outline); border-radius: var(--radius-field);
  min-height: 44px; padding: 10px 14px; width: 100%; max-width: 100%;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
select { padding: 10px 12px; }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: var(--chevron); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 3px var(--tip-background); }
input::placeholder, textarea::placeholder { color: var(--muted); }
input[type="hidden"] { display: none; }
label { display: block; margin: 0 0 14px; font-weight: 600; font-size: 14px; }
label > input, label > select, label > textarea { margin-top: 6px; font-weight: 400; font-size: 15px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-tile); padding: 14px 16px 2px; margin: 0 0 14px; min-width: 0; }
legend { font-weight: 650; padding: 0 6px; }
form { margin: 0 0 12px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0 12px; }
.actions form { margin: 0; }
.actions label { margin: 0; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form label { flex: 1 1 220px; margin: 0; }
.inline-form .narrow { flex: 0 1 160px; }
.field-hint { font-size: 13px; color: var(--muted); font-weight: 400; margin: 4px 0 0; }
.find { position: relative; }
.find .icon { position: absolute; left: 14px; bottom: 12px; color: var(--muted); pointer-events: none; }
.find input { padding-left: 44px; font-family: var(--face-mono); }

/* The segmented control: a choice of a few, each a link. */
.segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 14px; background: var(--tile-quiet); }
.segmented a, .segmented span {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; min-width: 44px; padding: 0 14px;
  border-radius: 11px; font: 600 14px/1 var(--face-text); color: var(--muted); text-decoration: none;
}
.segmented a:hover { color: var(--text); background: var(--hover); }
.segmented [aria-current="page"] { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(14, 19, 32, 0.14); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin: 0 0 16px; }
.toolbar-label { color: var(--muted); font-size: 13px; font-weight: 600; margin-right: 8px; }

/* A flag's three states. */
.states { display: inline-flex; padding: 3px; gap: 2px; border-radius: 14px; background: var(--tile-quiet); flex-wrap: wrap; }
.states form { margin: 0; display: inline-flex; }
.states button, .states .on {
  min-height: 40px; padding: 0 14px; border-radius: 11px; border: 0; background: transparent; color: var(--muted); font: 600 14px/1 var(--face-text);
  display: inline-flex; align-items: center; gap: 6px;
}
.states button:hover { background: var(--card); color: var(--text); border: 0; }
.states button.to-everyone { color: var(--danger); }
.states button.to-everyone:hover { background: var(--chip-late-background); color: var(--danger); }
.states .on { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(14, 19, 32, 0.14); }
.states .on.state-everyone { background: var(--chip-paid-background); color: var(--chip-paid-text); }
.states .on.state-chosen { background: var(--chip-submitted-background); color: var(--chip-submitted-text); }

/* ------------------------------------------------------------------ tables */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 16px; max-width: 100%; }
.card .table-scroll { margin: 0 -20px; padding: 0 8px; width: calc(100% + 40px); max-width: none; }
.card .table-scroll:last-child { margin-bottom: -8px; }
.local > .table-scroll { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-tile); box-shadow: var(--shadow); padding: 0 4px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--soft-line); vertical-align: top; }
thead th { font: 600 12px/1.2 var(--face-text); color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; border-bottom: 1px solid var(--line); white-space: nowrap; padding-top: 12px; padding-bottom: 10px; }
tbody th, table > tr > th { font-weight: 600; color: var(--muted); font-size: 14px; }
tbody tr:last-child > td, tbody tr:last-child > th { border-bottom: 0; }
tbody tr { transition: background-color 100ms ease; }
tbody tr:hover { background: var(--hover); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .muted { font-size: 13px; }
.id { font-family: var(--face-mono); font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
a.id { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
a.id code { background: var(--tip-background); color: var(--link); }
a.id:hover code { text-decoration: underline; }
td.bar-cell { width: 30%; min-width: 110px; vertical-align: middle; }
.databar { display: block; width: 100%; height: 8px; color: var(--series-1); }
.databar .track { fill: var(--soft-line); }
.databar .fill { fill: currentColor; }
.when { white-space: nowrap; font-variant-numeric: tabular-nums; }
.when small { display: block; color: var(--muted); font-size: 12px; }

/* Rows that turn into cards on a phone: each cell says what it is. */
@media (max-width: 759px) {
  .stack thead { display: none; }
  .stack, .stack tbody, .stack tr, .stack td { display: block; width: 100%; }
  .stack tr { padding: 12px 20px; border-bottom: 1px solid var(--soft-line); }
  .stack tbody tr:last-child { border-bottom: 0; }
  .stack td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; text-align: right; }
  .stack td::before { content: attr(data-label); color: var(--muted); font-size: 13px; text-align: left; flex: none; }
  .stack td.lead { justify-content: flex-start; text-align: left; padding-bottom: 6px; }
  .stack td.lead::before { content: none; }
  .stack td.bar-cell { display: none; }
  .stack td:empty { display: none; }
  .card .table-scroll.stacked { margin: 0 -16px; padding: 0; width: calc(100% + 32px); }
  .card { padding: 16px; }
  .card .table-scroll { margin: 0 -16px; width: calc(100% + 32px); }
  .hero { padding: 22px 18px; border-radius: 24px; }
  .hero h1 { font-size: 28px; line-height: 32px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi dd { font-size: 32px; line-height: 36px; }
  .page-head { margin-bottom: 18px; }
  .kv { grid-template-columns: minmax(100px, max-content) 1fr; }
}

/* ------------------------------------------------------------------ charts */

.chart { display: block; width: 100%; height: 150px; overflow: visible; }
.chart .grid-line { stroke: var(--soft-line); stroke-width: 1; }
.chart .base-line { stroke: var(--line); stroke-width: 1; }
.chart .col:hover rect { opacity: 0.78; }
.chart-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.chart-wrap { position: relative; padding-top: 18px; }
.chart-max { position: absolute; top: 0; left: 0; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.legend b { color: var(--text); font-variant-numeric: tabular-nums; }
.spark { display: block; overflow: visible; }
.spark .area { fill: currentColor; opacity: 0.16; }
.spark .stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }

.funnel { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.funnel-row { display: grid; grid-template-columns: 96px 1fr 4ch; gap: 12px; align-items: center; }
.funnel-row dt { font-weight: 600; font-size: 14px; }
.funnel-row dd { margin: 0; font: 700 22px/1 var(--face-display); font-variant-numeric: tabular-nums; text-align: right; }
.funnel-bar { display: block; width: 100%; height: 14px; color: var(--series-1); }
.funnel-row + .funnel-row .funnel-bar { color: var(--series-2); }
.funnel-bar .track { fill: var(--soft-line); }
.funnel-bar .fill { fill: currentColor; }

/* ------------------------------------------------------------------ lists: screens, timelines, claims */

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tile {
  display: flex; gap: 14px; align-items: flex-start; padding: 18px; min-height: 96px; border-radius: var(--radius-card);
  background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none; box-shadow: var(--shadow);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--outline); text-decoration: none; }
.tile:active { transform: translateY(0); }
.tile-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-tile); background: var(--tile-quiet); color: var(--text); flex: none; }
.tile-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile-title { font: 700 17px/1.2 var(--face-display); }
.tile-desc { font-size: 13px; color: var(--muted); line-height: 1.4; }
.tile-ref { font-size: 12px; color: var(--muted); }
.section-title { font: 600 12px/1 var(--face-text); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 28px 0 12px; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline > li { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; margin: 0; padding: 8px 0 12px; }
.timeline > li::before { content: ""; position: absolute; left: 17px; top: 46px; bottom: -6px; width: 2px; background: var(--soft-line); }
.timeline > li:last-child::before { content: none; }
.t-icon { position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--tile-quiet); color: var(--muted); }
.t-icon .icon { width: 17px; height: 17px; }
.t-body { min-width: 0; padding-top: 6px; }
.t-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-weight: 600; }
.t-title code { font-weight: 600; }
.t-meta { color: var(--muted); font-size: 13px; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.t-change { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; }
.t-change .arrow { color: var(--muted); }
.t-error .t-icon, .t-failed .t-icon { color: var(--chip-late-text); background: var(--chip-late-background); }
.t-claim .t-icon { color: var(--chip-paid-text); background: var(--chip-paid-background); }
.t-debug .t-icon, .t-admin .t-icon { color: var(--chip-submitted-text); background: var(--chip-submitted-background); }
.t-setting .t-icon, .t-flag .t-icon { color: var(--chip-draft-text); background: var(--chip-draft-background); }
.day-head { font: 600 12px/1 var(--face-text); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 20px 0 6px; padding-left: 50px; }
.day-head:first-child { margin-top: 0; }

.kv { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; margin: 0; }
.kv dt, .kv dd { padding: 10px 0; border-bottom: 1px solid var(--soft-line); margin: 0; }
.kv dt { color: var(--muted); font-size: 14px; padding-right: 16px; }
.kv dd { font-weight: 550; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: 0; }
.consent { list-style: none; padding: 0; margin: 0; }
.consent li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--soft-line); margin: 0; }
.consent li:last-child { border-bottom: 0; }
.consent .what { display: flex; flex-direction: column; min-width: 0; }
.consent .what small { color: var(--muted); font-size: 13px; }

.id-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.id-hero h1 { font-family: var(--face-mono); font-weight: 700; letter-spacing: 0.02em; margin: 0; }
.id-full { font-family: var(--face-mono); font-size: 13px; color: #C9CED8; overflow-wrap: anywhere; margin: 8px 0 0; }
.hero .chips { margin-top: 14px; }
.hero .button { border-color: #3A4356; background: transparent; color: #FFFFFF; }
.hero .button:hover { background: #262F47; border-color: #3A4356; }
.hero .copy { border-color: #3A4356; background: transparent; color: #C9CED8; }
.hero .copy:hover { background: #262F47; }
.hero .copy.done { color: #3DD68C; border-color: #3DD68C; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 16px; color: #C9CED8; font-size: 14px; }
.meta-row span b { color: #9AA3B2; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; display: block; margin-bottom: 2px; }

.flag-list { list-style: none; margin: 0; padding: 0; }
.flag-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 0; border-bottom: 1px solid var(--soft-line); margin: 0; }
.flag-row:first-child { padding-top: 0; }
.flag-row:last-child { border-bottom: 0; padding-bottom: 0; }
.flag-name { display: flex; flex-direction: column; gap: 4px; flex: 1 1 200px; min-width: 0; }
.flag-name code { font-size: 14px; font-weight: 600; align-self: flex-start; }
.flag-name small { color: var(--muted); font-size: 13px; }
.member-list { list-style: none; padding: 0; margin: 0 0 12px; }
.member-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--soft-line); margin: 0; }
.member-list li:last-child { border-bottom: 0; }
.member-list form { margin: 0; }

/* The read-only app preview: the phone's own list. */
.phone {
  max-width: 400px; margin: 0 auto; background: var(--ground); border: 1px solid var(--line); border-radius: 40px;
  padding: 14px; box-shadow: var(--shadow-lift);
}
.phone-hero { background: #0E1320; color: #FFFFFF; border-radius: var(--radius-hero); padding: 22px 20px; margin-bottom: 12px; }
.phone-hero dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.phone-hero dt { font-size: 12px; color: #9AA3B2; font-weight: 600; }
.phone-hero dd { margin: 4px 0 0; font: 700 26px/1.1 var(--face-display); font-variant-numeric: tabular-nums; }
.phone-hero .big { grid-column: span 2; }
.phone-hero .big dd { font-size: 52px; line-height: 56px; color: #FFD23F; }
.phone-hero .count { font-size: 13px; color: #C9CED8; margin: 14px 0 0; }
.claims { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.claims li { background: var(--card); border-radius: 18px; padding: 14px 16px; margin: 0; border: 1px solid var(--soft-line); }
.claim-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.claim-route { font: 700 17px/1.2 var(--face-display); }
.claim-when { color: var(--muted); font-size: 13px; margin-top: 2px; }
.claim-meta { color: var(--muted); font-size: 13px; margin-top: 8px; }
.claim-money { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 14px; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ empty, error and confirm pages */

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 28px 16px; color: var(--muted); }
.empty-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--tile-quiet); color: var(--muted); margin-bottom: 6px; }
.empty-icon .icon { width: 26px; height: 26px; }
.empty-title { font: 700 17px/1.3 var(--face-display); color: var(--text); }
.empty p { margin: 0; max-width: 46ch; font-size: 14px; }

.oops { max-width: 560px; margin: 8vh auto 0; text-align: center; }
.oops-code { font: 700 104px/1 var(--face-display); letter-spacing: -0.05em; color: var(--text); font-variant-numeric: tabular-nums; }
.oops-code span { color: var(--chevron); }
.oops h1 { margin: 14px 0 10px; }
.oops p { color: var(--muted); }
.oops .actions { justify-content: center; margin-top: 22px; }
.bare .oops { margin: 0 auto; background: var(--card); border-radius: var(--radius-panel); padding: 36px 28px; }

.confirm { max-width: 660px; margin: 2vh auto 0; }
.confirm .card { padding: 28px; }
.confirm h1 { font-size: 26px; line-height: 32px; }
.confirm-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--chip-late-background); color: var(--chip-late-text); margin-bottom: 16px; }
.confirm-icon.calm { background: var(--tip-background); color: var(--tip-text); }
.change { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 18px 0; padding: 16px; border-radius: var(--radius-tile); background: var(--ground); }
.change-side { display: flex; flex-direction: column; gap: 6px; }
.change-side small { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.change > .icon { color: var(--muted); }
.timer { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin: 0; }
.confirm .actions { margin-top: 20px; }

/* ------------------------------------------------------------------ sign-in and enrolment */

.auth-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--tile-quiet); color: var(--text); margin-bottom: 18px; }
.auth-icon .icon { width: 28px; height: 28px; }
.auth-steps { list-style: none; counter-reset: step; padding: 0; margin: 16px 0 20px; }
.auth-steps li { counter-increment: step; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; margin: 0 0 14px; align-items: start; }
.auth-steps li::before { content: counter(step); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--tile-quiet); font: 700 13px/1 var(--face-display); }
.code-block { display: flex; align-items: center; gap: 8px; background: #0E1320; color: #F3F4F6; border-radius: var(--radius-tile); padding: 6px 6px 6px 14px; margin: 8px 0 0; min-width: 0; }
.code-block pre { margin: 0; flex: 1; min-width: 0; overflow-x: auto; font-size: 13px; line-height: 1.5; padding: 8px 0; }
.code-block code { background: none; color: inherit; padding: 0; }
.code-block .copy { background: #1C2438; color: #FFFFFF; border-color: #3A4356; }
.code-block .copy:hover { background: #262F47; }
.code-block .copy.done { color: #3DD68C; border-color: #3DD68C; }
.status-line { min-height: 22px; font-size: 14px; color: var(--muted); margin: 14px 0 0; }
.status-line:empty { display: none; }
.code-input { font: 600 18px/1.2 var(--face-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.small-print { font-size: 13px; color: var(--muted); margin: 16px 0 0; }

/* ------------------------------------------------------------------ fixes after looking */

.funnel-row dt { grid-column: 1; grid-row: 1; }
.funnel-row .funnel-bar { grid-column: 2; grid-row: 1; }
.funnel-row dd { grid-column: 3; grid-row: 1; }
.stats { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.usage-table tr.group th { background: var(--ground); color: var(--text); font: 600 13px/1.2 var(--face-text); padding: 8px 12px; }
.usage-table tr.group th .muted { font-weight: 400; margin-left: 6px; }
.reveal { margin-top: 12px; }
.reveal > summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--link); font-weight: 600; }
.reveal[open] > summary { margin-bottom: 8px; }
.local .actions > a, .confirm .actions > a:not(.button) {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: var(--radius-button);
  border: 1px solid var(--outline); color: var(--text); font-weight: 700; text-decoration: none;
}
.local .actions > a:hover, .confirm .actions > a:not(.button):hover { background: var(--ground); }
.confirm.wide { max-width: 860px; }
.local h3 { margin-top: 24px; }
@media (max-width: 759px) {
  .tiles { grid-template-columns: 1fr; gap: 8px; }
  .tile { min-height: 0; padding: 14px; box-shadow: none; }
  .tile-ref { display: none; }
  .tile-icon { width: 40px; height: 40px; }
  .audit-head .copy { margin-left: 0; }
}
td code, a.id code { white-space: nowrap; overflow-wrap: normal; }
td time { white-space: nowrap; }
td .chips { flex-wrap: nowrap; }
.stack td { vertical-align: middle; }
@media (max-width: 759px) {
  .roster td[data-label="First seen"], .roster td[data-label="Model"] { display: none; }
  .roster tr { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .roster td.lead { grid-column: 1 / -1; }
  .roster td { font-size: 13px; }
}
@media (max-width: 759px) {
  .stack td { gap: 8px; justify-content: flex-end; }
  .stack td::before { margin-right: auto; }
}
/* Usage grids: a shown total, tinted by its share of the largest on the page. */
table.heat { font-size: 13px; }
table.heat th[scope="row"] { position: sticky; left: 0; background: var(--card); color: var(--text); font-weight: 600; white-space: nowrap; z-index: 1; }
table.heat thead th { white-space: nowrap; text-transform: none; letter-spacing: 0; font-size: 12px; }
table.heat td { min-width: 52px; padding: 9px 10px; font-weight: 600; border-left: 2px solid var(--card); border-bottom: 2px solid var(--card); border-radius: 6px; }
table.heat tbody tr:hover { background: none; }
.heat-0 { background: transparent; }
.heat-1 { background: var(--tip-background); color: var(--tip-text); }
.heat-2 { background: #C8D3FF; color: #1F3590; }
.heat-3 { background: #8EA3F5; color: #0E1320; }
.heat-4 { background: #2A44B0; color: #FFFFFF; }
:root[data-theme="dark"] .heat-2 { background: #2B3C7A; color: #DDE4FF; }
:root[data-theme="dark"] .heat-3 { background: #3C55B8; color: #FFFFFF; }
:root[data-theme="dark"] .heat-4 { background: #9DB0FF; color: #0E1320; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .heat-2 { background: #2B3C7A; color: #DDE4FF; }
  :root:not([data-theme="light"]) .heat-3 { background: #3C55B8; color: #FFFFFF; }
  :root:not([data-theme="light"]) .heat-4 { background: #9DB0FF; color: #0E1320; }
}
hr { border: 0; border-top: 1px solid var(--soft-line); margin: 16px 0; }
.inline-form label { max-width: 440px; }
.eyebrow a { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; color: var(--link); text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.eyebrow a code { background: none; padding: 0; color: inherit; text-transform: none; }
.local form label, .confirm form label { max-width: 600px; }
.confirm .card .table-scroll { margin: 12px 0 16px; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-tile); }
.confirm .card .table-scroll:last-child { margin-bottom: 16px; }

/* Anything pressed is at least 44 px (designsystem.md, Space and shape). */
.copy, button.small, .button.small, .segmented a, .segmented span, .theme-switch button, .states button, .states .on, a.id, .eyebrow a { min-height: 44px; }
.copy, button.small, .button.small { min-width: 44px; }
.oops-code span { color: var(--muted); }

/* A claim's status in a chart takes its chip's colour. */
.st-submitted { color: var(--chip-submitted-text); }
.st-confirmed { color: var(--series-3); }
.st-paid { color: var(--chip-paid-text); }
.st-refused { color: var(--chip-refused-text); }

/* Usage grids: a day's heading on two lines; on a narrow screen the right edge fades to say the
   table scrolls, while the first column stays put. */
table.heat thead th .wd { display: block; font-weight: 500; color: var(--muted); }
table.heat thead th { line-height: 1.25; vertical-align: bottom; }
table.heat td { min-width: 44px; padding: 9px 8px; }
table.heat th[scope="row"] { box-shadow: 6px 0 8px -6px rgba(14, 19, 32, 0.25); }
.fade-edge { position: relative; }
.fade-edge::after { content: none; }
@media (max-width: 1279px) { .fade-edge::after { content: ""; position: absolute; top: 0; bottom: 0; right: -20px; width: 36px; pointer-events: none; background: linear-gradient(to right, transparent, var(--card)); } }
@media (max-width: 759px) { .fade-edge::after { right: -16px; } }

/* Dashboard: operators grouped under each date, with the date's subtotal. */
table.grouped { table-layout: fixed; }
table.grouped col.c-first { width: 38%; }
table.grouped tr.subtotal th, table.grouped tr.subtotal td { background: var(--ground); color: var(--text); font-weight: 700; border-bottom: 1px solid var(--line); text-transform: none; letter-spacing: 0; font-size: 14px; }
table.grouped tbody + tbody tr.subtotal th, table.grouped tbody + tbody tr.subtotal td { border-top: 8px solid var(--card); }
table.grouped td.lead { padding-left: 24px; }
.reveal > .table-scroll { margin-top: 4px; }
.nowrap { white-space: nowrap; }
.kpi .meter .track { fill: rgba(255, 255, 255, 0.12); }
.kpi .meter .fill { fill: currentColor; }
@media (max-width: 759px) {
  table.grouped col.c-first { width: auto; }
  .stack tr.subtotal { display: flex; flex-wrap: wrap; gap: 4px 12px; background: var(--ground); }
  .stack tr.subtotal th { width: 100%; padding: 0; background: none; }
  .stack tr.subtotal td { width: auto; padding: 0; background: none; border: 0; font-weight: 600; font-size: 13px; }
  .stack tr.subtotal td::before { margin-right: 4px; }
  table.grouped td.lead { padding-left: 0; }
}

.reveal > summary::before { content: ""; width: 8px; height: 8px; margin: 0 10px 2px 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform 120ms ease; }
.reveal[open] > summary::before { transform: rotate(45deg); }
.reveal > summary { list-style: none; }
.reveal > summary::-webkit-details-marker { display: none; }

/* Figures on a card: a step lighter than the card in dark, a step darker in light. */
:root[data-theme="dark"] .stat { background: #1C2438; border-color: #262F47; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stat { background: #1C2438; border-color: #262F47; } }
.eyebrow a { text-transform: none; letter-spacing: 0; font-size: 14px; }

/* A reviewer can only look (GWT-AC16): the server refuses every change, and the page hides the
   forms that would ask for one. The sign-out forms sit outside main and stay. */
/* The look-ups a reviewer may use (an action marked `lookup`, whose form has class="lookup") stay. */
.read-only .main form[method="post"]:not(.lookup) { display: none; }
