/* CoSteward — "Steward Precision" design system.
   Self-hosted Latin woff2: Inter (UI/data) and Fraunces (display headings & key figures).
   Licences: /static/fonts/Inter-OFL.txt and /static/fonts/Fraunces-OFL.txt. */
@font-face{font-family:Inter;font-style:normal;font-weight:400;font-display:swap;src:url("/static/fonts/inter-400.woff2") format("woff2")}
@font-face{font-family:Inter;font-style:normal;font-weight:500;font-display:swap;src:url("/static/fonts/inter-500.woff2") format("woff2")}
@font-face{font-family:Inter;font-style:normal;font-weight:600;font-display:swap;src:url("/static/fonts/inter-600.woff2") format("woff2")}
@font-face{font-family:Fraunces;font-style:normal;font-weight:500;font-display:swap;src:url("/static/fonts/fraunces-500.woff2") format("woff2")}
@font-face{font-family:Fraunces;font-style:normal;font-weight:600;font-display:swap;src:url("/static/fonts/fraunces-600.woff2") format("woff2")}

:root{
  color-scheme:light;
  /* Surfaces — warm parchment stone + crisp white paper */
  --canvas:#F5F4F0;
  --surface:#FFFFFF;
  --surface-2:#FAF9F6;
  --surface-3:#EAE8E2;
  --surface-strip:#ECEAE4;
  --line:rgba(21,25,31,.09);
  --line-2:rgba(21,25,31,.16);
  --ink:#15191F;
  --ink-2:#3F4752;
  --ink-3:#5B6370;

  /* Single institutional brand accent — Deep Racing Navy */
  --accent:#1B3B5F;
  --accent-hover:#142D4A;
  --accent-soft:#EAF0F6;
  --accent-line:#C3D3E3;

  /* Strictly semantic status hues (never decorative card wallpaper) */
  --green:#1E6B4B;
  --green-soft:#E6F2EC;
  --green-ink:#165239;
  --amber:#A66208;
  --amber-soft:#FCF1DC;
  --amber-ink:#7A4604;
  --warn:#B43429;
  --warn-soft:#FBEAE8;
  --warn-ink:#96261C;

  /* Crisp institutional radii */
  --r-xs:6px;
  --r-sm:8px;
  --r-md:10px;
  --r-lg:14px;
  --r-xl:16px;
  --r-pill:999px;

  /* Subtle paper elevation */
  --sh-1:0 1px 2px rgba(21,25,31,.04);
  --sh-2:0 1px 2px rgba(21,25,31,.04),0 6px 18px -8px rgba(21,25,31,.08);
  --sh-3:0 4px 12px -2px rgba(21,25,31,.08),0 20px 44px -16px rgba(21,25,31,.18);
  --inset:inset 0 1px 0 rgba(255,255,255,.85);

  /* Spacing scale (4px base) */
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:24px; --s6:32px; --s7:48px; --s8:64px;
  --gap:16px; --pad:18px;

  /* Typography */
  --font-ui:Inter,"Segoe UI",system-ui,-apple-system,sans-serif;
  --font-display:Fraunces,Georgia,"Times New Roman",serif;
  --fs-display:clamp(28px,3.2vw,36px);
  --fs-h1:26px;
  --fs-h2:19px;
  --fs-lead:16px;
  --fs-body:15px;
  --fs-ui:14px;
  --fs-cap:13.5px;
  --fs-chip:12.5px;
  --ease:cubic-bezier(.2,.7,.2,1);
}

/* Control Room Dark Mode — low-glare calibrated broadcast slate for dim stewards' rooms */
html[data-theme="dark"]{
  color-scheme:dark;
  --canvas:#0E1319;
  --surface:#151C24;
  --surface-2:#1B2430;
  --surface-3:#232E3D;
  --surface-strip:#121820;
  --line:rgba(214,228,244,.10);
  --line-2:rgba(214,228,244,.18);
  --ink:#EDF2F7;
  --ink-2:#B8C4D2;
  --ink-3:#8695A7;
  --accent:#4D96DC;
  --accent-hover:#67A9E7;
  --accent-soft:rgba(77,150,220,.18);
  --accent-line:rgba(77,150,220,.38);
  --green:#38B881;
  --green-soft:rgba(56,184,129,.16);
  --green-ink:#7EE6B9;
  --amber:#E5A032;
  --amber-soft:rgba(229,160,50,.18);
  --amber-ink:#F7CC7C;
  --warn:#E25B50;
  --warn-soft:rgba(226,91,80,.18);
  --warn-ink:#F9A59D;
  --sh-1:0 1px 2px rgba(0,0,0,.28);
  --sh-2:0 2px 6px rgba(0,0,0,.32),0 10px 24px -10px rgba(0,0,0,.45);
  --sh-3:0 8px 24px -4px rgba(0,0,0,.45),0 24px 48px -16px rgba(0,0,0,.6);
  --inset:inset 0 1px 0 rgba(255,255,255,.06);
}
html[data-theme="dark"] .topbar{background:rgba(14,19,25,.92)}
html[data-theme="dark"] .bottomnav{background:rgba(14,19,25,.95)}
html[data-theme="dark"] .tabnav button[aria-selected=true]{background:#243142;color:#fff}
html[data-theme="dark"] .tab-badge{background:rgba(255,255,255,.12);color:#DCE6F2}
html[data-theme="dark"] .mode-seg{background:rgba(255,255,255,.08)}
html[data-theme="dark"] .mode-seg button[aria-pressed=true]{background:#243142;color:#fff}
html[data-theme="dark"] .mode-seg button[data-mode=pilot][aria-pressed=true]{background:#1F4A78;color:#fff}
html[data-theme="dark"] .btn.primary{background:#1F4E7E;color:#fff}
html[data-theme="dark"] .btn.primary:hover{background:#28619B}
html[data-theme="dark"] .tourbtn-top{background:#1F4E7E;color:#fff}
html[data-theme="dark"] .tourbtn-top:hover{background:#28619B}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--canvas);
  color:var(--ink);
  font:400 var(--fs-body)/1.55 var(--font-ui);
  letter-spacing:-.005em;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4,p{margin:0}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
button:disabled{opacity:.4;cursor:default}
a{color:var(--accent)}
.num{font-variant-numeric:tabular-nums;font-feature-settings:"tnum"}
.display{font-family:var(--font-display);font-weight:500;letter-spacing:-.02em}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:var(--r-sm)}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
[hidden]{display:none!important}

/* App shell — sticky header + persistent meeting strip */
.topbar{
  position:sticky;top:0;z-index:24;
  height:60px;
  display:flex;align-items:center;gap:14px;
  padding:0 24px;
  background:rgba(245,244,240,.92);
  backdrop-filter:saturate(1.3) blur(12px);
  border-bottom:1px solid var(--line);
}
a.brand{
  display:inline-flex;align-items:center;gap:10px;
  text-decoration:none;color:var(--ink);
  font:500 18px/1 var(--font-display);letter-spacing:-.015em;
  white-space:nowrap;flex:none;min-height:44px;
}
.brand .mark{
  width:28px;height:28px;border-radius:8px;flex:none;
  background:linear-gradient(145deg,#244D7A,var(--accent));
  box-shadow:var(--sh-1),inset 0 1px 0 rgba(255,255,255,.22);
  display:grid;place-items:center;
}
.brand .mark svg{display:block}
.brand-name{display:block;line-height:1.1}
.brand-sub{display:none}

/* Primary 6-tab bar — fits comfortably down to 1024px */
.tabnav{
  display:flex;align-items:center;gap:2px;
  padding:3px;
  background:var(--surface-3);
  border-radius:var(--r-pill);
  margin-left:6px;
  flex:0 0 auto;
}
.tabnav button{
  height:36px;padding:0 13px;border-radius:var(--r-pill);
  font-size:13.5px;font-weight:500;color:var(--ink-2);
  white-space:nowrap;display:inline-flex;align-items:center;gap:6px;
  transition:background .18s var(--ease),color .18s var(--ease),box-shadow .18s var(--ease);
}
.tabnav button:hover{color:var(--ink)}
.tabnav button[aria-selected=true]{
  background:var(--surface);color:var(--ink);font-weight:600;
  box-shadow:var(--sh-1),0 0 0 1px var(--line);
}
.tab-badge{
  display:inline-grid;place-items:center;
  min-width:19px;height:18px;padding:0 5px;border-radius:var(--r-pill);
  font-size:11px;font-weight:600;line-height:1;
  background:rgba(21,25,31,.1);color:var(--ink-2);
}
.tabnav button[aria-selected=true] .tab-badge{background:var(--accent);color:#fff}

.spacer{flex:1;min-width:4px}

.top-util{display:flex;align-items:center;gap:8px;flex:none}
.util-link{
  height:34px;padding:0 11px;border-radius:var(--r-pill);
  font-size:13.5px;font-weight:500;color:var(--ink-2);text-decoration:none;
  display:inline-flex;align-items:center;gap:6px;white-space:nowrap;flex:none;
  transition:background .15s var(--ease),color .15s var(--ease);
}
.util-link:hover{background:rgba(21,25,31,.06);color:var(--ink)}
.util-link[aria-current=page]{background:var(--accent-soft);color:var(--accent);font-weight:600}

/* Persistent slim meeting context strip + Evaluation / Pilot mode toggle */
.mstrip{
  background:var(--surface-strip);
  border-bottom:1px solid var(--line);
  padding:6px 24px;
  font-size:13px;color:var(--ink-2);
}
.mstrip-in{
  width:min(1180px,100%);margin:0 auto;
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 18px;
}
.mstrip-l{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.mstrip-track{font:500 15px/1.2 var(--font-display);color:var(--ink);letter-spacing:-.01em}
.mstrip-meta{color:var(--ink-3);font-size:13px}
.mstrip-r{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:13px;color:var(--ink-3)}
.mstrip-r span b{color:var(--ink);font-weight:600}

.mode-seg{
  display:inline-flex;align-items:center;gap:2px;padding:2px;
  border-radius:var(--r-pill);background:rgba(21,25,31,.08);
  font-family:var(--font-ui);
}
.mode-seg button{
  height:26px;padding:0 10px;border-radius:var(--r-pill);
  font-size:12px;font-weight:500;color:var(--ink-2);white-space:nowrap;
  transition:background .16s var(--ease),color .16s var(--ease),box-shadow .16s var(--ease);
}
.mode-seg button:hover{color:var(--ink)}
.mode-seg button[aria-pressed=true]{
  background:var(--surface);color:var(--ink);font-weight:600;
  box-shadow:0 1px 2px rgba(21,25,31,.08);
}
.mode-seg button[data-mode=pilot][aria-pressed=true]{
  background:var(--accent);color:#fff;
}
.theme-btn{
  width:30px;height:30px;border-radius:var(--r-pill);flex:none;
  display:grid;place-items:center;
  background:var(--surface);color:var(--ink-2);
  box-shadow:inset 0 0 0 1px var(--line-2);
  transition:background .15s var(--ease),color .15s var(--ease);
}
.theme-btn:hover{color:var(--ink);background:var(--surface-2)}
.theme-btn[aria-pressed=true]{background:#223042;color:#F7CC7C;box-shadow:inset 0 0 0 1px rgba(247,204,124,.35)}
.jur-sel{
  height:30px;padding:0 10px;border-radius:var(--r-pill);
  border:1px solid var(--line-2);background:var(--surface);color:var(--ink);
  font:500 12px/1 var(--font-ui);cursor:pointer;
  transition:border-color .15s var(--ease),background .15s var(--ease);
}
.jur-sel:hover{border-color:var(--accent)}
.jur-sel.is-preview{border-color:var(--accent);background:var(--accent-soft);color:var(--accent);font-weight:600}
.jur-preview{
  display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;
  padding:9px 14px;border-radius:var(--r-md);margin-bottom:14px;
  background:var(--accent-soft);border:1px solid rgba(27,59,95,.22);
  font-size:13px;color:var(--ink-2);
}
.jur-preview b{color:var(--ink)}
html[data-theme="dark"] .jur-sel{background:#1B2430;border-color:#2D3B4C;color:#EEF2F6}
html[data-theme="dark"] .jur-sel.is-preview{background:rgba(125,180,235,.16);border-color:#7DB4EB;color:#C8E1FA}
html[data-theme="dark"] .jur-preview{background:rgba(125,180,235,.1);border-color:rgba(125,180,235,.28)}

/* Keycap hints & non-intrusive toast notifications */
.kbd{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:19px;height:19px;padding:0 5px;border-radius:4px;
  background:var(--surface);border:1px solid var(--line-2);
  box-shadow:0 1px 0 var(--line-2);
  font:600 11px/1 var(--font-ui);color:var(--ink-2);vertical-align:middle;
}
.toast-host{
  position:fixed;right:18px;bottom:20px;z-index:90;
  display:grid;gap:8px;justify-items:end;pointer-events:none;
}
.toast{
  pointer-events:auto;display:inline-flex;align-items:center;gap:10px;
  max-width:min(420px,calc(100vw - 28px));
  padding:10px 12px 10px 14px;border-radius:12px;
  background:#151B23;color:#F4F6F9;font-size:13.5px;line-height:1.35;
  box-shadow:0 12px 28px -8px rgba(15,20,28,.45),0 0 0 1px rgba(255,255,255,.1);
  animation:vsToastIn .18s var(--ease);
}
.toast-dot{width:8px;height:8px;border-radius:50%;background:#7EC4E8;flex:none}
.toast.t-ok .toast-dot{background:#48C78E}
.toast.t-warn .toast-dot{background:#F59E0B}
.toast-msg{min-width:0}
.toast-act{
  margin-left:4px;padding:4px 10px;border-radius:999px;
  background:rgba(255,255,255,.14);color:#fff;font-size:12px;font-weight:600;white-space:nowrap;
}
.toast-act:hover{background:rgba(255,255,255,.24)}
.toast-x{color:rgba(255,255,255,.6);font-size:17px;line-height:1;padding:2px 4px}
.toast-x:hover{color:#fff}

/* Main page container */
.page{width:min(1180px,calc(100% - 48px));margin:0 auto;padding:20px 0 48px}

/* Status chips — solid for official verified records, dashed ONLY for demo/simulated */
.chip{
  display:inline-flex;align-items:center;gap:7px;
  height:30px;padding:0 11px;border-radius:var(--r-pill);
  font-size:var(--fs-chip);font-weight:500;color:var(--ink-2);
  background:var(--surface-3);white-space:nowrap;position:relative;
}
.chip::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--ink-3);flex:none}
.chip.official{background:var(--surface);color:var(--ink);box-shadow:inset 0 0 0 1px var(--line-2)}
.chip.official::before{background:var(--green)}
.chip.ok{background:var(--green-soft);color:var(--green-ink)}
.chip.ok::before{background:var(--green)}
.chip.blind{background:var(--accent-soft);color:var(--accent)}
.chip.blind::before{background:var(--accent)}
.chip.sim{background:var(--surface);color:var(--ink-3);border:1px dashed var(--line-2);box-shadow:none}
.chip.sim::before{background:transparent;border:1.5px dashed var(--ink-3)}

/* Cards & buttons */
.card{
  background:var(--surface);
  border-radius:var(--r-xl);
  box-shadow:var(--sh-1),0 0 0 1px var(--line);
}
.card.lg{border-radius:var(--r-xl)}
.card.md{border-radius:var(--r-lg)}
.hover-lift{transition:transform .2s var(--ease),box-shadow .2s var(--ease)}
.hover-lift:hover{transform:translateY(-1px);box-shadow:var(--sh-2),0 0 0 1px var(--line-2)}

.eyebrow{font-size:12px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:var(--ink-3)}
.h-page{font:500 var(--fs-h1)/1.18 var(--font-display);letter-spacing:-.02em;color:var(--ink)}
.sub{font-size:14.5px;color:var(--ink-2);max-width:78ch;margin-top:4px;line-height:1.5}
.section-head{margin:0}

.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  height:38px;padding:0 15px;border-radius:var(--r-pill);
  font-size:13.5px;font-weight:500;text-decoration:none;
  background:var(--surface);color:var(--ink);
  box-shadow:var(--sh-1),0 0 0 1px var(--line-2);
  transition:background .15s var(--ease),box-shadow .15s var(--ease),color .15s var(--ease),transform .12s var(--ease);
  white-space:nowrap;
}
.btn:hover{background:var(--surface-2);box-shadow:var(--sh-2),0 0 0 1px var(--line-2)}
.btn:active:not(:disabled){transform:scale(.98)}
.btn.icon{width:38px;padding:0}
.btn.primary{background:var(--accent);color:#fff;box-shadow:var(--sh-1)}
.btn.primary:hover{background:var(--accent-hover);color:#fff}
.btn.danger{background:var(--warn);color:#fff;box-shadow:none}
.btn.danger:hover{background:var(--warn-ink)}

.chev{width:18px;height:18px;color:var(--ink-3);flex:none;transition:transform .2s var(--ease)}
.more{display:inline-flex;align-items:center;gap:5px;min-height:36px;font-size:13.5px;font-weight:600;color:var(--accent);text-decoration:none}
.more:hover{color:var(--accent-hover)}
.more svg{transition:transform .2s var(--ease)}
.more:hover svg{transform:translateX(2px)}

/* Disclosure rows & footers */
.rowcard{
  display:flex;align-items:center;justify-content:space-between;gap:var(--s4);
  min-height:52px;padding:0 20px;width:100%;text-align:left;
  background:var(--surface);border-radius:var(--r-lg);
  box-shadow:var(--sh-1),0 0 0 1px var(--line);
  font-size:14.5px;
}
.rowcard:hover{background:var(--surface-2)}
.rowcard b{font-weight:600}
.rowcard .r{color:var(--ink-3);font-size:13.5px;display:flex;align-items:center;gap:8px}
.rowcard[aria-expanded=true]{border-bottom-left-radius:0;border-bottom-right-radius:0}
.stack{display:grid;gap:10px}
.footnote{
  max-width:780px;margin:24px auto 0;padding-top:18px;
  border-top:1px solid var(--line);text-align:center;
  font-size:13px;line-height:1.6;color:var(--ink-3);
}
.footnote a{color:var(--accent);text-decoration:underline;text-underline-offset:3px;display:inline-block;padding:8px 2px;margin:-8px -2px}

/* Runner drawer */
.scrim{position:fixed;inset:0;background:rgba(21,25,31,.32);backdrop-filter:blur(2px);z-index:35;animation:vsFadeIn .18s var(--ease)}
.drawer{
  position:fixed;top:14px;right:14px;bottom:14px;width:540px;max-width:calc(100% - 28px);z-index:45;
  background:var(--surface);border-radius:var(--r-xl);
  box-shadow:var(--sh-3),0 0 0 1px var(--line);
  display:flex;flex-direction:column;overflow:hidden;
  animation:vsDrawerIn .22s var(--ease);
}
.d-head{padding:18px 22px 14px;border-bottom:1px solid var(--line);background:var(--surface-2)}
.d-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.d-top>div:first-child{min-width:0;flex:1}
.d-title{font:500 24px/1.15 var(--font-display);letter-spacing:-.02em;margin-top:4px;display:flex;align-items:center;gap:12px;overflow-wrap:anywhere}
.d-subline{font-size:13.5px;color:var(--ink-2);margin-top:4px}
.d-head-acts{display:flex;align-items:center;gap:8px;margin-top:12px;flex-wrap:wrap}
.d-body{padding:18px 22px 26px;overflow:auto;flex:1;display:flex;flex-direction:column;gap:16px}
.d-body>*{flex:none}
.panel{padding:14px 16px;border-radius:var(--r-lg);background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line)}
.panel h4{font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--ink-3);display:flex;align-items:center;gap:7px}
.panel h4 i{width:7px;height:7px;border-radius:50%;background:var(--amber);display:inline-block}
.panel p{margin-top:6px;font-size:14.5px;color:var(--ink);line-height:1.5}
.kv2{display:grid;grid-template-columns:1fr 1fr;gap:14px 20px}
.k{font-size:12.5px;color:var(--ink-3);font-weight:500}
.v{font-size:16px;font-weight:600;letter-spacing:-.01em;line-height:1.25;margin-top:2px;color:var(--ink)}
.v small{font-size:12.5px;font-weight:400;color:var(--ink-3);margin-left:4px}
.acc{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:46px;padding:0 2px;border-top:1px solid var(--line);width:100%;text-align:left;font-size:14.5px;font-weight:600;color:var(--ink)}
.acc .r{font-weight:400;color:var(--ink-3);font-size:13px;display:flex;align-items:center;gap:6px;text-align:right}
.grab{display:none;width:40px;height:4px;border-radius:99px;background:var(--line-2);margin:6px auto 0}

/* Pills & lists */
.listcard{overflow:hidden;border-radius:var(--r-xl)}
.lrow{display:flex;align-items:center;gap:12px;width:100%;text-align:left;min-height:48px;padding:6px 20px;border-top:1px solid var(--line);cursor:pointer;transition:background .15s}
.lrow:first-child{border-top:0}
.lrow:hover{background:var(--surface-2)}
.pillrow{display:flex;gap:6px;flex-wrap:wrap}
.pill{
  height:36px;padding:0 13px;border-radius:var(--r-pill);
  background:var(--surface);box-shadow:inset 0 0 0 1px var(--line-2);
  font-size:13.5px;font-weight:500;color:var(--ink-2);
  display:inline-flex;align-items:center;gap:6px;white-space:nowrap;
  transition:background .15s var(--ease),color .15s var(--ease),box-shadow .15s var(--ease),transform .12s var(--ease);
}
.pill:hover{background:var(--surface-2);color:var(--ink)}
.pill:active:not(:disabled){transform:scale(.98)}
.pill[aria-pressed=true]{background:var(--accent);color:#fff;box-shadow:none}
.pill small{font-size:12px;color:var(--ink-3)}
.pill[aria-pressed=true] small{color:inherit;opacity:.85}
.dot{width:7px;height:7px;border-radius:50%;background:var(--accent);flex:none;display:inline-block}
.dot.off{background:transparent;box-shadow:inset 0 0 0 1.5px var(--ink-3)}
.barline{height:8px;border-radius:99px;background:var(--surface-3);overflow:hidden}
.barline i{display:block;height:100%;border-radius:99px;background:var(--accent)}

/* Mobile bottom nav — only kicks in below 960px (laptops 1024px+ keep full top nav!) */
.bottomnav{display:none}
@media (max-width:1320px){
  .topbar{padding:0 16px;gap:10px}
  .tabnav{margin-left:2px}
  .tabnav button{padding:0 11px;font-size:13px;gap:5px}
}
@media (max-width:1180px){
  .topbar{padding:0 12px;gap:6px}
  a.brand{font-size:15.5px;gap:7px}
  .brand .mark{width:24px;height:24px}
  .tabnav{margin-left:0;padding:2px}
  .tabnav button{height:33px;padding:0 8px;font-size:12px;gap:4px}
  .tab-badge{min-width:16px;height:16px;padding:0 4px;font-size:10px}
  .util-link{padding:0 7px;font-size:12px}
  .chip.official{padding:0 8px;font-size:11.5px;gap:5px}
  .mstrip{padding:6px 14px}
  .mstrip-wx{display:none}
  .page{width:calc(100% - 28px)}
}
@media (max-width:1080px){
  .tab-badge{display:none}
  .tabnav button{padding:0 8px}
}
@media (max-width:960px){
  .tabnav,.util-link{display:none}
  .bottomnav{
    display:grid;grid-template-columns:repeat(5,minmax(0,1fr));
    position:fixed;left:0;right:0;bottom:0;z-index:25;
    height:calc(72px + env(safe-area-inset-bottom));
    padding:6px 6px calc(12px + env(safe-area-inset-bottom));
    background:rgba(245,244,240,.95);backdrop-filter:blur(14px);
    border-top:1px solid var(--line);
  }
  .bottomnav button{
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
    font-size:12px;font-weight:500;color:var(--ink-3);min-height:48px;min-width:0;border-radius:10px;
  }
  .bottomnav button[aria-current=page]{color:var(--accent);font-weight:600}
  .bottomnav svg{width:20px;height:20px}
  .page{padding-bottom:104px}
  .toast-host{bottom:86px;right:12px}
}
@media (max-width:640px){
  .topbar{height:56px;padding:0 12px;gap:8px}
  a.brand{font-size:16px;gap:8px}
  .mstrip{padding:6px 12px;font-size:12.5px}
  .mstrip-r{gap:6px 10px;font-size:12px;width:100%;justify-content:space-between}
  .page{width:calc(100% - 24px);padding:14px 0 104px}
  .h-page{font-size:23px}
  .drawer{top:auto;left:0;right:0;bottom:0;width:100%;max-width:100%;height:88%;border-radius:20px 20px 0 0;animation:vsSheetUp .22s var(--ease)}
  .d-head{padding:12px 16px 12px}
  .d-body{padding:14px 16px 28px}
  .d-title{font-size:21px}
  .grab{display:block!important}
  .rowcard{padding:0 14px}
}
@media (max-width:420px){
  .topbar{padding:0 10px;gap:6px}
  a.brand{font-size:15px;gap:7px}
  .chip{padding:0 8px;gap:5px;font-size:11.5px;height:28px}
}
@media (max-width:360px){
  #simwrap{display:none}
}
@media print{
  body{background:#fff;color:#000}
  .topbar,.mstrip,.bottomnav,#moremenu,#toast-host,.footnote,.ph,.dr-bar,.dr-manual,.dr-item-r,.dr-ta,.dr-src{display:none!important}
  .page{width:100%;margin:0;padding:0}
  .card{box-shadow:none;border:1px solid #d0d5dd;border-radius:6px;break-inside:avoid}
}

/* Subtle Steward Precision micro-interactions (all disabled under prefers-reduced-motion) */
#view.vs-enter{animation:vsFadeUp .14s var(--ease)}
@keyframes vsFadeUp{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
@keyframes vsFadeIn{from{opacity:0}to{opacity:1}}
@keyframes vsDrawerIn{from{opacity:.6;transform:translateX(26px)}to{opacity:1;transform:none}}
@keyframes vsSheetUp{from{opacity:.7;transform:translateY(28px)}to{opacity:1;transform:none}}
@keyframes vsPopIn{from{opacity:0;transform:scale(.97) translateY(4px)}to{opacity:1;transform:none}}
@keyframes vsToastIn{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}

@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
