/* rimfire.com - shared by every Rimfire page. Tokens and components follow the
   house system of C:\tomcatwebappsdev (datagov.css): same names, same dark-mode
   switch (prefers-color-scheme, overridden by data-theme / localStorage rwf_theme). */

:root {
  color-scheme: light;
  --page: #f8f7f5;
  --surface: #ffffff;
  --surface-2: #f1efeb;
  --ink: #111111;
  --ink-2: #4a4845;
  --muted: #6c6964;
  --grid: #e4e1db;
  --axis: #c9c5bd;
  --ring: rgba(17, 17, 17, 0.10);
  /* Oct 6 2026, DESIGN.md section 4 (Drew round 1): one primary orange per mode that passes AA
     with its own text. Light: white on #c2410c 5.2:1 (#d9480f was 4.3:1). Dark: #111 on #ff6a2b. */
  --accent: #c2410c;
  --on-accent: #ffffff;
  --accent-ink: #b23a0a;
  --accent-wash: #fff1e8;
  --accent-2: #f59f00;
  /* input/select borders need 3:1 against page and surface (WCAG 1.4.11); --axis is 1.6:1 */
  --field-border: #8a857c;
  --serious: #ec835a;
  /* chart palette (DESIGN.md section 4; fixed order, max 4 per chart) */
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100;
  --series-5: #e87ba4; --series-6: #008300; --series-7: #4a3aa7; --series-8: #e34948;
  --good: #0ca30c;   /* status values converge on the house set (DESIGN.md section 4, step 5) */
  --good-ink: #12722b;
  --warning: #fab219;
  --critical: #d03b3b;
  --critical-ink: #b02a2a;
  --banner-warn: #fff4d6; --banner-warn-ring: #f0d58a;
  --banner-err: #fde8e8;  --banner-err-ring: #f2b8b8;
  --banner-ok: #e7f6ea;   --banner-ok-ring: #a9dcb4;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(0,0,0,.05);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.06), 0 18px 48px rgba(0,0,0,.10);
  --radius: 12px;   /* cards, tiles, panels (was 14px; DESIGN.md section 7) */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --display: "Big Shoulders Display", "Arial Narrow", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  /* the hero and footer are dark in both themes */
  --night: #0d0e10;
  --night-2: #17191d;
  --night-ink: #f4f2ee;
  --night-muted: #a19d95;
  --night-accent-ink: #ffb38a;
  /* type scale (DESIGN.md section 3): 12 / 13.5 / 15 / 17 / 20 / 24 px + display sizes */
  --fs-xs: .75rem; --fs-sm: .84375rem; --fs-md: .9375rem; --fs-lg: 1.0625rem; --fs-xl: 1.25rem; --fs-2xl: 1.5rem;
  /* spacing (4px base) */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;
  /* full-width layout (DESIGN.md section 6). Header and footer use --home-max on every page so the
     logo never moves; .wrap stays 1200px; wide pages opt in with .wrap.wide / .wrap.app. */
  --home-max: 1520px;
  --home-pad: clamp(16px, 4vw, 56px);
  --app-max: 1920px;
  --gap: clamp(16px, 1.5vw, 24px);
  --measure: 70ch;
  --radius-sm: 6px; --radius-md: 8px; --radius-xl: 16px;
  --dur-1: 120ms; --dur-2: 200ms; --dur-3: 320ms;
  --ease-out: cubic-bezier(.2, .7, .2, 1); --ease-in: cubic-bezier(.4, 0, 1, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0f1012; --surface: #18191c; --surface-2: #212327;
    --ink: #f4f2ee; --ink-2: #c8c4bc; --muted: #9b978f;
    --grid: #2b2d31; --axis: #3a3c41; --ring: rgba(255,255,255,0.10);
    --accent: #ff6a2b; --on-accent: #111111; --accent-ink: #ff9a66; --accent-wash: #2b1a10;
    --field-border: #6e7178;
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
    --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
    --good-ink: #4cc76a; --critical-ink: #ee7070;
    --banner-warn: #2e2610; --banner-warn-ring: #5c4a14;
    --banner-err: #331616;  --banner-err-ring: #6b2a2a;
    --banner-ok: #10291a;   --banner-ok-ring: #22573a;
    --shadow: none; --shadow-lg: 0 18px 48px rgba(0,0,0,.45);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0f1012; --surface: #18191c; --surface-2: #212327;
  --ink: #f4f2ee; --ink-2: #c8c4bc; --muted: #9b978f;
  --grid: #2b2d31; --axis: #3a3c41; --ring: rgba(255,255,255,0.10);
  --accent: #ff6a2b; --on-accent: #111111; --accent-ink: #ff9a66; --accent-wash: #2b1a10;
    --field-border: #6e7178;
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
    --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
  --good-ink: #4cc76a; --critical-ink: #ee7070;
  --banner-warn: #2e2610; --banner-warn-ring: #5c4a14;
  --banner-err: #331616;  --banner-err-ring: #6b2a2a;
  --banner-ok: #10291a;   --banner-ok-ring: #22573a;
  --shadow: none; --shadow-lg: 0 18px 48px rgba(0,0,0,.45);
}

/* Load-bearing: a component's own display must never beat [hidden]. */
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; /* anchors clear the sticky header */
  scrollbar-gutter: stable; /* short and long pages centre the same, so the logo does not shift */ }
body { margin: 0; background: var(--page); color: var(--ink); font: var(--fs-md)/1.55 var(--font); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
a { color: var(--accent-ink); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; }
p { margin: .5em 0; }
code { font: .9em var(--mono); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.num { font-variant-numeric: tabular-nums; }
.display { font-family: var(--display); font-weight: 800; letter-spacing: .01em; }
.eyebrow { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- wordmark ---- */
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: inherit; }
.logo svg { width: 32px; height: 32px; flex: none; }
.logo .word { font-family: var(--display); font-weight: 900; font-size: 1.6rem; letter-spacing: .04em; text-transform: uppercase; font-style: italic; transform: skewX(-6deg); line-height: 1; }
.logo .word b { color: var(--accent); font-weight: 900; }

/* ---- top bar ---- */
/* 97%: at 88% the light header went muddy grey over the dark hero (Drew round 1) */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 97%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--ring); }
.topbar .in { max-width: var(--home-max); margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 10px var(--home-pad); min-height: 60px; }
.sitenav .menu-only { display: none; }
.sitenav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
.sitenav a { text-decoration: none; color: var(--ink-2); font-size: var(--fs-md); font-weight: 500; padding: 7px 11px; border-radius: var(--radius-md); }
.sitenav a:hover { background: var(--surface-2); color: var(--ink); }
.sitenav a[aria-current="page"] { background: var(--accent-wash); color: var(--accent-ink); font-weight: 650; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; }
.usermenu { position: relative; }
.usermenu > button { padding: 4px 10px 4px 4px; border-radius: var(--radius-md); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: var(--fs-xs); flex: none; }
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--surface); border: 1px solid var(--ring); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 40; }
/* justify-content: the button inherits centring from the base button rule; menu items read left-aligned */
.dropdown a, .dropdown button { display: flex; justify-content: flex-start; width: 100%; text-align: left; padding: 9px 10px; border-radius: var(--radius-md); color: var(--ink); text-decoration: none; background: none; border: 0; min-height: 0; font-size: var(--fs-md); font-weight: 400; }
.dropdown a:hover, .dropdown button:hover { background: var(--surface-2); }
.dropdown .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--grid); margin-bottom: 4px; font-size: var(--fs-sm); }
@media (max-width: 820px) {
  .menu-btn { display: inline-flex; }
  .sitenav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--ring); padding: 8px 12px 12px; flex-direction: column; }
  .sitenav.open { display: flex; }
  .sitenav a { min-height: 44px; display: flex; align-items: center; } /* tap targets */
  .sitenav .menu-only { display: flex; }
  .topbar .in { justify-content: space-between; }
  .top-actions .hide-sm { display: none; }
}
/* Overflow-robustness: the logo may shrink (wordmark truncates) so the actions never force
   horizontal page scroll; the actions keep their intrinsic size. */
.topbar .in { min-width: 0; }
.topbar .logo { min-width: 0; }
.topbar .logo .word { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .top-actions { flex: none; }

/* <=440px phones: smaller wordmark and tighter actions (the signed-out header overflowed ~45px at 320,
   ~34px at 375; the tightening used to start only <=360 so 361-440 phones still overflowed). */
@media (max-width: 440px) {
  .topbar .in { gap: 8px; }
  .topbar .logo { gap: 6px; }
  .topbar .logo svg { width: 26px; height: 26px; }
  .topbar .logo .word { font-size: 1.3rem; }
  .top-actions { gap: 2px; }
  .top-actions .iconbtn { min-width: 40px; padding: 8px 6px; }
  .top-actions .btn { padding: 8px 10px; font-size: var(--fs-sm); }
}

/* ---- layout ---- */
/* width:100% - main is a flex child of body and shrink-wrapped (/apps/ was 805px at 1920).
   .wrap stays a 1200px reading width; wide pages opt in. */
/* The 1168px content width is the old 1200px box minus its 16px padding, so content keeps its width
   while its left edge lines up with the logo (both use --home-pad). */
.wrap { width: 100%; max-width: calc(1168px + 2 * var(--home-pad)); margin: 0 auto; padding: 24px var(--home-pad) 56px; }
.wrap.wide { max-width: var(--home-max); }
.wrap.app { max-width: var(--app-max); }
.wrap.narrow { max-width: 760px; padding-left: 16px; padding-right: 16px; } /* single-task pages keep their box (pages set inline max-widths) */
.section { padding: 64px 0; }
.section + .section { border-top: 1px solid var(--grid); }
.section-head { max-width: 720px; margin-bottom: 28px; }
.section-head h2 { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem); line-height: 1.05; letter-spacing: .01em; margin: 0 0 8px; } /* display-l */
.section-head p { color: var(--ink-2); font-size: var(--fs-lg); }
.card { background: var(--surface); border: 1px solid var(--ring); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.grid { display: grid; gap: 18px; }
/* min(..., 100%): a minimum wider than a 320px phone's content box overflowed the page */
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }
.page-head { display: flex; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-family: var(--display); font-weight: 800; font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem); line-height: 1.1; letter-spacing: .01em; } /* display-m */
.page-head p { margin: 4px 0 0; color: var(--ink-2); }

/* ---- forms ---- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; min-width: 0; }
.field label, .lbl { font-size: var(--fs-xs); font-weight: 650; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.field .hint, .hint { color: var(--muted); font-size: var(--fs-sm); margin: 2px 0 0; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], input[type="number"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--page);
  border: 1px solid var(--field-border); border-radius: var(--radius-md); padding: 9px 11px; min-height: 42px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-size: var(--fs-md); }
.form-grid { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

button, .btn {
  font: inherit; font-size: var(--fs-md); font-weight: 550; cursor: pointer; color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--ring); border-radius: var(--radius-md); padding: 9px 16px; min-height: 42px;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap;
}
button:hover, .btn:hover { border-color: var(--axis); }
.btn.primary, button.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 650; }
.btn.primary:hover, button.primary:hover { background: var(--accent-ink); }
.btn.ghost, button.ghost { background: transparent; }
.btn.danger, button.danger { color: var(--critical-ink); }
.btn.small, button.small { min-height: 32px; padding: 5px 11px; font-size: var(--fs-sm); border-radius: var(--radius-sm); }
.btn.lg { min-height: 50px; padding: 12px 22px; font-size: var(--fs-lg); border-radius: var(--radius-md); }
button:disabled { opacity: .55; cursor: default; }
.iconbtn { padding: 8px; min-width: 42px; }

.seg { display: inline-flex; border: 1px solid var(--ring); border-radius: 999px; padding: 3px; background: var(--surface-2); flex-wrap: wrap; gap: 2px; }
.seg button { border: 0; background: transparent; border-radius: 999px; min-height: 30px; padding: 4px 12px; font-size: var(--fs-sm); }
.seg button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 0 0 1px var(--ring); font-weight: 650; }
.seg button.allow[aria-pressed="true"] { background: var(--banner-ok); color: var(--good-ink); }
.seg button.deny[aria-pressed="true"] { background: var(--banner-err); color: var(--critical-ink); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--ring); background: var(--surface); border-radius: 999px; min-height: 34px; padding: 5px 13px; font-size: var(--fs-sm); font-weight: 550; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--page); border-color: var(--ink); }

/* ---- banners, badges ---- */
.banner { border-radius: var(--radius-md); padding: 11px 14px; margin-bottom: 14px; font-size: var(--fs-md); border: 1px solid; }
.banner.warn { background: var(--banner-warn); border-color: var(--banner-warn-ring); }
.banner.err { background: var(--banner-err); border-color: var(--banner-err-ring); }
.banner.ok { background: var(--banner-ok); border-color: var(--banner-ok-ring); }
.banner.info { background: var(--accent-wash); border-color: var(--ring); }
.banner > b { display: block; margin-bottom: 2px; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: 650; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--ring); background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge .dot, .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.badge.open { background: var(--banner-ok); color: var(--good-ink); border-color: var(--banner-ok-ring); }
.badge.locked { background: var(--surface-2); }
.badge.pending { background: var(--banner-warn); border-color: var(--banner-warn-ring); color: var(--ink); }
.badge.off { background: var(--banner-err); color: var(--critical-ink); border-color: var(--banner-err-ring); }
.badge.admin { background: var(--accent-wash); color: var(--accent-ink); }

.busy { display: flex; gap: 10px; align-items: center; color: var(--muted); padding: 20px 0; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--axis); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--axis); border-radius: var(--radius); }

/* ---- stat tiles, tables ---- */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 18px; }
.tile { background: var(--surface); border: 1px solid var(--ring); border-radius: var(--radius); padding: 14px 16px; }
.tile .k { font-size: var(--fs-xs); color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.tile .v { font-size: 1.75rem; font-weight: 700; line-height: 1.15; margin-top: 2px; font-variant-numeric: tabular-nums; } /* kpi token */
@media (max-width: 640px) { .tile .v { font-size: 1.375rem; } }
.tile .d { font-size: var(--fs-sm); color: var(--ink-2); }
.table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: var(--fs-sm); }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; white-space: nowrap; }
tbody tr:hover { background: var(--surface-2); }
tr.clickable { cursor: pointer; }

/* ---- tabs ---- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--grid); margin-bottom: 20px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 10px 14px; min-height: 44px; color: var(--ink-2); font-weight: 550; }
.tabs button[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--ink); font-weight: 700; }
.tabs .count { background: var(--accent); color: var(--on-accent); border-radius: 999px; font-size: var(--fs-xs); padding: 0 7px; margin-left: 4px; }

/* ---- dialog ---- */
dialog { border: 1px solid var(--ring); border-radius: var(--radius-xl); padding: 0; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
dialog::backdrop { background: rgba(10, 10, 12, .55); }
dialog .dhead { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--grid); }
dialog .dhead h2 { font-size: var(--fs-lg); flex: 1; }
dialog .dbody { padding: 18px 20px; overflow: auto; }
dialog .dfoot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--grid); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--page); padding: 11px 18px; border-radius: var(--radius-md); font-size: var(--fs-md); z-index: 100; box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px); }

/* ---- app cards ---- */
.appcard { display: flex; flex-direction: column; gap: 10px; position: relative; transition: transform .15s, box-shadow .15s, border-color .15s; }
.appcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--axis); }
.appcard .top { display: flex; gap: 12px; align-items: flex-start; }
.appicon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 26px; background: var(--accent-wash); flex: none; border: 1px solid var(--ring); }
.appcard h3 { font-size: var(--fs-lg); }
.appcard .cat { font-size: var(--fs-xs); color: var(--muted); }
.appcard .desc { color: var(--ink-2); font-size: var(--fs-md); flex: 1; margin: 0; }
.appcard .foot { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-top: 4px; }

/* ---- hero (dark in both themes) ---- */
/* flat: the radial halos and the diagonal stripe overlay are gone (DESIGN.md D10) */
.hero { background: var(--night); color: var(--night-ink); position: relative; overflow: hidden; }
.hero .in { max-width: var(--home-max); margin: 0 auto; padding: 84px var(--home-pad) 92px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; position: relative; }
.hero .eyebrow { color: var(--night-accent-ink); }
.hero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(2.75rem, 1.9rem + 3.4vw, 4.5rem); line-height: 1; letter-spacing: .005em; margin: 14px 0 18px; text-transform: uppercase; } /* display-xl */
/* emphasis is colour on upright type; italic and skew belong to the wordmark alone (D9). Night band: dark-mode orange. */
.hero h1 em { font-style: normal; color: #ff6a2b; }
.hero .lead { font-size: var(--fs-xl); color: #d7d3cb; max-width: 560px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero .btn:not(.primary) { background: rgba(255,255,255,.08); color: var(--night-ink); border-color: rgba(255,255,255,.18); }
.hero .btn:not(.primary):hover { background: rgba(255,255,255,.14); }
/* the night band is dark in both themes: dark-mode orange with dark text (6.6:1) */
.hero .btn.primary { background: #ff6a2b; color: #111; }
.hero .btn.primary:hover { background: #ff9a66; }
.hero .fine { margin-top: 18px; font-size: var(--fs-sm); color: var(--night-muted); }
.showcase { background: linear-gradient(180deg, #1b1d22, #121317); border: 1px solid rgba(255,255,255,.10); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.55); padding: 14px; transform: perspective(1400px) rotateY(-8deg) rotateX(3deg); }
.showcase .bar { display: flex; gap: 6px; padding: 2px 4px 12px; align-items: center; }
.showcase .bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a3d44; }
.showcase .bar span { margin-left: 10px; font: .75rem var(--mono); color: #8d8a84; background: #0d0e10; padding: 3px 10px; border-radius: 6px; flex: 1; }
.showcase .tilesx { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.plate { background: #1f2227; border: 1px solid rgba(255,255,255,.07); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 104px; }
.plate .ic { font-size: 22px; }
.plate b { font-size: var(--fs-sm); color: #eceae5; font-weight: 650; }
.plate .st { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-top: auto; }
.plate .st.on { color: #57d27a; } .plate .st.lock { color: #8d8a84; } .plate .st.new { color: #ff9a66; }
.plate.num { background: linear-gradient(135deg, #ff6a2b, #f59f00); border: 0; color: #121212; align-items: flex-start; justify-content: space-between; }
.plate.num .big { font-family: var(--display); font-size: 2.3rem; font-weight: 900; line-height: .9; color: #121212; }
.plate.num b { color: #121212; }
/* Hero picture (Oct 4 2026): a real screenshot of the Majors page in the browser frame, with a
   "New" callout hanging off its lower-left corner. The whole frame is one link to /datagov/majors/. */
.showcase.shot { display: block; position: relative; text-decoration: none; padding: 12px; transition: transform .25s; }
.showcase.shot:hover, .showcase.shot:focus-visible { transform: perspective(1400px) rotateY(-3deg) rotateX(1deg) translateY(-3px); outline: none; }
.showcase.shot img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid rgba(255,255,255,.08); }
.showcase .callout { position: absolute; left: -18px; bottom: -24px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; max-width: calc(100% + 8px);
  background: #fffaf6; color: #121212; border: 2px solid #ff6a2b; border-radius: 14px; padding: 10px 14px; box-shadow: 0 0 0 4px rgba(255,106,43,.25), 0 14px 40px rgba(0,0,0,.55); }
.showcase .callout .flag { background: #ff6a2b; color: #111; font-size: var(--fs-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.showcase .callout b { font-family: var(--display); font-size: 1.35rem; font-weight: 800; line-height: 1; }
.showcase .callout .what { color: #4a4744; font-weight: 650; font-size: var(--fs-md); }
@media (max-width: 860px) { .showcase .callout { left: 10px; bottom: -20px; } }
@media (max-width: 900px) {
  .hero .in { grid-template-columns: 1fr; padding: 56px var(--home-pad) 64px; }
  .showcase { transform: none; }
}

/* ---- home sections ---- */
.stats { background: var(--surface); border-bottom: 1px solid var(--grid); }
/* on the same grid as the hero h1 (Drew round 1): content width, first number flush left */
.stats-in { width: calc(100% - 2 * var(--home-pad)); max-width: calc(var(--home-max) - 2 * var(--home-pad)); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
@media (min-width: 761px) { .stats-in > div:first-child { padding-left: 0; } }
.stats-in > div { padding: 24px 16px; border-right: 1px solid var(--grid); }
.stats-in > div:last-child { border-right: 0; }
.stats .v { font-family: var(--display); font-weight: 800; font-size: 2.2rem; line-height: 1; }
.stats .v span { color: var(--accent); }
.stats .k { color: var(--ink-2); font-size: var(--fs-md); margin-top: 6px; }
@media (max-width: 760px) { .stats-in { grid-template-columns: 1fr 1fr; } .stats-in > div:nth-child(2) { border-right: 0; } .stats-in > div:nth-child(-n+2) { border-bottom: 1px solid var(--grid); } }
.step { position: relative; padding-top: 26px; }
.step .no { font-family: var(--display); font-weight: 900; font-size: 3.2rem; line-height: 1; color: var(--accent); opacity: .9; }
.step h3 { font-size: var(--fs-lg); margin: 8px 0 6px; }
.step p { color: var(--ink-2); margin: 0; }
.sol .ic { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent-ink); margin-bottom: 12px; }
.sol .ic svg { width: 22px; height: 22px; }
.sol h3 { font-size: var(--fs-lg); margin-bottom: 6px; }
.sol p { color: var(--ink-2); margin: 0; font-size: var(--fs-md); }
.timeline { position: relative; display: grid; gap: 18px; }
.timeline .item { display: grid; grid-template-columns: 92px 1fr; gap: 16px; align-items: start; }
/* home contact steps are single digits: 44px column at every width, matching the hero panel's list */
#contact .timeline .item { grid-template-columns: 44px 1fr; gap: 12px; }
.timeline .yr { font-family: var(--display); font-weight: 900; font-size: 1.9rem; color: var(--accent); line-height: 1; padding-top: 2px; }
.timeline h3 { font-size: var(--fs-lg); margin-bottom: 3px; }
.timeline p { margin: 0; color: var(--ink-2); font-size: var(--fs-md); }
.founder { display: flex; gap: 16px; align-items: flex-start; }
.founder .avatar { width: 64px; height: 64px; font-size: 1.4rem; }
.quote { font-size: var(--fs-lg); color: var(--ink-2); border-left: 3px solid var(--accent); padding-left: 14px; margin: 14px 0 0; }

/* ---- auth pages ---- */
.auth { min-height: calc(100vh - 61px); display: grid; grid-template-columns: 1fr 1fr; }
.auth .side { background: var(--night); color: var(--night-ink); padding: 56px 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth .side > * { position: relative; }
.auth .side .eyebrow { color: var(--night-accent-ink); }
.auth .side h2 { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; margin: 16px 0; }
.auth .side ul { padding: 0; list-style: none; display: grid; gap: 10px; color: #d7d3cb; }
.auth .side li::before { content: '→ '; color: #ff9a66; }
.auth .form { display: grid; place-items: center; padding: 40px 16px; }
.auth .form .box { width: min(420px, 100%); }
.auth .form h1 { font-family: var(--display); font-weight: 800; font-size: 2.2rem; margin-bottom: 4px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth .side { display: none; } }

/* ---- footer (dark in both themes) ---- */
.sitefoot { background: var(--night); color: var(--night-muted); margin-top: auto; }
.sitefoot .in { max-width: var(--home-max); margin: 0 auto; padding: 40px var(--home-pad) 28px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.sitefoot h4 { color: var(--night-ink); font-size: var(--fs-xs); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 10px; }
.sitefoot a { color: #d7d3cb; text-decoration: none; display: block; padding: 3px 0; font-size: var(--fs-md); }
.sitefoot a:hover { color: #fff; }
.sitefoot .logo { color: var(--night-ink); }
.sitefoot .legal { max-width: var(--home-max); margin: 0 auto; padding: 16px var(--home-pad); border-top: 1px solid rgba(255,255,255,.08); font-size: var(--fs-sm); display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
@media (max-width: 760px) { .sitefoot .in { grid-template-columns: 1fr 1fr; } }

.fatal { position: fixed; inset: auto 16px 16px 16px; background: var(--banner-err); border: 1px solid var(--banner-err-ring); border-radius: 10px; padding: 12px 16px; z-index: 50; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } .showcase { transform: none; } }

/* ---- home: announcement (Oct 4 2026 - the Data.gov Dashboard, Majors spotlight) */
.announce .in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; align-items: stretch; }
.announce .main { border-left: 5px solid var(--accent); background: linear-gradient(135deg, var(--accent-wash), var(--surface) 62%); padding: 28px; }
.announce h2 { font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 3.6vw, 2.5rem); letter-spacing: .01em; margin: 10px 0 8px; }
.announce .main p { color: var(--ink-2); font-size: var(--fs-lg); max-width: 60ch; }
.announce .badge.new { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.announce .spot { padding: 24px; display: flex; flex-direction: column; }
.announce .spot h3 { font-family: var(--display); font-weight: 800; font-size: var(--fs-2xl); margin: 6px 0 4px; }
.announce .spot p { color: var(--ink-2); margin: 0; }
.announce .spot ul { margin: 12px 0 18px; padding-left: 18px; color: var(--ink-2); display: grid; gap: 6px; font-size: var(--fs-md); }
.announce .spot .row { margin-top: auto; }
@media (max-width: 860px) { .announce .in { grid-template-columns: 1fr; } }

/* ---- step 5 components (DESIGN.md sections 6, 8 and 10) ---- */
/* .badge.sample ("Sample data · Private"): neutral badge with a muted dot, so demo data is never mistaken for real */
.badge.sample::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
/* loading placeholder for tables and KPI rows that take over 300ms (static under reduced motion) */
.skeleton { display: block; min-height: 1em; border-radius: var(--radius-sm); color: transparent; background: linear-gradient(90deg, var(--surface-2) 0, var(--grid) 50%, var(--surface-2) 100%) 0 0 / 200% 100%; animation: skel 1.4s linear infinite; }
@keyframes skel { to { background-position: -200% 0; } }
/* skip link: off screen until focused (rimfire.js puts it first in the body) */
.skip { position: absolute; left: 12px; top: -80px; z-index: 60; background: var(--surface); color: var(--ink); border: 1px solid var(--ring); border-radius: var(--radius-md); padding: 10px 14px; font-weight: 650; text-decoration: none; }
.skip:focus { top: 10px; box-shadow: var(--shadow-lg); }
main[tabindex="-1"]:focus { outline: none; } /* the skip target takes focus without a ring */
/* prose at a readable measure with something useful beside it on wide screens */
.prose-split { display: grid; gap: var(--gap); grid-template-columns: minmax(0, var(--measure)) minmax(240px, 1fr); align-items: start; }
@media (max-width: 999px) { .prose-split { grid-template-columns: 1fr; } }
