/* Drummond client portal design system.
   One stylesheet for every page: customer pages, sign-in, pay, help, and (with admin.css on top) the staff pages.
   Colors are variations on the Drummond brand palette (brand/TOKENS.md in DrummondWordPressSite): the navy #173d6d
   anchors a navy scale, the brand green #cef415 is the accent on dark surfaces, and sky, mint, purple and orange are
   supporting tints. Components use the semantic tokens (--text, --surface, --primary...), never raw hex, so a change to
   the palette happens here only. Type is Inter (SIL Open Font License), self-hosted in /fonts/. */
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/IBMPlexMono-500.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/Inter-var.woff2) format('woff2'); }

:root {
  /* Brand scale, built around Drummond navy (700) */
  --brand-950: #06132a; --brand-900: #0b1c33; --brand-800: #112a4d; --brand-700: #173d6d; --brand-600: #1f4f8c;
  --brand-500: #2a64ad; --brand-400: #5a8bd0; --brand-300: #9dbde6; --brand-200: #cddff3; --brand-100: #e3edf9; --brand-50: #f1f6fc;
  /* Brand accents */
  --lime: #cef415; --lime-soft: #f4fcd0; --lime-ink: #3b4a00;
  --sky: #72c4ec; --sky-soft: #e5f4fc; --mint: #5bf3b3; --mint-soft: #e3fcf1; --purple: #979ad6; --purple-soft: #efeffa;
  --orange: #ff6e30; --orange-soft: #fff0e8; --yellow: #f8e65b;
  --sky-ink: #0b5f86; --sky-line: #c6e8f8; --mint-ink: #0b7a4f; --mint-line: #bdf5dc; --purple-ink: #4b4fa6; --purple-line: #dcdcf3;
  --orange-ink: #b8430f; --orange-line: #ffd9c6; --lime-line: #e6f5a3;
  /* Neutrals, tinted toward the navy */
  --gray-0: #ffffff; --gray-25: #fbfcfd; --gray-50: #f6f8fb; --gray-100: #eef1f6; --gray-200: #e2e7ef; --gray-300: #cdd5e0;
  --gray-400: #98a3b4; --gray-500: #667085; --gray-600: #4a5567; --gray-700: #344054; --gray-800: #1f2a3c; --gray-900: #101828;

  /* Semantic tokens */
  --bg: var(--gray-50); --surface: var(--gray-0); --surface-2: var(--gray-25); --surface-sunken: var(--gray-100);
  --text: var(--gray-900); --text-2: var(--gray-700); --muted: var(--gray-500);
  --border: var(--gray-200); --border-strong: var(--gray-300);
  --primary: var(--brand-700); --primary-hover: var(--brand-800); --primary-soft: var(--brand-50); --link: var(--brand-600);
  --ok: #067647; --ok-soft: #ecfdf3; --ok-line: #abefc6;
  --warn: #93370d; --warn-soft: #fffaeb; --warn-line: #fedf89;
  --bad: #b42318; --bad-soft: #fef3f2; --bad-line: #fecdca;
  --info: var(--brand-600); --info-soft: var(--brand-50); --info-line: var(--brand-200);
  --tint: var(--brand-50); --tint-line: var(--brand-100); --tint-ink: var(--brand-700); --accent-ink: var(--brand-600); --hover-line: var(--brand-300);
  --on-primary: #fff; --topbar-bg: rgb(255 255 255 / .82); --offset: var(--brand-700);
  --focus: var(--brand-500); --ring: 0 0 0 4px rgb(42 100 173 / .18);

  /* Shape, depth, spacing */
  --r-xs: 6px; --r-sm: 8px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-full: 999px;
  --shadow-xs: 0 1px 2px rgb(16 24 40 / .05);
  --shadow-sm: 0 1px 3px rgb(16 24 40 / .08), 0 1px 2px rgb(16 24 40 / .04);
  --shadow-md: 0 4px 8px -2px rgb(16 24 40 / .08), 0 2px 4px -2px rgb(16 24 40 / .04);
  --shadow-lg: 0 12px 24px -6px rgb(16 24 40 / .10), 0 4px 8px -4px rgb(16 24 40 / .04);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: var(--font);
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* Process colours, for the print touches (D96): stripes on stat tiles and the registration mark */
  --cyan: #00a3e0; --magenta: #e0007a; --process-yellow: #f5d000; --key: var(--brand-900);
  --sidebar: 264px; --topbar: 60px;
  /* Older names other stylesheets and pages still use */
  --navy: var(--brand-700); --navy-deep: var(--brand-900); --pale: var(--brand-50); --light-blue: var(--brand-200);
  --ink: var(--text); --slate: var(--muted); --line: var(--border); --radius: var(--r-lg); --shadow: var(--shadow-sm);
  --font-body: var(--font); --accent: var(--brand-500); --warn-bg: var(--warn-soft); --warn-ink: var(--warn);
  color-scheme: light;
}

/* Dark mode: the same tokens, redefined. "Follow my system" (no data-theme) uses the operating system's setting; the
   sun and moon switch in the top bar (/assets/theme.js) sets data-theme="light" or "dark" on <html> to override it. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0a1220; --surface: #0f1a2c; --surface-2: #122034; --surface-sunken: #17263d;
  --text: #eaf0f8; --text-2: #bccadd; --muted: #8697b0; --border: #1e2d46; --border-strong: #2b3e5e;
  --primary: var(--lime); --primary-hover: #dcff3a; --on-primary: #06132a; --link: #8fbbee;
  --tint: rgb(114 164 230 / .12); --tint-line: rgb(114 164 230 / .22); --tint-ink: #cfe0f6; --accent-ink: #8fbbee; --hover-line: #3a5584;
  --topbar-bg: rgb(10 18 32 / .78); --offset: var(--lime); --key: #eaf0f8; --focus: #8fbbee; --ring: 0 0 0 4px rgb(143 187 238 / .22);
  --ok: #5ee0a8; --ok-soft: rgb(91 243 179 / .1); --ok-line: rgb(91 243 179 / .25);
  --warn: #f5d86a; --warn-soft: rgb(248 230 91 / .09); --warn-line: rgb(248 230 91 / .25);
  --bad: #ff8f73; --bad-soft: rgb(255 110 48 / .11); --bad-line: rgb(255 110 48 / .3);
  --info: #8fbbee; --info-soft: rgb(114 164 230 / .1); --info-line: rgb(114 164 230 / .25);
  --sky-ink: #8fd3f3; --sky-line: rgb(114 196 236 / .25); --mint-ink: #7cf0c0; --mint-line: rgb(91 243 179 / .22); --purple-ink: #bbbdf0; --purple-line: rgb(151 154 214 / .28); --orange-ink: #ffa07a; --orange-line: rgb(255 110 48 / .28); --lime-ink: #d8f75a; --lime-line: rgb(206 244 21 / .22);
  --sky-soft: rgb(114 196 236 / .12); --mint-soft: rgb(91 243 179 / .1); --purple-soft: rgb(151 154 214 / .14); --orange-soft: rgb(255 110 48 / .12); --lime-soft: rgb(206 244 21 / .1);
  --gray-25: #122034; --gray-50: #122034; --gray-100: #17263d; --gray-200: #1e2d46; --gray-300: #2b3e5e; --gray-400: #5d6f8c; --gray-600: #aebbd0;
  --shadow-xs: 0 1px 2px rgb(0 0 0 / .3); --shadow-sm: 0 1px 3px rgb(0 0 0 / .35); --shadow-md: 0 6px 14px -4px rgb(0 0 0 / .45); --shadow-lg: 0 16px 32px -8px rgb(0 0 0 / .55);
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #0a1220; --surface: #0f1a2c; --surface-2: #122034; --surface-sunken: #17263d;
  --text: #eaf0f8; --text-2: #bccadd; --muted: #8697b0; --border: #1e2d46; --border-strong: #2b3e5e;
  --primary: var(--lime); --primary-hover: #dcff3a; --on-primary: #06132a; --link: #8fbbee;
  --tint: rgb(114 164 230 / .12); --tint-line: rgb(114 164 230 / .22); --tint-ink: #cfe0f6; --accent-ink: #8fbbee; --hover-line: #3a5584;
  --topbar-bg: rgb(10 18 32 / .78); --offset: var(--lime); --key: #eaf0f8; --focus: #8fbbee; --ring: 0 0 0 4px rgb(143 187 238 / .22);
  --ok: #5ee0a8; --ok-soft: rgb(91 243 179 / .1); --ok-line: rgb(91 243 179 / .25);
  --warn: #f5d86a; --warn-soft: rgb(248 230 91 / .09); --warn-line: rgb(248 230 91 / .25);
  --bad: #ff8f73; --bad-soft: rgb(255 110 48 / .11); --bad-line: rgb(255 110 48 / .3);
  --info: #8fbbee; --info-soft: rgb(114 164 230 / .1); --info-line: rgb(114 164 230 / .25);
  --sky-ink: #8fd3f3; --sky-line: rgb(114 196 236 / .25); --mint-ink: #7cf0c0; --mint-line: rgb(91 243 179 / .22); --purple-ink: #bbbdf0; --purple-line: rgb(151 154 214 / .28); --orange-ink: #ffa07a; --orange-line: rgb(255 110 48 / .28); --lime-ink: #d8f75a; --lime-line: rgb(206 244 21 / .22);
  --sky-soft: rgb(114 196 236 / .12); --mint-soft: rgb(91 243 179 / .1); --purple-soft: rgb(151 154 214 / .14); --orange-soft: rgb(255 110 48 / .12); --lime-soft: rgb(206 244 21 / .1);
  --gray-25: #122034; --gray-50: #122034; --gray-100: #17263d; --gray-200: #1e2d46; --gray-300: #2b3e5e; --gray-400: #5d6f8c; --gray-600: #aebbd0;
  --shadow-xs: 0 1px 2px rgb(0 0 0 / .3); --shadow-sm: 0 1px 3px rgb(0 0 0 / .35); --shadow-md: 0 6px 14px -4px rgb(0 0 0 / .45); --shadow-lg: 0 16px 32px -8px rgb(0 0 0 / .55);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 .9375rem/1.6 var(--font); font-feature-settings: 'cv11', 'ss01', 'ss03'; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text); line-height: 1.25; }
h1 { font-size: clamp(1.5rem, 3vw, 1.875rem); font-weight: 700; margin: 0 0 6px; letter-spacing: -.025em; }
h2 { font-size: 1.0625rem; font-weight: 650; margin: 8px 0 8px; letter-spacing: -.012em; }
h3 { font-size: .975rem; font-weight: 650; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 12px; }
strong, b { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
code, pre, kbd { font-family: var(--font-mono); font-size: .85em; }
code { background: var(--surface-sunken); border-radius: var(--r-xs); padding: 1px 6px; }
pre { background: var(--brand-950); color: #dbe7f7; border-radius: var(--r-md); padding: 14px 16px; overflow-x: auto; white-space: pre-wrap; }
img { max-width: 100%; }
::selection { background: var(--brand-200); color: var(--brand-900); }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: var(--r-sm); box-shadow: var(--shadow-lg); }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 600; letter-spacing: .02em; color: var(--accent-ink); margin: 0 0 6px; }
.lead { font-size: 1rem; color: var(--muted); margin: 0; max-width: 46rem; }
.note { color: var(--muted); font-size: .8125rem; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.test-banner { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand-950); color: var(--brand-100); padding: 7px 16px; font-weight: 500; font-size: .8125rem; text-align: center; }
.test-banner::before { content: 'Sandbox'; font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--lime); color: var(--brand-950); padding: 2px 8px; border-radius: var(--r-full); }

/* ---------- App shell: sidebar, top bar, content ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--border); padding: 18px 12px 16px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; }
.brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-decoration: none; padding: 4px 10px 10px; }
.brand img { display: block; width: 132px; height: auto; }
.brand span { font-size: .6875rem; font-weight: 600; color: var(--tint-ink); background: var(--tint); border: 1px solid var(--tint-line); border-radius: var(--r-full); padding: 2px 8px; white-space: nowrap; }
.nav-group { display: grid; gap: 1px; margin-bottom: 8px; }
.nav-label { font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 8px 10px 4px; }
nav a { position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: var(--r-sm); color: var(--text-2); text-decoration: none; font-weight: 500; font-size: .875rem; transition: background .12s, color .12s; }
nav a:hover { background: var(--gray-100); color: var(--text); }
nav a[aria-current="page"] { background: var(--tint); color: var(--tint-ink); font-weight: 600; }
nav a[aria-current="page"]::before { content: ''; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--tint-ink); }
nav a[aria-current="page"] .icon { color: var(--accent-ink); }
.icon { flex: none; color: var(--gray-400); }
nav a .icon { width: 18px; height: 18px; }
nav a:hover .icon { color: var(--gray-600); }
.sidebar-foot { margin: auto 0 0; font-size: .8125rem; color: var(--muted); padding: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); }
.sidebar-foot a { font-weight: 600; }
.main-col { display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; min-height: var(--topbar); padding: 0 28px; background: var(--topbar-bg); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--r-sm); color: var(--text-2); text-decoration: none; font-size: .8125rem; font-weight: 500; }
.topbar-link:hover { background: var(--gray-100); color: var(--text); }
.topbar-link .icon { width: 18px; height: 18px; }
.mobile-nav, .mobile-brand { display: none; }
.user-menu { position: relative; }
.user-menu summary, .mobile-nav summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; border-radius: var(--r-md); padding: 5px 8px 5px 5px; }
.user-menu summary::-webkit-details-marker, .mobile-nav summary::-webkit-details-marker { display: none; }
.user-menu summary:hover, .user-menu[open] summary { background: var(--gray-100); }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-500), var(--brand-800)); color: #fff; font-weight: 600; font-size: .8125rem; box-shadow: inset 0 0 0 2px rgb(255 255 255 / .25); }
.who { display: grid; line-height: 1.25; font-weight: 600; font-size: .8125rem; color: var(--text); }
.who small { font-weight: 400; color: var(--muted); font-size: .75rem; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 6px; display: grid; z-index: 30; }
.menu a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r-sm); text-decoration: none; color: var(--text-2); font-weight: 500; font-size: .875rem; }
.menu a:hover { background: var(--gray-100); color: var(--text); }
main { flex: 1; }
.page { padding: 32px 32px 56px; margin: 0 auto; width: 100%; }
.page.narrow { max-width: 52rem; } .page.wide { max-width: 82rem; }
.page-head { margin-bottom: 24px; }
.page-head h1 { margin-bottom: 6px; }
.site-footer { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; padding: 18px 32px; color: var(--muted); font-size: .8125rem; border-top: 1px solid var(--border); }
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); text-decoration: none; } .site-footer a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-xs); }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card + .card, .card + form, form + .card, .table-wrap + .card, .card + .table-wrap { margin-top: 16px; }
.section-head { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.section-head small { font: 400 .8125rem var(--font); color: var(--muted); margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 14px; }

/* Signed-out landing hero: navy with the brand green */
.hero { position: relative; overflow: hidden; padding: 44px 40px; color: var(--brand-100); border: 0; background:
  radial-gradient(60% 90% at 100% 0%, rgb(206 244 21 / .20), transparent 60%),
  radial-gradient(50% 80% at 0% 100%, rgb(114 196 236 / .25), transparent 60%),
  linear-gradient(135deg, var(--brand-800), var(--brand-950)); box-shadow: var(--shadow-lg); }
.hero::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgb(255 255 255 / .05) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .05) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(to bottom, #000, transparent 85%); -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 4.5vw, 2.75rem); letter-spacing: -.035em; max-width: 30rem; }
.hero .eyebrow { color: var(--lime); }
.hero .lead { color: var(--brand-200); font-size: 1.0625rem; }
.hero .note { color: var(--brand-300); } .hero .note a { color: #fff; }
.hero .btn { background: var(--lime); border-color: var(--lime); color: var(--brand-950); box-shadow: 0 0 0 1px rgb(206 244 21 / .3), 0 8px 24px -8px rgb(206 244 21 / .6); }
.hero .btn:hover { background: #dcff3a; color: var(--brand-950); }
.hero .btn.secondary { background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .2); color: #fff; box-shadow: none; }
.hero .btn.secondary:hover { background: rgb(255 255 255 / .14); }

/* Quick actions and tiles */
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 12px; margin: 0 0 24px; }
.page.narrow .quick { margin-top: 16px; }
.quick-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px; text-decoration: none; color: var(--text); font-size: .875rem; box-shadow: var(--shadow-xs); transition: border-color .15s, box-shadow .15s, transform .15s; }
.quick-card:hover { border-color: var(--hover-line); box-shadow: var(--shadow-md); transform: translateY(-1px); color: var(--text); }
.quick-card .icon { flex: none; box-sizing: content-box; width: 18px; height: 18px; padding: 9px; border-radius: var(--r-md); color: var(--accent-ink); background: var(--tint); box-shadow: inset 0 0 0 1px var(--tint-line); }
.quick-card:nth-child(6n+2) .icon { color: var(--sky-ink); background: var(--sky-soft); box-shadow: inset 0 0 0 1px var(--sky-line); }
.quick-card:nth-child(6n+3) .icon { color: var(--mint-ink); background: var(--mint-soft); box-shadow: inset 0 0 0 1px var(--mint-line); }
.quick-card:nth-child(6n+4) .icon { color: var(--purple-ink); background: var(--purple-soft); box-shadow: inset 0 0 0 1px var(--purple-line); }
.quick-card:nth-child(6n+5) .icon { color: var(--orange-ink); background: var(--orange-soft); box-shadow: inset 0 0 0 1px var(--orange-line); }
.quick-card:nth-child(6n+6) .icon { color: var(--lime-ink); background: var(--lime-soft); box-shadow: inset 0 0 0 1px var(--lime-line); }
.quick-card strong { font-weight: 600; }
.quick-card span { display: grid; gap: 1px; } .quick-card small { color: var(--muted); font-size: .8125rem; }
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.dash .side { display: grid; gap: 16px; }
.dash .side .card + .card { margin-top: 0; }
.section-list { list-style: none; padding: 0; margin: 0 -8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 12px; }
.section-list a { display: grid; gap: 2px; padding: 10px; border-radius: var(--r-md); text-decoration: none; color: var(--text); }
.section-list a strong { font-weight: 600; font-size: .9rem; }
.section-list a:hover { background: var(--gray-50); color: var(--text); }
.section-list a:hover strong { color: var(--accent-ink); }
.section-list small { color: var(--muted); font-size: .8125rem; line-height: 1.5; }
.card.rep { margin: 0; position: relative; overflow: hidden; }
.card.rep::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--tint-ink), var(--sky), var(--lime)); }
.card.rep p { margin: .25rem 0; }
.rep-name { font-weight: 650; font-size: 1.0625rem; margin: 0; letter-spacing: -.01em; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.tile { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; text-decoration: none; color: var(--text); box-shadow: var(--shadow-xs); transition: border-color .15s, box-shadow .15s; }
.tile:hover { border-color: var(--hover-line); box-shadow: var(--shadow-md); color: var(--text); }
.tile h2 { margin-top: 0; }
.tile p { margin: 0; color: var(--muted); }
.tile.planned { background: var(--surface-2); border-style: dashed; box-shadow: none; }
.badge { display: inline-block; margin-top: 10px; font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-full); padding: 2px 10px; }

/* Stats */
.summary-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 12px; }
.summary-cards .card + .card { margin-top: 0; }
.big { font-weight: 700; font-size: 1.875rem; letter-spacing: -.03em; line-height: 1.15; color: var(--text); margin: 0; font-variant-numeric: tabular-nums; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-row .stat { margin: 0; padding: 18px 20px; }
.stat-row .stat .eyebrow { margin: 0 0 6px; color: var(--muted); font-weight: 500; font-size: .8125rem; letter-spacing: 0; }
.glance a.stat { text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s; } .glance a.stat:hover { border-color: var(--hover-line); box-shadow: var(--shadow-md); }
.glance .stat .note { margin: 6px 0 0; } .glance .stat.attention { box-shadow: inset 3px 0 0 var(--orange), var(--shadow-xs); }

/* Order tracker (F-84) */
.filter-bar { margin: 0 0 16px; }
.search { position: relative; display: block; max-width: 420px; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; }
.search input { padding-left: 38px; }
.job-list { display: grid; gap: 14px; }
.job header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.job header p { margin: 2px 0 0; color: var(--muted); }
.job.late { box-shadow: inset 3px 0 0 var(--bad), var(--shadow-xs); } .job.at-risk { box-shadow: inset 3px 0 0 #f79009, var(--shadow-xs); }
.tracker { list-style: none; margin: 20px 0 12px; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); }
.tracker li { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; font-size: .75rem; color: var(--muted); }
.tracker li::before { content: ''; position: absolute; top: 8px; right: 50%; width: 100%; height: 2px; background: var(--gray-200); z-index: 0; }
.tracker li:first-child::before { display: none; }
.tracker .dot { position: relative; z-index: 1; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 2px solid var(--gray-300); }
.tracker li.done::before, .tracker li.current::before { background: var(--accent-ink); }
.tracker li.done .dot { background: var(--accent-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center/11px no-repeat; border-color: var(--accent-ink); }
.tracker li.current .dot { border-color: var(--accent-ink); border-width: 5px; box-shadow: 0 0 0 5px rgb(42 100 173 / .15); }
.tracker li.current { color: var(--text); font-weight: 600; }
.tracker.late li.current .dot { border-color: var(--bad); box-shadow: 0 0 0 5px rgb(180 35 24 / .14); }
.tracker.at-risk li.current .dot { border-color: #f79009; box-shadow: 0 0 0 5px rgb(247 144 9 / .18); }
.job-facts { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 8px 0 14px; font-size: .875rem; }
.job-facts div { display: flex; gap: 6px; } .job-facts dt { color: var(--muted); } .job-facts dd { margin: 0; font-weight: 600; }
.job-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.narrow-head { padding-top: 0; }

/* ---------- Forms ---------- */
.pay-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 16px; margin-top: 24px; }
.pay-form h2 { font-size: .9375rem; margin: 6px 0 0; padding-top: 8px; }
.pay-form .full:first-of-type h2 { padding-top: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.full { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; align-content: start; }
label { font-weight: 500; font-size: .875rem; color: var(--text-2); }
.req { color: var(--bad); }
input, select, textarea { font: inherit; font-size: .9375rem; width: 100%; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--text); min-height: 40px; box-shadow: var(--shadow-xs); transition: border-color .12s, box-shadow .12s; }
textarea { min-height: 96px; line-height: 1.5; resize: vertical; }
select { appearance: none; -webkit-appearance: none; padding-right: 36px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23667085' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E") right 10px center/18px no-repeat; }
select[multiple] { background-image: none; padding-right: 12px; }
input::placeholder, textarea::placeholder { color: var(--gray-400); }
input:hover, select:hover, textarea:hover { border-color: var(--gray-400); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-400); box-shadow: var(--ring); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-sunken); color: var(--muted); cursor: not-allowed; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; min-height: 0; padding: 0; margin: 0; box-shadow: none; accent-color: var(--tint-ink); flex: none; }
input[type=file] { padding: 6px; font-size: .875rem; background: var(--surface-2); border-style: dashed; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; font-size: .8125rem; margin-right: 10px; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: var(--r-xs); background: var(--surface); color: var(--text); cursor: pointer; }
input[type=color] { padding: 4px; width: 56px; }
input.locked { background: var(--tint); border-style: dashed; color: var(--tint-ink); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 4px rgb(180 35 24 / .12); }
.field-error { margin: 0; color: var(--bad); font-size: .8125rem; font-weight: 500; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.methods { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.methods legend { padding: 0; margin-bottom: 8px; }
.methods legend h2 { margin: 0; }
.method { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; cursor: pointer; font-weight: 400; background: var(--surface); transition: border-color .12s, box-shadow .12s, background .12s; }
.method:hover { border-color: var(--gray-400); }
.method input { margin-top: 3px; }
.method strong { color: var(--text); }
.method small { display: block; color: var(--muted); font-size: .8125rem; }
.method:has(input:checked) { border-color: var(--brand-500); background: var(--tint); box-shadow: 0 0 0 1px var(--brand-500); }
.summary { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 18px; }
.summary dl { margin: 0; display: grid; gap: 6px; }
.summary dl > div { display: flex; justify-content: space-between; gap: 16px; color: var(--text-2); }
.summary dd { margin: 0; font-variant-numeric: tabular-nums; }
.summary .total { border-top: 1px dashed var(--border-strong); padding-top: 10px; margin-top: 4px; font-weight: 700; font-size: 1.125rem; color: var(--text); letter-spacing: -.01em; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 400; color: var(--text); }
fieldset.plain { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
fieldset.plain legend { font-weight: 600; margin-bottom: 4px; font-size: .875rem; }
input.amount { width: 8rem; min-height: 34px; padding: 5px 8px; margin-top: 4px; }
form.inline { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 2px 0; }
form.inline select, form.inline input:not([type=checkbox]):not([type=radio]) { width: auto; min-height: 34px; padding-top: 5px; padding-bottom: 5px; font-size: .875rem; }
.status { margin: 0; min-height: 1.6em; }
.status.error { color: var(--bad); font-weight: 600; }
.dev-signin { display: grid; gap: 8px; border-top: 1px dashed var(--border-strong); padding-top: 16px; margin: 16px 0; }

/* ---------- Buttons ---------- */
.btn, .btn-small { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 .875rem/1.2 var(--font); letter-spacing: -.005em; background: var(--primary); color: var(--on-primary); border: 1px solid var(--primary); border-radius: var(--r-md); padding: 10px 18px; min-height: 40px; cursor: pointer; text-decoration: none; white-space: nowrap; box-shadow: var(--shadow-xs), inset 0 1px 0 rgb(255 255 255 / .12); transition: background .12s, border-color .12s, box-shadow .12s, transform .06s; }
.btn:hover, .btn-small:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
.btn:active, .btn-small:active { transform: translateY(1px); }
.btn:focus-visible, .btn-small:focus-visible { outline: none; box-shadow: var(--ring); }
.btn.secondary, .btn-small.secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn.secondary:hover, .btn-small.secondary:hover { background: var(--gray-50); color: var(--text); border-color: var(--gray-400); }
.btn.btn-small, .btn-small { min-height: 32px; padding: 6px 12px; font-size: .8125rem; border-radius: var(--r-sm); }
.btn.danger, .btn-small.danger { background: var(--bad); border-color: var(--bad); }
.btn:disabled, .btn-small:disabled { opacity: .55; cursor: not-allowed; }
.btn-link { font: inherit; font-weight: 500; background: none; border: 0; color: var(--link); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 0; }
.btn-link:hover { color: var(--primary); }

/* ---------- Feedback ---------- */
.banner { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--info-line); border-radius: var(--r-md); padding: 12px 16px; margin: 16px 0 0; background: var(--info-soft); color: var(--tint-ink); font-size: .875rem; }
.banner::before { content: ''; flex: none; width: 18px; height: 18px; margin-top: 1px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E") center/contain no-repeat; }
.banner.warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); font-weight: 500; }
.banner.ok { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok); }
.banner.bad, .banner.error { background: var(--bad-soft); border-color: var(--bad-line); color: var(--bad); }
.page-head + .banner, .page-head + p.banner { margin-top: 0; margin-bottom: 16px; }
.page.company-note { padding-bottom: 0; }
.page.company-note + .page { padding-top: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 500; line-height: 1.5; border-radius: var(--r-full); padding: 1px 9px; background: var(--tint); color: var(--tint-ink); box-shadow: inset 0 0 0 1px var(--tint-line); white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill.ok { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok-line); }
.pill.warn { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); }
.pill.bad { background: var(--bad-soft); color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad-line); }
.pill.info { background: var(--sky-soft); color: var(--sky-ink); box-shadow: inset 0 0 0 1px var(--sky-line); }
.pill.muted { color: var(--gray-600); background: var(--gray-100); box-shadow: inset 0 0 0 1px var(--gray-200); }
.pill.muted::before { display: none; }

/* ---------- Tables and lists ---------- */
.table-wrap { position: relative; overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); }
.table-wrap table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .875rem; }
.table-wrap th, .table-wrap td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table-wrap th { background: var(--surface-2); color: var(--muted); font-size: .75rem; font-weight: 500; white-space: nowrap; padding-top: 10px; padding-bottom: 10px; }
.table-wrap td { color: var(--text-2); font-variant-numeric: tabular-nums; }
.table-wrap td strong, .table-wrap td a { color: var(--text); }
.table-wrap td a { font-weight: 500; text-decoration: none; } .table-wrap td a:hover { color: var(--accent-ink); text-decoration: underline; }
.table-wrap td a.btn-small, .table-wrap td a.btn-small:hover { color: var(--on-primary); text-decoration: none; }
.table-wrap td a.btn-small.secondary, .table-wrap td a.btn-small.secondary:hover { color: var(--text); }
.table-wrap tbody tr { transition: background .1s; }
.table-wrap tbody tr:hover td { background: var(--gray-25); }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td.empty { color: var(--muted); text-align: center; padding: 36px 16px; }
.facts { display: grid; gap: 8px; margin: 0 0 16px; }
.facts > div { display: grid; grid-template-columns: 12rem 1fr; gap: 12px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; color: var(--text); }
.facts.cols { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.facts.cols > div { grid-template-columns: 1fr; gap: 2px; }
.thread { list-style: none; padding: 0; display: grid; gap: 12px; }
.thread li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 16px; }
.thread li.staff { background: var(--tint); border-color: var(--tint-line); }
.thread .meta { margin: 0 0 4px; color: var(--muted); font-size: .8125rem; }
.findings li { margin-bottom: 8px; } .findings.bad li::marker { color: var(--bad); }
.decide { display: grid; gap: 6px; min-width: 16rem; } .decide textarea { min-height: 0; }
details.approve form { display: grid; gap: 6px; margin-top: 6px; min-width: 14rem; }
details.approve > summary { display: inline-block; min-height: 24px; padding: 2px 0; cursor: pointer; }
.doc-list { padding-left: 18px; } .doc-list li { margin-bottom: 8px; }
.pay-bar { margin-top: 16px; }
.help-list { line-height: 1.9; } .card.help h2 { font-size: 1.0625rem; margin-top: 1.5rem; }
.card.help h2:first-child { margin-top: 0; }
.carrier-status { display: inline-block; margin-left: 6px; font-size: .85em; color: var(--muted); }
details > summary { cursor: pointer; }

/* Payment frame and result */
.pay-frame { margin-top: 24px; padding: 20px; }
.pay-frame iframe { width: 100%; min-height: 480px; border: 0; display: block; background: var(--surface); }
.result-details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 16px 0; }
.result-details dt { color: var(--muted); }
.result-details dd { margin: 0; font-variant-numeric: tabular-nums; }

/* Portal assistant (F-91) */
.chat { display: flex; flex-direction: column; gap: 12px; }
.chat-msg { max-width: 85%; padding: 10px 14px; border-radius: var(--r-lg); font-size: .9375rem; }
.chat-msg p { margin: 0 0 6px; } .chat-msg p:last-child { margin: 0; }
.chat-msg.from-user { align-self: flex-end; background: var(--primary); color: var(--on-primary); border-bottom-right-radius: var(--r-xs); }
.chat-msg.from-user a { color: var(--on-primary); }
.chat-msg.from-assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs); border-bottom-left-radius: var(--r-xs); }
.chat-msg .btn-small { margin-top: 4px; }
/* Page previews (F-117): trim solid, bleed dashed, drawn over the page image. */
.previews { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 4px; }
.previews figure { margin: 0; width: 120px; }
.previews svg { width: 100%; height: auto; display: block; border: 1px solid var(--border); border-radius: var(--r-xs); background: #fff; }
.previews figcaption { font-size: 12px; text-align: center; color: var(--muted); }
.previews .trim-box { stroke: #d6336c; stroke-width: 1.5; }
.previews .bleed-box { stroke: #1c7ed6; stroke-width: 1.5; stroke-dasharray: 4 3; }
.quick-check { border-left: 3px solid var(--border-strong); padding-left: 12px; margin: 12px 0; }
.fix-offer .check { display: flex; gap: 8px; align-items: center; margin: 8px 0 12px; }
.comments { list-style: none; padding: 0; display: grid; gap: 8px; }
.comments li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 14px; }
.comments .from-drummond { box-shadow: inset 3px 0 0 var(--brand-500); }

/* Inline SVG charts (src/charts.js, /assets/chart.js). The blue is the chart palette's first slot. */
.chart { margin: 0 0 20px; max-width: 640px; }
.chart figcaption { font-weight: 600; margin: 0 0 6px; font-size: .875rem; }
.chart svg { display: block; height: auto; overflow: visible; }
.chart-grid { stroke: var(--gray-200); stroke-width: 1; }
.chart-axis { fill: var(--muted); font-size: 13px; }
.chart-value { fill: var(--text); font-size: 14px; font-weight: 600; }
.chart-col { fill: var(--brand-500); }
.chart-goal { stroke: var(--text); stroke-width: 2; stroke-dasharray: 4 2; }
.chart-hit { fill: transparent; }
.chart-mark { outline: none; }
.chart-mark.on .chart-col, .chart-mark:focus-visible .chart-col { fill: var(--brand-400); }
.chart-mark:focus-visible .chart-hit { stroke: var(--focus); stroke-width: 2; }
.chart-legend { font-size: 13px; color: var(--muted); margin: 0 0 4px; }
.chart-legend .key-col { display: inline-block; width: 10px; height: 10px; background: var(--brand-500); border-radius: 2px; margin: 0 4px 0 0; vertical-align: -1px; }
.chart-legend .key-goal { display: inline-block; width: 14px; border-top: 2px dashed var(--text); margin: 0 4px 0 10px; vertical-align: 3px; }
.chart-table summary { font-size: 13px; color: var(--muted); cursor: pointer; }
.chart-tip { position: absolute; z-index: 50; pointer-events: none; background: var(--brand-950); color: var(--brand-100); border-radius: var(--r-sm); padding: 7px 10px; font-size: 13px; box-shadow: var(--shadow-lg); }
.chart-tip strong { display: block; font-size: 15px; color: #fff; }
.chart-tip span { color: var(--brand-300); }
.chart-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 8px 24px; }
/* F-144: dated notes on charts. */
.chart-note circle { fill: var(--surface); stroke: var(--text); stroke-width: 1.5; }
.chart-note text { fill: var(--text); font-size: 11px; font-weight: 700; }
.chart-notes { font-size: 13px; color: var(--muted); margin: 2px 0 6px; padding-left: 1.4em; }

/* ---------- Sign-in and other stand-alone pages: brand panel beside a form ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; background: var(--surface); }
.auth-aside { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 40px 48px; color: var(--brand-100); background:
  radial-gradient(55% 60% at 90% 10%, rgb(206 244 21 / .22), transparent 60%),
  radial-gradient(60% 60% at 10% 90%, rgb(114 196 236 / .28), transparent 60%),
  linear-gradient(160deg, var(--brand-800), var(--brand-950)); }
.auth-aside::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgb(255 255 255 / .05) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .05) 1px, transparent 1px); background-size: 36px 36px; mask-image: radial-gradient(80% 70% at 50% 40%, #000, transparent); -webkit-mask-image: radial-gradient(80% 70% at 50% 40%, #000, transparent); pointer-events: none; }
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside img { width: 150px; height: auto; display: block; }
.auth-aside h2 { color: #fff; font-size: clamp(1.75rem, 3vw, 2.5rem); letter-spacing: -.035em; line-height: 1.1; margin: 0 0 14px; max-width: 26rem; font-weight: 700; }
.auth-aside h2 em { font-style: normal; color: var(--lime); }
.auth-aside p { color: var(--brand-200); max-width: 28rem; }
.auth-points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.auth-points li { display: flex; gap: 12px; align-items: center; color: var(--brand-100); font-size: .9375rem; }
.auth-points .icon { box-sizing: content-box; padding: 8px; border-radius: var(--r-md); background: rgb(255 255 255 / .08); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12); color: var(--lime); width: 18px; height: 18px; }
.auth-aside .auth-foot { font-size: .8125rem; color: var(--brand-300); margin: 0; }
.auth-aside .auth-foot a { color: #fff; }
.auth-main { display: flex; flex-direction: column; justify-content: center; padding: 48px 32px; }
.auth-main > * { width: 100%; max-width: 26rem; margin-left: auto; margin-right: auto; }
.auth-main .mobile-brand { display: none; margin-bottom: 28px; }
.auth-main h1 { font-size: 1.75rem; }
.auth-main .card { padding: 0; border: 0; box-shadow: none; background: none; }
.auth-main form { display: grid; gap: 8px; margin: 18px 0 12px; }
.auth-main form .btn { margin-top: 8px; width: 100%; }
.auth-main .banner { margin: 0 0 16px; }
.auth-main .back { font-size: .8125rem; color: var(--muted); text-decoration: none; margin-bottom: 36px; display: inline-flex; gap: 6px; }
.auth-main .back:hover { color: var(--text); }
.test-banner + .auth { min-height: calc(100vh - 34px); }

/* A small centered page: errors, staff sign-in required, read-only notices */
.plain-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(60% 50% at 50% 0%, var(--tint-line), transparent 70%), var(--bg); }
.plain-page .card { max-width: 30rem; width: 100%; padding: 32px; box-shadow: var(--shadow-lg); }
.plain-page .card img { width: 128px; height: auto; display: block; margin-bottom: 24px; }

/* ---------- Print ---------- */
@media print {
  .sidebar, .topbar, .site-footer, .no-print, .test-banner, .auth-aside { display: none; }
  .shell, .auth { display: block; } body { background: #fff; } .card, .table-wrap { box-shadow: none; } .page { padding: 0; }
  .chart-table { display: none; }
}

/* ---------- Smaller screens ---------- */
@media (max-width: 1100px) {
  .dash { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-nav, .mobile-brand { display: block; }
  .mobile-brand img { width: 112px; height: auto; display: block; }
  .topbar .mobile-brand { flex-shrink: 0; padding: 0; }
  .mobile-nav { position: static; }
  .mobile-nav summary { padding: 8px; border: 1px solid var(--border); background: var(--surface); }
  .mobile-nav nav { position: absolute; left: 12px; right: 12px; top: calc(var(--topbar) - 4px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 10px; max-height: 75vh; overflow-y: auto; }
  .mobile-nav nav a[aria-current="page"]::before { display: none; }
  .topbar { padding: 0 14px; }
  .topbar-link span { display: none; }
  .page { padding: 24px 20px 48px; }
  .site-footer { padding: 16px 20px; }
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-main { justify-content: flex-start; padding-top: 40px; }
  .auth-main .mobile-brand { display: block; }
  .auth-main .mobile-brand img { width: 132px; }
}
@media (max-width: 560px) {
  .pay-form, .form-grid { grid-template-columns: 1fr; }
  .facts > div { grid-template-columns: 1fr; gap: 0; }
  .who { display: none; }
  .card { padding: 18px; }
  .hero { padding: 32px 22px; }
  .page { padding: 20px 16px 40px; }
  .quick { grid-template-columns: 1fr 1fr; }
  .tracker { grid-template-columns: 1fr; gap: 6px; }
  .tracker li { grid-template-columns: 18px 1fr; justify-items: start; text-align: left; }
  .tracker li::before { top: -8px; left: 8px; right: auto; width: 2px; height: 14px; }
  .tracker li.todo { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* Empty states: a section waiting on a connection, or with nothing in it yet */
.empty-state { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 40px 24px; background: var(--surface-2); border-style: dashed; box-shadow: none; }
.empty-state p { max-width: 34rem; color: var(--muted); margin: 0; }
.empty-state strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }
.empty-icon { width: 44px; height: 44px; border-radius: var(--r-lg); margin-bottom: 8px; background: var(--tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f4f8c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 17H7a5 5 0 0 1 0-10h2M15 7h2a5 5 0 0 1 0 10h-2M8 12h8'/%3E%3C/svg%3E") center/22px no-repeat; box-shadow: inset 0 0 0 1px var(--tint-line); }
.page.narrow .quick { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* Theme switch: follow the system, light, or dark (sun and moon icons; /assets/theme.js) */
.theme-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-full); background: var(--surface-sunken); border: 1px solid var(--border); }
.theme-switch button { display: grid; place-items: center; width: 28px; height: 26px; padding: 0; border: 0; border-radius: var(--r-full); background: none; color: var(--muted); cursor: pointer; }
.theme-switch button:hover { color: var(--text); }
.theme-switch button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.theme-switch svg { width: 15px; height: 15px; }
.staff .sidebar .theme-switch, .auth-aside .theme-switch { background: rgb(255 255 255 / .06); border-color: rgb(255 255 255 / .1); }
.auth-aside .theme-switch button, .staff .sidebar .theme-switch button { color: var(--brand-300); }
.auth-aside .theme-switch button[aria-pressed="true"], .staff .sidebar .theme-switch button[aria-pressed="true"] { background: rgb(255 255 255 / .14); color: #fff; }
.auth-main .theme-switch { position: absolute; top: 16px; right: 16px; }
.auth-main { position: relative; }
/* The navy logo on light surfaces, the white one on dark */
.logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-light { display: none !important; } :root:not([data-theme="light"]) .logo-dark { display: block !important; } }
:root[data-theme="dark"] .logo-light { display: none !important; } :root[data-theme="dark"] .logo-dark { display: block !important; }
@media print { .theme-switch { display: none; } }

/* ---------- Pressroom touches (D96): a little of the print shop on a calm base ----------
   Mono labels like a job ticket, CMYK stripes on the number tiles, a registration mark on page eyebrows, and a hard
   offset shadow when a card is picked up. */
.eyebrow { font-family: var(--font-mono); font-weight: 500; font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em; }
.eyebrow::before { content: ''; flex: none; width: 11px; height: 11px; border-radius: 50%; border: 1.25px solid currentColor; background: linear-gradient(currentColor, currentColor) center/1.25px 17px no-repeat, linear-gradient(currentColor, currentColor) center/17px 1.25px no-repeat; opacity: .8; }
.stat-row .stat .eyebrow::before, .card .eyebrow::before, .hero .eyebrow::before { display: none; }
.stat-row .stat .eyebrow, .rep .eyebrow { font-size: .6875rem; }
.table-wrap th, .staff .wrap-table th { font-family: var(--font-mono); font-weight: 500; font-size: .6875rem; text-transform: uppercase; letter-spacing: .07em; }
.nav-label { font-family: var(--font-mono); font-weight: 500; letter-spacing: .1em; }
.stat-row .stat, .summary-cards > .card { position: relative; overflow: hidden; }
.stat-row .stat::before, .summary-cards > .card::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: var(--cyan); }
.stat-row .stat:nth-child(4n+2)::before, .summary-cards > .card:nth-child(4n+2)::before { background: var(--magenta); }
.stat-row .stat:nth-child(4n+3)::before, .summary-cards > .card:nth-child(4n+3)::before { background: var(--process-yellow); }
.stat-row .stat:nth-child(4n+4)::before, .summary-cards > .card:nth-child(4n+4)::before { background: var(--key); }
.quick-card:hover, .tile:hover, .glance a.stat:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--offset); border-color: var(--offset); }
.card.rep::before { background: linear-gradient(90deg, var(--cyan) 0 25%, var(--magenta) 25% 50%, var(--process-yellow) 50% 75%, var(--key) 75%); }
.mono, .table-wrap td code { font-family: var(--font-mono); }
.glance .stat.attention { box-shadow: var(--shadow-xs); } .glance .stat.attention .note { color: var(--warn); font-weight: 500; }
.card + .quick, .stat-row + .quick { margin-top: 20px; }
.auth-main > .theme-switch { width: auto; max-width: none; margin: 0; }

/* Staff guide (/admin/guide/) and the getting-started page in customer help */
.guide-toc { margin: 0 0 24px; } .guide-toc ul { columns: 2 16rem; column-gap: 32px; margin: 8px 0 0; padding: 0; list-style: none; line-height: 1.8; }
.guide { max-width: 52rem; } .guide h2 { margin-top: 2rem; scroll-margin-top: 16px; } .guide h3 { margin-top: 1.25rem; }
.guide li + li, .card.help .steps li + li { margin-top: 6px; }
.start-roles { margin: 12px 0 0; }
.card.help h2[id] { scroll-margin-top: 16px; }

/* ---------- What's new and the roadmap (F-170, F-171, src/changelog.js) ---------- */
.releases { display: grid; gap: 16px; }
.releases .card + .card { margin-top: 0; }
.release { position: relative; padding-left: 28px; }
.release::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; border-radius: var(--r-lg) 0 0 var(--r-lg); background: var(--tint-line); }
.releases .release:first-child::before { background: linear-gradient(var(--cyan) 0 25%, var(--magenta) 25% 50%, var(--process-yellow) 50% 75%, var(--key) 75%); }
.release-head { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 12px; margin-bottom: 12px; }
.release-head h2, .staff main .release-head h2 { margin: 0; font-size: 1.125rem; }
.release-head .note { grid-column: 2; }
.version { font-family: var(--font-mono); font-size: .8125rem; font-weight: 600; color: var(--tint-ink); background: var(--tint); box-shadow: inset 0 0 0 1px var(--tint-line); border-radius: var(--r-sm); padding: 2px 8px; text-decoration: none; }
.version:hover { box-shadow: inset 0 0 0 1px var(--hover-line); }
.change-list { margin: 0; padding-left: 1.1rem; display: grid; gap: 8px; color: var(--text-2); }
.change-list li::marker { color: var(--muted); }
.change-list .mono { font-size: .75rem; color: var(--muted); }
.change-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.change-meta small { color: var(--muted); font-size: .75rem; }
.road-group + .road-group { margin-top: 8px; }
.road-grid, .staff main .road-grid { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.road-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow-xs); }
.road-card h3 { margin: 0 0 6px; font-size: .9375rem; color: var(--text); }
.road-card p { margin: 0; color: var(--text-2); font-size: .875rem; }
.road-card .note { margin-top: 10px; font-size: .75rem; }
@media (max-width: 560px) { .release { padding-left: 20px; } .release-head { grid-template-columns: 1fr; } .release-head .note { grid-column: 1; } }
/* Where to go next, on the not-found page. */
.next-steps { padding-left: 1.2em; line-height: 1.9; }
/* Phones: the logo keeps its size; Help and Support stay in the menu and the footer. */
@media (max-width: 480px) {
  .topbar .topbar-link { display: none; }
  .topbar .mobile-brand img { width: 96px; }
}
/* Phones: a wide table scrolls sideways inside its box, with a soft shadow on the side that has more; the first column
   (an invoice, job or order number, or a date) stays on one line. */
@media (max-width: 960px) {
  .table-wrap {
    background:
      linear-gradient(to right, var(--surface) 30%, transparent) left / 40px 100% no-repeat local,
      linear-gradient(to left, var(--surface) 30%, transparent) right / 40px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .14), transparent) left / 14px 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .14), transparent) right / 14px 100% no-repeat scroll,
      var(--surface);
  }
  .table-wrap td:first-child { white-space: nowrap; }
}
