/* Abundance Factories product app: design tokens and every shared component.
   Views use these classes as they are and add only layout of their own in /app/views/<name>.css.
   Light theme, flat cards with 1 px borders, shadows only on floating things.
   Hover and press styles are written for :hover / :active and for .is-hover / .is-pressed, because scripted
   (synthetic) events never trigger the CSS pseudo-classes (core/ui.js mirrors them). */

/* ---------------------------------------------------------------- tokens */
:root {
  --bg-app: #F6F7F9; --bg-surface: #FFFFFF; --bg-subtle: #F1F3F6; --bg-sunken: #E9ECF1;
  --border-subtle: #E6E9EE; --border: #D5DAE1; --border-strong: #B8C0CC;
  --text: #0F1722; --text-2: #4A5565; --text-3: #7A8494; --text-disabled: #A7AFBB;
  --accent: #2F6DF0; --accent-hover: #245CD6; --accent-pressed: #1D4DB8; --accent-subtle: #EAF1FE; --accent-border: #BBD0FB;
  --focus: 0 0 0 3px rgba(47,109,240,.30);
  --ok: #12834F; --ok-bg: #E7F5EE; --warn: #B25E09; --warn-bg: #FFF4E0; --warn-fill: #F2A20C;
  --bad: #D93025; --bad-bg: #FDECEC; --off: #7A8494; --off-bg: #F1F3F6;
  --va: #2F6DF0; --necessary: #9DB9F5; --motion: #F2A20C; --waiting: #64748B;
  --stage: #0B0F14; --chip-on-video: rgba(11,15,20,.72);
  --hand-left: #19B8D6; --hand-right: #E0489E;
  --part-1: #2F6DF0; --part-2: #F2A20C; --part-3: #12A594; --part-4: #8E4EC6; --part-5: #46A758; --part-6: #E93D82; --part-7: #0090FF; --part-8: #A18072;
  --hover: rgba(15,23,34,.05); --press: rgba(15,23,34,.09);
  --hatch: repeating-linear-gradient(45deg, rgba(255,255,255,.5) 0 2px, rgba(255,255,255,0) 2px 6px);

  --font: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r-chip: 4px; --r-ctl: 6px; --r-card: 8px; --r-panel: 12px; --r-pill: 999px;
  --sh-xs: 0 1px 2px rgba(15,23,34,.06);
  --sh-sm: 0 1px 2px rgba(15,23,34,.06), 0 2px 6px rgba(15,23,34,.06);
  --sh-md: 0 4px 12px rgba(15,23,34,.10), 0 1px 3px rgba(15,23,34,.08);
  --sh-lg: 0 16px 40px rgba(15,23,34,.16), 0 2px 8px rgba(15,23,34,.08);
  --ease: cubic-bezier(.2,.8,.2,1);
  --t-hover: 120ms; --t-press: 160ms; --t-pop: 200ms; --t-panel: 280ms; --t-route: 120ms;

  --page-pad: 20px; --gap: 12px; --card-pad: 16px;
  --sidebar-w: 216px; --topbar-h: 48px; --ask-w: 400px;
  --ctl-h: 32px; --ctl-h-sm: 28px; --row-h: 36px;
}
@media (min-width: 1600px) { :root { --page-pad: 24px; --gap: 16px; } }
@media (min-width: 1920px) { :root { --sidebar-w: 232px; } }

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 400 13px/20px var(--font); color: var(--text); background: var(--bg-app);
  font-feature-settings: "tnum"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility; overflow: hidden;
}
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4 { font-weight: 600; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; margin: 0; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
svg { display: block; flex: none; }
img, video, canvas { display: block; }
::selection { background: rgba(47,109,240,.22); }
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus); }
[hidden] { display: none !important; }
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------- type helpers */
.mono { font-family: var(--mono); font-feature-settings: "tnum", "zero" 0; letter-spacing: -0.01em; }
.overline { font: 600 11px/16px var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.text-bad { color: var(--bad); } .text-ok { color: var(--ok); } .text-warn { color: var(--warn); } .text-accent { color: var(--accent); }
.t-meta { font-size: 12px; line-height: 16px; }
.t-em { font-size: 14px; line-height: 20px; font-weight: 500; }
.h-section { font: 600 16px/24px var(--font); }
.h-page { font: 600 20px/28px var(--font); letter-spacing: -0.01em; }
.num { font-family: var(--mono); font-feature-settings: "tnum"; letter-spacing: -0.01em; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.link { color: var(--accent); font-weight: 500; cursor: pointer; border-radius: 3px; transition: color var(--t-hover); }
.link:is(:hover, .is-hover) { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 2px; }
.kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px;
  font: 500 11px/1 var(--font); color: var(--text-2); background: var(--bg-surface); border: 1px solid var(--border);
  border-bottom-width: 2px; border-radius: 4px; white-space: nowrap;
}

/* ---------------------------------------------------------------- layout helpers */
.row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row-wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.spacer { flex: 1 1 auto; }
.grow { flex: 1 1 0; min-width: 0; min-height: 0; }
.grid { display: grid; grid-template-columns: repeat(var(--cols, 12), minmax(0, 1fr)); gap: var(--gap); min-width: 0; }
.grid-2 { --cols: 2; } .grid-3 { --cols: 3; } .grid-4 { --cols: 4; } .grid-6 { --cols: 6; }
.col-1 { grid-column: span 1; } .col-2 { grid-column: span 2; } .col-3 { grid-column: span 3; } .col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; } .col-6 { grid-column: span 6; } .col-7 { grid-column: span 7; } .col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; } .col-10 { grid-column: span 10; } .col-11 { grid-column: span 11; } .col-12 { grid-column: span 12; }
.divider { height: 1px; background: var(--border-subtle); border: 0; margin: 0; flex: none; }
.divider-v { width: 1px; align-self: stretch; background: var(--border-subtle); flex: none; }

/* ---------------------------------------------------------------- shell */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); height: 100vh; min-width: 960px; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.main-row { flex: 1 1 0; display: flex; min-height: 0; min-width: 0; }
.content { position: relative; flex: 1 1 0; min-width: 0; min-height: 0; overflow: auto; opacity: 1; transition: opacity var(--t-route) linear; }
.content.is-leaving { opacity: 0; }
.view { height: 100%; min-height: 0; }
.ask-dock { flex: none; width: 0; min-height: 0; overflow: hidden; position: relative; transition: width var(--t-panel) var(--ease); }
.ask-dock > * { width: var(--ask-w); height: 100%; }
.app.ask-open .ask-dock { width: var(--ask-w); }
.layers { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.layers > * { pointer-events: auto; }
/* the one card shown instead of the app when it cannot start (core/app.js) */
.boot-error { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; background: var(--bg-app); }

.sidebar { display: flex; flex-direction: column; min-height: 0; padding: 10px 8px 8px; background: var(--bg-subtle); border-right: 1px solid var(--border-subtle); user-select: none; }
.brand { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border-radius: var(--r-ctl); font: 600 14px/20px var(--font); letter-spacing: -0.01em; }
.brand-mark { width: 22px; height: 22px; display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 22px; height: 22px; display: block; }
.ws { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 10px; padding: 7px 8px; border-radius: var(--r-ctl); background: var(--bg-surface); border: 1px solid var(--border-subtle); box-shadow: var(--sh-xs); transition: border-color var(--t-hover), box-shadow var(--t-hover); }
.ws:is(:hover, .is-hover, .is-open) { border-color: var(--border-strong); }
.ws-icon { width: 28px; height: 28px; border-radius: 6px; background: var(--accent-subtle); color: var(--accent); display: grid; place-items: center; flex: none; }
.ws-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ws-name { font-weight: 600; line-height: 18px; }
.ws-sub { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; color: var(--text-2); margin-top: 1px; }
.ws-info { display: flex; flex-direction: column; gap: 2px; width: 248px; cursor: default; }
.ws-info-name { margin-top: 4px; font-weight: 600; color: var(--text); }
.ws-info-sub { font-size: 12px; line-height: 16px; color: var(--text-2); }
.ws-info-note { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-subtle); font-size: 12px; line-height: 16px; color: var(--text-3); text-wrap: pretty; }
.ws:focus-visible { box-shadow: var(--focus); }
.nav { display: flex; flex-direction: column; gap: 1px; margin-top: 4px; overflow: auto; min-height: 0; flex: 1; }
.nav .overline { padding: 14px 8px 6px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 8px; border-radius: var(--r-ctl); color: var(--text-2); font-weight: 500; transition: background var(--t-hover), color var(--t-hover); }
.nav-item .icon { color: var(--text-3); transition: color var(--t-hover); }
.nav-item:is(:hover, .is-hover) { background: var(--hover); color: var(--text); }
.nav-item:is(:active, .is-pressed) { background: var(--press); }
.nav-item.is-active { background: var(--bg-surface); color: var(--text); box-shadow: var(--sh-xs), 0 0 0 1px var(--border-subtle); }
.nav-item.is-active .icon { color: var(--accent); }
.nav-item:focus-visible { box-shadow: var(--focus); }
.nav-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-foot { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-subtle); }
.user-row { display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; padding: 0 8px; border-radius: var(--r-ctl); transition: background var(--t-hover); }
.user-row:is(:hover, .is-hover, .is-open) { background: var(--hover); }
.user-row .icon-more { margin-left: auto; color: var(--text-3); }
.avatar { width: 24px; height: 24px; border-radius: 999px; background: var(--bg-sunken); color: var(--text-2); display: grid; place-items: center; flex: none; border: 1px solid var(--border); }
.user-name { font-weight: 500; }

.topbar { flex: none; height: var(--topbar-h); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(min-content, 1fr); align-items: center; gap: 16px; padding: 0 16px 0 20px; background: var(--bg-surface); border-bottom: 1px solid var(--border-subtle); position: relative; z-index: 5; }
.topbar-ask { width: min(480px, 38vw); height: 36px; display: flex; align-items: center; }
.topbar-ask:empty { width: 0; }
/* The right side is never clipped: its column is at least as wide as its content, the breadcrumb column gives way instead. */
@media (max-width: 1380px) { .topbar-ask { width: min(480px, 32vw); } }
.topbar-meta { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; white-space: nowrap; }
.topbar-live { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: var(--r-chip); background: var(--bg-subtle); border: 1px solid var(--border-subtle); color: var(--text-2); font-size: 12px; font-weight: 500; }
.topbar-live > i { width: 6px; height: 6px; border-radius: 999px; background: var(--off); flex: none; }
.topbar-live.is-live > i { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.topbar-live.is-waiting > i { background: var(--warn-fill); }
/* Dev mode (an admin's switch in the user menu): the root element carries .is-dev. Technical details wear .dev-only. */
:root:not(.is-dev) .dev-only { display: none !important; }
.crumbs { display: flex; align-items: center; gap: 2px; min-width: 0; font-weight: 500; }
.crumb { display: inline-flex; align-items: center; height: 24px; padding: 0 6px; border-radius: var(--r-chip); color: var(--text-3); white-space: nowrap; transition: background var(--t-hover), color var(--t-hover); }
a.crumb:is(:hover, .is-hover) { background: var(--hover); color: var(--text); }
.crumb.is-current { color: var(--text); overflow: hidden; text-overflow: ellipsis; display: block; line-height: 24px; }
.crumb-sep { color: var(--text-disabled); flex: none; }

/* ---------------------------------------------------------------- page scaffolding */
.page { display: flex; flex-direction: column; gap: var(--gap); height: 100%; min-height: 0; padding: var(--page-pad); }
.page.page-scroll { height: auto; min-height: 100%; }
.page-h { display: flex; align-items: center; gap: 12px; min-height: 32px; flex: none; min-width: 0; }
.page-h .page-title { font: 600 20px/28px var(--font); letter-spacing: -0.01em; white-space: nowrap; }
.page-h .page-sub { color: var(--text-2); min-width: 0; }
.page-h .page-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.page-fill { flex: 1 1 0; min-height: 0; min-width: 0; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--ctl-h); padding: 0 12px;
  border-radius: var(--r-ctl); border: 1px solid var(--border); background: var(--bg-surface); color: var(--text);
  font: 500 13px/20px var(--font); white-space: nowrap; cursor: pointer; user-select: none; position: relative; flex: none;
  box-shadow: var(--sh-xs); transition: background var(--t-hover), border-color var(--t-hover), color var(--t-hover), box-shadow var(--t-hover);
}
.btn .icon { color: var(--text-2); margin-left: -2px; }
.btn:is(:hover, .is-hover) { background: var(--bg-subtle); border-color: var(--border-strong); }
.btn:is(:active, .is-pressed) { background: var(--bg-sunken); border-color: var(--border-strong); transition-duration: var(--t-press); }
.btn:focus-visible { box-shadow: var(--focus); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: var(--sh-xs), inset 0 1px 0 rgba(255,255,255,.16); }
.btn-primary .icon { color: #fff; }
.btn-primary:is(:hover, .is-hover) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-primary:is(:active, .is-pressed) { background: var(--accent-pressed); border-color: var(--accent-pressed); }
.btn-primary:focus-visible { box-shadow: var(--focus), var(--sh-xs); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:is(:hover, .is-hover) { background: var(--hover); border-color: transparent; color: var(--text); }
.btn-ghost:is(:active, .is-pressed) { background: var(--press); border-color: transparent; }
.btn-sm { height: var(--ctl-h-sm); padding: 0 10px; font-size: 12px; line-height: 16px; gap: 5px; }
.btn[disabled], .btn.is-disabled { background: var(--bg-subtle); border-color: var(--border-subtle); color: var(--text-disabled); box-shadow: none; cursor: not-allowed; pointer-events: none; }
.btn[disabled] .icon, .btn.is-disabled .icon { color: var(--text-disabled); }
.btn-ghost[disabled], .btn-ghost.is-disabled { background: transparent; border-color: transparent; }
.btn-primary[disabled], .btn-primary.is-disabled { background: var(--accent-border); border-color: var(--accent-border); color: #fff; }
.btn-primary[disabled] .icon { color: #fff; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading > * { visibility: hidden; }
.btn.is-loading::after { content: ''; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 999px; border: 2px solid var(--border-strong); border-top-color: var(--text-2); animation: spin .7s linear infinite; }
.btn-primary.is-loading::after { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
.btn-block { width: 100%; }

.iconbtn { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-ctl); color: var(--text-2); cursor: pointer; flex: none; transition: background var(--t-hover), color var(--t-hover); }
.iconbtn:is(:hover, .is-hover) { background: var(--hover); color: var(--text); }
.iconbtn:is(:active, .is-pressed) { background: var(--press); }
.iconbtn.is-on { background: var(--accent-subtle); color: var(--accent); }
.iconbtn[disabled] { color: var(--text-disabled); pointer-events: none; }
.iconbtn-md { width: 32px; height: 32px; }
.iconbtn-solid { background: var(--bg-surface); border: 1px solid var(--border); box-shadow: var(--sh-xs); }
.iconbtn-solid:is(:hover, .is-hover) { background: var(--bg-subtle); border-color: var(--border-strong); }
.iconbtn-solid:focus-visible { box-shadow: var(--focus); }
.spinner { width: 16px; height: 16px; border-radius: 999px; border: 2px solid var(--border); border-top-color: var(--accent); animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- inputs */
.input { height: var(--ctl-h); padding: 0 10px; border-radius: var(--r-ctl); border: 1px solid var(--border); background: var(--bg-surface); font: 400 14px/20px var(--font); color: var(--text); min-width: 0; transition: border-color var(--t-hover), box-shadow var(--t-hover); }
.input::placeholder { color: var(--text-3); }
.input:is(:hover, .is-hover) { border-color: var(--border-strong); }
.input:focus, .input:focus-visible { border-color: var(--accent); box-shadow: var(--focus); border-radius: var(--r-ctl); }
.input[disabled] { background: var(--bg-subtle); color: var(--text-disabled); }
.input-sm { height: var(--ctl-h-sm); font-size: 13px; padding: 0 8px; }
.input-num { font-family: var(--mono); text-align: right; letter-spacing: -0.01em; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > label, .field-label { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--text-2); }
.check { display: flex; align-items: center; gap: 10px; min-height: var(--row-h); padding: 0 8px; margin: 0 -8px; border-radius: var(--r-ctl); cursor: pointer; transition: background var(--t-hover); }
.check:is(:hover, .is-hover) { background: var(--hover); }
.check input { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--border-strong); background: var(--bg-surface); display: grid; place-items: center; flex: none; cursor: pointer; transition: background var(--t-hover), border-color var(--t-hover); }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: ''; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: translateY(-1px) rotate(-45deg); }
.check input:focus-visible { box-shadow: var(--focus); }
.check-meta { margin-left: auto; color: var(--text-3); font: 400 12px/16px var(--mono); }
.progress { height: 6px; border-radius: 999px; background: var(--bg-sunken); overflow: hidden; min-width: 40px; }
.progress > i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width 240ms linear; }

/* ---------------------------------------------------------------- chips, pills, tags */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: var(--ctl-h-sm); padding: 0 10px 0 8px; border-radius: var(--r-chip);
  border: 1px solid var(--border); background: var(--bg-surface); color: var(--text-3); font: 500 12px/16px var(--font);
  white-space: nowrap; cursor: pointer; user-select: none; flex: none; --chip-color: var(--accent);
  transition: background var(--t-press), border-color var(--t-press), color var(--t-press);
}
.chip .dot { width: 8px; height: 8px; border-radius: 999px; border: 1.5px solid var(--chip-color); background: transparent; flex: none; transition: background var(--t-press); }
.chip .icon { color: currentColor; }
.chip:is(:hover, .is-hover) { border-color: var(--border-strong); color: var(--text-2); }
.chip:is(:active, .is-pressed) { background: var(--bg-subtle); }
.chip.is-on { color: var(--text); border-color: var(--border-strong); }
.chip.is-on .dot { background: var(--chip-color); }
.chip:focus-visible { box-shadow: var(--focus); }
.chip.is-static { cursor: default; color: var(--text-2); }
.chip.is-static:is(:hover, .is-hover) { border-color: var(--border); color: var(--text-2); }
.chip[disabled] { color: var(--text-disabled); pointer-events: none; }
.kv { display: inline-flex; align-items: baseline; gap: 6px; height: var(--ctl-h-sm); padding: 0 10px; border-radius: var(--r-chip); border: 1px solid var(--border-subtle); background: var(--bg-surface); font-size: 12px; line-height: 26px; white-space: nowrap; flex: none; }
.kv > span { color: var(--text-3); }
.kv > b { font: 500 13px/26px var(--mono); letter-spacing: -0.01em; color: var(--text); }
.kv.is-bad > b { color: var(--bad); } .kv.is-ok > b { color: var(--ok); } .kv.is-warn > b { color: var(--warn); }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px; border-radius: var(--r-pill); font: 500 12px/16px var(--font); white-space: nowrap; flex: none; color: var(--off); background: var(--off-bg); }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: currentColor; flex: none; }
.pill.no-dot::before { display: none; }
.pill-ok { color: var(--ok); background: var(--ok-bg); }
.pill-warn { color: var(--warn); background: var(--warn-bg); }
.pill-bad { color: var(--bad); background: var(--bad-bg); }
.pill-off { color: var(--off); background: var(--off-bg); }
.pill-info { color: var(--accent-pressed); background: var(--accent-subtle); }

.tag { display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 6px; border-radius: var(--r-chip); border: 1px solid var(--border); background: transparent; color: var(--text-3); font: 500 11px/16px var(--font); white-space: nowrap; flex: none; }
.tag .icon { width: 12px; height: 12px; }
.tag-accent { color: var(--accent-pressed); border-color: var(--accent-border); background: var(--accent-subtle); }
.tag-warn { color: var(--warn); border-color: #F5D9A8; background: var(--warn-bg); }
.tag-bad { color: var(--bad); border-color: #F6C6C2; background: var(--bad-bg); }
.tag-ok { color: var(--ok); border-color: #BFE3D0; background: var(--ok-bg); }
.tag-dev { border-color: var(--text); background: var(--text); color: #fff; font-family: var(--mono); letter-spacing: 0.04em; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; background: var(--c, var(--text-3)); flex: none; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--c, var(--accent)); flex: none; }
.swatch.is-hatch { background: var(--hatch), var(--c, var(--waiting)); }
.swatch.is-line { height: 0; width: 14px; border-radius: 0; background: none; border-top: 1.5px dashed var(--c, var(--text)); }
.fill-va { background: var(--va); } .fill-necessary { background: var(--necessary); } .fill-motion { background: var(--motion); }
.fill-waiting { background: var(--hatch), var(--waiting); }
.legend { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; line-height: 16px; color: var(--text-2); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* ---------------------------------------------------------------- cards and stats */
.card { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--r-card); }
.card.is-floating { box-shadow: var(--sh-sm); border-color: var(--border-subtle); }
.card.is-clickable { cursor: pointer; transition: border-color var(--t-hover), box-shadow var(--t-hover); }
.card.is-clickable:is(:hover, .is-hover) { border-color: var(--border-strong); box-shadow: var(--sh-xs); }
.card-h { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px var(--card-pad); flex: none; min-width: 0; }
.card-h + .card-b { padding-top: 0; }
.card-title { font: 600 13px/20px var(--font); white-space: nowrap; }
.card-sub { color: var(--text-3); font-size: 12px; line-height: 16px; min-width: 0; }
.card-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.card-b { padding: var(--card-pad); min-width: 0; min-height: 0; flex: 1 1 auto; }
.card-b.is-flush { padding: 0; }
.card-f { padding: 10px var(--card-pad); border-top: 1px solid var(--border-subtle); color: var(--text-3); font-size: 12px; line-height: 16px; flex: none; }

.stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-label { font-size: 12px; line-height: 16px; color: var(--text-3); font-weight: 500; white-space: nowrap; }
.stat-value { font: 600 28px/32px var(--font); letter-spacing: -0.02em; white-space: nowrap; display: flex; align-items: baseline; gap: 6px; }
.stat-value small, .stat-unit { font: 500 14px/20px var(--font); letter-spacing: 0; color: var(--text-3); }
.stat-delta { font-size: 12px; line-height: 16px; color: var(--text-2); white-space: nowrap; }
.stat-delta.is-bad { color: var(--bad); font-weight: 500; } .stat-delta.is-ok { color: var(--ok); font-weight: 500; } .stat-delta.is-warn { color: var(--warn); font-weight: 500; }
.stat.is-bad .stat-value { color: var(--bad); }
.stat-hero .stat-value { font-size: 40px; line-height: 44px; }
.stat-sm .stat-value { font-size: 20px; line-height: 28px; letter-spacing: -0.01em; }

/* ---------------------------------------------------------------- tabs, segmented control */
.tabs { display: flex; align-items: stretch; gap: 20px; border-bottom: 1px solid var(--border-subtle); flex: none; min-width: 0; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 1px; color: var(--text-2); font: 500 13px/20px var(--font); white-space: nowrap; cursor: pointer; border-radius: 4px 4px 0 0; transition: color var(--t-hover); }
.tab::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: transparent; transition: background var(--t-press); }
.tab:is(:hover, .is-hover) { color: var(--text); }
.tab:is(:hover, .is-hover)::after { background: var(--border-strong); }
.tab.is-active { color: var(--text); }
.tab.is-active::after { background: var(--accent); }
.tab .count { font: 500 11px/16px var(--mono); color: var(--text-3); background: var(--bg-subtle); border-radius: 999px; padding: 0 6px; }
.tabs.in-card { padding: 0 var(--card-pad); }

.seg { display: inline-flex; align-items: center; gap: 2px; padding: 2px; height: var(--ctl-h-sm); border-radius: var(--r-ctl); background: var(--bg-sunken); flex: none; }
.seg-item, .seg > button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 4px; color: var(--text-2); font: 500 12px/16px var(--font); white-space: nowrap; cursor: pointer; transition: background var(--t-press), color var(--t-press), box-shadow var(--t-press); }
.seg > button:is(:hover, .is-hover) { color: var(--text); }
.seg > button.is-active { background: var(--bg-surface); color: var(--text); box-shadow: var(--sh-xs); }
.seg > button:focus-visible { box-shadow: var(--focus); }

/* ---------------------------------------------------------------- table */
.table-wrap { overflow: auto; min-height: 0; min-width: 0; border-radius: inherit; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; line-height: 20px; }
.table th { position: sticky; top: 0; z-index: 1; height: 32px; padding: 0 12px; background: var(--bg-surface); border-bottom: 1px solid var(--border-subtle); color: var(--text-3); font: 500 12px/16px var(--font); text-align: left; white-space: nowrap; user-select: none; }
.table td { height: var(--row-h); padding: 0 12px; border-bottom: 1px solid var(--border-subtle); white-space: nowrap; vertical-align: middle; transition: background var(--t-hover); }
.table tr:last-child td { border-bottom-color: transparent; }
.table th:first-child, .table td:first-child { padding-left: var(--card-pad); }
.table th:last-child, .table td:last-child { padding-right: var(--card-pad); }
.table .num, .table th.num { text-align: right; }
.table td.num { font-family: var(--mono); letter-spacing: -0.01em; }
.table tbody tr:is(:hover, .is-hover) td { background: var(--bg-subtle); }
.table tbody tr.is-clickable { cursor: pointer; }
.table tbody tr.is-selected td { background: var(--accent-subtle); }
.table tbody tr.is-selected td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
.table tbody tr.is-muted td { color: var(--text-3); }
.table tbody tr.is-muted:is(:hover, .is-hover) td { background: transparent; }
.table th.is-sortable { cursor: pointer; transition: color var(--t-hover); }
.table th.is-sortable:is(:hover, .is-hover) { color: var(--text); }
.table th .th { display: inline-flex; align-items: center; gap: 4px; }
.table th.num .th { flex-direction: row-reverse; }
.table th .icon { width: 12px; height: 12px; opacity: 0; transition: opacity var(--t-hover); }
.table th.is-sortable:is(:hover, .is-hover) .icon { opacity: .6; }
.table th.is-sorted { color: var(--text); }
.table th.is-sorted .icon { opacity: 1; color: var(--accent); }
.table-compact td { height: 32px; }

/* ---------------------------------------------------------------- skeleton, empty */
.skeleton { display: block; border-radius: 4px; min-height: 12px; background: linear-gradient(90deg, var(--bg-sunken) 0%, var(--bg-subtle) 40%, var(--bg-sunken) 80%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; color: transparent !important; user-select: none; }
.skeleton > * { visibility: hidden; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: 0 0; } }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 32px 24px; text-align: center; color: var(--text-2); min-height: 160px; height: 100%; }
.empty-icon { width: 36px; height: 36px; border-radius: 999px; background: var(--bg-subtle); border: 1px solid var(--border-subtle); color: var(--text-3); display: grid; place-items: center; margin-bottom: 6px; }
.empty-title { font: 600 14px/20px var(--font); color: var(--text); }
.empty-text { max-width: 380px; }
.empty-detail { font: 400 12px/16px var(--mono); color: var(--text-3); max-width: 520px; overflow-wrap: anywhere; margin-top: 2px; }
.empty-actions { display: flex; gap: 8px; margin-top: 10px; }

/* ---------------------------------------------------------------- floating: tooltip, popover, menu, toast, modal */
.tip { position: fixed; z-index: 1300; width: max-content; max-width: 280px; padding: 4px 8px; border-radius: var(--r-ctl); background: #0F1722; color: #fff; font: 500 12px/16px var(--font); box-shadow: var(--sh-md); pointer-events: none !important; display: flex; align-items: center; gap: 8px; opacity: 0; transition: opacity var(--t-hover); white-space: normal; text-wrap: balance; }
.tip.is-open { opacity: 1; }
.tip-kbd { display: inline-flex; gap: 3px; flex: none; }
.tip .kbd { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); border-bottom-width: 1px; color: #fff; height: 16px; min-width: 16px; font-size: 10px; }
.tip-rich { display: block; padding: 8px 10px; white-space: normal; text-wrap: wrap; transition: none; }
.tipc { display: flex; flex-direction: column; gap: 3px; min-width: 120px; }
.tipc-title { font-weight: 600; color: #fff; white-space: nowrap; }
.tipc-title.mono { font-weight: 500; }
.tipc-row { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.72); font-weight: 400; white-space: nowrap; }
.tipc-row b { margin-left: auto; padding-left: 12px; font: 500 12px/16px var(--mono); color: #fff; letter-spacing: -0.01em; }
.tipc-foot { color: rgba(255,255,255,.56); font-weight: 400; margin-top: 2px; }

.popover { position: fixed; z-index: 1000; min-width: 160px; max-width: 360px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--sh-md); padding: 12px; opacity: 0; transform: translateY(4px) scale(.985); transform-origin: top left; transition: opacity var(--t-pop) var(--ease), transform var(--t-pop) var(--ease); }
.popover[data-side="top"] { transform: translateY(-4px) scale(.985); transform-origin: bottom left; }
.popover.is-open { opacity: 1; transform: none; }
.popover-menu { padding: 4px; min-width: 200px; }
.popover-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.popover-title { font: 600 13px/20px var(--font); }
.menu { display: flex; flex-direction: column; gap: 1px; }
.menu:focus, .menu:focus-visible { box-shadow: none; }
.menu-item { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 8px; border-radius: var(--r-ctl); color: var(--text); font-weight: 400; text-align: left; white-space: nowrap; cursor: pointer; transition: background var(--t-hover); }
.menu-item .icon { color: var(--text-3); }
.menu-item:is(:hover, .is-hover, :focus-visible) { background: var(--bg-subtle); box-shadow: none; }
.menu-item:is(:active, .is-pressed) { background: var(--bg-sunken); }
.menu-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.menu-hint { font-size: 12px; line-height: 16px; color: var(--text-3); }
.menu-kbd { margin-left: auto; display: inline-flex; gap: 3px; padding-left: 16px; }
.menu-item .menu-check { color: var(--accent); margin-left: 8px; }
.switch { position: relative; flex: none; width: 26px; height: 16px; margin-left: 12px; border-radius: 999px; background: var(--border-strong); transition: background var(--t-hover); }
.switch::after { content: ''; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 999px; background: #fff; box-shadow: var(--sh-xs); transition: transform var(--t-hover); }
.switch.is-on { background: var(--accent); }
.switch.is-on::after { transform: translateX(10px); }
.menu-sep { height: 1px; background: var(--border-subtle); margin: 4px -4px; }
.menu-label { font: 600 11px/16px var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); padding: 6px 8px 4px; }
.menu-note { padding: 6px 8px 8px; font-size: 12px; line-height: 16px; color: var(--text-3); white-space: normal; max-width: 260px; }

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 1200; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; transition: right var(--t-panel) var(--ease); }
body.ask-open .toasts { right: calc(var(--ask-w) + 16px); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; min-height: 40px; max-width: 480px; padding: 8px 8px 8px 12px; border-radius: var(--r-card); background: #0F1722; color: #fff; box-shadow: var(--sh-md); opacity: 0; transform: translateY(8px); transition: opacity var(--t-pop) var(--ease), transform var(--t-pop) var(--ease); }
.toast.is-open { opacity: 1; transform: none; }
.toast > .icon { color: #5FD39B; }
.toast-bad > .icon { color: #FF8A80; } .toast-info > .icon { color: #9DB9F5; }
.toast-text { font-weight: 500; }
.toast-action { height: 24px; padding: 0 8px; border-radius: 4px; color: #9DC0FF; font-weight: 600; transition: background var(--t-hover); }
.toast-action:is(:hover, .is-hover) { background: rgba(255,255,255,.1); }
.toast-close { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 4px; color: rgba(255,255,255,.56); transition: background var(--t-hover), color var(--t-hover); }
.toast-close:is(:hover, .is-hover) { background: rgba(255,255,255,.1); color: #fff; }

.modal-backdrop { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 24px; background: rgba(15,23,34,.36); opacity: 0; transition: opacity var(--t-pop) var(--ease); }
.modal-backdrop.is-open { opacity: 1; }
.modal:focus, .modal:focus-visible { box-shadow: var(--sh-lg); border-radius: var(--r-panel); }
.modal { max-width: 100%; max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: var(--bg-surface); border-radius: var(--r-panel); box-shadow: var(--sh-lg); transform: translateY(8px) scale(.985); transition: transform var(--t-pop) var(--ease); }
.modal-backdrop.is-open .modal { transform: none; }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 16px 16px 8px 20px; flex: none; }
.modal-title { font: 600 16px/24px var(--font); flex: 1; min-width: 0; }
.modal-b { padding: 4px 20px 16px; overflow: auto; min-height: 0; color: var(--text-2); }
.modal-b p + p { margin-top: 8px; }
.modal-f { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; flex: none; border-top: 1px solid var(--border-subtle); }
.sheet { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 40px; }
.sheet-col { min-width: 0; }
.sheet-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--row-h); border-bottom: 1px solid var(--border-subtle); color: var(--text); }
.sheet-row:last-child { border-bottom: 0; }
.sheet-keys { display: inline-flex; align-items: center; gap: 4px; flex: none; color: var(--text-3); font-size: 12px; }
.sheet-head { padding: 16px 0 4px; }
.sheet-group:first-child .sheet-head { padding-top: 0; }
@media (max-width: 760px) { .sheet { grid-template-columns: minmax(0, 1fr); } .sheet-col + .sheet-col .sheet-group:first-child .sheet-head { padding-top: 16px; } }

/* ---------------------------------------------------------------- media stage and scrubber */
.media { position: relative; min-width: 0; min-height: 0; background: var(--stage); border-radius: var(--r-card); overflow: hidden; color: #fff; isolation: isolate; }
.media-fit, .media > video, .media > canvas.media-fit, .media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.media-chips { position: absolute; left: 12px; top: 12px; z-index: 3; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; max-width: calc(100% - 24px); }
.media-meta { position: absolute; right: 12px; top: 12px; z-index: 3; display: flex; align-items: center; gap: 6px; font: 400 12px/16px var(--mono); color: rgba(255,255,255,.86); }
.media-bottom { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 3; display: flex; align-items: center; gap: 8px; }
.media-center { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; color: rgba(255,255,255,.72); }
.media-label, .media .tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: var(--r-chip); border: 0; background: var(--chip-on-video); color: #fff; font: 500 12px/16px var(--font); white-space: nowrap; }
.media-label .dot { width: 6px; height: 6px; }
.media .chip { background: var(--chip-on-video); border-color: transparent; color: rgba(255,255,255,.62); height: 24px; }
.media .chip:is(:hover, .is-hover) { color: #fff; border-color: rgba(255,255,255,.28); }
.media .chip.is-on { color: #fff; border-color: transparent; }
.media .chip.is-static { color: #fff; }
.media .iconbtn { color: rgba(255,255,255,.86); background: var(--chip-on-video); }
.media .iconbtn:is(:hover, .is-hover) { color: #fff; background: rgba(11,15,20,.9); }
.media .seg { background: var(--chip-on-video); height: 28px; }
.media .seg > button { color: rgba(255,255,255,.66); }
.media .seg > button:is(:hover, .is-hover) { color: #fff; }
.media .seg > button.is-active { background: rgba(255,255,255,.92); color: var(--text); box-shadow: none; }
.media .spinner { border-color: rgba(255,255,255,.2); border-top-color: #fff; }
.media.is-light { background: var(--bg-app); color: var(--text); border: 1px solid var(--border-subtle); }
.transport { display: flex; flex-direction: row; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; flex: none; min-width: 0; }
.transport .time { font: 400 12px/16px var(--mono); color: var(--text-2); white-space: nowrap; letter-spacing: -0.01em; }

.scrub { position: relative; flex: 1 1 auto; min-width: 60px; height: 24px; display: flex; align-items: center; cursor: pointer; touch-action: none; border-radius: 4px; --scrub-h: 4px; }
.scrub-track { position: relative; display: block; width: 100%; height: var(--scrub-h); border-radius: 999px; background: var(--bg-sunken); overflow: hidden; transition: height var(--t-hover); }
.scrub.has-segs { --scrub-h: 8px; }
.scrub.has-segs .scrub-track { border-radius: 2px; background: transparent; }
.scrub-segs { position: absolute; inset: 0; display: block; }
.scrub-seg { position: absolute; top: 0; bottom: 0; background: var(--c, var(--accent)); box-shadow: inset -1px 0 0 var(--bg-surface); }
.scrub-fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--p, 0%); background: var(--accent); border-radius: inherit; }
/* the part of a step-coloured track that is still ahead: tinted enough to read as not played yet, light enough to keep the step colours */
.scrub.has-segs .scrub-fill { left: var(--p, 0%); right: 0; width: auto; border-radius: 0; background: rgba(255,255,255,.4); }
.scrub-head { position: absolute; top: 50%; left: var(--p, 0%); width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 999px; background: #fff; border: 2px solid var(--accent); box-shadow: var(--sh-xs); transition: transform var(--t-hover); pointer-events: none; }
.scrub.has-segs .scrub-head { width: 3px; height: 18px; margin: -9px 0 0 -1.5px; border-radius: 2px; border: 0; background: var(--text); box-shadow: 0 0 0 1.5px var(--bg-surface); }
.scrub:is(:hover, .is-hover, .is-dragging) .scrub-head { transform: scale(1.15); }
.scrub:is(:hover, .is-hover, .is-dragging):not(.has-segs) { --scrub-h: 6px; }
.scrub:focus-visible { box-shadow: var(--focus); }
.media .scrub-track, .on-dark .scrub-track { background: rgba(255,255,255,.22); }
.media .scrub.has-segs .scrub-head, .on-dark .scrub.has-segs .scrub-head { background: #fff; box-shadow: 0 0 0 1.5px rgba(11,15,20,.8); }
.media .scrub-seg, .on-dark .scrub-seg { box-shadow: inset -1px 0 0 rgba(11,15,20,.8); }
.media .scrub.has-segs .scrub-fill, .on-dark .scrub.has-segs .scrub-fill { background: rgba(11,15,20,.45); }

/* ---------------------------------------------------------------- charts (core/ui.js bars, stackedBars, pareto) */
.chart { position: relative; width: 100%; min-width: 0; }
.chart svg { overflow: visible; font-family: var(--font); }
.chart-grid { stroke: var(--border-subtle); stroke-width: 1; shape-rendering: crispEdges; }
.chart-base { stroke: var(--border); stroke-width: 1; shape-rendering: crispEdges; }
.chart-tick { font: 400 10.5px/1 var(--mono); fill: var(--text-3); letter-spacing: -0.02em; }
.chart-x { font: 500 11px/1 var(--font); fill: var(--text-2); }
.chart-x-sub { font-weight: 400; fill: var(--text-3); }
.chart-val { font: 500 11px/1 var(--mono); fill: var(--text); letter-spacing: -0.02em; pointer-events: none; paint-order: stroke; stroke: var(--bg-surface); stroke-width: 3px; stroke-linejoin: round; }
.chart-in { font: 500 11px/1 var(--mono); fill: #fff; letter-spacing: -0.02em; pointer-events: none; }
.chart-in.is-dark { fill: var(--text); }
.chart-bar { transition: opacity var(--t-hover); }
.chart-ref { fill: var(--bg-sunken); }
.chart-sep { stroke: var(--bg-surface); stroke-width: 1; }
.chart-col.is-hover .chart-bar { opacity: .82; }
.chart-col.is-hover .chart-x { fill: var(--text); }
.chart-hit { fill: transparent; pointer-events: all; }
.chart-hit.is-clickable { cursor: pointer; }
.chart-line { stroke: var(--text); stroke-width: 1.25; stroke-dasharray: 4 3; }
.chart-line-label { font: 500 10.5px/1 var(--mono); fill: var(--text); letter-spacing: -0.02em; paint-order: stroke; stroke: var(--bg-surface); stroke-width: 4px; stroke-linejoin: round; }
.chart-cum { fill: none; stroke: var(--text); stroke-width: 1.5; stroke-linejoin: round; }
.chart-cum-dot { fill: var(--bg-surface); stroke: var(--text); stroke-width: 1.5; }
.chart-cum-label { font: 500 10.5px/1 var(--mono); fill: var(--text-2); letter-spacing: -0.02em; paint-order: stroke; stroke: var(--bg-surface); stroke-width: 4px; stroke-linejoin: round; }

/* ---------------------------------------------------------------- quiet focus
   Focus that a script moved after a pointer action (a dialog opening, a menu closing; core/ui.js moveFocus) draws no
   keyboard ring, as a click would not. Keyboard users still get the ring. Kept last so it wins over the rules above. */
.focus-quiet.focus-quiet:focus-visible { box-shadow: none; }
.btn.focus-quiet.focus-quiet:focus-visible, .iconbtn-solid.focus-quiet.focus-quiet:focus-visible, .ws.focus-quiet.focus-quiet:focus-visible { box-shadow: var(--sh-xs); }
.btn-primary.focus-quiet.focus-quiet:focus-visible { box-shadow: var(--sh-xs), inset 0 1px 0 rgba(255,255,255,.16); }
.btn-ghost.focus-quiet.focus-quiet:focus-visible { box-shadow: none; }
.nav-item.is-active.focus-quiet.focus-quiet:focus-visible { box-shadow: var(--sh-xs), 0 0 0 1px var(--border-subtle); }
