/* FUNPOINT.ID — single source of visual values (theme tokens) + shared components.
   Theme "Graphite & Inferno", light edition: a fresh, bright product. Cool off-white canvas, white cards and chrome, soft grey wells, one Inferno red for action and live state, metallic silver for precision (hairlines, numerals, the
   wordmark). Status colours are separate and always come with a label or an icon.
   Fonts are bundled locally (CSP blocks CDNs): DM Sans for the interface, Instrument Sans Bold for titles and numbers
   (it has tabular figures), FP Pixel only inside the FP logo mark. */
@font-face { font-family: "DM Sans"; src: url("../fonts/dmsans-var.woff") format("woff"); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-700.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "FP Pixel"; src: url("../fonts/fp-pixel.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  /* canvas & layered surfaces: a cool off-white page, white cards, soft grey wells */
  --void: #f3f6fb; --charcoal: #ffffff; --graphite: #ffffff; --raised: #f4f6fa; --hover: #eaeef5; --sunken: #eef2f7;
  --ink-rgb: 15, 23, 42;
  --line: rgba(15, 23, 42, .09); --line-2: rgba(15, 23, 42, .06); --line-strong: rgba(15, 23, 42, .16);
  --field: #ffffff; --field-line: rgba(15, 23, 42, .22);
  --glass: rgba(255, 255, 255, .86); --glass-strong: rgba(255, 255, 255, .97);
  /* ink: slate, larger steps than before so small text stays readable on white */
  --ink: #0f172a; --ink-2: #334155; --muted: #52607a; --faint: #64748b;
  /* Inferno red: --red is a fill under white text, --red-ink is red text on white, --red-hot for live dots and focus */
  --red: #e11d35; --red-hover: #d91a31; --red-press: #bf1428; --red-ink: #c8102e; --red-hot: #e11d35;
  --red-tint: rgba(225, 29, 53, .1); --red-wash: rgba(225, 29, 53, .05); --red-line: rgba(225, 29, 53, .3);
  /* slate takes the place of silver; --metal is the dark gradient used for big numerals */
  --silver: #475569; --silver-hi: #0f172a; --silver-lo: #64748b; --silver-tint: rgba(71, 85, 105, .08); --silver-line: rgba(71, 85, 105, .22);
  --metal: linear-gradient(180deg, #0f172a 0%, #1e293b 55%, #334155 100%);
  /* one fresh accent (teal) for indicators; red stays reserved for action and live state */
  --fresh: #0d9488; --fresh-tint: rgba(13, 148, 136, .1); --fresh-line: rgba(13, 148, 136, .3);
  /* status: never colour alone */
  --success: #15803d; --success-bg: rgba(21, 128, 61, .1); --success-line: rgba(21, 128, 61, .28); --success-fill: #1a7f45;
  --warn: #a16207; --warn-bg: rgba(202, 138, 4, .12); --warn-line: rgba(202, 138, 4, .32);
  --danger: #c2391f; --danger-bg: rgba(212, 58, 36, .08); --danger-line: rgba(212, 58, 36, .3); --danger-fill: #d43a24;
  --info: var(--silver); --info-bg: var(--silver-tint); --info-line: var(--silver-line);
  --neutral: var(--muted); --neutral-bg: rgba(15, 23, 42, .05);
  --wa: #15803d;
  /* chart roles: one slate hue for magnitude, ink for the active mark, danger only for overdue */
  --viz-1: #7c8aa3; --viz-1-hi: #0f172a; --viz-muted: #cbd2de; --viz-tint: rgba(71, 85, 105, .12);
  --viz-grid: rgba(15, 23, 42, .07); --viz-axis: rgba(15, 23, 42, .2);
  --viz-critical: #c2391f; --viz-critical-fill: #d43a24; --viz-slate: #64748b; --viz-warn: #ca8a04; --viz-ok: #16a34a;
  /* shape, space, depth, motion */
  --radius-xs: 6px; --radius-sm: 8px; --radius: 10px; --radius-lg: 14px; --radius-xl: 20px; --pill: 999px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, .07), 0 1px 1px rgba(15, 23, 42, .04);
  --shadow-2: 0 10px 28px -8px rgba(15, 23, 42, .18), 0 0 0 1px rgba(15, 23, 42, .06);
  --shadow-3: 0 24px 60px -14px rgba(15, 23, 42, .28), 0 0 0 1px rgba(15, 23, 42, .08);
  --focus: 0 0 0 3px rgba(225, 29, 53, .28);
  --ease: cubic-bezier(.2, .8, .2, 1); --t1: 150ms; --t2: 180ms; --t3: 240ms; --t4: 320ms;
  --blur: blur(14px) saturate(140%);
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Instrument Sans", "DM Sans", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --pixel: "FP Pixel", var(--mono);
  --fs-xs: 13px; --fs-sm: 14px; --fs: 15px; --fs-md: 17px; --fs-lg: 19px; --fs-xl: 23px; --fs-2xl: 28px; --fs-3xl: 36px; --fs-4xl: 48px;
  --sidebar: 248px; --rail: 72px; --topbar: 56px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--void); scrollbar-color: var(--viz-muted) transparent; }
html, body { margin: 0; }
body { position: relative; isolation: isolate; font-family: var(--font); font-size: var(--fs); color: var(--ink); background: transparent; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
/* one quiet light source: a red aura top left, a silver sheen top right */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(880px 460px at 14% -14%, rgba(225, 29, 53, .06), transparent 62%),
              radial-gradient(720px 420px at 100% -8%, rgba(13, 148, 136, .08), transparent 60%), var(--void); }
a { color: var(--red-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
/* Text links get a 24px-tall hit area; vertical padding on an inline box leaves the line where it is. */
:where(a:not([class])) { padding-block: 4px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; color: var(--ink); }
h1 { font-family: var(--display); font-weight: 700; font-size: var(--fs-2xl); line-height: 1.15; letter-spacing: -.02em; }
h2 { font-size: var(--fs-md); font-weight: 600; letter-spacing: -.01em; }
h3 { font-size: var(--fs); font-weight: 600; }
p { margin: 0 0 var(--s2); }
code, .mono { font-family: var(--mono); font-size: .9em; }
kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; background: rgba(var(--ink-rgb), .04); color: var(--muted); font: 600 11px/1 var(--font); }
:focus-visible { outline: 2px solid var(--red-hot); outline-offset: 2px; }
::selection { background: rgba(225, 29, 53, .22); color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 12px; top: -64px; z-index: 200; padding: 10px 16px; border-radius: var(--radius); background: var(--red); color: #fff; font-weight: 600; text-decoration: none !important; box-shadow: var(--shadow-2); transition: top var(--t1); }
.skip-link:focus { top: 12px; outline: none; box-shadow: var(--focus), var(--shadow-2); }
main:focus { outline: none; }
.num, .tnum { font-variant-numeric: tabular-nums; }

/* ---------- icons: line icons; inside tiles and menus a translucent fill (".d") gives them a second, silver tone */
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.icon.sm { width: 16px; height: 16px; }
.icon.lg { width: 22px; height: 22px; }
.icon .d { display: none; }
.ico .icon .d, .nav .icon .d, .kpi .label .icon .d, .lp-badge .icon .d, .bottom-nav .icon .d, .agenda .ic .icon .d, .empty-ico .icon .d, .notif-ic .icon .d, .cmdk-ic .icon .d, .lp-kit-list .icon .d, .lp-req li > .icon .d, .icon.duo .d { display: inline; fill: currentColor; stroke: none; opacity: .16; }
/* icon tile: graphite key with a silver icon; ".red" for the one tile that leads (brand moments only) */
.ico { --ico: 40px; display: inline-grid; place-items: center; flex: none; width: var(--ico); height: var(--ico); border-radius: 11px; color: var(--silver); background: linear-gradient(180deg, var(--raised), var(--sunken)); border: 1px solid var(--line-strong); box-shadow: inset 0 1px 0 rgba(var(--ink-rgb), .06), 0 1px 2px rgba(0, 0, 0, .4); }
.ico .icon { width: 50%; height: 50%; }
.ico.red { color: #fff; background: linear-gradient(180deg, #ea2a41, var(--red-press)); border-color: rgba(255, 255, 255, .12); }
.ico.glass { color: var(--red-ink); }
.ico.sm { --ico: 30px; border-radius: 8px; }
.ico.lg { --ico: 52px; border-radius: 14px; }

/* ---------- live indicator: a red dot that breathes while data updates itself */
.live-dot { position: relative; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red-hot); flex: none; }
.live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--red-hot); opacity: 0; animation: live-ring 2.4s var(--ease) infinite; }
@keyframes live-ring { 0% { transform: scale(.5); opacity: .7; } 80%, 100% { transform: scale(1.5); opacity: 0; } }
.live { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 9px; border-radius: var(--pill); border: 1px solid var(--line); background: rgba(var(--ink-rgb), .02); color: var(--muted); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.live.is-stale .live-dot { background: var(--faint); }
.live.is-stale .live-dot::after { display: none; }

/* ---------- top loading bar (navigation and form posts) */
.progress { position: fixed; left: 0; top: 0; z-index: 300; height: 2px; width: 0; background: linear-gradient(90deg, var(--red), var(--red-hot)); opacity: 0; pointer-events: none; transition: width 2.4s cubic-bezier(.1, .7, .2, 1), opacity var(--t2); }
.progress.is-on { width: 82%; opacity: 1; }
.progress.is-done { width: 100%; opacity: 0; transition: width var(--t2), opacity var(--t3) var(--t2); }

/* ---------- shell */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns var(--t3) var(--ease); }
.sidebar { position: sticky; top: 0; height: 100vh; z-index: 40; display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3); background: var(--charcoal); border-right: 1px solid var(--line); overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; view-transition-name: sidebar; }
.side-head { display: flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 0 var(--s2) var(--s1); }
.logo { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none !important; }
.logo-mark { width: 34px; height: 34px; flex: none; display: grid; place-items: center; background: var(--red); color: #fff; font-family: var(--pixel); font-size: 18px; line-height: 1; text-shadow: 2px 2px 0 var(--red-press); box-shadow: 3px 3px 0 var(--ink); border-radius: 0; }
.logo-text { font-family: var(--pixel); font-weight: 400; font-size: 17px; letter-spacing: .04em; line-height: 1; white-space: nowrap; color: var(--ink); text-shadow: 2px 2px 0 rgba(var(--ink-rgb), .14); -webkit-font-smoothing: none; }
.logo-text b { font-weight: 400; color: var(--red); text-shadow: 2px 2px 0 var(--red-tint); }
.logo-text small { display: block; margin-top: 4px; font: 500 11.5px/1.2 var(--font); letter-spacing: 0; color: var(--muted); white-space: normal; }
.rail-toggle { margin-left: auto; color: var(--muted); }
.nav { display: grid; gap: 2px; }
.nav-group { margin: var(--s4) 0 var(--s1); padding: 0 10px; font-size: var(--fs-xs); font-weight: 600; color: var(--faint); white-space: nowrap; }
.nav-group:first-child { margin-top: var(--s1); }
.nav a { position: relative; display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--ink-2); font-weight: 500; text-decoration: none !important; white-space: nowrap; transition: background var(--t2) var(--ease), color var(--t2); }
.nav a .icon { color: var(--muted); transition: color var(--t2); }
.nav a:hover { background: rgba(var(--ink-rgb), .045); color: var(--ink); }
.nav a:hover .icon { color: var(--ink); }
.nav a.active { background: var(--raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.nav a.active .icon { color: var(--silver-hi); }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
.nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav .count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: var(--pill); background: rgba(var(--ink-rgb), .06); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.nav .count + .count { margin-left: 4px; }
.nav .count.hot { display: inline-flex; align-items: center; gap: 3px; background: var(--danger-bg); color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger-line); }
.nav .count.hot .icon { width: 12px; height: 12px; stroke-width: 2.4; }
.nav .count.warn { display: inline-flex; align-items: center; gap: 3px; background: var(--warn-bg); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); }
.nav .count.warn .icon { width: 12px; height: 12px; stroke-width: 2.4; }
.side-foot { margin-top: auto; padding-top: var(--s3); border-top: 1px solid var(--line); display: grid; gap: 6px; }
.side-note { display: flex; align-items: center; gap: 8px; padding: 6px 10px; color: var(--faint); font-size: var(--fs-xs); white-space: nowrap; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: var(--radius); border: 0; background: transparent; color: inherit; cursor: pointer; transition: background var(--t2), color var(--t2), transform var(--t1); }
.icon-btn:hover { background: rgba(var(--ink-rgb), .06); color: var(--ink); }
.icon-btn:active { transform: scale(.96); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar); display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s6); background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-bottom: 1px solid var(--line); view-transition-name: topbar; }
.topbar .spacer { flex: 1; }
.topbar-title { font-family: var(--display); font-weight: 700; font-size: var(--fs-md); letter-spacing: -.01em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-btn { display: none; color: var(--ink); }
/* search: a real GET form (works without script) that opens the command palette when script runs */
.search { position: relative; flex: 0 1 420px; min-width: 0; }
.search > .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search input[type=search] { height: 36px; min-height: 36px; padding-left: 38px; padding-right: 76px; background: rgba(var(--ink-rgb), .035); border-color: var(--line); cursor: text; }
.search input[type=search]:hover { border-color: var(--line-strong); background: rgba(var(--ink-rgb), .05); }
.search kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.search-btn { display: none; }
.bell .dot-count { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: var(--pill); background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px var(--void); font-variant-numeric: tabular-nums; }
.bell .dot-count:empty, .bell .dot-count[data-n="0"] { display: none; }
.avatar-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 2px 8px 2px 2px; border: 1px solid transparent; border-radius: var(--pill); background: transparent; color: var(--ink-2); font: 500 var(--fs-sm) var(--font); cursor: pointer; transition: background var(--t2), border-color var(--t2); }
.avatar-btn:hover, .avatar-btn[aria-expanded="true"] { background: rgba(var(--ink-rgb), .05); border-color: var(--line); }
.avatar-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.avatar-btn .chev { color: var(--faint); }
.content { padding: var(--s6) var(--s6) var(--s7); max-width: 1440px; width: 100%; animation: page-in var(--t3) var(--ease) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.page-head .sub { color: var(--ink-2); font-size: var(--fs-md); margin-top: 6px; max-width: 72ch; }
.page-head .actions { display: flex; gap: var(--s2); flex-wrap: wrap; }
.scrim { display: none; }
.bottom-nav { display: none; }
.next-pill { display: none; }

/* rail: the sidebar folds to icons (desktop toggle, remembered); between 961 and 1180 px it is always a rail */
.app.is-rail { grid-template-columns: var(--rail) minmax(0, 1fr); }
@media (min-width: 961px) and (max-width: 1180px) { .app { grid-template-columns: var(--rail) minmax(0, 1fr); } .rail-toggle { display: none; } }
@media (min-width: 961px) {
  .app.is-rail .sidebar { padding-inline: 10px; }
  .app.is-rail .logo-text, .app.is-rail .nav-label, .app.is-rail .nav-group, .app.is-rail .nav .count, .app.is-rail .side-note span { display: none; }
  .app.is-rail .side-head { flex-direction: column; padding-left: 0; }
  .app.is-rail .rail-toggle { margin: 0; }
  .app.is-rail .nav a { justify-content: center; padding: 9px 0; }
  .app.is-rail .nav a.active::before { left: -10px; }
  .app.is-rail .nav a:has(.count)::after { content: ""; position: absolute; top: 7px; right: 13px; width: 7px; height: 7px; border-radius: 50%; background: var(--silver); box-shadow: 0 0 0 2px var(--charcoal); }
  .app.is-rail .nav a:has(.count.hot)::after { background: var(--danger); }
  .app.is-rail .nav-sep { display: block; height: 1px; margin: var(--s2) 6px; background: var(--line); }
  .app.is-rail .side-note { justify-content: center; }
}
@media (min-width: 961px) and (max-width: 1180px) {
  .sidebar { padding-inline: 10px; }
  .logo-text, .nav-label, .nav-group, .nav .count, .side-note span { display: none; }
  .side-head { flex-direction: column; padding-left: 0; }
  .nav a { justify-content: center; padding: 9px 0; }
  .nav a.active::before { left: -10px; }
  .nav a:has(.count)::after { content: ""; position: absolute; top: 7px; right: 13px; width: 7px; height: 7px; border-radius: 50%; background: var(--silver); box-shadow: 0 0 0 2px var(--charcoal); }
  .nav a:has(.count.hot)::after { background: var(--danger); }
  .nav-sep { display: block; height: 1px; margin: var(--s2) 6px; background: var(--line); }
  .side-note { justify-content: center; }
}
.nav-sep { display: none; }
.rail-tip { position: fixed; z-index: 90; padding: 5px 9px; border-radius: var(--radius-sm); background: var(--raised); border: 1px solid var(--line-strong); box-shadow: var(--shadow-2); color: var(--ink); font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; pointer-events: none; transform: translateY(-50%); animation: tip-in var(--t1) var(--ease); }
@keyframes tip-in { from { opacity: 0; transform: translate(-4px, -50%); } to { opacity: 1; transform: translateY(-50%); } }

@media (max-width: 960px) {
  .app, .app.is-rail { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); height: 100%; transform: translateX(-102%); transition: transform var(--t4) var(--ease); box-shadow: var(--shadow-3); view-transition-name: none; }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(var(--ink-rgb), .5); animation: fade-in var(--t3) var(--ease); }
  .rail-toggle { display: none; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 0 var(--s3); gap: 6px; }
  .topbar .cta-label, .topbar .live-label, .search kbd, .avatar-btn .who-name, .avatar-btn .chev { display: none; }
  .topbar .btn-primary { display: none; }
  .avatar-btn { padding: 2px; }
  .search { display: none; }
  .search-btn { display: inline-grid; }
  .topbar .spacer { display: block; }
  .live { padding: 0; width: 28px; height: 28px; justify-content: center; border: 0; background: none; }
  .content { padding: var(--s5) var(--s4) calc(var(--s7) + 80px); }
  .bottom-nav { display: grid; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-top: 1px solid var(--line); view-transition-name: bottomnav; }
  .bottom-nav a, .bottom-nav button { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; min-width: 0; min-height: 50px; padding: 4px; border: 0; border-radius: var(--radius); background: none; color: var(--muted); font: 500 11.5px var(--font); text-decoration: none !important; cursor: pointer; transition: color var(--t2), background var(--t2); }
  .bottom-nav a:active, .bottom-nav button:active { background: rgba(var(--ink-rgb), .05); }
  .bottom-nav .active { color: var(--ink); }
  .bottom-nav .active .icon { color: var(--silver-hi); }
  .bottom-nav .active::after { content: ""; position: absolute; top: -7px; left: 32%; right: 32%; height: 2px; border-radius: 0 0 2px 2px; background: var(--red); }
  .bottom-nav .fab span:first-child { width: 42px; height: 42px; margin-top: -16px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(180deg, #ea2a41, var(--red-press)); color: #fff; box-shadow: 0 6px 18px -4px rgba(225, 29, 53, .55), inset 0 1px 0 rgba(255, 255, 255, .2); }
  .bottom-nav .badge-dot { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: var(--pill); background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; box-shadow: 0 0 0 2px var(--charcoal); }
  .next-pill { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 29; transform: translateX(-50%); }
}

/* ---------- primitives */
.card { background: var(--graphite); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; padding: 14px var(--s5); border-bottom: 1px solid var(--line-2); }
.card-h h2 { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-md); font-weight: 700; }
.card-h h2 .icon { color: var(--muted); }
.card-h .hint { color: var(--muted); font-size: var(--fs-sm); }
.card-b { padding: var(--s4) var(--s5); }
.card-f { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; padding: var(--s3) var(--s5); border-top: 1px solid var(--line-2); background: rgba(var(--ink-rgb), .03); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
/* a section without its own box: heading + content on the canvas, separated by space, not borders */
.section-h { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.section-h h2 { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -.015em; }
.section-h .hint { color: var(--muted); font-size: var(--fs-sm); }
.stack > * + * { margin-top: var(--s4); }
.stack-sm > * + * { margin-top: var(--s2); }
.row { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.row.spread { justify-content: space-between; }
.grid { display: grid; gap: var(--s4); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2.1fr) minmax(300px, 1fr); align-items: start; gap: var(--s5); }
.g-wide { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; gap: var(--s5); }
@media (max-width: 1100px) { .g-main, .g-wide { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .g-2, .g-3 { grid-template-columns: minmax(0, 1fr); } }
.mt { margin-top: var(--s4); }
.mb { margin-bottom: var(--s4); }
.mb-lg { margin-bottom: var(--s5); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.num { text-align: right; white-space: nowrap; }
.strong { font-weight: 600; }

/* ---------- buttons: graphite by default, Inferno for the one primary action; press scales a hair */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 36px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--raised); color: var(--ink); font: inherit; font-weight: 550; line-height: 1.2; cursor: pointer; text-decoration: none !important; white-space: nowrap; box-shadow: inset 0 1px 0 rgba(var(--ink-rgb), .04); transition: background var(--t2) var(--ease), border-color var(--t2), color var(--t2), box-shadow var(--t2), transform var(--t1) var(--ease); }
.btn:hover { background: var(--hover); border-color: rgba(var(--ink-rgb), .16); }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn .icon { color: currentColor; }
.btn-primary, .btn-accent { background: var(--red); border-color: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 1px 2px rgba(0, 0, 0, .4); }
.btn-primary:hover, .btn-accent:hover { background: var(--red-hover); border-color: rgba(255, 255, 255, .16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 4px 14px -4px rgba(225, 29, 53, .55); }
.btn-primary:active, .btn-accent:active { background: var(--red-press); }
.btn-success { background: var(--success-fill); border-color: rgba(255, 255, 255, .1); color: #fff; }
.btn-success:hover { background: #1e8c4d; }
.btn-danger { background: transparent; border-color: var(--danger-line); color: var(--danger); box-shadow: none; }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); }
.btn-danger-solid { background: var(--danger-fill); border-color: rgba(255, 255, 255, .12); color: #fff; }
.btn-danger-solid:hover { background: #c4351f; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); box-shadow: none; }
.btn-ghost:hover { background: rgba(var(--ink-rgb), .05); border-color: transparent; color: var(--ink); }
.btn-wa .icon { color: var(--wa); }
.btn-sm { min-height: 30px; padding: 0 10px; font-size: var(--fs-sm); border-radius: var(--radius-sm); }
.btn-lg { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn[disabled], .btn.disabled { opacity: .42; cursor: not-allowed; pointer-events: none; box-shadow: none; }
.btn.is-busy { color: transparent !important; pointer-events: none; }
.btn.is-busy::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- badges & inline alerts */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: var(--pill); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; border: 1px solid transparent; line-height: 1; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge.lg { height: 26px; padding: 0 11px; font-size: var(--fs-sm); }
.tone-success { background: var(--success-bg); color: var(--success); }
.tone-warn { background: var(--warn-bg); color: var(--warn); }
.tone-danger { background: var(--danger-bg); color: var(--danger); }
.tone-info { background: var(--info-bg); color: var(--info); }
.tone-neutral { background: var(--neutral-bg); color: var(--neutral); }
.tone-brand { background: var(--red-tint); color: var(--red-ink); }
.badge.tone-success { border-color: var(--success-line); } .badge.tone-warn { border-color: var(--warn-line); }
.badge.tone-danger { border-color: var(--danger-line); } .badge.tone-info { border-color: var(--info-line); }
/* "in progress with us": calm silver text, the red dot says it is live (red text is kept for action and danger) */
.badge.tone-brand { background: rgba(var(--ink-rgb), .045); color: var(--ink-2); border-color: var(--line-strong); }
.badge.tone-brand::before { background: var(--red-hot); }
.badge.tone-neutral { border-color: var(--line); }
.badge.is-live::before { background: var(--red-hot); animation: blink 2.4s var(--ease) infinite; }
@keyframes blink { 50% { opacity: .35; } }
.alert { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--radius); border: 1px solid var(--line); background: var(--raised); color: var(--ink-2); }
.alert > .icon { margin-top: 2px; }
.alert.tone-success { border-color: var(--success-line); background: var(--success-bg); } .alert.tone-danger { border-color: var(--danger-line); background: var(--danger-bg); }
.alert.tone-warn { border-color: var(--warn-line); background: var(--warn-bg); } .alert.tone-info { border-color: var(--line-strong); background: var(--raised); }
.alert.tone-success > .icon { color: var(--success); } .alert.tone-danger > .icon { color: var(--danger); }
.alert.tone-warn > .icon { color: var(--warn); } .alert.tone-info > .icon { color: var(--silver); }
.alert.tone-success, .alert.tone-danger, .alert.tone-warn { color: var(--ink-2); }
.alert strong { color: var(--ink); }
.unmet-list { margin: var(--s1) 0 0; padding-left: var(--s5); font-weight: 400; }
.unmet-list li + li { margin-top: 2px; }
.flash-stack { display: grid; gap: var(--s2); margin-bottom: var(--s4); }

/* ---------- toasts: the server's flash messages and the client's own notices */
.toaster { position: fixed; top: calc(var(--topbar) + 12px); right: 16px; z-index: 120; display: grid; gap: 10px; width: min(392px, calc(100vw - 32px)); pointer-events: none; }
.toast { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 12px 10px 12px 14px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line-strong); box-shadow: var(--shadow-2); color: var(--ink-2); font-size: var(--fs-sm); overflow: hidden; pointer-events: auto; animation: toast-in var(--t3) var(--ease) both; }
.toast > .icon { margin-top: 1px; }
.toast.tone-success > .icon { color: var(--success); } .toast.tone-danger > .icon { color: var(--danger); }
.toast.tone-warn > .icon { color: var(--warn); } .toast.tone-info > .icon { color: var(--silver); }
.toast.tone-success, .toast.tone-danger, .toast.tone-warn, .toast.tone-info { background: var(--raised); }
.toast strong { display: block; color: var(--ink); font-weight: 600; }
.toast .toast-x { width: 28px; height: 28px; margin: -4px -2px 0 0; color: var(--faint); }
.toast .toast-x:hover { color: var(--ink); }
.toast .toast-time { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: currentColor; opacity: .5; transform-origin: left; animation: toast-time var(--life, 6s) linear forwards; }
.toast.tone-success .toast-time { color: var(--success); } .toast.tone-info .toast-time { color: var(--silver); }
.toast:hover .toast-time, .toast:focus-within .toast-time { animation-play-state: paused; }
.toast.is-leaving { animation: toast-out var(--t2) var(--ease) forwards; }
.toast .unmet-list { max-height: 180px; overflow: auto; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(12px); } }
@keyframes toast-time { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 960px) { .toaster { top: auto; bottom: calc(80px + env(safe-area-inset-bottom)); right: 12px; left: 12px; width: auto; } }

/* ---------- menus (profile, row actions): a raised panel that drops in */
.menu { position: relative; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; min-width: 232px; padding: 6px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line-strong); box-shadow: var(--shadow-2); transform-origin: top right; animation: pop-in var(--t2) var(--ease) both; }
.menu-panel.is-leaving { animation: pop-out var(--t1) var(--ease) forwards; }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-head strong { display: block; font-size: var(--fs-sm); color: var(--ink); }
.menu-head span { font-size: var(--fs-xs); color: var(--muted); }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 0 10px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink-2); font: 500 var(--fs-sm) var(--font); text-align: left; text-decoration: none !important; cursor: pointer; transition: background var(--t1), color var(--t1); }
.menu-item .icon { color: var(--muted); }
.menu-item:hover, .menu-item:focus-visible { background: var(--hover); color: var(--ink); outline: none; }
.menu-item kbd { margin-left: auto; }
.menu-sep { height: 1px; margin: 6px 4px; background: var(--line); }
.menu-panel form { margin: 0; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes pop-out { to { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- dialogs (confirmation, shortcuts), drawer (side sheet; bottom sheet on phones) */
dialog { color: var(--ink); }
.dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--graphite); box-shadow: var(--shadow-3); }
.dialog[open] { animation: dialog-in var(--t3) var(--ease) both; }
.dialog.is-leaving { animation: dialog-out var(--t2) var(--ease) forwards; }
.dialog::backdrop, .drawer::backdrop, .cmdk::backdrop { background: rgba(var(--ink-rgb), .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fade-in var(--t3) var(--ease); }
.dialog-box { display: grid; gap: var(--s3); padding: var(--s5); margin: 0; }
.dialog-box h2 { font-family: var(--display); font-weight: 700; font-size: var(--fs-lg); letter-spacing: -.01em; }
.dialog-box p { margin: 0; color: var(--muted); }
.dialog-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-line); }
.dialog-icon.tone-brand { background: var(--red-tint); color: var(--red-ink); border-color: var(--red-line); }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--s2); margin-top: var(--s2); flex-wrap: wrap; }
.dialog-actions .btn { min-width: 96px; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes dialog-out { to { opacity: 0; transform: translateY(6px) scale(.98); } }
.shortcuts { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px var(--s4); margin: 0; font-size: var(--fs-sm); }
.shortcuts dt { color: var(--ink-2); }
.shortcuts dd { margin: 0; display: flex; gap: 4px; justify-content: flex-end; }
.drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(460px, 100vw); max-width: 100vw; height: 100%; max-height: 100%; padding: 0; border: 0; border-left: 1px solid var(--line-strong); background: var(--graphite); box-shadow: var(--shadow-3); }
.drawer[open] { display: flex; flex-direction: column; animation: drawer-in var(--t4) var(--ease) both; }
.drawer.is-leaving { animation: drawer-out var(--t3) var(--ease) forwards; }
.drawer-form { display: flex; flex-direction: column; flex: 1; min-height: 0; margin: 0; }
.drawer-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); }
.drawer-h h2 { font-family: var(--display); font-weight: 700; font-size: var(--fs-lg); letter-spacing: -.01em; }
.drawer-b { flex: 1; overflow-y: auto; padding: var(--s5); }
.drawer-f { display: flex; justify-content: flex-end; gap: var(--s2); padding: var(--s3) var(--s5) calc(var(--s3) + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(var(--ink-rgb), .03); }
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes drawer-out { to { transform: translateX(100%); } }
@media (max-width: 720px) {
  .drawer { inset: auto 0 0 0; width: 100%; height: auto; max-height: 90vh; border-left: 0; border-top: 1px solid var(--line-strong); border-radius: 18px 18px 0 0; }
  .drawer[open] { animation-name: sheet-in; }
  .drawer.is-leaving { animation-name: sheet-out; }
  .drawer-h::before { content: ""; position: absolute; left: 50%; top: 7px; width: 36px; height: 4px; margin-left: -18px; border-radius: 4px; background: rgba(var(--ink-rgb), .16); }
  .drawer-h { position: relative; padding-top: 22px; }
}
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-out { to { transform: translateY(100%); } }

/* ---------- command palette (⌘K / Ctrl K / "/"): pages, actions and live search over transactions, customers, units */
.cmdk { width: min(640px, calc(100vw - 24px)); max-height: none; margin: 12vh auto auto; padding: 0; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--graphite); box-shadow: var(--shadow-3); overflow: hidden; }
.cmdk[open] { animation: dialog-in var(--t3) var(--ease) both; }
.cmdk.is-leaving { animation: dialog-out var(--t2) var(--ease) forwards; }
.cmdk-input { display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s4); border-bottom: 1px solid var(--line); }
.cmdk-input > .icon { color: var(--muted); }
.cmdk-input input { flex: 1; min-height: 54px; padding: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; font-size: var(--fs-md); color: var(--ink); }
.cmdk-list { max-height: min(56vh, 460px); overflow-y: auto; padding: 6px; scroll-padding: 6px; }
.cmdk-group { padding: 10px 10px 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--faint); }
.cmdk-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 46px; padding: 6px 10px; border-radius: var(--radius); color: var(--ink-2); text-decoration: none !important; cursor: pointer; }
.cmdk-item[aria-selected="true"] { background: var(--hover); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.cmdk-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--raised); border: 1px solid var(--line); color: var(--silver); }
.cmdk-t { display: block; font-weight: 550; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-s { display: block; font-size: var(--fs-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-item mark { background: none; color: var(--red-ink); }
.cmdk-empty { padding: var(--s6) var(--s4); text-align: center; color: var(--muted); font-size: var(--fs-sm); }
.cmdk-foot { display: flex; gap: var(--s4); padding: 10px var(--s4); border-top: 1px solid var(--line); color: var(--faint); font-size: var(--fs-xs); }
.cmdk-foot span { display: inline-flex; align-items: center; gap: 5px; }
@media (max-width: 720px) { .cmdk { margin-top: 10px; } .cmdk-foot { display: none; } }

/* ---------- notification center: what needs attention now, computed live from the data */
.notif { position: relative; }
.notif-panel { position: absolute; right: -8px; top: calc(100% + 10px); z-index: 70; width: 400px; max-height: min(72vh, 620px); display: flex; flex-direction: column; border-radius: 14px; background: var(--graphite); border: 1px solid var(--line-strong); box-shadow: var(--shadow-2); transform-origin: top right; animation: pop-in var(--t2) var(--ease) both; }
.notif-panel.is-leaving { animation: pop-out var(--t1) var(--ease) forwards; }
.notif-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: 12px var(--s4); border-bottom: 1px solid var(--line); }
.notif-h h2 { font-size: 15px; }
.notif-list { overflow-y: auto; padding: 6px; }
.notif-item { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px; border-radius: var(--radius); color: var(--ink-2); text-decoration: none !important; transition: background var(--t1); }
.notif-item:hover, .notif-item:focus-visible { background: var(--hover); outline: none; }
.notif-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--raised); border: 1px solid var(--line); color: var(--silver); }
.notif-item.tone-danger .notif-ic { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-line); }
.notif-item.tone-warn .notif-ic { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.notif-item.tone-brand .notif-ic { color: var(--red-ink); background: var(--red-tint); border-color: var(--red-line); }
.notif-item.tone-danger, .notif-item.tone-warn, .notif-item.tone-brand, .notif-item.tone-info { background: none; }
.notif-item.tone-danger:hover, .notif-item.tone-warn:hover, .notif-item.tone-brand:hover, .notif-item.tone-info:hover { background: var(--hover); }
.notif-t { display: block; color: var(--ink); font-weight: 550; font-size: var(--fs-sm); }
.notif-s { display: block; color: var(--muted); font-size: var(--fs-xs); margin-top: 2px; }
.notif-n { align-self: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: var(--pill); background: rgba(var(--ink-rgb), .06); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; line-height: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.notif-empty { display: grid; justify-items: center; gap: 6px; padding: var(--s6) var(--s4); text-align: center; color: var(--muted); font-size: var(--fs-sm); }
.notif-empty .icon { width: 28px; height: 28px; color: var(--success); }
.notif-f { padding: 10px var(--s4); border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--faint); display: flex; justify-content: space-between; gap: var(--s2); }
@media (max-width: 960px) { .notif { position: static; } .notif-panel { position: fixed; left: 8px; right: 8px; top: calc(var(--topbar) + 6px); width: auto; max-height: calc(100vh - var(--topbar) - 100px); } }

/* ---------- skeletons: grey shapes that shimmer while data loads */
.skeleton { display: block; border-radius: var(--radius-xs); background: linear-gradient(90deg, rgba(var(--ink-rgb), .04) 25%, rgba(var(--ink-rgb), .085) 37%, rgba(var(--ink-rgb), .04) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.sk-row { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px; }
.sk-row .sk-ic { width: 32px; height: 32px; border-radius: 9px; }
.sk-row .sk-l1 { height: 11px; width: 62%; }
.sk-row .sk-l2 { height: 9px; width: 38%; margin-top: 8px; }
@keyframes shimmer { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
[data-live-region] { position: relative; }
[data-live-region].is-refreshing::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(90deg, transparent 30%, rgba(var(--ink-rgb), .035) 50%, transparent 70%); background-size: 300% 100%; animation: shimmer 1.1s ease infinite; }
.is-fresh { animation: fresh 1.2s var(--ease); }
@keyframes fresh { from { box-shadow: 0 0 0 1px var(--silver-line); } to { box-shadow: 0 0 0 1px transparent; } }

/* ---------- tabs: status links over a list (server), and in-page tab panels (client, all panels show without script) */
.tabs { display: flex; gap: 2px; margin-bottom: var(--s4); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 40px; padding: 0 12px; border: 0; background: none; color: var(--muted); font: 500 var(--fs) var(--font); text-decoration: none !important; white-space: nowrap; cursor: pointer; transition: color var(--t2); }
.tab:hover { color: var(--ink); }
.tab::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--red); transform: scaleX(0); transition: transform var(--t3) var(--ease); }
.tab[aria-current="page"], .tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-current="page"]::after, .tab[aria-selected="true"]::after { transform: scaleX(1); }
.tab:focus-visible { outline: none; box-shadow: inset var(--focus); border-radius: var(--radius-sm); }
.tab-count { min-width: 22px; height: 20px; padding: 0 6px; border-radius: var(--pill); background: rgba(var(--ink-rgb), .06); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.tab-count.hot { background: var(--danger-bg); color: var(--danger); }
[data-tabs]:not(.tabs-ready) > .tabs { display: none; }
[data-tabs].tabs-ready > [role="tabpanel"][hidden] { display: none !important; }
[data-tabs].tabs-ready > [role="tabpanel"] { animation: page-in var(--t3) var(--ease) both; }

/* ---------- list toolbar: search, filters, active filter chips */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-bottom: var(--s3); }
.toolbar .grow { flex: 1 1 260px; min-width: 0; }
.input-icon { position: relative; display: block; }
.input-icon > .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.input-icon > input, .input-icon > input[type=search] { padding-left: 36px; }
.toolbar select { width: auto; min-width: 160px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 11px; border-radius: var(--pill); border: 1px solid var(--line-strong); background: var(--raised); color: var(--ink-2); font-size: var(--fs-sm); white-space: nowrap; }
.chip a { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: var(--muted); text-decoration: none !important; }
.chip a:hover { background: rgba(var(--ink-rgb), .08); color: var(--ink); }

/* ---------- pager */
.pager { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; padding: var(--s3) var(--s4); border-top: 1px solid var(--line-2); color: var(--muted); font-size: var(--fs-sm); }
.pager-btns { display: flex; align-items: center; gap: var(--s2); }
.pager-n { font-variant-numeric: tabular-nums; padding: 0 4px; }

/* ---------- empty states: say what is missing and what to do about it */
.empty { display: grid; justify-items: center; gap: 6px; padding: var(--s6) var(--s4); text-align: center; color: var(--muted); }
.empty-ico { width: 44px; height: 44px; margin-bottom: 6px; border-radius: 12px; display: grid; place-items: center; color: var(--silver); background: linear-gradient(180deg, var(--raised), var(--sunken)); border: 1px solid var(--line-strong); box-shadow: inset 0 1px 0 rgba(var(--ink-rgb), .05); }
.empty-ico .icon { width: 22px; height: 22px; }
.empty strong { color: var(--ink); font-size: 15px; font-weight: 600; }
.empty p, .empty > span { margin: 0; max-width: 46ch; font-size: var(--fs-sm); }
.empty-actions { display: flex; gap: var(--s2); flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.empty.compact { padding: var(--s4); }
.all-clear { display: flex; align-items: center; gap: var(--s3); padding: var(--s3); border-radius: var(--radius); background: var(--success-bg); color: var(--success); font-weight: 600; border: 1px solid var(--success-line); }

/* ---------- forms */
.field { display: grid; gap: 6px; align-content: start; }
.field > label, .label { font-size: var(--fs-sm); font-weight: 550; color: var(--ink-2); }
.field .help { font-size: var(--fs-xs); color: var(--muted); }
input[type=text], input[type=password], input[type=number], input[type=email], input[type=tel], input[type=date], input[type=datetime-local], input[type=search], input[type=url], select, textarea {
  width: 100%; min-height: 38px; padding: 8px 12px; border: 1px solid var(--field-line); border-radius: var(--radius); font: inherit; color: var(--ink); background: var(--field); transition: border-color var(--t2), box-shadow var(--t2), background var(--t2); }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 34px; background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%239d9fa7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center; }
select option { background: var(--raised); color: var(--ink); }
input:hover, select:hover, textarea:hover { border-color: rgba(var(--ink-rgb), .2); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red-hot); box-shadow: var(--focus); background-color: rgba(var(--ink-rgb), .045); }
input[readonly] { background: rgba(var(--ink-rgb), .015); color: var(--muted); }
input:disabled, select:disabled, textarea:disabled, fieldset:disabled input, fieldset:disabled select, fieldset:disabled textarea { opacity: .6; cursor: not-allowed; }
input[type=date], input[type=datetime-local] { color-scheme: light; }
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: var(--danger); }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--red); flex: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) var(--s4); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.form-actions { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.card-f.sticky-f { position: sticky; bottom: 0; z-index: 5; background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
@media (max-width: 960px) { .card-f.sticky-f { bottom: calc(66px + env(safe-area-inset-bottom)); border-radius: 0; } }
.kit-row { display: grid; grid-template-columns: minmax(140px, 1.2fr) minmax(140px, 1fr) 90px minmax(140px, 1.4fr); align-items: center; gap: 8px; }
.split-aside { grid-template-columns: minmax(0, 1fr) 250px; align-items: start; }
.form-grid.filter-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 900px) { .form-grid.filter-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .kit-row { grid-template-columns: minmax(0, 1fr) 84px; padding: 8px 0; border-top: 1px solid var(--line-2); }
  .kit-row > :first-child, .kit-row > :last-child { grid-column: 1 / -1; }
  .split-aside { grid-template-columns: minmax(0, 1fr); }
  .form-grid.filter-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--radius); background: rgba(var(--ink-rgb), .03); border: 1px solid var(--line); flex-wrap: wrap; }
.seg label, .seg a { padding: 6px 12px; border-radius: 7px; cursor: pointer; font-size: var(--fs-sm); font-weight: 550; color: var(--muted); text-decoration: none !important; border: 1px solid transparent; transition: background var(--t2), color var(--t2); }
.seg label:hover, .seg a:hover { color: var(--ink); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked), .seg a.on { background: var(--hover); border-color: var(--line-strong); color: var(--ink); box-shadow: inset 0 1px 0 rgba(var(--ink-rgb), .05); }
.seg label:has(input:focus-visible) { box-shadow: var(--focus); }
.addon-pick { border: 0; padding: 0; margin: 0; min-width: 0; }
.addon-pick legend { margin-bottom: 6px; }
.addon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s2); }
.addon-opt { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--field); cursor: pointer; font-size: var(--fs-sm); line-height: 1.35; transition: border-color var(--t2), background var(--t2); }
.addon-opt:has(input:checked), .addon-opt:has(select option:checked:not([value="0"])) { border-color: var(--red-line); background: var(--red-wash); }
.addon-opt select { width: auto; min-width: 58px; padding-right: 26px; }
.addon-opt input[type=checkbox] { width: 18px; height: 18px; flex: none; accent-color: var(--red); }
.addon-opt.is-off { opacity: .45; cursor: not-allowed; }
.pkg-set { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3) var(--s4); margin: 0; min-width: 0; }
.pkg-set legend { padding: 0 6px; font-weight: 600; }
.pkg-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--s2); margin-bottom: 6px; }
.pkg-row { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 6px; }
.check-inline { display: inline-flex; align-items: center; gap: 5px; margin-right: 10px; font-size: var(--fs-sm); white-space: nowrap; cursor: pointer; }
.check-inline input { width: 16px; height: 16px; accent-color: var(--red); }
.addon-table input[type=text], .addon-table input[type=number] { min-width: 84px; }
.addon-table td:first-child input[type=text] { min-width: 150px; }
.range-form { flex-wrap: nowrap; }
.range-form input[type=date] { width: 158px; min-height: 34px; padding: 5px 10px; }
@media (max-width: 560px) { .range-form { flex-wrap: wrap; } .range-form input[type=date] { width: calc(50% - 40px); } }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3) var(--s4); margin: 0; min-width: 0; }
legend { font-weight: 600; padding: 0 var(--s1); font-size: var(--fs-sm); }
/* fields that appear because of an earlier choice slide in, so the change is visible */
[data-delivery]:not([hidden]), [data-manual-fee]:not([hidden]), [data-for]:not([hidden]), [data-new-customer]:not([hidden]) { animation: reveal var(--t3) var(--ease); }
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- tables: one panel per list; on phones every row becomes a card (label · value, status top right) */
.table-wrap { position: relative; overflow-x: auto; } /* relative: absolutely placed text (sr-only) scrolls with the table instead of widening the page */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: var(--fs-xs); color: var(--muted); font-weight: 550; padding: 10px 14px; border-bottom: 1px solid var(--line); background: rgba(var(--ink-rgb), .02); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--t1); }
.table tbody tr:hover td { background: rgba(var(--ink-rgb), .022); }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: rgba(var(--ink-rgb), .035); }
.table tr.click:hover td:first-child { box-shadow: inset 2px 0 0 var(--red); }
.table tfoot td { font-weight: 600; border-top: 1px solid var(--line); }
.table td a strong, .table td > a:first-child { color: var(--ink); }
.table td a:hover strong { color: var(--red-ink); }
.th-sort { display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none !important; border-radius: 4px; }
.th-sort:hover { color: var(--ink); }
.th-sort .icon { width: 14px; height: 14px; opacity: .35; transition: opacity var(--t1), transform var(--t2) var(--ease); }
.th-sort:hover .icon { opacity: .8; }
th[aria-sort="ascending"] .th-sort, th[aria-sort="descending"] .th-sort { color: var(--ink); }
th[aria-sort="ascending"] .th-sort .icon, th[aria-sort="descending"] .th-sort .icon { opacity: 1; color: var(--red-ink); }
th[aria-sort="ascending"] .th-sort .icon { transform: rotate(180deg); }
th.num, td.num { text-align: right; }
.list-table { min-width: 640px; }
.table-panel { overflow: hidden; }
.table-panel > .table-wrap > .table th:first-child, .table-panel > .table-wrap > .table td:first-child { padding-left: var(--s5); }
.table-panel > .table-wrap > .table th:last-child, .table-panel > .table-wrap > .table td:last-child { padding-right: var(--s5); }
.cell-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-sub { font-size: var(--fs-xs); color: var(--muted); }
.show-sm { display: none; }
@media (max-width: 720px) {
  .hide-sm { display: none; }
  .show-sm { display: block; }
  .rtable, .list-table.rtable { min-width: 0; }
  .rtable thead { display: none; }
  .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
  .rtable tr { position: relative; padding: 14px var(--s4); border-bottom: 1px solid var(--line-2); }
  .rtable tr:last-child { border-bottom: 0; }
  .rtable td { border: 0 !important; padding: 3px 0 !important; text-align: left; white-space: normal; }
  .rtable td.num { text-align: left; }
  .rtable td.rt-top { padding-right: 116px !important; font-size: var(--fs); }
  .rtable td.rt-badge { position: absolute; top: 14px; right: var(--s4); width: auto; }
  .rtable td[data-label] { position: relative; padding-left: 116px !important; min-height: 24px; }
  .rtable td[data-label]::before { content: attr(data-label); position: absolute; left: 0; top: 5px; width: 106px; color: var(--muted); font: 500 var(--fs-xs)/1.4 var(--font); }
  .rtable td.hide-sm { display: none; }
  .rtable td.rt-actions { padding-top: 8px !important; }
  .rtable td:empty { display: none; }
  .rtable tbody tr:hover td, .rtable tr.click:hover td { background: none; box-shadow: none; }
  .rtable tr.click:active { background: rgba(var(--ink-rgb), .03); }
  .rtable td[colspan] { padding: 0 !important; }
}
.kv { display: grid; grid-template-columns: minmax(120px, 38%) minmax(0, 1fr); gap: 8px var(--s3); margin: 0; }
.kv dt { color: var(--muted); font-size: var(--fs-sm); }
.kv dd { margin: 0; font-weight: 550; min-width: 0; overflow-wrap: anywhere; }

/* ---------- KPI strip: one surface split into segments; the numbers carry the metallic finish */
.kpi-strip { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: var(--s3); margin-bottom: var(--s5); }
.kpi { position: relative; display: grid; gap: 8px; align-content: start; min-width: 0; padding: var(--s4) var(--s5); background: var(--graphite); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); overflow: hidden; text-decoration: none !important; transition: background var(--t2) var(--ease), box-shadow var(--t2) var(--ease), transform var(--t2) var(--ease); }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--fresh), rgba(13, 148, 136, .25)); }
a.kpi:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
a.kpi:hover { background: var(--raised); }
a.kpi::after { content: ""; position: absolute; right: 16px; top: 18px; width: 7px; height: 7px; border-top: 1.5px solid var(--faint); border-right: 1.5px solid var(--faint); transform: rotate(45deg); opacity: 0; transition: opacity var(--t2), transform var(--t2) var(--ease); }
a.kpi:hover::after { opacity: 1; transform: translateX(2px) rotate(45deg); }
.kpi .label { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: var(--fs); font-weight: 600; }
.kpi .label .icon { width: 18px; height: 18px; color: var(--fresh); }
.kpi .value { font-family: var(--display); font-weight: 700; font-size: 34px; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent; width: max-content; max-width: 100%; }
.kpi .value small { font-size: 15px; letter-spacing: 0; }
.kpi .foot { display: flex; align-items: center; gap: var(--s2); justify-content: space-between; font-size: var(--fs-sm); color: var(--muted); min-height: 20px; }
.kpi.is-alert .value { background: none; color: var(--danger); }
.kpi.is-alert .label { color: var(--danger); }
.kpi.is-alert .label .icon { color: var(--danger); }
.kpi.is-alert::before { background: var(--danger); }
.kpi.is-alert { background: linear-gradient(180deg, var(--danger-bg), transparent 70%), var(--graphite); border-color: var(--danger-line); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.delta .icon { width: 13px; height: 13px; stroke-width: 2.2; }
.delta.up { color: var(--success); } .delta.down { color: var(--danger); } .delta.flat { color: var(--muted); }
@media (max-width: 1100px) { .kpi-strip { grid-template-columns: repeat(min(var(--n, 4), 3), minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-strip > .kpi-wide { grid-column: 1 / -1; }
  .kpi-strip > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .kpi-strip:has(> .kpi-wide) > :last-child:nth-child(odd) { grid-column: auto; }
  .kpi { padding: var(--s3) var(--s4); }
  .kpi .value { font-size: 27px; }
}

/* ---------- focus banner: the one thing to do next, chosen from the live data */
.focus { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s4); align-items: center; margin-bottom: var(--s5); padding: var(--s4) var(--s5); border-radius: var(--radius-lg); border: 1px solid var(--line); background: linear-gradient(90deg, rgba(var(--ink-rgb), .035), rgba(var(--ink-rgb), .01)), var(--graphite); }
.focus .ico { --ico: 42px; }
.focus-t { font-weight: 700; font-size: var(--fs-md); color: var(--ink); }
.focus-s { color: var(--ink-2); font-size: var(--fs); }
.focus.tone-danger { border-color: var(--danger-line); background: linear-gradient(90deg, var(--danger-bg), transparent 60%), var(--graphite); }
.focus.tone-danger .ico { color: var(--danger); border-color: var(--danger-line); }
.focus.tone-brand { border-color: var(--red-line); background: linear-gradient(90deg, rgba(225, 29, 53, .09), rgba(225, 29, 53, .015) 60%), var(--graphite); }
.focus.tone-brand .ico { color: var(--red-ink); border-color: var(--red-line); }
.focus.tone-success .ico { color: var(--success); }
.focus.tone-danger, .focus.tone-brand, .focus.tone-success, .focus.tone-warn, .focus.tone-info { color: var(--ink-2); }
@media (max-width: 720px) { .focus { grid-template-columns: auto minmax(0, 1fr); } .focus > .btn { grid-column: 1 / -1; } }

/* ---------- fleet status: every unit with its live state (available, rented, late, maintenance) */
.fleet { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--s5); }
.unit-chip { display: inline-flex; align-items: center; gap: 9px; min-height: 38px; padding: 0 14px 0 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--graphite); color: var(--ink-2); font-size: var(--fs-sm); text-decoration: none !important; transition: border-color var(--t2), background var(--t2); }
.unit-chip:hover { border-color: var(--line-strong); background: var(--raised); color: var(--ink); }
.unit-chip b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.unit-chip .st { color: var(--muted); font-size: var(--fs-sm); }
.state-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--faint); }
.state-available .state-dot, .state-dot.available { background: var(--success); }
.state-rented .state-dot, .state-dot.rented { background: var(--red-hot); box-shadow: 0 0 0 3px var(--red-tint); }
.state-late .state-dot, .state-dot.late { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); animation: blink 1.6s var(--ease) infinite; }
.state-maintenance .state-dot, .state-dot.maintenance { background: var(--warn); }
.state-retired .state-dot, .state-dot.retired { background: transparent; box-shadow: inset 0 0 0 1.5px var(--faint); }
.unit-chip.state-late { border-color: var(--danger-line); }
.unit-state { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 550; white-space: nowrap; }
.unit-state.state-late { color: var(--danger); }
.fleet-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--ink-2); font-size: var(--fs-sm); }
.fleet-legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- charts — thin marks, hairline grid, tooltip on hover/focus, a table twin for every chart */
.viz { position: relative; }
.viz-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.viz-total { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink); }
.viz-note { font-size: var(--fs-xs); color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: var(--fs-xs); color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }
.colchart { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: var(--plot-h, 180px) auto; column-gap: 10px; outline: none; border-radius: var(--radius-sm); }
.colchart:focus-visible { box-shadow: var(--focus); }
.colchart .yaxis { position: relative; min-width: 30px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.colchart .yaxis span { position: absolute; right: 0; transform: translateY(50%); white-space: nowrap; }
.colchart .plot { position: relative; border-bottom: 1px solid var(--viz-axis); }
.colchart .gridline { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--viz-grid); }
.colchart .cols { position: absolute; inset: 0; display: flex; align-items: stretch; z-index: 0; isolation: isolate; }
.colchart .col { flex: 1 1 0; min-width: 0; display: flex; align-items: flex-end; justify-content: center; position: relative; }
.colchart .col i { display: block; width: min(22px, 60%); height: var(--h); background: var(--viz-1); border-radius: 4px 4px 0 0; transform-origin: bottom; animation: grow .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 10ms); transition: background var(--t1); }
.colchart .col.is-muted i { background: var(--viz-muted); }
.colchart .col.is-active i, .colchart .col:hover i { background: var(--viz-1-hi); }
.colchart .col.is-active::after, .colchart .col:hover::after { content: ""; position: absolute; inset: 0 1px; background: rgba(var(--ink-rgb), .035); z-index: -1; border-radius: 4px 4px 0 0; }
.colchart .xaxis { grid-column: 2; display: flex; padding-top: 6px; font-size: 11px; color: var(--muted); }
.colchart .xaxis span { flex: 1 1 0; min-width: 0; text-align: center; white-space: nowrap; }
.colchart .xaxis span:empty::before { content: "\00a0"; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.viz-tip { position: fixed; z-index: 80; pointer-events: none; min-width: 132px; max-width: 260px; padding: 8px 11px; border-radius: var(--radius); background: var(--glass-strong); border: 1px solid var(--line-strong); color: var(--ink); box-shadow: var(--shadow-2); font-size: var(--fs-xs); line-height: 1.4; transform: translate(-50%, calc(-100% - 12px)); }
.viz-tip .v { display: block; font-family: var(--display); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.viz-tip .k { display: block; color: var(--ink-2); }
.viz-tip .k i { display: inline-block; width: 12px; height: 2px; margin-right: 6px; vertical-align: middle; background: var(--silver); }
.chart-data { margin-top: var(--s3); }
.chart-data > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: var(--fs-xs); font-weight: 550; color: var(--muted); list-style: none; padding: 4px 0; }
.chart-data > summary:hover { color: var(--ink); }
.chart-data > summary::-webkit-details-marker { display: none; }
.chart-data > summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform var(--t2) var(--ease); }
.chart-data[open] > summary::before { transform: rotate(45deg); }
.chart-data .table-wrap { max-height: 280px; overflow: auto; border: 1px solid var(--line-2); border-radius: var(--radius-sm); margin-top: var(--s2); }
.chart-data .table th { position: sticky; top: 0; background: var(--raised); }
.hbars { display: grid; grid-template-columns: minmax(96px, max-content) minmax(0, 1fr) auto; gap: 12px 14px; align-items: center; }
.hbars .lbl { font-size: var(--fs-sm); line-height: 24px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none !important; }
a.lbl:hover { color: var(--ink); }
.hbars .lane { position: relative; height: 10px; background: rgba(var(--ink-rgb), .04); border-radius: var(--pill); }
.hbars .bar { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); min-width: 3px; border-radius: var(--pill); background: var(--viz-1); }
.hbars .bar.is-zero { min-width: 0; width: 0; }
.hbars .val { font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.hbars .val small { font-weight: 400; color: var(--muted); }
.meter { height: 6px; border-radius: var(--pill); background: rgba(var(--ink-rgb), .07); overflow: hidden; }
.meter > i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--viz-1); transition: width var(--t4) var(--ease); }
.meter.warn > i { background: var(--viz-warn); }
.meter.danger > i { background: var(--viz-critical); }
.meter.ok > i { background: var(--viz-ok); }
.meter.thin { height: 4px; }
.spark-wrap { position: relative; height: 34px; margin-top: 2px; }
.spark { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.spark .ln { fill: none; stroke: var(--viz-muted); stroke-width: 1.8; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.spark .ln.cur { stroke: var(--viz-1); }
.spark .area { fill: var(--viz-1); opacity: .09; }
.spark-dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px rgba(var(--ink-rgb), .14); }

/* ---------- unit schedule board (rows = units, 7 day columns, bars = bookings) */
.sched { overflow-x: auto; scrollbar-width: thin; }
.sched-grid { --label-w: 128px; --head-h: 46px; position: relative; min-width: 780px; padding-bottom: 26px; }
.sched-head, .sched-row { display: grid; grid-template-columns: var(--label-w) minmax(0, 1fr); }
.sched-head { min-height: var(--head-h); align-items: end; }
.sched-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.sched-days span { padding: 0 8px 8px; border-left: 1px solid var(--line-2); font-size: var(--fs-xs); color: var(--muted); line-height: 1.25; }
.sched-days span b { display: block; font-family: var(--display); font-size: 15px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.sched-days span.is-today { color: var(--red-ink); }
.sched-unit { position: sticky; left: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 0; background: var(--graphite); border-top: 1px solid var(--line-2); min-width: 0; }
.unit-glyph { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--raised); color: var(--silver); font-size: 10.5px; font-weight: 700; letter-spacing: .02em; border: 1px solid var(--line); }
.sched-unit .code { font-weight: 600; font-size: var(--fs-sm); line-height: 1.2; }
.sched-unit .meta { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched-lane { position: relative; height: 54px; border-top: 1px solid var(--line-2); background: linear-gradient(to right, var(--line-2) 1px, transparent 1px) 0 0 / calc(100% / 7) 100%; }
.sched-today { position: absolute; top: 0; bottom: 0; left: calc(var(--x) * 100%); width: calc(100% / 7); background: var(--red-wash); }
.sched-now { position: absolute; top: var(--head-h); bottom: 26px; left: calc(var(--label-w) + (100% - var(--label-w)) * var(--x)); width: 2px; margin-left: -1px; background: var(--red-hot); z-index: 4; pointer-events: none; }
.sched-now::before { content: attr(data-label); position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); padding: 1px 7px; border-radius: var(--pill); background: var(--red); color: #fff; font-size: 10.5px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sched-bar { position: absolute; top: 9px; height: 36px; left: calc(var(--x) * 100%); width: calc(var(--w) * 100%); min-width: 8px; display: flex; flex-direction: column; justify-content: center; padding: 0 9px; border-radius: 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--fs-xs); line-height: 1.2; text-decoration: none !important; box-shadow: 0 0 0 2px var(--graphite); z-index: 1; transition: filter var(--t1); }
.sched-bar b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.sched-bar span { font-size: 11px; opacity: .85; overflow: hidden; text-overflow: ellipsis; }
.sched-bar:hover, .sched-bar:focus-visible { z-index: 2; filter: brightness(1.12); outline: 2px solid var(--ink); outline-offset: 1px; }
.sched-bar.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.sched-bar.cut-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.s-booked { background: var(--viz-tint); color: var(--ink-2); box-shadow: inset 2px 0 0 var(--silver), 0 0 0 2px var(--graphite); }
.s-active { background: var(--silver); color: #fff; }
.s-overdue { background: repeating-linear-gradient(135deg, rgba(var(--ink-rgb), .12) 0 6px, transparent 6px 12px), var(--viz-critical-fill); color: #fff; }
.s-returning { background: var(--viz-slate); color: #fff; }
.legend i.s-booked { box-shadow: inset 2px 0 0 var(--silver); }
.legend i.s-now { width: 2px; height: 12px; border-radius: 0; background: var(--red-hot); }
.sched-empty { padding: var(--s4) 0 0; color: var(--muted); font-size: var(--fs-sm); }

/* ---------- overdue list */
.late-list { list-style: none; margin: 0; padding: 0; }
.late-list li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .8fr) auto; gap: var(--s3); align-items: center; padding: var(--s3) var(--s5); border-top: 1px solid var(--line-2); }
.late-list li:first-child { border-top: 0; }
.late-list .who a { font-weight: 600; color: var(--ink); }
.late-list .fine strong { font-family: var(--display); font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .late-list li { grid-template-columns: minmax(0, 1fr) auto; padding: var(--s3) var(--s4); } .late-list .fine { text-align: left; } }
.review-panel { border-color: var(--warn-line); border-left: 4px solid var(--warn); }
.review-panel .card-h { background: linear-gradient(90deg, var(--warn-bg), transparent 70%); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.review-panel .card-h h2, .review-panel .card-h h2 .icon { color: var(--warn); }
.late-panel { border-color: var(--danger-line); }
.late-panel .card-h { background: linear-gradient(90deg, rgba(255, 122, 92, .08), transparent 70%); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.late-panel .card-h h2 { color: var(--danger); }
.late-panel .card-h h2 .icon { color: var(--danger); }

/* ---------- trips (antar & jemput) and the pickup counter's cards */
.trip-day { display: flex; align-items: baseline; gap: var(--s2); margin-bottom: var(--s3); font-size: 15px; }
.trip-day.is-late { color: var(--danger); }
.trip-list { display: grid; gap: var(--s3); }
.trip { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--s4); padding: var(--s4) var(--s5); }
.trip-time { display: grid; align-content: start; gap: 8px; }
.trip-time .t { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink); }
.trip-kind { display: inline-flex; align-items: center; gap: 5px; width: max-content; height: 22px; padding: 0 9px; border-radius: var(--pill); font-size: var(--fs-xs); font-weight: 600; background: var(--red-tint); color: var(--red-ink); border: 1px solid var(--red-line); }
.trip-kind.back { background: var(--neutral-bg); color: var(--ink-2); border-color: var(--line); }
.trip-body { display: grid; gap: 5px; min-width: 0; }
.trip-body > .row > a.strong { color: var(--ink); }   /* the record link reads as a name, like the other lists */
.trip-body > .row > a.strong:hover { color: var(--red-ink); }
@media (max-width: 560px) { .trip { grid-template-columns: minmax(0, 1fr); gap: var(--s2); padding: var(--s4); } .trip-time { grid-auto-flow: column; justify-content: start; align-items: center; } }
.counter-card { grid-template-columns: 116px minmax(0, 1fr); }
.counter-card.is-done { border-color: var(--success-line); }
.counter-ack { margin: 6px 0 2px; padding: 10px 12px; border: 1px solid var(--warn-line); border-radius: var(--radius); background: var(--warn-bg); font-size: var(--fs-sm); transition: border-color var(--t2), background var(--t2); }
.counter-ack:has(input:checked) { border-color: var(--success-line); background: var(--success-bg); }
.counter-card .photo-grid { margin-top: var(--s2); grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.counter-card .photo-actions .btn { min-height: 40px; padding: 0 14px; }
.counter-card .photo-actions .btn:disabled { opacity: .42; cursor: not-allowed; }
.counter-later { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
/* counter: what happens next, the documents to check, and the form that stores them */
.counter-next { display: flex; gap: 6px; align-items: flex-start; margin-top: 4px; color: var(--ink-2); }
.counter-next .icon { flex: none; margin-top: 3px; color: var(--fresh); }
.doc-reqs { list-style: none; margin: 0; display: grid; gap: var(--s2); }
.doc-reqs li { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2); font-size: var(--fs); }
.doc-reqs li > span:nth-child(2) { flex: 1 1 200px; min-width: 0; }
.doc-card { border-left: 4px solid var(--warn-line); }
.doc-card.is-held { border-left-color: var(--success); }
.doc-store { margin-top: var(--s2); padding-top: var(--s3); border-top: 1px dashed var(--line-strong); }
.doc-store input[type=text] { min-height: 48px; font-size: var(--fs-md); }
.doc-store .btn-lg { width: 100%; min-height: 52px; justify-content: center; }
.counter-open { min-height: 44px; }
.pay-form { padding: var(--s3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--raised); }
.proc-steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s1); margin: 0 0 var(--s4); padding: 0; list-style: none; counter-reset: ph; }
.proc-steps li { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: var(--radius); background: var(--raised); color: var(--muted); text-align: center; font-size: var(--fs-xs); font-weight: 600; line-height: 1.2; }
.proc-steps .n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--hover); color: var(--ink-2); font-family: var(--display); font-weight: 700; }
.proc-steps .is-done { color: var(--success); background: var(--success-bg); }
.proc-steps .is-done .n { background: var(--success-fill); color: #fff; }
.proc-steps .is-current { color: var(--ink); background: var(--red-tint); box-shadow: inset 0 0 0 2px var(--red); }
.proc-steps .is-current .n { background: var(--red); color: #fff; }
.proc-btn { width: 100%; min-height: 52px; justify-content: center; font-size: var(--fs-md); font-weight: 700; }
.proc-links { display: grid; gap: var(--s2); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.proc-links .btn { min-height: 52px; justify-content: center; }
.proc-reqs h3 { margin-bottom: var(--s2); }
.proc-kv a { margin-left: 6px; }
.proc-check { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.proc-kit { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.proc-kit select, .proc-kit input { min-height: 44px; }
@media (min-width: 640px) { .proc-kit { grid-template-columns: minmax(0, 1.2fr) 150px 80px minmax(0, 1fr); align-items: center; } }
/* phone: the counter is used one-handed on a phone or tablet. One column, big buttons, big tick boxes. */
@media (max-width: 560px) {
  .counter-card { grid-template-columns: minmax(0, 1fr); }
  .counter-card .photo-grid { grid-template-columns: minmax(0, 1fr); }
  .counter-card .photo-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
  .counter-card .photo-actions .btn { flex: 1 1 calc(50% - var(--s2)); min-height: 48px; justify-content: center; font-size: var(--fs); }
  .counter-ack { padding: 14px; font-size: var(--fs); }
  .counter-ack input { width: 24px; height: 24px; }
  .trip-day { font-size: var(--fs-md); }
  .counter-open { width: 100%; min-height: 48px; justify-content: center; }
  .doc-card .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .doc-card .kv dd { margin-bottom: var(--s2); }
}
.counter-task { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s2); padding: var(--s3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--sunken); }
.counter-task.is-todo { border-color: var(--red-line); background: var(--red-wash); }
.counter-task.is-todo .strong .icon { color: var(--red-ink); }
.counter-task.is-done .strong .icon { color: var(--success); }
.counter-task-text { display: grid; gap: 2px; min-width: 0; }
.counter-task-text .strong { display: inline-flex; align-items: center; gap: 6px; }
.counter-task .btn { min-height: 44px; }
.photo-frame .ph.is-saved { color: var(--ink); }
.photo-frame .ph.is-saved .icon { width: 28px; height: 28px; color: var(--success); }
@media (max-width: 560px) { .counter-card { grid-template-columns: minmax(0, 1fr); } .counter-task .btn { width: 100%; justify-content: center; } }

/* ---------- agenda, tasks, rental cards */
.agenda { list-style: none; margin: 0; padding: 0; }
.agenda li { display: grid; grid-template-columns: 46px 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); }
.agenda li:first-child { border-top: 0; padding-top: 0; }
.agenda .t { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; font-size: var(--fs-sm); color: var(--ink); }
.agenda .t.muted { color: var(--faint); }
.agenda .ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--raised); color: var(--silver); border: 1px solid var(--line); }
.agenda .ic.out, .agenda .ic.self { color: var(--red-ink); border-color: var(--red-line); background: var(--red-wash); }
.agenda .who { min-width: 0; }
.agenda .who a { font-weight: 600; color: var(--ink); }
.agenda .who div { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 42px; padding: 0 var(--s3); border-radius: var(--radius); border: 1px solid var(--line); background: var(--field); color: var(--ink-2); font-weight: 500; text-decoration: none !important; transition: border-color var(--t2), background var(--t2), color var(--t2); }
.task:hover { border-color: var(--line-strong); background: var(--raised); color: var(--ink); }
.task .n { min-width: 28px; height: 22px; padding: 0 8px; border-radius: var(--pill); background: var(--neutral-bg); color: var(--ink-2); font-weight: 650; line-height: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.task.hot .n { background: var(--warn-bg); color: var(--warn); }
.task-quiet { display: flex; flex-wrap: wrap; gap: 6px; }
.task-quiet a { font-size: var(--fs-xs); color: var(--muted); padding: 3px 9px; border: 1px solid var(--line); border-radius: var(--pill); text-decoration: none !important; }
.task-quiet a:hover { color: var(--ink); border-color: var(--line-strong); }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--raised); border: 1px solid var(--line-strong); flex: none; display: grid; place-items: center; color: var(--silver); font-weight: 650; font-size: 14px; }
img.avatar { background: linear-gradient(90deg, rgba(var(--ink-rgb), .04), rgba(var(--ink-rgb), .08), rgba(var(--ink-rgb), .04)) 0 0 / 300% 100%; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.avatar.sm { width: 30px; height: 30px; font-size: var(--fs-xs); }
.avatar.xs { width: 26px; height: 26px; font-size: 11px; }
.countdown { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.countdown.overdue { color: var(--danger); }
.countdown.soon { color: var(--warn); }

/* ---------- side rail: one surface split into sections by hairlines (instead of a stack of cards) */
.rail-panel { overflow: hidden; }
.rail-sec { padding: var(--s4) var(--s5); margin: 0; }
.rail-sec + .rail-sec { border-top: 1px solid var(--line-2); }
.rail-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.rail-h h2 { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; }
.rail-h .hint { color: var(--muted); font-size: var(--fs-xs); }
/* active rentals as rows: who, time left with its meter, when it ends */
.rent-list { list-style: none; margin: 0; padding: 0; }
.rent-list li + li { border-top: 1px solid var(--line-2); }
.rent-row { display: grid; grid-template-columns: auto minmax(0, 1.2fr) minmax(150px, 1fr) minmax(0, 1fr); gap: var(--s3) var(--s4); align-items: center; padding: var(--s3) var(--s5); color: var(--ink-2); text-decoration: none !important; transition: background var(--t1); }
.rent-row:hover { background: rgba(var(--ink-rgb), .025); }
.rent-who { display: grid; min-width: 0; }
.rent-who b { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rent-time { display: grid; gap: 6px; font-size: var(--fs-sm); }
.rent-meta { text-align: right; }
.rent-list li.is-late .rent-row { box-shadow: inset 2px 0 0 var(--danger); }
@media (max-width: 720px) { .rent-row { grid-template-columns: auto minmax(0, 1fr); padding: var(--s3) var(--s4); } .rent-time, .rent-meta { grid-column: 2; } .rent-meta { text-align: left; } }
.focus.tone-warn { border-color: var(--warn-line); background: linear-gradient(90deg, var(--warn-bg), transparent 60%), var(--graphite); }
.focus.tone-warn .ico { color: var(--warn); border-color: var(--warn-line); }

/* ---------- workflow stepper: done in silver, the current step in red (it is the one to act on) */
.stepper { display: flex; overflow-x: auto; padding: var(--s3) var(--s2) var(--s2); scrollbar-width: thin; }
.step { flex: 1 0 92px; position: relative; text-align: center; padding: 0 4px; }
.step::before { content: ""; position: absolute; top: 12px; left: -50%; width: 100%; height: 2px; background: rgba(var(--ink-rgb), .08); z-index: 0; }
.step:first-child::before { display: none; }
.step .dot { position: relative; z-index: 1; width: 26px; height: 26px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: var(--fs-xs); background: var(--graphite); border: 1.5px solid rgba(var(--ink-rgb), .14); color: var(--muted); font-variant-numeric: tabular-nums; }
.step .t { font-size: 11px; line-height: 1.25; color: var(--muted); font-weight: 500; }
.step.done .dot { background: var(--silver); border-color: var(--silver); color: #fff; }
.step.done::before, .step.current::before { background: var(--silver-lo); }
.step.current .dot { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 0 0 4px var(--red-tint); }
.step.current .t { color: var(--ink); font-weight: 650; }
.step.cancelled .dot { border-color: var(--danger-line); color: var(--danger); }

/* ---------- requirements & next step */
.reqs { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.reqs li { display: flex; gap: var(--s2); align-items: flex-start; }
.reqs .mark { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 1px; }
.reqs .mark .icon { width: 13px; height: 13px; stroke-width: 2.4; }
.reqs .ok .mark { background: var(--success-bg); color: var(--success); }
.reqs .no .mark { background: var(--danger-bg); color: var(--danger); }
.reqs .hint { display: block; color: var(--muted); font-size: var(--fs-xs); }
.next-card { position: relative; border-color: var(--red-line); overflow: hidden; }
.next-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, var(--red), var(--red-hot) 40%, transparent); }
.next-card .card-h { background: linear-gradient(180deg, rgba(225, 29, 53, .07), transparent); }
.next-card .eyebrow { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; color: var(--red-ink); font-size: var(--fs-xs); font-weight: 600; }
a[data-doc] { color: var(--ink-2); }
a[data-doc]:hover { color: var(--ink); }
.next-pill { align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px; border-radius: var(--pill); background: var(--raised); border: 1px solid var(--red-line); box-shadow: var(--shadow-2); color: var(--ink); font-size: var(--fs-sm); font-weight: 550; white-space: nowrap; text-decoration: none !important; animation: pop-in var(--t3) var(--ease); }
.next-pill.is-shown { display: inline-flex; }
@media (min-width: 961px) { .next-pill.is-shown { position: fixed; right: var(--s6); bottom: var(--s5); z-index: 29; } }

/* ---------- rental hub header */
.hub { margin-bottom: var(--s5); }
.hub-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s4) var(--s5); align-items: start; }
.hub-head h1 { font-size: 26px; font-variant-numeric: tabular-nums; }
.hub-time { width: 280px; padding: var(--s3) var(--s4); border-radius: var(--radius); background: var(--sunken); border: 1px solid var(--line); }
.hub-time .countdown { font-size: 22px; }
.hub-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--s2); padding-top: var(--s3); border-top: 1px solid var(--line-2); }
@media (max-width: 860px) { .hub-head { grid-template-columns: minmax(0, 1fr); } .hub-time { width: auto; } }
@media (max-width: 720px) { .hub-head .avatar.lg { width: 52px; height: 52px; font-size: 17px; } .hub-head h1 { font-size: 22px; } }
.hub-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: var(--fs-sm); color: var(--ink-2); }
.hub-facts span { display: inline-flex; align-items: center; gap: 6px; }
.hub-facts .icon { color: var(--muted); }
.pay-meter { display: grid; gap: 6px; }
.pay-meter .row { font-size: var(--fs-xs); color: var(--muted); }

/* ---------- stage panels (accordion): opening slides the content in */
details.panel { background: var(--graphite); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); transition: border-color var(--t2); interpolate-size: allow-keywords; }
details.panel > summary { position: relative; list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--s3); min-height: 54px; padding: var(--s3) 48px var(--s3) var(--s5); font-weight: 600; border-radius: var(--radius-lg); transition: background var(--t2); }
details.panel > summary > span:not(.badge):not(.panel-n) { min-width: 0; }
details.panel > summary:hover { background: rgba(var(--ink-rgb), .02); }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::after { content: ""; position: absolute; right: 22px; top: 50%; margin-top: -5px; width: 8px; height: 8px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); transition: transform var(--t3) var(--ease); }
details.panel[open] > summary::after { transform: rotate(45deg); }
details.panel[open] > summary { border-bottom: 1px solid var(--line-2); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
details.panel::details-content { height: 0; overflow: clip; transition: height var(--t3) var(--ease), content-visibility var(--t3) allow-discrete; }
details.panel[open]::details-content { height: auto; }
details.panel .panel-b { padding: var(--s4) var(--s5) var(--s5); }
details.panel.current { border-color: var(--red-line); }
.panel-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); color: var(--muted); font-size: var(--fs-xs); font-weight: 700; flex: none; border: 1px solid var(--line-strong); font-variant-numeric: tabular-nums; }
details.panel.current .panel-n { background: var(--red); border-color: var(--red); color: #fff; }
.sub-card { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3) var(--s4); background: var(--sunken); }

/* ---------- photo capture & comparison */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s3); }
.photo-slot { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--sunken); display: flex; flex-direction: column; transition: border-color var(--t2); }
.photo-slot.done { border-color: var(--success-line); }
.photo-slot.required:not(.done) { border-color: var(--warn-line); }
.photo-frame { position: relative; aspect-ratio: 4 / 3; background: radial-gradient(circle at 50% 40%, rgba(var(--ink-rgb), .05), transparent 65%), #0b0b0d; display: grid; place-items: center; color: var(--muted); font-size: var(--fs-sm); text-align: center; }
.photo-frame img, .photo-frame video { width: 100%; height: 100%; object-fit: cover; display: block; animation: fade-in var(--t3) var(--ease); }
.photo-frame .ph { padding: var(--s3); }
.photo-frame .ph .icon { color: var(--silver); }
.photo-meta { padding: var(--s2) var(--s3) var(--s3); display: grid; gap: var(--s2); }
.photo-meta .title { font-weight: 600; font-size: var(--fs-sm); }
.photo-meta > a { justify-self: start; padding-block: 3px; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.photo-status { font-size: var(--fs-xs); color: var(--muted); }
.photo-status.ok { color: var(--success); font-weight: 600; }
.photo-status.err { color: var(--danger); font-weight: 600; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.compare figure { margin: 0; }
.compare figcaption { font-size: var(--fs-xs); color: var(--muted); padding-top: 4px; }
.compare .label-tag { position: absolute; top: 8px; left: 8px; background: rgba(0, 0, 0, .72); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--pill); }
.compare-slider { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: #0b0b0d; }
.compare-slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare-slider .after-wrap { position: absolute; inset: 0; overflow: hidden; }
.compare-slider .divider { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.flag { border-left: 3px solid var(--viz-warn); background: var(--warn-bg); padding: var(--s2) var(--s3); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.flag.resolved { border-left-color: var(--success); background: var(--success-bg); }

/* ---------- timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px; background: var(--line-strong); }
.timeline li { position: relative; padding: 0 0 var(--s3) 24px; }
.timeline li::before { content: ""; position: absolute; left: 1px; top: 5px; width: 11px; height: 11px; border-radius: 50%; background: var(--graphite); border: 2px solid var(--silver); }
.timeline li.override::before { border-color: var(--danger); }
.timeline li.minor::before { border-color: var(--faint); }
.timeline .when { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- signature & terms; the signing pad stays paper-white so ink reads like ink */
.sig-pad { width: 100%; height: 170px; border: 1.5px dashed #b9bec6; border-radius: var(--radius); background: #f6f6f7; touch-action: none; display: block; }
.terms-scroll { max-height: 52vh; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4) var(--s5); background: var(--sunken); color: var(--ink-2); }
.terms-scroll h3 { margin: var(--s4) 0 var(--s2); color: var(--ink); }
.terms-scroll h3:first-child { margin-top: 0; }
.terms-scroll ul { margin: 0; padding-left: var(--s5); }
.terms-scroll li { margin-bottom: 6px; }
.read-progress { height: 4px; background: rgba(var(--ink-rgb), .07); border-radius: var(--pill); overflow: hidden; }
.read-progress span { display: block; height: 100%; width: 0; background: var(--red); transition: width var(--t2); }
.locked { opacity: .5; pointer-events: none; }

/* ---------- illustration (vector, drawn with these strokes and fills) */
.art { display: block; max-width: 100%; height: auto; }
.art .a-line { stroke: rgba(var(--ink-rgb), .1); }
.art .a-street { stroke: rgba(var(--ink-rgb), .16); }
.art .a-route { stroke: var(--silver); }
.art .a-red { fill: var(--red); }
.art .a-dim { fill: rgba(var(--ink-rgb), .05); }
.art .a-silver { fill: var(--silver); }
.art .a-ink { fill: var(--charcoal); }

/* ---------- portal (customer-facing, phone first) */
.portal { max-width: 720px; margin: 0 auto; padding: var(--s4) var(--s4) var(--s7); }
.portal-head { position: relative; overflow: hidden; padding: var(--s5); margin-bottom: var(--s4); border-radius: var(--radius-lg); border: 1px solid var(--line); background: radial-gradient(520px 220px at 100% 0%, rgba(225, 29, 53, .14), transparent 70%), var(--graphite); box-shadow: var(--shadow-1); }
.portal-head h1 { font-size: 30px; }
.portal-head .muted { color: var(--ink-2); }
.portal-head .logo { margin-bottom: var(--s4); }
.portal-foot { text-align: center; padding: var(--s4) 0; color: var(--muted); font-size: var(--fs-xs); }

/* ---------- customer consent page (portal/terms): numbered steps, bold titles, colour per step. Scoped to .tp-* so the shared card, table and checkbox styles stay as they are. */
.tp-title::after { content: ""; display: block; width: 64px; height: 5px; margin-top: 12px; background: var(--red); box-shadow: 5px 5px 0 var(--ink); }
.tp-card { border-top: 4px solid var(--fresh); box-shadow: var(--shadow-2); }
.tp-form { border-top-color: var(--red); }
.tp-h { display: flex; align-items: center; gap: var(--s3); padding: var(--s4) var(--s5) var(--s2); }
.tp-h h2, .tp-sub { font-family: var(--display); font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.015em; color: var(--ink); }
.tp-sub { display: flex; align-items: center; gap: var(--s3); margin: 0; }
.tp-n { flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--red); color: #fff; font: 700 var(--fs)/1 var(--display); box-shadow: 0 0 0 4px var(--red-tint); }
.tp-sum .tp-n { background: var(--fresh); box-shadow: 0 0 0 4px var(--fresh-tint); }
.tp-ver { margin-left: 6px; padding: 2px 10px; border-radius: var(--pill); background: var(--silver-tint); color: var(--ink-2); font: 600 var(--fs-xs)/1.5 var(--font); vertical-align: middle; white-space: nowrap; }
.tp-sum .kv { padding: var(--s4); border-radius: var(--radius); background: var(--sunken); }
.tp-sum .kv dt { color: var(--ink-2); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding-top: 3px; }
.tp-sum .kv dd { color: var(--ink); font-size: var(--fs-md); font-weight: 700; }
.tp-sum .kv dd .muted { font-weight: 500; font-size: var(--fs); }
.tp-quote td { font-size: var(--fs); }
.tp-quote td.num { text-align: right; white-space: nowrap; font-weight: 700; }
.tp-quote tfoot tr:first-child td { background: var(--red-wash); border-top: 2px solid var(--red-line); color: var(--red-ink); font-size: var(--fs-lg); font-weight: 700; }
.tp-quote tfoot tr:last-child td { background: var(--fresh-tint); color: var(--ink); font-size: var(--fs); }
.tp-form .read-progress { height: 8px; }
.tp-form .read-progress span { background: linear-gradient(90deg, var(--fresh), var(--red)); }
.tp-terms { max-height: 56vh; padding: var(--s5); border: 2px solid var(--line-strong); background: #fff; color: var(--ink); font-size: var(--fs-md); line-height: 1.7; box-shadow: inset 0 -18px 14px -14px rgba(var(--ink-rgb), .14); }
.tp-terms h3 { margin: var(--s5) 0 var(--s2); padding-bottom: 6px; border-bottom: 2px solid var(--red-line); color: var(--red-ink); font-family: var(--display); font-size: var(--fs-lg); font-weight: 700; }
.tp-terms li { margin-bottom: 8px; }
.tp-terms li::marker { color: var(--red); }
.tp-agree .check { margin: 0; padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: var(--graphite); font-size: var(--fs); line-height: 1.5; transition: background var(--t2), border-color var(--t2); }
.tp-agree .check + .check { margin-top: var(--s2); }
.tp-agree .check input { width: 22px; height: 22px; accent-color: var(--success-fill); }
.tp-agree .check:has(input:checked) { background: var(--success-bg); border-color: var(--success-line); }
.tp-agree .field > label, .tp-sign .field > label { color: var(--ink); font-size: var(--fs-md); font-weight: 700; }
.tp-agree input[type=text] { min-height: 48px; font-size: var(--fs-md); border-width: 1.5px; }
.tp-sign .sig-pad { border: 2px dashed var(--fresh); background: #fff; }
.tp-submit { width: 100%; min-height: 54px; font-size: var(--fs-md); font-weight: 700; }

/* ---------- error page */
.error-page { padding-top: 10vh; }
.error-page .card-b { display: grid; justify-items: start; gap: var(--s3); padding: var(--s6); }

/* ---------- auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr); }
.auth-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: var(--s6); padding: var(--s7); background: radial-gradient(640px 420px at 85% 75%, rgba(225, 29, 53, .12), transparent 70%), linear-gradient(rgba(var(--ink-rgb), .025) 1px, transparent 1px) 0 0 / 100% 48px, var(--charcoal); border-right: 1px solid var(--line); color: var(--ink-2); }
.auth-art h1 { font-size: clamp(34px, 3.8vw, 52px); line-height: 1.04; letter-spacing: -.03em; max-width: 15ch; margin-bottom: var(--s3); }
.auth-art p { max-width: 44ch; margin: 0; color: var(--muted); font-size: var(--fs-md); }
.auth-points { list-style: none; margin: var(--s5) 0 0; padding: 0; display: grid; gap: var(--s3); }
.auth-points li { display: flex; gap: var(--s3); align-items: center; color: var(--ink-2); }
.auth-form { display: grid; place-items: center; padding: var(--s6) var(--s5); }
.auth-card { width: 100%; max-width: 380px; padding: var(--s6) var(--s5); border-radius: 18px; background: var(--graphite); border: 1px solid var(--line); box-shadow: var(--shadow-3); }
.auth-card h2 { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -.02em; }
@media (max-width: 860px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { padding: var(--s5); gap: var(--s4); border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-points { display: none; }
}

/* ---------- motion, transparency & print */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--t2); animation-timing-function: var(--ease); }
@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; }
  .live-dot::after, .skeleton, .state-late .state-dot { animation: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .topbar, .bottom-nav, .lp-top, .card-f.sticky-f { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--charcoal); }
  .dialog::backdrop, .drawer::backdrop, .cmdk::backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(var(--ink-rgb), .5); }
}
@media print {
  :root { color-scheme: light; --ink: #111; --ink-2: #333; --muted: #555; --line: #ccc; --line-2: #ddd; --graphite: #fff; --raised: #fff; }
  html, body { background: #fff; }
  body::before { display: none; }
  .kpi .value { background: none; color: #111; }
  .sidebar, .topbar, .bottom-nav, .no-print, .chart-data > summary, .toaster, .next-pill, .progress { display: none !important; }
  .app { display: block; } .content { padding: 0; animation: none; } .card, .kpi, .kpi-strip { break-inside: avoid; box-shadow: none; }
}

/* ---------- game slideshow (landing): title cards that glide by; paused on hover, still for reduced motion */
.lp-showcase { padding-bottom: var(--s6); }
.lp-reel { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.lp-reel-track { display: flex; gap: var(--s4); width: max-content; margin: 0; padding: var(--s2) var(--s4) var(--s5); list-style: none; animation: lp-reel 48s linear infinite; }
.lp-reel:hover .lp-reel-track, .lp-reel:focus-within .lp-reel-track { animation-play-state: paused; }
.lp-game-card { position: relative; flex: none; width: 240px; min-height: 124px; display: flex; flex-direction: column; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s4) var(--s3); color: #fff; background: linear-gradient(135deg, hsl(var(--h) 75% 46%), hsl(calc(var(--h) + 32) 80% 28%)); box-shadow: 0 6px 0 hsl(var(--h) 70% 22%), var(--shadow-1); clip-path: polygon(0 10px, 10px 10px, 10px 0, calc(100% - 10px) 0, calc(100% - 10px) 10px, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 10px calc(100% - 10px), 0 calc(100% - 10px)); }
.lp-game-card::before { content: ""; position: absolute; inset: 10px 10px auto auto; width: 56px; height: 56px; background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .35), transparent 65%); pointer-events: none; }
.lp-game-card strong { font-family: var(--display); font-size: var(--fs-xl); line-height: 1.05; letter-spacing: .01em; text-transform: uppercase; color: #fff; text-shadow: 2px 2px 0 hsl(var(--h) 70% 20%); overflow-wrap: anywhere; }
.lp-game-c { align-self: flex-start; padding: 2px 10px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .35); color: #fff; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
@keyframes lp-reel { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .lp-reel { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .lp-reel-track { animation: none; }
}

/* ---------- running text under the header: dark band so it reads as an arcade marquee on the light page */
.lp-ticker { overflow: hidden; background: var(--ink); color: #fff; border-bottom: 3px solid var(--red); }
.lp-tick-track { display: flex; width: max-content; animation: lp-tick 40s linear infinite; }
.lp-ticker:hover .lp-tick-track { animation-play-state: paused; }
.lp-tick-copy { display: flex; flex: none; margin: 0; padding: 0; list-style: none; }
.lp-tick-copy li { display: inline-flex; align-items: center; gap: var(--s5); padding: 10px var(--s5) 10px 0; font-family: var(--display); font-size: var(--fs-sm); letter-spacing: .12em; white-space: nowrap; }
.lp-tick-copy li::after { content: ""; width: 8px; height: 8px; background: var(--red-hot); transform: rotate(45deg); flex: none; }
@keyframes lp-tick { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .lp-tick-track { animation: none; width: auto; }
  .lp-tick-copy + .lp-tick-copy { display: none; }
  .lp-tick-copy { flex-wrap: wrap; justify-content: center; padding-inline: var(--s4); }
}

/* ---------- landing page (public, phone first)
   Same system as the app: graphite surfaces, Instrument Sans for headlines and prices, silver numerals, one red action.
   The hero shows the real availability of today (from the unit schedule) instead of an illustration. */
.lp { background: transparent; }
.lp-wrap { max-width: 1160px; margin: 0 auto; padding: 0 var(--s5); }
.lp-top { position: sticky; top: 0; z-index: 50; background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-bottom: 1px solid var(--line); }
.lp-top-in { display: flex; align-items: center; gap: var(--s4); height: 64px; }
.lp-nav { display: flex; gap: 4px; margin-left: auto; }
.lp-nav a { padding: 6px 12px; border-radius: var(--pill); color: var(--ink-2); font-weight: 500; font-size: var(--fs-sm); transition: background var(--t2), color var(--t2); }
.lp-nav a:hover { color: var(--ink); background: rgba(var(--ink-rgb), .05); text-decoration: none; }
.lp-ghost-dark { background: rgba(var(--ink-rgb), .03); border-color: var(--line-strong); color: var(--ink); }
.lp-ghost-dark:hover { background: rgba(var(--ink-rgb), .07); border-color: rgba(var(--ink-rgb), .2); }

.lp-hero { position: relative; isolation: isolate; padding: var(--s8) 0 var(--s7); overflow: hidden; }
.lp-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(560px 420px at 78% 46%, rgba(225, 29, 53, .14), transparent 70%),
              linear-gradient(rgba(var(--ink-rgb), .03) 1px, transparent 1px) 0 0 / 56px 56px,
              linear-gradient(90deg, rgba(var(--ink-rgb), .03) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 20%, transparent 75%); }
.lp-hero-in { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: var(--s7); align-items: center; }
.lp-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: var(--s5); }
.lp-pill { display: inline-flex; gap: 8px; align-items: center; height: 32px; padding: 0 14px 0 12px; border-radius: var(--pill); background: rgba(var(--ink-rgb), .04); border: 1px solid var(--line-strong); color: var(--ink-2); font-weight: 500; font-size: var(--fs-sm); margin: 0; }
.lp-pill .icon { color: var(--silver); }
.lp-new { display: inline-flex; align-items: center; gap: 10px; height: 32px; padding: 0 14px 0 4px; border-radius: var(--pill); background: var(--red-wash); border: 1px solid var(--red-line); color: var(--ink); font-weight: 550; font-size: var(--fs-sm); text-decoration: none !important; transition: background var(--t2); }
.lp-new:hover { background: var(--red-tint); }
.lp-new-tag { display: inline-grid; place-items: center; height: 24px; padding: 0 10px; border-radius: var(--pill); background: var(--red); color: #fff; font-size: var(--fs-xs); font-weight: 700; }
.lp-hero h1 { font-size: clamp(40px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -.035em; max-width: 14ch; margin-bottom: var(--s4); }
.lp-hero h1.is-long { font-size: clamp(36px, 4.6vw, 58px); max-width: 16ch; }
.lp-lede { font-size: clamp(16px, 1.5vw, 18px); line-height: 1.6; color: var(--muted); max-width: 46ch; margin-bottom: var(--s5); }
.lp-actions { display: flex; flex-wrap: wrap; gap: var(--s3); }
.lp-from { list-style: none; padding: 0; margin: var(--s6) 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.lp-from li { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 14px; border-radius: var(--radius); background: rgba(var(--ink-rgb), .025); border: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); }
.lp-from b { color: var(--ink); font-weight: 600; }
.lp-from .price { font-family: var(--display); font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-per { color: var(--muted); font-size: var(--fs-sm); }

/* the live availability panel: real numbers from today's unit schedule */
.lp-live-panel { position: relative; padding: var(--s5); border-radius: var(--radius-xl); background: linear-gradient(180deg, rgba(var(--ink-rgb), .04), rgba(var(--ink-rgb), .01)), var(--graphite); border: 1px solid var(--line-strong); box-shadow: var(--shadow-3); }
.lp-live-panel::before { content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(var(--ink-rgb), .35), transparent); }
.lp-live-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.lp-live-t { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 600; color: var(--ink); }
.lp-live-k { color: var(--muted); font-size: var(--fs-xs); }
.lp-live-rows { display: grid; gap: var(--s3); }
.lp-live-row { display: grid; grid-template-columns: minmax(84px, max-content) minmax(0, 1fr) auto; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--radius); background: var(--sunken); border: 1px solid var(--line); }
.lp-live-name { font-family: var(--display); font-weight: 700; color: var(--ink); white-space: nowrap; }
.lp-bar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; max-width: 180px; }
.lp-bar i { height: 8px; border-radius: 3px; background: rgba(var(--ink-rgb), .08); }
.lp-bar i.on { background: var(--silver); transform-origin: left; animation: lp-fill var(--t4) var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 200ms); }
@keyframes lp-fill { from { transform: scaleX(0); opacity: 0; } to { transform: none; opacity: 1; } }
.lp-live-val { font-size: var(--fs-sm); color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lp-live-val b { font-family: var(--display); font-weight: 700; color: var(--ink); }
.lp-live-f { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); }
.lp-hud-link { font-weight: 600; }

.lp-trust { list-style: none; margin: var(--s7) 0 0; padding: var(--s5) 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); border-top: 1px solid var(--line); }
.lp-trust li { display: flex; gap: 14px; align-items: flex-start; font-size: var(--fs-sm); line-height: 1.55; color: var(--muted); }
.lp-trust strong { color: var(--ink); display: block; font-size: var(--fs); font-weight: 600; margin-bottom: 2px; }
.lp-badge { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; color: var(--silver); background: linear-gradient(180deg, var(--raised), var(--sunken)); border: 1px solid var(--line-strong); box-shadow: inset 0 1px 0 rgba(var(--ink-rgb), .06); }
.lp-badge .icon { width: 20px; height: 20px; }

.lp-section { padding: 88px 0; scroll-margin-top: 64px; }
.lp-alt { background: rgba(var(--ink-rgb), .012); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.lp-head { margin-bottom: var(--s6); max-width: 680px; }
.lp-head h2 { display: flex; align-items: center; gap: 14px; font-family: var(--display); font-weight: 700; font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -.03em; line-height: 1.08; margin-bottom: 12px; }
.lp-head h2 .ico { --ico: 40px; }
.lp-head p { color: var(--muted); font-size: var(--fs-md); margin: 0; }
.lp-head h2, .lp-band h2, .lp-hero h1 { text-wrap: balance; }

.lp-check { display: grid; grid-template-columns: auto minmax(150px, 1fr) minmax(110px, .7fr) minmax(110px, .7fr) auto auto; gap: var(--s3) var(--s4); align-items: end; padding: var(--s5); border-radius: var(--radius-xl); }
.lp-check.is-pickup { grid-template-columns: auto minmax(150px, 1fr) minmax(110px, .7fr) minmax(110px, .7fr) auto; }
.lp-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.lp-field legend { font-size: var(--fs-sm); font-weight: 550; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.lp-check .seg { display: flex; }
.lp-check .seg label { padding: 7px 14px; text-align: center; flex: 1; white-space: nowrap; }
.lp-check .btn-lg { min-height: 40px; }
.lp-result { display: flex; gap: var(--s4); align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: var(--s4); padding: var(--s4) var(--s5); animation: page-in var(--t3) var(--ease) both; }
.lp-result > div { flex: 1 1 360px; }
.lp-result p { margin: 0 0 4px; }
.lp-result-title { font-weight: 650; font-size: var(--fs-md); display: flex; gap: 8px; align-items: center; color: var(--ink); }
.lp-result.is-ok { border-color: var(--success-line); }
.lp-result.is-ok .lp-result-title .icon { color: var(--success); }
.lp-result.is-full { border-color: var(--warn-line); }
.lp-result.is-full .lp-result-title .icon { color: var(--warn); }

/* price list: one panel per console; packages as rows (length · leader · price); the best deal carries a red tag */
.lp-kit { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 var(--s5); }
.lp-kit-title { margin: 0; font-weight: 600; color: var(--ink-2); }
.lp-kit-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lp-kit-list li { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 10px; border: 1px solid var(--line); border-radius: var(--pill); background: rgba(var(--ink-rgb), .025); font-size: var(--fs-sm); color: var(--ink-2); }
.lp-kit-list .icon { color: var(--silver); }
.lp-plans { display: flex; flex-wrap: wrap; gap: var(--s5); }
.lp-plan { position: relative; flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; container: plan / inline-size; background: var(--graphite); border: 1px solid var(--line); border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-1); transition: border-color var(--t2), transform var(--t3) var(--ease), box-shadow var(--t3); }
.lp-plan:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.lp-plan-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px var(--s3); padding: var(--s5) var(--s5) var(--s4); border-bottom: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(var(--ink-rgb), .03), transparent); }
.lp-plan-head .ico { --ico: 42px; }
.lp-plan h3 { font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1.05; letter-spacing: -.02em; scroll-margin-top: 96px; }
.lp-plan h3.is-long { font-size: 22px; }
.lp-plan-sub { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.lp-units { align-self: start; margin-top: 2px; height: 24px; padding: 0 10px; border-radius: var(--pill); background: rgba(var(--ink-rgb), .05); border: 1px solid var(--line); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; line-height: 22px; white-space: nowrap; }
.lp-plan-hot { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 6px 0 0; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500; }
.lp-plan-hot .lp-new-tag { height: 22px; }
.lp-plan-body { flex: 1; display: grid; grid-template-rows: auto auto 1fr auto; gap: var(--s4); padding: var(--s3) var(--s5) var(--s5); }
.lp-menu { list-style: none; margin: 0 -12px; padding: 0; display: grid; gap: 2px; }
.lp-pk { display: grid; grid-template-columns: auto minmax(16px, 1fr) auto 14px; grid-template-areas: "len dots price go" "meta meta meta ."; align-items: center; gap: 2px 10px; padding: 10px 12px; border: 1px solid transparent; border-radius: var(--radius); color: var(--ink); text-decoration: none !important; transition: background var(--t2), border-color var(--t2); }
.lp-pk:hover, .lp-pk:focus-visible { background: rgba(var(--ink-rgb), .04); border-color: var(--line); }
.lp-pk:focus-visible { outline: none; box-shadow: var(--focus); }
.lp-pk::after { content: ""; grid-area: go; width: 7px; height: 7px; border-top: 1.5px solid var(--muted); border-right: 1.5px solid var(--muted); transform: rotate(45deg); opacity: 0; transition: opacity var(--t2), transform var(--t2) var(--ease); }
.lp-pk:hover::after, .lp-pk:focus-visible::after { opacity: 1; transform: translateX(2px) rotate(45deg); }
.lp-pk.is-best { background: var(--red-wash); border-color: var(--red-line); }
.lp-pk.is-best::after { opacity: 1; border-color: var(--red-ink); }
.lp-pk.is-best:hover, .lp-pk.is-best:focus-visible { background: var(--red-tint); }
.lp-pk-len { grid-area: len; color: var(--ink-2); font-weight: 550; }
.lp-pk-dots { grid-area: dots; height: 1px; background: repeating-linear-gradient(90deg, rgba(var(--ink-rgb), .18) 0 2px, transparent 2px 6px); }
.lp-pk-price { grid-area: price; font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -.01em; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-pk-meta { grid-area: meta; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 8px; font-size: var(--fs-xs); color: var(--muted); }
.lp-tag { margin-right: auto; height: 20px; padding: 0 8px; border-radius: var(--pill); background: var(--red); color: #fff; font-size: var(--fs-xs); font-weight: 700; line-height: 20px; }
.lp-plan-ex { margin: var(--s2) 0 0; font-size: var(--fs-sm); color: var(--muted); }
.lp-spec { margin: 0; padding-top: var(--s4); border-top: 1px solid var(--line-2); display: grid; gap: 8px; font-size: var(--fs-sm); }
.lp-spec div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--s3); }
.lp-spec dt { color: var(--muted); font-weight: 500; }
.lp-spec dd { margin: 0; color: var(--ink-2); }
.lp-plan-games { display: grid; align-content: start; gap: 8px; }
.lp-games-title { margin: 0; font-size: var(--fs-sm); font-weight: 550; color: var(--muted); }
.lp-games-title span { margin-left: 4px; padding: 0 7px; border-radius: var(--pill); background: rgba(var(--ink-rgb), .06); color: var(--ink-2); font-size: var(--fs-xs); }
.lp-games { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.lp-games li { height: 26px; padding: 0 10px; border-radius: var(--pill); background: rgba(var(--ink-rgb), .04); border: 1px solid var(--line); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 500; line-height: 24px; }
.lp-games li.is-hot { background: var(--red-tint); border-color: var(--red-line); color: var(--ink); }
.lp-more summary { display: inline-flex; align-items: center; height: 26px; cursor: pointer; list-style: none; padding: 0 10px; border: 1px dashed var(--line-strong); border-radius: var(--pill); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; }
.lp-more summary:hover { color: var(--ink); border-color: rgba(var(--ink-rgb), .24); }
.lp-more summary::-webkit-details-marker { display: none; }
.lp-more summary:focus-visible { outline: none; box-shadow: var(--focus); }
.lp-more[open] .lp-more-c, .lp-more:not([open]) .lp-more-o { display: none; }
.lp-more .lp-games { margin-top: 8px; }
.lp-plan-cta { align-self: end; }
@container plan (min-width: 640px) {
  .lp-plan-body { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); grid-template-rows: auto 1fr auto; grid-template-areas: "prices spec" "prices games" "prices cta"; column-gap: var(--s6); }
  .lp-plan-prices { grid-area: prices; }
  .lp-spec { grid-area: spec; padding-top: var(--s2); border-top: 0; }
  .lp-plan-games { grid-area: games; }
  .lp-plan-cta { grid-area: cta; }
}
@container plan (max-width: 340px) { .lp-pk-price { font-size: 18px; } }
.lp-note { display: flex; gap: 12px; align-items: flex-start; margin-top: var(--s5); padding: var(--s4) var(--s5); border-radius: var(--radius-lg); background: rgba(var(--ink-rgb), .02); border: 1px solid var(--line); color: var(--ink-2); }
.lp-note .icon { color: var(--silver); margin-top: 2px; flex: none; }
.lp-note p { margin: 0; }

.lp-items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--s4); }
.lp-item { display: flex; gap: 14px; padding: var(--s4) var(--s5) var(--s4) var(--s4); background: var(--graphite); border: 1px solid var(--line); border-radius: var(--radius-lg); transition: border-color var(--t2); }
.lp-item:hover { border-color: var(--line-strong); }
.lp-item h3 { font-size: var(--fs-md); margin: 2px 0 6px; }
.lp-item-price { margin: 0 0 8px; display: flex; align-items: baseline; gap: 4px; }
.lp-item-price .price { font-family: var(--display); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; color: var(--ink); }
.lp-item-note { margin: 0 0 4px; color: var(--ink-2); font-size: var(--fs-sm); }
.lp-item-for { margin: 0; color: var(--muted); font-size: var(--fs-xs); font-weight: 500; }

.lp-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s5); counter-reset: step; }
.lp-steps li { position: relative; padding: var(--s5) var(--s4) var(--s4); border-top: 1px solid var(--line-strong); }
.lp-steps li::before { content: ""; position: absolute; left: 0; top: -1px; width: 48px; height: 2px; background: var(--red); }
.lp-step-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s4); }
.lp-lv { font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-steps .ico { --ico: 40px; }
.lp-steps h3 { font-size: var(--fs-md); margin-bottom: 6px; }
.lp-steps p { color: var(--muted); margin: 0; }

.lp-split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: var(--s7); align-items: start; }
.lp-req { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s4); }
.lp-req li { display: flex; gap: 14px; }
.lp-req li > .icon { width: 40px; height: 40px; padding: 10px; border-radius: 11px; color: var(--silver); background: linear-gradient(180deg, var(--raised), var(--sunken)); border: 1px solid var(--line-strong); flex: none; }
.lp-req strong { color: var(--ink); font-weight: 600; }
.lp-req p { margin: 2px 0 0; color: var(--muted); }
.lp-privacy { position: relative; overflow: hidden; padding: var(--s5); border-radius: var(--radius-xl); background: radial-gradient(320px 200px at 100% 0%, rgba(225, 29, 53, .12), transparent 70%), var(--graphite); border: 1px solid var(--line-strong); box-shadow: var(--shadow-2); }
.lp-privacy h3 { font-size: var(--fs-md); margin: var(--s4) 0 var(--s2); }
.lp-privacy p { margin: 0; line-height: 1.65; color: var(--ink-2); }
.lp-loc { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: var(--s7); align-items: center; }
.lp-loc-actions { margin-top: var(--s5); }
.lp-loc-art { border-radius: var(--radius-xl); border: 1px solid var(--line-strong); background: var(--graphite); overflow: hidden; box-shadow: var(--shadow-2); }
.lp-loc-art .art { width: 100%; }
.art .art-label { font: 600 13px var(--font); fill: var(--ink); }

/* questions as a list divided by hairlines (not a stack of cards) */
.lp-faq { display: grid; max-width: 860px; border-top: 1px solid var(--line); }
.lp-faq details { border-bottom: 1px solid var(--line); }
.lp-faq summary { position: relative; cursor: pointer; padding: var(--s4) 48px var(--s4) 0; font-weight: 600; list-style: none; color: var(--ink); transition: color var(--t2); }
.lp-faq summary:hover { color: var(--red-ink); }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::before, .lp-faq summary::after { content: ""; position: absolute; right: 12px; top: 50%; width: 12px; height: 1.5px; background: var(--muted); transition: transform var(--t3) var(--ease), background var(--t2); }
.lp-faq summary::after { transform: rotate(90deg); }
.lp-faq details[open] summary::after { transform: rotate(0deg); }
.lp-faq details[open] summary::before, .lp-faq details[open] summary::after { background: var(--red-ink); }
.lp-faq summary:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }
.lp-faq p { margin: 0; padding: 0 48px var(--s4) 0; color: var(--muted); line-height: 1.65; animation: reveal var(--t3) var(--ease); }

.lp-band { padding: var(--s7) 0 var(--s8); }
.lp-wrap.lp-band-in { max-width: calc(1160px - 2 * var(--s5)); }
.lp-band-in { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: var(--s5); flex-wrap: wrap; padding: var(--s6); border-radius: 24px; border: 1px solid var(--line-strong); background: radial-gradient(420px 260px at 92% 50%, rgba(225, 29, 53, .12), transparent 70%), var(--graphite); box-shadow: var(--shadow-2); }
.lp-band-copy { display: flex; align-items: center; gap: var(--s4); }
.lp-band h2 { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.05; letter-spacing: -.03em; margin-bottom: 8px; }
.lp-band p { margin: 0; color: var(--muted); }
.lp-foot { color: var(--muted); border-top: 1px solid var(--line); padding: var(--s6) 0 calc(var(--s5) + env(safe-area-inset-bottom)); }
.lp-foot-in { display: flex; gap: var(--s5); justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.lp-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: var(--fs-sm); }
.lp-foot li { display: flex; gap: 8px; align-items: center; }
.lp-foot li .icon { color: var(--faint); }
.lp-foot-meta { width: 100%; margin: var(--s4) 0 0; padding-top: var(--s4); border-top: 1px solid var(--line-2); font-size: var(--fs-xs); display: flex; align-items: center; gap: var(--s4); }
.lp-foot-meta a { color: var(--ink-2); }
.lp-foot a { display: inline-block; padding: 4px 0; }
.lp-float { display: none; }
@media (max-width: 960px) {
  .lp-nav { display: none; }
  .lp-top-in { justify-content: space-between; }
  .lp-cta-top { margin-left: auto; }
  .lp-hero-in, .lp-split, .lp-loc { grid-template-columns: minmax(0, 1fr); }
  .lp-screen { max-width: 600px; }
  .lp-loc-art { max-width: 520px; }
  .lp-hero { padding-top: var(--s7); }
  .lp-check, .lp-check.is-pickup { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-check > .lp-field:first-child, .lp-check > button, .lp-check.is-pickup .lp-f-date { grid-column: 1 / -1; }
  .lp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .lp-wrap { padding: 0 var(--s4); }
  .lp-cta-top span { display: none; }
  .lp-actions .btn { width: 100%; }
  .lp-trust, .lp-steps, .lp-check, .lp-check.is-pickup { grid-template-columns: minmax(0, 1fr); }
  .lp-check { padding: var(--s4); }
  .lp-check > .lp-field:last-of-type { grid-column: auto; }
  .lp-section { padding: var(--s7) 0; }
  .lp-band { padding: var(--s5) 0 var(--s7); }
  .lp-band-in { padding: var(--s5); }
  .lp-wrap.lp-band-in { max-width: calc(100% - 2 * var(--s4)); }
  .lp-head h2 .ico { --ico: 36px; border-radius: 10px; }
  .lp-live-panel { padding: var(--s4); }
  .lp-live-row { grid-template-columns: minmax(0, 1fr) auto; }
  .lp-live-row .lp-bar { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .lp-plan-head { padding: var(--s4); }
  .lp-plan-body { padding: var(--s3) var(--s4) var(--s4); }
  .lp-band-copy { align-items: flex-start; }
  .lp-float { display: inline-flex; position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; border-radius: var(--pill); opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity var(--t3) var(--ease), transform var(--t3) var(--ease); box-shadow: var(--shadow-3); }
  .lp-float.is-visible { opacity: 1; pointer-events: auto; transform: none; }
  .lp-foot { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
}
