/* Backline · base
   Layout, components and motion for every page, in every style.
   Colours, type, radii and shadows are tokens. static/css/instrument.css sets
   them for the default look; pass.css and night.css set their own and add
   each style's signature pieces. Nothing below the token block names a colour. */

/* ---------- fonts (Instrument's; the other two load from Google Fonts) ---------- */

@font-face {
  font-family: 'Geist';
  src: url('/static/fonts/Geist.woff2?v=6') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/static/fonts/GeistMono.woff2?v=6') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Fallback';
  src: local('Arial');
  size-adjust: 100%;
  ascent-override: 90%;
  descent-override: 22%;
}

/* ---------- structural tokens (same in every style) ---------- */

:root {
  --side-w: 248px;
  --bar-h: 58px;
  --page-max: 1180px;
  --gutter: clamp(16px, 3.2vw, 36px);

  --r-xs: 5px;
  --r-sm: 7px;
  --r: 10px;
  --r-lg: 14px;
  --r-pill: 999px;

  --ease: cubic-bezier(.16, 1, .3, 1);        /* expo out */
  --ease-in: cubic-bezier(.55, 0, .85, .25);
  --t-fast: 140ms;
  --t: 220ms;
  --t-slow: 420ms;

  --z-sticky: 20;
  --z-scrim: 35;
  --z-side: 40;
  --z-pop: 60;
  --z-toast: 80;

  --fs-body: 16px;
  --lh-body: 1.6;
  --fs-small: 13px;
  --fs-xs: 12px;

  /* per-style knobs with neutral defaults */
  --f-display: var(--f-sans);
  --display-weight: 620;
  --display-tracking: -0.03em;
  --display-stretch: 100%;
  --display-case: none;
  --h2-weight: 600;
  --h2-case: none;
  --h2-tracking: -0.01em;
  --line-w: 1px;
  --panel-bg: var(--surface);
  --panel-line: var(--line);
  --panel-shadow: var(--shadow-1);
  --panel-r: var(--r-lg);
}

/* ---------- reset + base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
svg.i, svg.ic { flex: none; }
a { color: var(--link); text-decoration: underline; text-decoration-color: color-mix(in oklab, currentColor 35%, transparent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; text-wrap: balance; }
p { margin: 0 0 12px; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
small { font-size: var(--fs-small); }
strong, b { font-weight: 650; }
hr { border: 0; border-top: var(--line-w) solid var(--line-2); margin: 16px 0; }
code { font-family: var(--f-mono); font-size: .92em; }
details > summary { cursor: pointer; }
::selection { background: var(--accent-tint-strong); color: var(--text); }

.money, .num, td.num, th.num, .big-money, .stat-rows dd, .fig-v, .hc-num, .yoy-big {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
}
td.money, th.money { text-align: right; white-space: nowrap; }
th.num, td.num { text-align: right; white-space: nowrap; }

/* ---------- small utilities ---------- */

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: var(--z-toast);
  background: var(--surface); color: var(--text); padding: 10px 16px;
  border: var(--line-w) solid var(--line); border-radius: var(--r); font-weight: 600;
  text-decoration: none; transition: top var(--t) var(--ease);
}
.skip-link:focus { top: 12px; }
.nowrap { white-space: nowrap; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.inline { display: inline; margin: 0; }
.hint { color: var(--text-2); font-size: var(--fs-small); }
p.hint { max-width: 72ch; }
.warn-text { color: var(--warn); }
.danger-text { color: var(--bad); font-weight: 650; }
.meta { color: var(--text-3); font-size: var(--fs-small); font-weight: 450; }
.stack > * + * { margin-top: 16px; }
.narrow { max-width: 620px; margin-left: auto; margin-right: auto; }
.span-2, .span-all { grid-column: 1 / -1; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
a:focus-visible, summary:focus-visible, button:focus-visible { border-radius: var(--r-xs); }

/* ---------- icons ---------- */

.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.i .i-fill { fill: currentColor; stroke: none; }
.btn .i { width: 16px; height: 16px; }

/* status marks: ok draws a check, warn an exclamation, bad a cross, todo a dashed ring */
.ic { width: 20px; height: 20px; }
.ic circle { fill: none; stroke-width: 1.6; }
.ic path { fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic-ok circle, .ic-ok path { stroke: var(--good); }
.ic-ok path { stroke-dasharray: 12; stroke-dashoffset: 0; }
.ic-warn circle, .ic-warn path { stroke: var(--warn); }
.ic-bad circle, .ic-bad path { stroke: var(--bad); }
.ic-todo circle { stroke: var(--text-3); stroke-dasharray: 2.5 2.5; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 0 16px;
  border-radius: var(--btn-r, var(--r)); border: var(--line-w) solid var(--btn-line);
  background: var(--btn-bg); color: var(--btn-ink);
  font: inherit; font-weight: 600; font-size: 14.5px; line-height: 1.1;
  white-space: nowrap; text-decoration: none; cursor: pointer;
  box-shadow: var(--btn-shadow);
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}
.btn:hover { background: var(--btn-hover-bg); border-color: var(--btn-hover-line, var(--btn-line)); color: var(--btn-ink); transform: var(--btn-lift, none); box-shadow: var(--btn-hover-shadow, var(--btn-shadow)); }
.btn:active { transform: var(--btn-press); box-shadow: var(--btn-press-shadow, var(--btn-shadow)); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: default; transform: none; }
.btn.primary, .btn.teal {
  background: var(--btn-primary-bg); color: var(--btn-primary-ink);
  border-color: var(--btn-primary-line); box-shadow: var(--btn-primary-shadow);
}
.btn.primary:hover, .btn.teal:hover { background: var(--btn-primary-hover); color: var(--btn-primary-ink); border-color: var(--btn-primary-line); box-shadow: var(--btn-primary-hover-shadow, var(--btn-primary-shadow)); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); border-color: transparent; }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad-line); box-shadow: none; }
.btn.danger:hover { background: var(--bad-tint); color: var(--bad); border-color: var(--bad); }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 13.5px; border-radius: var(--btn-r-sm, var(--r-sm)); }
.btn.lg { min-height: 48px; padding: 0 22px; font-size: 16px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.btn .i + span, .btn span + .i { margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- form controls ---------- */

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="tel"], input[type="search"], input[type="file"], select, textarea {
  font: inherit; font-size: 15px; color: var(--text);
  background: var(--input-bg); border: var(--line-w) solid var(--input-line);
  border-radius: var(--r-sm); padding: 8px 11px; min-height: 40px; width: 100%;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--text-3); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: var(--input-hover-line, var(--text-3)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus-ring); }
select { cursor: pointer; appearance: none; -webkit-appearance: none; padding-right: 32px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
select[multiple] { background-image: none; padding-right: 11px; }
input[type="file"] { padding: 6px; color: var(--text-2); }
input[type="file"]::file-selector-button {
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--btn-ink); background: var(--btn-bg);
  border: var(--line-w) solid var(--btn-line); border-radius: var(--r-xs); padding: 5px 12px; margin-right: 10px; cursor: pointer;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; flex: none; }
input[type="checkbox"].big-check { width: 22px; height: 22px; cursor: pointer; }
input[type="checkbox"].big-check:checked { animation: tick-pop .2s var(--ease); }
@keyframes tick-pop { 50% { transform: scale(1.22); } }

.form { display: grid; gap: 14px; margin: 0; }
.form > label, .form .field, .form-grid > label {
  display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--text);
}
.form label .hint { font-weight: 400; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
fieldset.group {
  border: var(--line-w) solid var(--line); border-radius: var(--r); padding: 12px 14px 14px; margin: 0;
  display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr));
}
fieldset.group legend { font-weight: 650; font-size: 13.5px; padding: 0 6px; }
fieldset.group .hint { margin: 0; }
.form .check, label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14.5px; cursor: pointer; }
.picker { position: relative; display: inline-flex; align-items: center; }
.picker select { min-height: 36px; font-size: 14px; font-weight: 550; padding: 6px 34px 6px 12px; background-image: none; max-width: 260px; }
.picker-chev { position: absolute; right: 10px; width: 16px; height: 16px; pointer-events: none; color: var(--text-2); }

/* ---------- notices, chips, tags ---------- */

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 14px; margin: 0 0 16px; border-radius: var(--r);
  border: var(--line-w) solid var(--line); background: var(--surface); font-size: 14.5px; max-width: 80ch;
}
.notice.ok { color: var(--good); border-color: var(--good-line); background: var(--good-tint); }
.notice.err { color: var(--bad); border-color: var(--bad-line); background: var(--bad-tint); }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 650; line-height: 1.4;
  padding: 1px 8px; border-radius: var(--r-pill);
  border: var(--line-w) solid var(--line); color: var(--text-2); background: var(--surface);
  white-space: nowrap; vertical-align: 1px;
}
.chip.ok { color: var(--good); border-color: var(--good-line); background: var(--good-tint); }
.chip.warn { color: var(--warn); border-color: var(--warn-line); background: var(--warn-tint); }
.chip.bad { color: var(--bad); border-color: var(--bad-line); background: var(--bad-tint); }
.tag {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px;
  border: var(--line-w) solid var(--line); border-radius: var(--r-pill); color: var(--text-2);
}
.count {
  display: inline-block; min-width: 20px; padding: 0 6px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--accent-ink); font: 650 12px/20px var(--f-mono); text-align: center;
}
.pulse-chip {
  display: inline-flex; align-items: center; gap: 9px; height: 32px; padding: 0 13px;
  border-radius: var(--r-pill); font-size: 13.5px; font-weight: 600;
  color: var(--warn); background: var(--warn-tint); border: var(--line-w) solid var(--warn-line);
}
.pulse-chip i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pulse-chip i::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  background: radial-gradient(closest-side, currentColor, transparent); opacity: .35;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: .15; transform: scale(.6); } 50% { opacity: .5; transform: scale(1.2); } }

.delta { display: inline-block; font-family: var(--f-sans); font-size: 11.5px; font-weight: 600; letter-spacing: 0; white-space: nowrap; }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }
.big-label .delta { display: block; margin-top: 3px; }
.stat-rows dd .delta { display: block; margin-top: 1px; }

/* ---------- logo ---------- */

.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font: 650 18px/1 var(--f-logo, var(--f-sans)); letter-spacing: -0.02em; }
.logo:hover { color: var(--text); }
.logo-mark { width: 22px; height: 22px; fill: currentColor; }
.logo-mark .logo-hot { fill: var(--accent); }
.logo-mark-ticket { display: none; }
.logo-mark-ticket .logo-line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ---------- menus (popover) + style picker ---------- */

.menu-pop {
  margin: 0; padding: 6px; min-width: 248px; max-width: min(320px, calc(100vw - 24px));
  border: var(--line-w) solid var(--line); border-radius: var(--r-lg);
  background: var(--pop-bg, var(--surface)); color: var(--text); box-shadow: var(--shadow-pop);
  inset: auto; position: fixed; overflow: auto; overscroll-behavior: contain;
}
.no-popover .menu-pop { display: none; }
.no-popover .menu-pop.is-open { display: block; z-index: var(--z-pop); }
.menu-pop:popover-open { animation: pop-in var(--t) var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: translateY(4px) scale(.98); } }
.menu-label { margin: 6px 10px 6px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.menu-sep { margin: 6px 4px; border-top: var(--line-w) solid var(--line-2); }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 38px; padding: 6px 10px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 500;
  text-align: left; text-decoration: none; cursor: pointer;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); color: var(--text); }
.menu-item .i { color: var(--text-2); }
.menu-item.is-on { background: var(--accent-tint); }
.menu-item small { display: block; color: var(--text-3); font-size: 12px; }
.menu-2 { display: grid; line-height: 1.3; }
.menu-form { margin: 0; }

.style-pick { margin: 0; }
.style-opts { display: grid; gap: 2px; }
.style-opt {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  width: 100%; min-height: 42px; padding: 6px 10px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 500; text-align: left; cursor: pointer;
}
.style-opt:hover { background: var(--surface-2); }
.style-opt[aria-pressed="true"] { background: var(--accent-tint); }
.style-name small { display: inline; margin-left: 6px; font-size: 12px; color: var(--text-3); }
.style-on { width: 16px; height: 16px; color: var(--accent-text); opacity: 0; }
.style-opt[aria-pressed="true"] .style-on { opacity: 1; }
/* a swatch previews the style it switches to, whatever the current one is */
.style-sw { display: inline-flex; width: 34px; height: 22px; border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .14); }
.style-sw i { flex: 1; }
.style-sw-instrument i:nth-child(1) { background: #fafafa; }
.style-sw-instrument i:nth-child(2) { background: #23262e; }
.style-sw-instrument i:nth-child(3) { background: #3b4fd1; }
.style-sw-pass i:nth-child(1) { background: #edf0f4; }
.style-sw-pass i:nth-child(2) { background: #1b2230; }
.style-sw-pass i:nth-child(3) { background: #f5812a; }
.style-sw-night i:nth-child(1) { background: #0a0d1f; }
.style-sw-night i:nth-child(2) { background: #ff3fa2; }
.style-sw-night i:nth-child(3) { background: #57e5ff; }

.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--avatar-bg, var(--text)); color: var(--avatar-ink, var(--bg)); font: 650 12.5px/1 var(--f-sans); letter-spacing: .02em;
}
.acct-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: var(--r);
  background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.acct-btn:hover { background: var(--surface-2); }
.acct-who { display: grid; min-width: 0; line-height: 1.25; flex: 1; }
.acct-who b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-who small { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-chev { width: 16px; height: 16px; color: var(--text-3); }
.acct-btn.is-compact { width: auto; padding: 4px; border-radius: var(--r-pill); }
.acct-btn.is-compact .acct-who, .acct-btn.is-compact .acct-chev { display: none; }

.store-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 9px;
  border: var(--line-w) solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--text);
  font: inherit; text-align: left; cursor: pointer; box-shadow: var(--shadow-1);
  transition: border-color var(--t-fast) var(--ease);
}
.store-btn:hover { border-color: var(--text-3); }
.store-no {
  display: grid; place-items: center; min-width: 30px; height: 28px; padding: 0 5px; border-radius: var(--r-sm);
  background: var(--store-no-bg, var(--text)); color: var(--store-no-ink, var(--bg)); font: 650 11px/1 var(--f-mono); letter-spacing: .01em; flex: none;
}
.store-name { display: grid; min-width: 0; line-height: 1.25; flex: 1; }
.store-name b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-name small { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-chev { width: 16px; height: 16px; color: var(--text-3); }

/* ---------- the app shell: sidebar + bar + page ---------- */

.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100dvh; }
.side {
  position: sticky; top: 0; height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 14px;
  padding: 16px 14px 12px; background: var(--side-bg, var(--bg-2)); border-right: var(--line-w) solid var(--side-line, var(--line));
  view-transition-name: side;
}
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 2px; }
.side-close { display: none; }
.side-nav { display: grid; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border-radius: var(--r-sm);
  color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 500;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.side-nav a span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-nav a:hover { color: var(--text); background: var(--nav-hover, var(--surface-2)); }
.side-nav a.on { color: var(--text); background: var(--nav-on-bg, var(--surface)); box-shadow: var(--nav-on-shadow, 0 0 0 1px var(--line)); }
.side-nav .i { width: 17px; height: 17px; }
.side-label { margin: 14px 10px 4px; font-size: 12px; font-weight: 500; color: var(--text-3); }
.nav-count {
  flex: none; min-width: 22px; padding: 2px 7px; border-radius: var(--r-sm);
  background: var(--accent-tint); color: var(--accent-text); font: 650 11.5px/1.2 var(--f-mono); text-align: center;
}
.side-foot { margin-top: auto; padding-top: 10px; border-top: var(--line-w) solid var(--line-2); }

.app-main { min-width: 0; display: flex; flex-direction: column; }
.bar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; gap: 12px; min-height: var(--bar-h);
  padding: 8px var(--gutter); border-bottom: var(--line-w) solid var(--line-2);
  background: var(--bar-bg, color-mix(in oklab, var(--bg) 88%, transparent));
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  view-transition-name: bar;
}
.bar-menu { display: none; }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; color: var(--text-2); }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumb-sep { color: var(--text-3); }
.crumb-here { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.period-jump { display: flex; gap: 4px; }
.page {
  width: 100%; max-width: var(--page-max); margin: 0 auto;
  padding: 26px var(--gutter) 72px;
  view-transition-name: page;
}
.scrim { display: none; }

@media (max-width: 1023px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: fixed; inset: 0 auto 0 0; z-index: var(--z-side); width: min(300px, 86vw);
    transform: translateX(-102%); visibility: hidden; box-shadow: var(--shadow-pop);
    transition: transform var(--t-slow) var(--ease), visibility 0s linear var(--t-slow);
  }
  .app.nav-open .side { transform: none; visibility: visible; transition: transform var(--t-slow) var(--ease); }
  .side-close {
    display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: var(--r-sm);
    background: transparent; color: var(--text-2); cursor: pointer;
  }
  .side-close:hover { background: var(--surface-2); color: var(--text); }
  .scrim { display: block; position: fixed; inset: 0; z-index: var(--z-scrim); background: rgb(8 10 20 / .42); opacity: 0; transition: opacity var(--t) var(--ease); }
  .scrim[hidden] { display: none; }
  .app.nav-open ~ .scrim { opacity: 1; }
  .bar-menu {
    display: grid; place-items: center; width: 38px; height: 38px; margin-left: -6px; border: 0; border-radius: var(--r-sm);
    background: transparent; color: var(--text); cursor: pointer;
  }
  .bar-menu:hover { background: var(--surface-2); }
}
@media (max-width: 640px) {
  .crumb-store, .crumb-sep { display: none; }
  .bar { gap: 8px; }
  .bar-share span, .period-jump span { display: none; }
  .picker select { max-width: 170px; }
  .page { padding-top: 18px; }
}

/* ---------- public shell ---------- */

.bl-top {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: var(--bar-bg, color-mix(in oklab, var(--bg) 86%, transparent));
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: var(--line-w) solid var(--line-2);
  view-transition-name: bar;
}
.bl-top-in {
  max-width: 1240px; margin: 0 auto; min-height: 64px; padding: 10px var(--gutter);
  display: flex; align-items: center; gap: 28px;
}
.bl-links { display: flex; align-items: center; gap: 22px; font-size: 14.5px; }
.bl-links a { color: var(--text-2); text-decoration: none; font-weight: 500; }
.bl-links a:hover, .bl-links a[aria-current] { color: var(--text); }
.bl-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.bl-main { max-width: 1240px; margin: 0 auto; padding: 36px var(--gutter) 80px; view-transition-name: page; }
.bl-main.wide { max-width: 1320px; }
.bl-foot { border-top: var(--line-w) solid var(--line-2); color: var(--text-3); font-size: 13px; }
.bl-foot-in { max-width: 1240px; margin: 0 auto; padding: 22px var(--gutter) 32px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 860px) {
  .bl-anchors { display: none; }
  .bl-top-in { gap: 14px; }
  .bl-right { gap: 12px; }
}
@media (max-width: 480px) {
  .bl-cta { display: none; }
}

/* ---------- share-link shell ---------- */

.snap-top { border-bottom: var(--line-w) solid var(--line-2); background: var(--bar-bg, color-mix(in oklab, var(--bg) 88%, transparent)); }
.snap-top-in { max-width: var(--page-max); margin: 0 auto; padding: 12px var(--gutter); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.snap-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.snap-chip { margin-left: 2px; }
.snap-top .bar-actions { margin-left: auto; }
.snapshot-footer { text-align: center; color: var(--text-3); font-size: 13px; padding: 24px var(--gutter) 40px; border-top: var(--line-w) solid var(--line-2); }

/* ---------- page + section heads ---------- */

.page-head { margin: 4px 0 24px; }
.page-kicker { margin: 0 0 8px; color: var(--text-2); font-size: 14px; }
.page-title {
  font-family: var(--f-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch);
  text-transform: var(--display-case); letter-spacing: var(--display-tracking);
  font-size: clamp(1.55rem, 1.1rem + 1.5vw, 2.15rem); line-height: 1.14; max-width: 32ch;
}
.page-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin: 36px 0 14px; }
.section-head h2 {
  font-family: var(--f-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch);
  text-transform: var(--display-case); letter-spacing: var(--display-tracking); font-size: 1.3rem;
}
.section-head p { flex-basis: 100%; margin: 0; color: var(--text-2); max-width: 68ch; }
.more { font-size: 14px; }
.sub-h { margin: 22px 0 10px; font-size: 15px; font-weight: 650; }

/* ---------- panels + cards ---------- */

.panel, .card {
  background: var(--panel-bg); border: var(--line-w) solid var(--panel-line);
  border-radius: var(--panel-r); box-shadow: var(--panel-shadow);
  padding: 20px 22px; min-width: 0; position: relative;
}
.panel + .panel, .panel + .card, .card.full + .card.full, .page > .card.full + .panel { margin-top: 20px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; margin: 0 0 14px; }
.panel-head h2, .panel-head h3 {
  font-size: 15px; font-weight: var(--h2-weight); text-transform: var(--h2-case); letter-spacing: var(--h2-tracking);
}
.rule { border-top: var(--line-w) solid var(--line-2); margin: 16px 0; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; }
.card.full { margin-bottom: 18px; }
.card-kicker {
  display: flex; align-items: center; gap: 8px; margin: 0 0 14px;
  font-size: 14.5px; font-weight: var(--h2-weight); text-transform: var(--h2-case); letter-spacing: var(--h2-tracking); color: var(--text);
}
.card-kicker small { font-weight: 450; color: var(--text-3); text-transform: none; letter-spacing: 0; }
.card-kicker.k-green::before, .card-kicker.k-purple::before, .card-kicker.k-teal::before, .card-kicker.k-amber::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--text-3)); flex: none;
}
.card-kicker.k-green { --dot: var(--chart-net); }
.card-kicker.k-purple { --dot: var(--chart-sales); }
.card-kicker.k-amber { --dot: var(--chart-margin); }
.card-kicker.k-teal { --dot: var(--chart-labor); }
.card-source { margin: 14px 0 0; padding-top: 10px; border-top: var(--line-w) solid var(--line-2); font-size: 12px; color: var(--text-3); }

.big-money { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; color: var(--text); }
.big-money.neg { color: var(--bad); }
.big-money.num-up { color: var(--good); }
.big-money.num-down { color: var(--bad); }
.big-label { color: var(--text-2); font-size: 13px; margin: 5px 0 14px; line-height: 1.4; }
.stat-rows { margin: 0; }
.stat-rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-top: var(--line-w) solid var(--line-2); }
.stat-rows > div:first-child { border-top: 0; padding-top: 2px; }
.stat-rows dt { color: var(--text-2); font-size: 13.5px; margin: 0; }
.stat-rows dd { margin: 0; font-weight: 550; text-align: right; font-size: 14px; }
.stat-rows dd:has(.delta.up) { color: var(--good); }
.stat-rows dd:has(.delta.down) { color: var(--bad); }
.empty {
  color: var(--text-2); font-size: 14px; padding: 18px 14px; text-align: center;
  border: var(--line-w) dashed var(--line); border-radius: var(--r);
}
.headcount { display: flex; gap: 28px; margin-bottom: 14px; }
.headcount > div { display: flex; flex-direction: column; }
.hc-num { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.hc-num.plus { color: var(--good); }
.hc-num.minus { color: var(--bad); }
.hc-label { font-size: 12.5px; color: var(--text-2); }

/* ---------- the overview: the close + the figures ---------- */

.overview { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.overview.is-snapshot { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
@media (max-width: 1080px) { .overview { grid-template-columns: minmax(0, 1fr); } }

.close-card { padding-bottom: 18px; }
.ticket-head h2 { display: flex; align-items: baseline; gap: 10px; }
.ticket-no { display: none; }
.ticket-check::before { content: " · "; }
.ticket-dates { white-space: nowrap; }
.tag-bonus { margin-left: auto; }
.ticket-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.ticket-sum { color: var(--text-2); font-size: 13.5px; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.stamp, .rail, .hero-sign, .hero-tube { display: none; }

/* the four steps: a track of four segments by default */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.step { min-width: 0; --f: 0; --c: var(--accent); }
.step.is-done { --f: 1; --c: var(--good); }
.step.is-need { --f: .5; --c: var(--accent); }
.step-link {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "bar bar" "mark name" "status status";
  gap: 7px 7px; align-items: center; color: var(--text); text-decoration: none; border-radius: var(--r-sm);
}
a.step-link:hover .step-name { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in oklab, currentColor 40%, transparent); }
.step-bar { grid-area: bar; position: relative; display: block; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.step-bar i { position: absolute; inset: 0; background: var(--c); transform-origin: left; transform: scaleX(var(--f)); border-radius: inherit; transition: transform var(--t-slow) var(--ease), background var(--t) var(--ease); }
.step-mark { grid-area: mark; width: 16px; height: 16px; }
.step-name { grid-area: name; font-size: 13.5px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-status { grid-area: status; font-size: 12.5px; color: var(--text-2); line-height: 1.35; }
.step.is-need .step-status { color: var(--text); }
.step .ic circle { transition: stroke var(--t) var(--ease), fill var(--t) var(--ease); }
.step .ic-ok path { transition: stroke-dashoffset 380ms var(--ease) 100ms; }
.step.is-need .ic-ok path { stroke-dashoffset: 12; }
.step.is-need .ic-ok circle { stroke: var(--accent); }
.step.is-wait .step-name { color: var(--text-2); }

.needs-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 4px; font-size: 14.5px; font-weight: 650; }
.needs { list-style: none; margin: 0; padding: 0; }
.need {
  display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 12px; align-items: start;
  padding: 12px 0; border-top: var(--line-w) solid var(--line-2);
}
.need:first-child { border-top: 0; }
.need-mark { margin-top: 1px; }
.need-title { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.need-detail { display: block; color: var(--text-2); font-size: 13px; margin-top: 3px; line-height: 1.45; }
.need-go { align-self: center; }
.all-clear { display: flex; align-items: center; gap: 10px; margin: 8px 0 0; color: var(--text-2); }

.figures-card .panel-head { margin-bottom: 8px; }
.figs { margin: 0; }
.fig {
  display: grid; grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) 88px; gap: 14px; align-items: center;
  padding: 11px 0; border-top: var(--line-w) solid var(--line-2);
}
.fig:first-child { border-top: 0; }
.fig dt { font-size: 14px; color: var(--text-2); }
.fig dd { margin: 0; text-align: right; display: grid; justify-items: end; gap: 2px; }
.fig-v { font-size: 17px; font-weight: 550; letter-spacing: -0.01em; line-height: 1.15; color: var(--text); }
.fig-d, .fig-sub { font-size: 12px; color: var(--text-3); line-height: 1.3; }
.fig-d.up { color: var(--good); }
.fig-d.down { color: var(--bad); }
.spark { width: 88px; height: 28px; overflow: visible; }
.spark polyline { fill: none; stroke: var(--chart-spark, var(--accent)); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--chart-spark, var(--accent)); }
.spark .spark-area { stroke: none; fill: var(--chart-spark, var(--accent)); opacity: .08; }
.receipt-foot { display: flex; justify-content: space-between; align-items: baseline; margin: 0; font-size: 13.5px; color: var(--text-2); }
.receipt-foot b { font-family: var(--f-mono); color: var(--text); font-weight: 600; }
@media (max-width: 520px) {
  .fig { grid-template-columns: minmax(max-content, 1fr) minmax(0, auto); }
  .spark { display: none; }
}

.odo { display: inline-flex; height: 1em; line-height: 1; overflow: hidden; vertical-align: -0.1em; }
.odo-col { display: inline-block; height: 1em; overflow: hidden; }
.odo-strip { display: flex; flex-direction: column; }
.odo-strip span { display: block; height: 1em; line-height: 1; }

/* ---------- setup checklist (new stores) ---------- */

.setup { margin-bottom: 20px; }
.setup-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.setup-item { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: var(--line-w) solid var(--line-2); }
.setup-item:first-child { border-top: 0; }
.setup-item b { display: block; font-size: 14.5px; font-weight: 600; }
.setup-item span { display: block; font-size: 13px; color: var(--text-2); }
.setup-item.is-done b { color: var(--text-2); font-weight: 500; }

/* ---------- recent pay periods ---------- */

.periods { position: relative; }
.period-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.period-link {
  display: grid; gap: 2px; padding: 12px 14px; height: 100%;
  border: var(--line-w) solid var(--panel-line); border-radius: var(--r);
  background: var(--panel-bg); color: var(--text); text-decoration: none; box-shadow: var(--shadow-1);
  transition: border-color var(--t-fast) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.period-link:hover { border-color: var(--text-3); color: var(--text); }
.period-no { font-family: var(--f-mono); font-size: 15px; font-weight: 650; }
.period-dates { font-size: 12.5px; color: var(--text-2); }
.period-state { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--text-2); }
.period-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: none; }
.is-closed .period-state::before, .is-open .period-state::before { background: var(--good); }
.is-missing .period-state::before { background: var(--warn); }
.is-current .period-state::before { background: var(--accent); }
.period-item.is-current .period-link { border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-line), var(--shadow-1); }
@media (max-width: 1080px) {
  .period-list { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
  .period-item { scroll-snap-align: start; }
}

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

.chart-card { margin-top: 20px; }
#trend-chart { min-height: 120px; }
#trend-chart svg, .yoy-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.trend-head { margin: 0 0 2px; font-size: 15px; color: var(--text); }
.trend-head strong { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.trend-sub { margin: 0 0 8px; font-size: 13px; color: var(--text-2); }
.trend-note { margin: 12px 0 0; font-size: 13px; color: var(--text-3); }
.trend-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 12px; }
@media (min-width: 900px) { .trend-grid { grid-template-columns: 1fr 1fr; } }
.trend-panel {
  border: var(--line-w) solid var(--line-2); border-radius: var(--r); padding: 12px 14px 8px; background: var(--surface);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
}
.trend-panel[role="button"] { cursor: pointer; }
.trend-panel[role="button"]:hover { border-color: var(--text-3); }
.trend-panel.is-hero { order: -1; grid-column: 1 / -1; }
.trend-panel:not(.is-hero) .trend-sub { display: none; }
.trend-panel:not(.is-hero) .bar-val { display: none; }
.tp-title { margin: 0 0 2px; font-size: 13.5px; font-weight: 650; color: var(--text); }
.yoy-scorecard { margin: 0 0 16px; }
.yoy-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.yoy-tile { border: var(--line-w) solid var(--line-2); border-radius: var(--r); padding: 12px 14px; background: var(--surface); }
.yoy-tile.up { border-color: var(--good-line); background: var(--good-tint); }
.yoy-tile.down { border-color: var(--bad-line); background: var(--bad-tint); }
.yoy-big { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; color: var(--text); }
.yoy-tile.up .yoy-big, .yoy-big .up { color: var(--good); }
.yoy-tile.down .yoy-big, .yoy-big .down { color: var(--bad); }
.yoy-label { margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--text); }
.yoy-sub { margin-top: 2px; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.yoy-notes { margin: 12px 0 0; padding: 12px 14px 12px 30px; border: var(--line-w) solid var(--line-2); border-radius: var(--r); background: var(--surface); font-size: 14px; line-height: 1.55; }
.yoy-notes li { margin: 2px 0; }
.yoy-head { margin: 0 0 12px; }
.yoy-window { font-weight: 450; }
/* Chart marks. app.js draws one SVG with every part a style might use; each
   style's sheet shows and paints the parts it wants. */
.c-grid { stroke: var(--chart-grid); stroke-width: 1; stroke-dasharray: 2 4; }
.c-zero { stroke: var(--chart-zero); stroke-width: 1.5; }
.c-axis { fill: var(--chart-axis); font: 500 10px var(--f-mono); }
.c-x { fill: var(--chart-x); font: 600 10.5px var(--f-mono); }
.c-x.now { fill: var(--text); font-weight: 700; }
.c-mon { fill: var(--chart-axis); font: 500 10px var(--f-sans); }
.c-gap { fill: none; stroke: var(--chart-grid); stroke-width: 1.5; stroke-dasharray: 3 4; }
.c-gap-t { fill: var(--chart-axis); font: 500 10px var(--f-mono); }
.c-val { fill: var(--chart-val); font: 650 11px var(--f-mono); }
.c-val.up { fill: var(--chart-up-ink); }
.c-val.dn { fill: var(--chart-down-ink); }
.c-prior { stroke: var(--chart-prior); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 4 3; }
.c-line { fill: none; stroke: var(--s); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.s-sales { --s: var(--chart-sales); }
.s-net { --s: var(--chart-net); }
.s-margin { --s: var(--chart-margin); }
.s-labor { --s: var(--chart-labor); }
.s-up { --s: var(--chart-up); }
.s-down { --s: var(--chart-down); }
.b-body { fill: var(--s); rx: var(--bar-r, 3px); }
.bar.now .b-body { fill: var(--s-now, var(--s)); }
.b-halo, .b-sh, .b-hi { display: none; }
/* bars grow from their baseline */
.bar { transform-box: fill-box; }
.bar.up { transform-origin: 50% 100%; }
.bar.dn { transform-origin: 50% 0; }

/* ---------- downloads + share links ---------- */

.records, .share { margin-top: 20px; }
.dl-line { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.dl-range { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 0; }
.dl-range label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.dl-range input[type="date"] { width: auto; }
.sharelink-list { margin: 8px 0 4px; }
.sharelink-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 0; border-bottom: var(--line-w) solid var(--line-2); }
.share-meta { min-width: 200px; flex: 1 1 200px; }
.share-meta small { display: block; color: var(--text-2); }
.share-url { display: flex; gap: 8px; flex: 2 1 320px; }
.share-url input { font-size: 13px; font-family: var(--f-mono); color: var(--text-2); }
.copy-btn.copied { color: var(--good); }
.mint-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding-top: 16px; }
.mint-form input[type="text"] { flex: 1 1 220px; max-width: 360px; }
.check-label { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 14px; min-height: 40px; cursor: pointer; }
.revoke-form { margin: 0; }
@media (max-width: 768px) {
  .sharelink-row { align-items: stretch; flex-direction: column; gap: 10px; }
}

/* ---------- the close wizard ---------- */

.wiz-head { margin: 0 0 22px; }
.wiz-head .page-kicker { margin-bottom: 14px; }
.wiz-count { color: var(--text-3); }
.gw-progress .steps-h { gap: 6px; }
.steps-h .step-link { padding: 4px 2px 6px; }
.steps-h .step.is-current .step-name { color: var(--accent-text); }
.steps-h .step.is-current .step-bar { box-shadow: 0 0 0 2px var(--accent-tint-strong); }
.steps-h .step.is-current .step-link { position: relative; }
.gw-seg-n { font-family: var(--f-mono); color: var(--text-3); margin-right: 2px; }
.gw-body { min-width: 0; max-width: 900px; }
.gw-body > .card, .gw-body > form.card, .gw-body > details.card, .gw-body > section { margin-bottom: 18px; }
.gw-stepcount { margin: 0 0 6px; font-size: 13.5px; font-weight: 600; color: var(--accent-text); }
.gw-body h1 {
  font-family: var(--f-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch);
  text-transform: var(--display-case); letter-spacing: var(--display-tracking);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 1.95rem); margin: 0 0 12px;
}
.gw-intro { margin: 0 0 22px; max-width: 72ch; }
.gw-what { font-size: 16.5px; line-height: 1.55; color: var(--text); margin: 0 0 12px; }
.gw-whynext { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; }
.gw-whynext div { padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); }
.gw-whynext dt { font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.gw-whynext dd { margin: 2px 0 0; font-size: 13.5px; color: var(--text); }
@media (max-width: 640px) { .gw-whynext { grid-template-columns: 1fr; } }
.gw-primary { border-color: var(--accent-line); }
.gw-help { margin: 0 0 18px; }
.gw-help summary { color: var(--text-2); font-size: 14px; list-style: none; display: flex; align-items: center; gap: 8px; min-height: 40px; }
.gw-help summary::-webkit-details-marker { display: none; }
.gw-help-q { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: var(--line-w) solid var(--line); color: var(--accent-text); font-size: 12px; font-weight: 700; flex: none; }
.gw-help[open] summary { color: var(--text); }
.gw-help-body { margin: 6px 0 0 28px; padding: 12px 16px; background: var(--surface); border: var(--line-w) solid var(--line-2); border-radius: var(--r); font-size: 14px; color: var(--text-2); }
.gw-help-body p { margin: 0 0 8px; }
.gw-help-body strong { color: var(--text); }
.gw-footnav { display: flex; align-items: center; gap: 14px; margin-top: 28px; padding-top: 18px; border-top: var(--line-w) solid var(--line-2); }
.gw-footstate { flex: 1; text-align: center; min-width: 0; }
.gw-done-chip { display: inline-flex; align-items: center; gap: 8px; color: var(--good); font-weight: 600; font-size: 14px; }
.gw-done-chip .ic { width: 18px; height: 18px; }
.gw-todo-chip { color: var(--text-3); font-size: 13px; }
.gw-next.nudge { box-shadow: 0 0 0 3px var(--accent-tint-strong), var(--btn-primary-shadow); }
@media (max-width: 768px) {
  .steps-h .step-status { display: none; }
  .steps-h .gw-seg-name { font-size: 12.5px; }
  .gw-footnav { flex-wrap: wrap; }
  .gw-footstate { order: -1; flex-basis: 100%; text-align: left; }
}
@media (max-width: 440px) {
  .steps-h .gw-seg-name { display: none; }
  .steps-h .step-link { grid-template-areas: "bar bar" "mark name"; }
}

/* ---------- wizard step content ---------- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table, .mini-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .mini-table th {
  text-align: left; font-size: 12.5px; font-weight: 600; color: var(--text-2);
  padding: 8px 10px; border-bottom: var(--line-w) solid var(--line); white-space: nowrap;
}
.data-table td, .mini-table td { padding: 9px 10px; border-bottom: var(--line-w) solid var(--line-2); vertical-align: middle; }
.data-table.plain td { vertical-align: top; }
.data-table tbody tr:hover td { background: var(--row-hover, color-mix(in oklab, var(--surface-2) 60%, transparent)); }
.mini-table tfoot td { border-bottom: 0; border-top: var(--line-w) solid var(--line); font-weight: 650; }
td.clip { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
tr.row-warn td { background: var(--warn-tint); }
tr.row-done td { opacity: .55; }
tr.row-done td .chip, tr.row-done td select { opacity: 1; }
tr.is-new td { background: var(--accent-tint); }
.qbo-vendor { display: block; color: var(--text-3); font-size: 12px; }
.counter-line { font-weight: 600; color: var(--warn); }
.counter-line.ok, .counter-line.ok #bank-remaining { color: var(--good); }
.pnl-table .pnl-label { white-space: pre-wrap; }
.pnl-table tr.pnl-total td { font-weight: 650; border-top: var(--line-w) solid var(--line); }
@media (max-width: 768px) {
  .table-scroll .data-table { min-width: 600px; }
  .table-scroll .mini-table { min-width: 340px; }
  .table-scroll .data-table.plain, .table-scroll .data-table.bills-table { min-width: 0; }
  .data-table td, .mini-table td { padding: 8px; }
  .data-table { font-size: 13.5px; }
}
.filter-input { max-width: 320px; margin-bottom: 10px; }

.dl-list { list-style: none; margin: 0; padding: 0; }
.dl-list li { padding: 10px 4px; border-top: var(--line-w) solid var(--line-2); display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.dl-list li:first-child { border-top: 0; }

.upload-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin-bottom: 18px; }
.upload-grid.one { grid-template-columns: minmax(250px, 520px); }
.upload-card { display: grid; gap: 10px; align-content: start; }
.upload-card h3 { margin: 0; font-size: 15px; font-weight: 650; }
.upload-card .hint { margin: 0; }
.upload-msg { margin-top: 4px; font-size: 13.5px; border-radius: var(--r-sm); padding: 10px 12px; word-break: break-word; }
.upload-msg.ok { background: var(--good-tint); color: var(--good); }
.upload-msg.warn { background: var(--warn-tint); color: var(--warn); }
.upload-msg.err { background: var(--bad-tint); color: var(--bad); }

.field-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 240px)); gap: 12px 16px; align-items: end; margin: 12px 0 16px; }
.field-form label, .ps-form label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.field-form input, .ps-form input { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.ps-form fieldset { border: var(--line-w) solid var(--line); border-radius: var(--r); margin: 0 0 16px; padding: 12px 14px; }
.ps-form legend { font-size: 13.5px; font-weight: 650; padding: 0 6px; color: var(--text); }
.ps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 18px; }
.balance-strip { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 18px; padding: 12px 16px; background: var(--surface); border: var(--line-w) solid var(--line); border-radius: var(--r); }
.balance-strip .totals { color: var(--text-2); font-size: 13px; font-family: var(--f-mono); }

.tieout { border-radius: var(--r); padding: 12px 16px; margin-bottom: 18px; font-weight: 600; font-variant-numeric: tabular-nums; border: var(--line-w) solid transparent; }
.tieout.ok { background: var(--good-tint); color: var(--good); border-color: var(--good-line); }
.tieout.warn { background: var(--warn-tint); color: var(--warn); border-color: var(--warn-line); }
.tieout-note { margin: -8px 0 18px; max-width: 78ch; }

.verify-ok { color: var(--good); }
.verify-bad { color: var(--warn); }
.verify-todo { color: var(--warn); }
.verify-ok, .verify-bad, .verify-todo { max-width: 78ch; }
.doc-asks { margin: 6px 0 12px; padding-left: 20px; }
.doc-asks li { margin-bottom: 4px; }
.doc-path { color: var(--text); font-size: 14px; }
.doc-why { color: var(--text-2); font-size: 13.5px; max-width: 74ch; }
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.doc-list > li { display: flex; align-items: flex-start; gap: 10px; }
.doc-list li .chip { flex: none; margin-top: 2px; }
.doc-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.doc-name small { margin-left: 4px; color: var(--text-3); }
.doc-list .doc-missing .doc-name { color: var(--warn); }
.doc-list .dl-note small { color: var(--text-2); }
.doc-shot { display: block; margin: 6px 0 2px; width: max-content; max-width: 100%; border: var(--line-w) solid var(--line); border-radius: var(--r-sm); overflow: hidden; line-height: 0; background: var(--surface-2); }
.doc-shot:hover { border-color: var(--accent); }
.doc-shot img { display: block; width: auto; max-width: 100%; max-height: 190px; }
@media (max-width: 640px) { .doc-shot img { max-height: 150px; } }

.dropzone {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  border: 1.5px dashed var(--drop-line, var(--line)); border-radius: var(--panel-r); padding: 18px;
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease), transform var(--t) var(--ease);
}
.dropzone.drag-over { border-color: var(--accent); background: var(--accent-tint); transform: scale(1.005); }
.dropzone h3 { flex-basis: 100%; margin: 0; font-size: 16px; font-weight: 650; }
.dropzone .hint { flex-basis: 100%; margin: 0; }
.dropzone .doc-asks, .dropzone .doc-shot { flex-basis: 100%; }
.dropzone input[type="file"] { flex: 1 1 260px; min-width: 0; }
.import-results { flex-basis: 100%; display: grid; gap: 6px; }
.import-row { padding: 8px 10px; border-radius: var(--r-sm); font-size: 14px; }
.import-row.ok { background: var(--good-tint); color: var(--good); }
.import-row.bad { background: var(--bad-tint); color: var(--bad); }
.import-row.warn { background: var(--warn-tint); color: var(--warn); }
.import-row small { display: block; color: var(--warn); }

.overview-list { display: grid; gap: 8px; margin-bottom: 4px; }
.overview-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); border: var(--line-w) solid var(--line-2); }
.overview-row.ov-missing { border-color: var(--warn-line); }
.overview-row.ov-current { border-color: var(--accent-line); background: var(--accent-tint); }
.ov-period { font-weight: 600; }
.ov-dates { color: var(--text-2); font-size: 13.5px; }
.ov-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ov-dl { margin-left: auto; text-decoration: none; color: var(--text-2); border: var(--line-w) solid var(--line); border-radius: var(--r-sm); padding: 2px 9px; font-size: 14px; line-height: 1.5; }
.ov-dl:hover { color: var(--accent-text); border-color: var(--accent); background: var(--accent-tint); }

.doc-details > summary.doc-summary { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; list-style: none; }
.doc-summary::-webkit-details-marker { display: none; }
.doc-title { font-size: 14.5px; font-weight: var(--h2-weight); text-transform: var(--h2-case); letter-spacing: var(--h2-tracking); }
.doc-details > summary.doc-summary::after { content: "›"; color: var(--text-3); margin-left: auto; transition: transform var(--t) var(--ease); font-size: 18px; line-height: 1; }
.doc-details[open] > summary.doc-summary::after { transform: rotate(90deg); }
.doc-details[open] > summary.doc-summary { margin-bottom: 14px; }
details.fallback-uploads > summary, .bills-detail > summary, .day-tieout-detail > summary, .more-list > summary { color: var(--text-2); font-size: 14px; padding: 8px 0; }
details.fallback-uploads > summary:hover, .bills-detail > summary:hover, .day-tieout-detail > summary:hover, .more-list > summary:hover { color: var(--text); }
details.fallback-uploads[open] > summary, .bills-detail[open] > summary, .more-list[open] > summary { margin-bottom: 10px; }
details.card.fallback-uploads > summary { padding: 0; }

.ps-review { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.ps-review-group h4 { margin: 0 0 8px; color: var(--text-2); font-size: 13px; font-weight: 650; }
.ps-review-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: var(--line-w) solid var(--line-2); font-size: 14px; }
.ps-review-row span { color: var(--text-2); }
.ps-review-row strong { color: var(--text); font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-weight: 550; }
.headline-figs { margin: 0 0 12px; }

.bill-entry { border-color: var(--warn-line); }
.bill-entry.be-done { border-color: var(--good-line); }
.be-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.be-head .card-kicker { margin: 0; }
.be-count { color: var(--warn); font-weight: 600; font-size: 13.5px; }
.be-count.ok { color: var(--good); }
.be-download { margin: 0; }
.be-steps { margin: 14px 0 0; padding-left: 22px; max-width: 68ch; }
.be-steps li { margin-bottom: 5px; font-size: 14.5px; }
.be-hint { color: var(--text-2); font-size: 13.5px; margin: 12px 0 0; max-width: 68ch; }
.be-undo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bills-table .qbo-vendor { font-size: 11.5px; }
.bills-table .col-acct { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bills-table .col-status { white-space: nowrap; }
@media (max-width: 640px) { .bills-table .col-date, .bills-table .col-acct { display: none; } }

.vendor-map { border-color: var(--warn-line); }
.vmap-list { display: grid; gap: 10px; margin-top: 14px; }
.vmap-row {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr) auto;
  gap: 10px 12px; align-items: end; padding: 12px; border: var(--line-w) solid var(--line-2); border-radius: var(--r); background: var(--surface);
}
.vmap-src { display: flex; flex-direction: column; gap: 4px; min-width: 0; align-self: center; }
.vmap-src strong { overflow-wrap: anywhere; }
.vmap-src .chip { align-self: flex-start; white-space: normal; }
.vmap-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vmap-field span { font-size: 12.5px; color: var(--text-2); }
@media (max-width: 768px) { .vmap-row { grid-template-columns: 1fr; } }
.emp-jev { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: 6px; }
.emp-jev .chip { white-space: normal; }
.emp-linked { display: inline-flex; align-items: center; gap: 6px; margin: 4px 10px 0 0; }

/* ---------- settings ---------- */

.settings { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--bar-h) + 20px); display: grid; gap: 2px; }
.settings-nav a { padding: 7px 10px; border-radius: var(--r-sm); color: var(--text-2); text-decoration: none; font-size: 14px; }
.settings-nav a:hover { background: var(--surface-2); color: var(--text); }
.settings-body > .panel + .panel { margin-top: 18px; }
.settings-body .panel { scroll-margin-top: calc(var(--bar-h) + 16px); }
.settings-body .panel > .hint { margin-bottom: 14px; }
.accounts-table td:first-child { color: var(--text-2); width: 48%; }
.accounts-table input { min-height: 36px; padding: 6px 10px; }
.mgr-rows { display: grid; gap: 10px; }
.mgr-row { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; max-width: 520px; }
.mgr-row .field { font-size: 13px; }
.columns { columns: 3 200px; padding-left: 18px; font-size: 14px; margin: 0; }
.list-plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.rowform { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.rowform select, .rowform input[type="text"] { width: auto; min-height: 34px; padding: 5px 30px 5px 9px; font-size: 14px; }
.rowform input[type="text"] { padding-right: 9px; }
.newlink { background: var(--accent-tint); border: var(--line-w) solid var(--accent-line); border-radius: var(--r); padding: 14px 16px; margin: 0 0 20px; }
.newlink p { margin: 0 0 10px; }
.copyrow { display: flex; gap: 8px; }
.copyfield { flex: 1; font-family: var(--f-mono) !important; font-size: 13px !important; min-width: 0; }
@media (max-width: 900px) {
  .settings { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .settings-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .settings-nav a { border: var(--line-w) solid var(--line-2); }
}
@media (max-width: 640px) {
  .form-grid, fieldset.group { grid-template-columns: minmax(0, 1fr); }
  .copyrow { flex-direction: column; }
}

/* ---------- admin, stores, auth ---------- */

.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.subnav a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--r-pill); border: var(--line-w) solid var(--line); color: var(--text-2); text-decoration: none; font-size: 13.5px; font-weight: 550; background: var(--surface); }
.subnav a:hover { color: var(--text); border-color: var(--text-3); }
.is-admin .panel { margin-top: 20px; }
.is-admin .panel > h2 { font-size: 16px; font-weight: 650; margin: 0 0 14px; }
.msg { max-width: 34ch; }
.events { font-size: 14px; color: var(--text-2); }
.panel > h2 { font-size: 16px; font-weight: var(--h2-weight); text-transform: var(--h2-case); letter-spacing: var(--h2-tracking); margin: 0 0 14px; }
.panel > h3 { font-size: 15px; font-weight: 650; margin: 22px 0 10px; }

.store-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.store-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "no name" "no meta" "no role";
  gap: 1px 14px; align-items: center; padding: 16px 18px; height: 100%;
  border: var(--line-w) solid var(--panel-line); border-radius: var(--panel-r); background: var(--panel-bg); box-shadow: var(--panel-shadow);
  color: var(--text); text-decoration: none; transition: border-color var(--t-fast) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.store-card:hover { border-color: var(--text-3); color: var(--text); }
.store-card .store-no { grid-area: no; align-self: start; min-width: 44px; height: 44px; font-size: 13px; border-radius: var(--r); }
.store-card-name { grid-area: name; font-weight: 650; font-size: 16px; }
.store-card-meta { grid-area: meta; font-size: 13px; color: var(--text-2); }
.store-card-role { grid-area: role; margin-top: 4px; font-size: 12.5px; color: var(--text-3); }
.store-card .tag { grid-column: 2; justify-self: start; margin-top: 4px; }

.is-auth .bl-main { display: grid; place-items: start center; padding-top: clamp(32px, 9vh, 96px); }
.auth-card { width: min(420px, 100%); padding: 28px 28px 24px; }
.auth-card h1 {
  font-family: var(--f-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch);
  text-transform: var(--display-case); letter-spacing: var(--display-tracking); font-size: 1.6rem; margin: 0 0 16px;
}
.auth-card .form { margin: 4px 0 16px; }
.auth-card .form .btn { width: 100%; }

/* ---------- landing ---------- */

.is-landing .bl-main { padding-top: 0; }
.hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: clamp(28px, 5vw, 64px);
  align-items: center; min-height: min(720px, calc(100dvh - 64px)); padding: clamp(40px, 7vh, 88px) 0;
}
.hero-copy { position: relative; z-index: 1; }
.hero-for { margin: 0 0 16px; font-size: 14.5px; font-weight: 550; color: var(--text-2); }
.hero-title {
  font-family: var(--f-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch);
  text-transform: var(--display-case); letter-spacing: var(--display-tracking);
  font-size: clamp(2.35rem, 1.35rem + 3.6vw, 4rem); line-height: 1.03; max-width: 13ch; margin: 0;
}
.hero-title em { font-style: normal; color: var(--hero-em, inherit); }
.lede { font-size: clamp(16.5px, 1rem + .3vw, 18.5px); line-height: 1.6; color: var(--text-2); max-width: 46ch; margin: 22px 0 0; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 30px; }
.price-line { margin: 22px 0 0; color: var(--text-2); font-size: 14.5px; }
.price-line b { color: var(--text); font-family: var(--f-mono); font-weight: 650; }
.hero-demo { position: relative; margin: 0; }
.hero-demo figcaption { margin-top: 12px; font-size: 13px; color: var(--text-3); text-align: center; }
.demo-card { max-width: 520px; margin: 0 auto; padding: 22px 24px; box-shadow: var(--shadow-2); }
.demo-line {
  margin: 4px 0 18px; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; max-width: 26ch;
  font-family: var(--f-display); font-stretch: var(--display-stretch);
}
.demo-card .steps { margin-bottom: 4px; }
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 40px; }
  .hero-title { max-width: 16ch; }
}

.how, .checks, .pricing, .request { padding: clamp(32px, 6vh, 64px) 0 0; }
.how .section-head, .checks .section-head { margin-top: 0; }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: how; }
.how-step { padding: 20px; border: var(--line-w) solid var(--panel-line); border-radius: var(--panel-r); background: var(--panel-bg); box-shadow: var(--panel-shadow); }
.how-n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; margin-bottom: 14px; background: var(--accent-tint); color: var(--accent-text); font: 650 13px/1 var(--f-mono); }
.how-step h3 { font-size: 17px; font-weight: 650; margin: 0 0 8px; font-family: var(--f-display); font-stretch: var(--display-stretch); text-transform: var(--display-case); }
.how-step p { color: var(--text-2); font-size: 14.5px; line-height: 1.6; margin: 0; }
@media (max-width: 1060px) { .how-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .how-steps { grid-template-columns: minmax(0, 1fr); } }

.check-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 4px 28px; }
.check-list li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: var(--line-w) solid var(--line-2); }
.check-list b { display: block; font-size: 15.5px; font-weight: 650; }
.check-list span { display: block; color: var(--text-2); font-size: 14.5px; margin-top: 2px; }

.price-card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px 40px; align-items: start;
  padding: clamp(24px, 4vw, 40px); border: var(--line-w) solid var(--panel-line); border-radius: var(--panel-r);
  background: var(--panel-bg); box-shadow: var(--panel-shadow);
}
.price-card h2 {
  grid-column: 1; font-family: var(--f-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch);
  text-transform: var(--display-case); letter-spacing: var(--display-tracking); font-size: 1.3rem;
}
.price-big { grid-column: 1; margin: 6px 0 0; display: grid; gap: 2px; }
.price-big b { font-family: var(--f-mono); font-size: clamp(2.6rem, 2rem + 2vw, 3.6rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1; color: var(--text); }
.price-big span { color: var(--text-2); font-size: 15px; }
.price-card .list-check { grid-column: 2; grid-row: 1 / span 3; }
.price-card > .hint { grid-column: 1; margin-top: 12px; }
.list-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.list-check li { position: relative; padding-left: 28px; font-size: 15px; line-height: 1.5; }
.list-check li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--good-tint); box-shadow: inset 0 0 0 1.5px var(--good);
}
.list-check li::after {
  content: ""; position: absolute; left: 6px; top: calc(.2em + 4px); width: 5px; height: 8px;
  border: solid var(--good); border-width: 0 1.8px 1.8px 0; transform: rotate(45deg);
}
@media (max-width: 760px) {
  .price-card { grid-template-columns: minmax(0, 1fr); }
  .price-card .list-check, .price-card > .hint { grid-column: 1; grid-row: auto; }
}
.request { padding-bottom: 20px; }
.request-card { max-width: 760px; margin: 0 auto; }

.gate-msg { max-width: 560px; margin: 0 auto; padding: clamp(48px, 14vh, 140px) var(--gutter) 64px; }
.gate-msg h1 { font-family: var(--f-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-size: 1.9rem; margin: 0 0 12px; }
.gate-msg p { color: var(--text-2); font-size: 16px; }

/* ---------- toasts, loading, offline ---------- */

.toast-wrap { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: var(--z-toast); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: var(--pop-bg, var(--surface)); color: var(--text); border: var(--line-w) solid var(--line);
  border-radius: var(--r); padding: 10px 16px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-pop);
  animation: toast-in var(--t) var(--ease);
}
.toast.ok { color: var(--good); border-color: var(--good-line); }
.toast.err { color: var(--bad); border-color: var(--bad-line); }
.toast.warn { color: var(--warn); border-color: var(--warn-line); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: var(--r-sm); color: transparent !important; min-height: 1em; }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--line-2), transparent); animation: shimmer 1.1s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.morphing { opacity: .6; transition: opacity var(--t-fast) var(--ease); }
.offline-banner { position: sticky; top: calc(var(--bar-h) + 8px); z-index: var(--z-sticky); background: var(--bad-tint); border: var(--line-w) solid var(--bad-line); color: var(--bad); padding: 10px 16px; border-radius: var(--r); margin: 0 0 14px; font-weight: 600; display: flex; gap: 12px; align-items: center; }

/* ---------- motion ---------- */

/* page to page: the sidebar and bar hold still, the page cross-fades up */
@view-transition { navigation: auto; }
::view-transition-old(page) { animation: vt-out 160ms var(--ease-in) both; }
::view-transition-new(page) { animation: vt-in 320ms var(--ease) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }
/* switching style: backline.js wipes the new look in as a circle from the
   button that was pressed; the whole page moves as one picture */
html.style-switching::view-transition-old(root),
html.style-switching::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.style-switching::view-transition-old(side), html.style-switching::view-transition-new(side),
html.style-switching::view-transition-old(bar), html.style-switching::view-transition-new(bar),
html.style-switching::view-transition-old(page), html.style-switching::view-transition-new(page) { animation: none; }
html.style-switching .side, html.style-switching .bar, html.style-switching .page,
html.style-switching .bl-top, html.style-switching .bl-main { view-transition-name: none; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- print ---------- */

@media print {
  :root, html:root[data-style] {
    --bg: #fff; --bg-2: #fff; --surface: #fff; --surface-2: #fff; --panel-bg: #fff;
    --line: #999; --line-2: #ccc; --panel-line: #999; --text: #000; --text-2: #333; --text-3: #555;
    --panel-shadow: none; --shadow-1: none; --shadow-2: none;
  }
  body { font-size: 12px; line-height: 1.4; }
  *, *::before, *::after { box-shadow: none !important; text-shadow: none !important; filter: none !important; }
  .rail, .hero-tube, .stamp, .ticket::after { display: none !important; }
  .side, .bar, .topbar, .bl-top, .bl-foot, .snap-top .bar-actions, .page-cta, .btn, .btn-row, .dropzone,
  .gw-progress, .gw-footnav, .gw-help, .gw-intro, .fallback-uploads, .mint-form, .revoke-form, .share-url,
  #period-picker, input[type="file"], .upload-card, .records, .share, .periods, .toast-wrap, .skip-link { display: none !important; }
  .app { display: block; }
  .page { padding: 0; max-width: none; }
  .panel, .card { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }
  .table-scroll { overflow: visible; }
  .data-table, .mini-table { font-size: 11px; }
  details { display: block; }
  details > summary { display: none; }
  details > *:not(summary) { display: block !important; }
  a { color: #000; text-decoration: none; }
}
