/* BlindTick 3.0 · LED · Электрик · Контраст (brand "ledblue2") — the single design layer.
   tokens.css (loaded first) owns every colour, font, radius and spacing token. This file
   maps retained semantic component variables onto those tokens, then draws the shell,
   base controls, the four card archetypes and the overlays. Strict CSP: no inline styles —
   dynamic geometry arrives through CSS custom properties set with the CSSOM API. */

/* Chakra Petch latin-ext subsets shipped with the handoff. tokens.css declares the base
   faces without a unicode-range; these later faces win only for Latin Extended code points. */
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 400; font-display: swap; src: url('/static/fonts/ChakraPetch-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 500; font-display: swap; src: url('/static/fonts/ChakraPetch-500-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 600; font-display: swap; src: url('/static/fonts/ChakraPetch-600-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 700; font-display: swap; src: url('/static/fonts/ChakraPetch-700-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------------------------------------------------------------------------------------
   1. Theme plumbing and the legacy-variable bridge
   ------------------------------------------------------------------------------------- */
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
html { background: var(--bg); }

/* Compatibility names for retained native components. Retired Stitch/terminal skins
   are not loaded by workspace.html; component geometry lives in the bt-* modules. */
html body.bt-app,
html body.bt-lazy,
html body.bt-login {
  --wall: var(--bg) !important;
  --side-bg: var(--bg2) !important;
  --panel: var(--card) !important;
  --panel-raised: var(--card2) !important;
  --panel-soft: var(--card2) !important;
  --surface: var(--card) !important;
  --surface-2: var(--card2) !important;
  --surface-3: var(--card3) !important;
  --line-strong: var(--line2) !important;
  --line-control: var(--line2) !important;
  --seg-on: var(--card3) !important;
  --text: var(--tx) !important;
  --text-soft: var(--tx2) !important;
  --text-main: var(--tx) !important;
  --text-muted: var(--tx2) !important;
  --muted: var(--tx2) !important;
  --dim: var(--tx3) !important;
  --ink: var(--acc-ink) !important;
  --accent: var(--acc) !important;
  --accent-strong: var(--acc) !important;
  --accent-soft: var(--acc-soft) !important;
  --accent-line: var(--acc-line) !important;
  --good: var(--pos) !important;
  --good-soft: var(--pos-soft) !important;
  --green: var(--pos) !important;
  --emerald: var(--pos) !important;
  --emerald-bg: var(--pos-soft) !important;
  --lime: var(--acc-tx) !important;
  --lime-soft: var(--acc-soft) !important;
  --teal: var(--info) !important;
  --cyan: var(--info) !important;
  --cyan-bg: var(--info-soft) !important;
  --blue: var(--info) !important;
  --blue-soft: var(--info-soft) !important;
  --red: var(--neg) !important;
  --red-soft: var(--neg-soft) !important;
  --crimson: var(--neg) !important;
  --crimson-bg: var(--neg-soft) !important;
  --bad: var(--neg) !important;
  --amber: var(--warn) !important;
  --amber-soft: var(--warn-soft) !important;
  --amber-bg: var(--warn-soft) !important;
  --warning: var(--warn) !important;
  --yellow: var(--warn) !important;
  --coral: var(--c-bb) !important;
  --violet: var(--vio) !important;
  --purple: var(--vio) !important;
  --viz-money: var(--warn) !important;
  --viz-ai: var(--acc) !important;
  --viz-market: var(--info) !important;
  --football: var(--c-fb) !important;
  --tennis: var(--c-tn) !important;
  --hockey: var(--c-hk) !important;
  --esports: var(--c-es) !important;
  --basketball: var(--c-bb) !important;
  --volleyball: var(--c-vb) !important;
  --football-tint: color-mix(in srgb, var(--c-fb) 14%, var(--card)) !important;
  --tennis-tint: color-mix(in srgb, var(--c-tn) 14%, var(--card)) !important;
  --hockey-tint: color-mix(in srgb, var(--c-hk) 14%, var(--card)) !important;
  --esports-tint: color-mix(in srgb, var(--c-es) 14%, var(--card)) !important;
  --basketball-tint: color-mix(in srgb, var(--c-bb) 14%, var(--card)) !important;
  --volleyball-tint: color-mix(in srgb, var(--c-vb) 14%, var(--card)) !important;
  --border: var(--line) !important;
  --border-subtle: var(--line) !important;
  --border-accent: var(--acc-line) !important;
  --bg-void: var(--bg) !important;
  --bg-panel: var(--card) !important;
  --bg-card: var(--card) !important;
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.7) !important;
  --font: var(--fbody) !important;
  --font-body: var(--fbody) !important;
  --font-sans: var(--fbody) !important;
  --font-display: var(--fh) !important;
  --font-heading: var(--fh) !important;
  --mono: var(--fn) !important;
  --font-mono: var(--fn) !important;
  --radius: var(--r-card) !important;
  --radius-lg: var(--r-card) !important;
  --radius-md: var(--r-card) !important;
  --radius-sm: var(--r-in) !important;
  --fa-card-radius: var(--r-card) !important;
  --page-max: 1440px !important;
  --page-gutter: var(--page-x) !important;
  /* Sniper radar, tipsters and research component palettes. */
  --sr-text: var(--tx) !important;
  --sr-muted: var(--tx2) !important;
  --sr-panel: var(--card) !important;
  --sr-panel-raised: var(--card2) !important;
  --sr-line: var(--line) !important;
  --sr-line-strong: var(--line2) !important;
  --sr-trench: var(--bg2) !important;
  --sr-cyan: var(--info) !important;
  --sr-cyan-bg: var(--info-soft) !important;
  --sr-cyan-border: color-mix(in srgb, var(--info) 42%, transparent) !important;
  --sr-green: var(--pos) !important;
  --sr-green-bg: var(--pos-soft) !important;
  --sr-green-border: color-mix(in srgb, var(--pos) 42%, transparent) !important;
  --sr-red: var(--neg) !important;
  --sr-red-bg: var(--neg-soft) !important;
  --sr-red-border: color-mix(in srgb, var(--neg) 42%, transparent) !important;
  --sr-amber: var(--warn) !important;
  --sr-amber-bg: var(--warn-soft) !important;
  --sr-amber-border: color-mix(in srgb, var(--warn) 42%, transparent) !important;
  --sr-font: var(--fbody) !important;
  --sr-mono: var(--fn) !important;
  --tp-bg: var(--bg) !important;
  --tp-panel: var(--card) !important;
  --tp-line: var(--line) !important;
  --tp-text: var(--tx) !important;
  --tp-muted: var(--tx2) !important;
  --tp-accent: var(--acc) !important;
  --aic-green: var(--pos) !important;
  --fa-active-bg: var(--acc-soft) !important;
  --fa-active-fg: var(--acc-tx) !important;
  --fa-active-border: var(--acc-line) !important;
  --today-model: var(--acc) !important;
  --remaining-body: var(--tx2) !important;
  --remaining-meta: var(--tx3) !important;
  --remaining-label: var(--tx3) !important;
  /* README type scale. */
  --fs-micro: 12px !important;
  --fs-meta: 12.5px !important;
  --fs-label: 13px !important;
  --fs-body: 14px !important;
  --fs-lead: 15px !important;
  --fs-card: 16px !important;
  --fs-block: 18px !important;
  --fs-h1: 30px !important;
  --fs-num: 28px !important;
  --side: 256px;
  --bt-top-h: 64px;
  font-family: var(--fbody);
  font-size: 14px;
  line-height: 1.45;
  color: var(--tx);
  background: var(--glow, none), var(--bg);
  background-attachment: fixed;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html body.bt-app { min-height: 100vh; margin: 0; }
html body.bt-app :is(button, input, select, textarea) { font-family: inherit; }
html body.bt-app :is(.num, .mono, [data-num], code, kbd, td, th, .fa-kpi-value, .fa-kpi-odds, time) {
  font-variant-numeric: tabular-nums;
}
html body.bt-app :is(.num, .mono, [data-num], .fa-kpi-value, .fa-kpi-odds) { font-family: var(--fn); }
html body.bt-app ::selection { background: var(--acc-soft); }
html body.bt-app a { color: inherit; }
html body.bt-app a:hover { color: var(--acc-tx); }
html body.bt-app :focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }

/* Sport colours: dot 8px, icon tint. */
.bt-sport, [data-sport] { --sp: var(--tx3); }
:is(.bt-sport, [data-sport])[data-sport="football"], .sport-dot.football { --sp: var(--c-fb); }
:is(.bt-sport, [data-sport])[data-sport="tennis"], .sport-dot.tennis { --sp: var(--c-tn); }
:is(.bt-sport, [data-sport])[data-sport="hockey"], .sport-dot.hockey { --sp: var(--c-hk); }
:is(.bt-sport, [data-sport])[data-sport="volleyball"], .sport-dot.volleyball { --sp: var(--c-vb); }
:is(.bt-sport, [data-sport])[data-sport="esports"], .sport-dot.esports { --sp: var(--c-es); }
:is(.bt-sport, [data-sport])[data-sport="basketball"], .sport-dot.basketball { --sp: var(--c-bb); }
:is(.bt-sport, [data-sport])[data-sport="crypto"] { --sp: var(--c-cr); }
html body.bt-app .sport-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sp, var(--tx3)); }
.bt-sp-ic { width: 18px; height: 18px; flex: none; color: var(--sp, var(--tx3)); stroke-width: 1.6; }

/* SVG icons: 24-grid, round caps, currentColor. */
html body.bt-app svg.ic, .bt-ic {
  width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.bt-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------------------------------------------------------------------------------------
   2. Shell: sidebar 256 (rail 76 below 1180), sticky glass top bar 64, content ≤ 1440
   ------------------------------------------------------------------------------------- */
html body.bt-app .skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 200; padding: 10px 14px; border-radius: var(--r-ctl);
  background: var(--acc); color: var(--acc-ink); font-weight: 650; text-decoration: none;
}
html body.bt-app .skip-link:focus { top: 12px; }
html body.bt-app .bt-frame {
  display: flex; min-height: 100vh; align-items: flex-start; background: transparent;
}
html body.bt-app .bt-side {
  position: sticky; top: 0; z-index: 40; flex: 0 0 var(--side); height: 100vh; height: 100dvh; width: var(--side);
  display: flex; flex-direction: column; padding: 18px 12px 14px; margin: 0;
  background: var(--bg2); border: 0; border-right: 1px solid var(--line); border-radius: 0;
  box-shadow: none; overflow: hidden; transition: width .3s var(--ease-out), background .3s;
}
html body.bt-app .bt-brand {
  flex: none; display: flex; align-items: center; gap: 11px; padding: 2px 6px 18px; min-width: 0;
  color: var(--tx); text-decoration: none; background: none; border: 0;
}
html body.bt-app .bt-brand .bt-mark { width: 34px; height: 34px; flex: none; margin: 2px 3px; }
html body.bt-app .bt-brand .brand-name { display: flex; flex-direction: column; min-width: 0; }
html body.bt-app .bt-brand strong {
  font-family: var(--fh); font-size: 17px; line-height: 20px; font-weight: 700; letter-spacing: .02em;
  white-space: nowrap; color: var(--tx); text-transform: none;
}
html body.bt-app .bt-brand strong span { color: var(--acc-tx); }
html body.bt-app .bt-brand small { font-size: 12px; line-height: 16px; color: var(--tx3); white-space: nowrap; font-weight: 400; }
html body.bt-app .bt-search {
  flex: none; display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 11px;
  margin: 0 0 18px; border: 1px solid var(--line); border-radius: 11px; background: var(--card);
  color: var(--tx3); font-size: 13.5px; text-align: left; cursor: pointer; box-shadow: none;
  transition: border-color .2s, color .2s;
}
html body.bt-app .bt-search:hover { border-color: var(--line2); color: var(--tx2); }
html body.bt-app .bt-search svg.ic { width: 17px; height: 17px; stroke-width: 2; }
html body.bt-app .bt-search span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body.bt-app :is(.bt-search, .shell-commands) kbd {
  font-family: inherit; font-size: 11.5px; font-weight: 600; padding: 2px 6px; border-radius: 6px;
  background: var(--card3); color: var(--tx2); border: 0; box-shadow: none; line-height: 16px;
}
html body.bt-app .bt-side .side-nav-label {
  flex: none; margin: 0; padding: 0 10px 8px; font-size: 12px; font-weight: 600; color: var(--tx3);
  letter-spacing: 0; text-transform: none; font-family: var(--ft);
}
html body.bt-app .bt-side-scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none;
  margin: 0 -12px; padding: 0 12px 4px;
}
html body.bt-app .bt-side-scroll::-webkit-scrollbar { width: 0; height: 0; }
html body.bt-app .bt-side .side-nav {
  position: relative; display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0;
  background: none; border: 0;
}
html body.bt-app .bt-nav-indicator {
  position: absolute; left: 0; right: 0; top: 0; height: 40px; border-radius: var(--r-ctl);
  background: var(--nav-on); box-shadow: inset 0 0 0 1px var(--nav-onbd);
  transform: translateY(var(--bt-nav-y, 0px)); opacity: var(--bt-nav-op, 0);
  transition: transform .42s var(--ease-nav), opacity .2s; pointer-events: none;
}
html body.bt-app .bt-nav-indicator i {
  position: absolute; left: -12px; top: 10px; width: 3px; height: 20px; border-radius: 0 3px 3px 0;
  background: var(--acc); box-shadow: 0 0 14px var(--acc);
}
html body.bt-app .bt-side .side-nav > a {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; height: 40px;
  min-height: 40px; padding: 0 11px; margin: 0; border: 0; border-radius: 11px; background: transparent;
  color: var(--nav-tx); font-size: 14px; font-weight: 500; text-decoration: none; box-shadow: none;
  transition: color .2s, background .2s;
}
html body.bt-app .bt-side .side-nav > a::before,
html body.bt-app .bt-side .side-nav > a::after { content: none; display: none; }
html body.bt-app .bt-side .side-nav > a svg.ic { color: var(--nav-ic); transition: color .2s; }
html body.bt-app .bt-side .side-nav > a:hover { background: var(--hover); color: var(--tx); }
html body.bt-app .bt-side .side-nav > a[aria-current="page"] {
  color: var(--tx); font-weight: 600; background: transparent; border: 0; box-shadow: none;
}
html body.bt-app.bt-nav-static .bt-side .side-nav > a[aria-current="page"] {
  background: var(--nav-on); box-shadow: inset 0 0 0 1px var(--nav-onbd);
}
html body.bt-app .bt-side .side-nav > a[aria-current="page"] svg.ic { color: var(--acc-tx); }
html body.bt-app .bt-side .side-nav > a > span {
  flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: inherit;
}
html body.bt-app .bt-nav-badge {
  font-family: var(--fn); font-size: 11.5px; font-weight: 600; line-height: 18px; padding: 0 7px;
  border-radius: 999px; background: var(--card3); color: var(--tx2);
}
html body.bt-app .bt-side .nav-key {
  font-family: var(--fn); font-size: 11px; font-weight: 600; min-width: 18px; text-align: center;
  color: var(--tx3); background: none; border: 0; box-shadow: none; padding: 0;
}
html body.bt-app .bt-side .side-more { margin: 10px 0 0; padding: 0; border: 0; background: none; }
html body.bt-app .bt-side .side-more > summary {
  display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 11px; border-radius: 11px;
  color: var(--tx2); font-size: 14px; cursor: pointer; list-style: none; background: transparent;
}
html body.bt-app .bt-side .side-more > summary::-webkit-details-marker { display: none; }
html body.bt-app .bt-side .side-more > summary::marker { content: ""; }
html body.bt-app .bt-side .side-more > summary:hover { background: var(--hover); }
html body.bt-app .bt-side .side-more > summary svg.ic { color: var(--tx3); }
html body.bt-app .bt-side .side-more > summary span { flex: 1; }
html body.bt-app .bt-side .side-more > summary .chev { width: 16px; height: 16px; stroke-width: 2; transition: transform .25s; }
html body.bt-app .bt-side .side-more[open] > summary .chev { transform: rotate(90deg); }
html body.bt-app .bt-side .side-more > a {
  display: flex; align-items: center; gap: 8px; height: 32px; margin: 2px 0 0 28px; padding: 0 10px;
  border-radius: 9px; color: var(--tx2); font-size: 13.5px; font-weight: 500; white-space: nowrap;
  text-decoration: none; background: transparent; animation: fa-up .3s both;
}
html body.bt-app .bt-side .side-more > a:hover { background: var(--hover); color: var(--tx); }
html body.bt-app .bt-side .side-more > a[aria-current="page"] { background: var(--card2); color: var(--tx); font-weight: 600; }
html body.bt-app .bt-dot { width: 5px; height: 5px; flex: none; border-radius: 50%; background: transparent; }
html body.bt-app .side-more > a[aria-current="page"] .bt-dot { background: var(--acc); }
html body.bt-app .bt-side .side-foot {
  flex: none; display: flex; flex-direction: column; gap: 10px; margin: 10px 0 0; padding: 0; border: 0;
}
html body.bt-app .bt-status {
  display: block; padding: 12px; border-radius: var(--r-in); background: var(--card);
  border: 1px solid var(--line); color: var(--tx); text-decoration: none; transition: border-color .2s;
}
html body.bt-app .bt-status:hover { border-color: var(--line2); color: var(--tx); }
html body.bt-app .bt-status .health-pill {
  display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0; background: none; border: 0;
  font-size: 13px; font-weight: 600; color: var(--tx);
}
html body.bt-app .bt-status #sidebar-health { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body.bt-app .bt-status .live-dot {
  width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--tx3); box-shadow: none;
}
html body.bt-app .bt-status .live-dot.ok { background: var(--pos); animation: fa-pulse 2s infinite; }
html body.bt-app .bt-status .live-dot.bad { background: var(--neg); }
html body.bt-app .bt-mode {
  margin-left: auto; font-family: var(--fn); font-size: 11.5px; font-weight: 600; padding: 1px 7px;
  border-radius: 6px; background: var(--warn-soft); color: var(--warn); letter-spacing: .02em;
}
html body.bt-app .bt-status-sub { display: block; margin-top: 4px; font-size: 12.5px; color: var(--tx3); }
html body.bt-app .bt-uptime { display: flex; gap: 2px; height: 16px; align-items: flex-end; margin-top: 10px; }
html body.bt-app .bt-uptime:empty { display: none; }
html body.bt-app .bt-uptime > i {
  flex: 1; height: 100%; border-radius: 2px; background: var(--pos); opacity: .9;
}
html body.bt-app .bt-uptime > i[data-state="warn"] { background: var(--warn); height: 70%; }
html body.bt-app .bt-uptime > i[data-state="bad"] { background: var(--neg); height: 45%; }
html body.bt-app .bt-uptime > i[data-state="none"] { background: var(--card3); height: 35%; }
html body.bt-app .bt-side-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
html body.bt-app .bt-theme-seg {
  position: relative; display: flex; gap: 0; padding: 3px; margin: 0; border-radius: 11px;
  background: var(--card); border: 1px solid var(--line);
}
html body.bt-app .bt-theme-thumb {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: 34px; border-radius: 8px;
  background: var(--card3); transition: transform .35s var(--ease-nav);
}
html body.bt-app .bt-theme-thumb[data-on="light"] { transform: translateX(34px); }
html body.bt-app .bt-theme-seg .theme-swatch {
  position: relative; width: 34px; height: 28px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 8px; background: transparent !important; color: var(--tx3);
  box-shadow: none !important; cursor: pointer;
}
html body.bt-app .bt-theme-seg .theme-swatch[aria-pressed="true"] { color: var(--tx); }
html body.bt-app .bt-theme-seg .theme-swatch svg.ic { width: 16px; height: 16px; stroke-width: 2; }
html body.bt-app .bt-news {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px;
  border: 0; border-radius: 10px; background: var(--acc-soft); color: var(--acc-tx); font-size: 12.5px;
  font-weight: 600; cursor: pointer; white-space: nowrap;
}
html body.bt-app .bt-news:hover { filter: brightness(1.15); }
html body.bt-app .bt-news svg.ic { width: 14px; height: 14px; stroke-width: 2; }

/* App shell + top bar. */
html body.bt-app .app-shell {
  position: relative; z-index: 1; display: flex; flex: 1 1 0; flex-direction: column; min-width: 0; min-height: 100vh;
  margin: 0; padding: 0; background: transparent;
}
html body.bt-app .bt-top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
  height: var(--bt-top-h); min-height: var(--bt-top-h); margin: 0; padding: 0 var(--page-x);
  background: var(--glass); -webkit-backdrop-filter: saturate(1.5) blur(16px);
  backdrop-filter: saturate(1.5) blur(16px); border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0; box-shadow: none; transition: background .3s;
}
html body.bt-app .bt-top-brand { display: none; }
html body.bt-app .bt-top .shell-context {
  display: flex; align-items: center; gap: 12px; min-width: 0; flex: 0 1 auto; margin: 0;
  font-size: 13px; color: var(--tx3);
}
html body.bt-app .bt-clock {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); white-space: nowrap; color: var(--tx3);
}
html body.bt-app .bt-clock .appbar-clock { font-family: var(--fn); font-size: 13.5px; font-weight: 600; color: var(--tx); letter-spacing: .01em; }
html body.bt-app .bt-pulse { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--pos); animation: fa-pulse 2s infinite; }
html body.bt-app .bt-tz { font-size: 12.5px; color: var(--tx3); }
html body.bt-app .bt-top .freshness {
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px;
  color: var(--tx3); background: none; border: 0; padding: 0;
}
html body.bt-app .bt-top .freshness .freshness-compact { display: none; }
html body.bt-app .bt-top .fa-header-quant-bar {
  flex: 1 1 auto; display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0;
  margin: 0; padding: 0; background: none; border: 0;
}
html body.bt-app .bt-top .bt-lazy-link {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; margin: 0;
  border: 1px solid var(--acc-line); border-radius: 10px; background: var(--acc-soft); color: var(--acc-tx);
  font-size: 13.5px; font-weight: 600; white-space: nowrap; text-decoration: none; box-shadow: none;
  transition: filter .15s, transform .15s;
}
html body.bt-app .bt-top .bt-lazy-link:hover { filter: brightness(1.15); transform: translateY(-1px); color: var(--acc-tx); }
html body.bt-app .bt-top .bt-lazy-link svg.ic { width: 15px; height: 15px; stroke-width: 2; }
html body.bt-app .bt-top #sr-header-trigger-btn:not([hidden]) {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--tx2); font-size: 13px; font-weight: 600;
}
html body.bt-app .bt-bank {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 6px 0 12px; margin: 0;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 13px;
  color: var(--tx3); white-space: nowrap; cursor: text; box-shadow: none;
}
html body.bt-app .bt-bank:focus-within { border-color: var(--acc-line); }
html body.bt-app .bt-bank .fa-bankroll-input {
  width: 78px; height: 26px; padding: 0; border: 0; outline: none; background: transparent; color: var(--tx);
  font-family: var(--fn); font-size: 14px; font-weight: 650; text-align: right; box-shadow: none;
  -moz-appearance: textfield; appearance: textfield;
}
html body.bt-app .bt-bank .fa-bankroll-input::-webkit-inner-spin-button,
html body.bt-app .bt-bank .fa-bankroll-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
html body.bt-app .bt-bank-cur { color: var(--tx2); }
html body.bt-app .bt-bank .fa-bankroll-flat-pill {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 7px;
  background: var(--card2); color: var(--tx2); font-size: 12.5px; border: 0;
}
html body.bt-app .bt-bank .fa-bankroll-flat-pill strong { font-weight: 600; color: var(--tx2); font-family: var(--fbody); }
html body.bt-app .bt-top .appbar-status { display: flex; align-items: center; gap: 10px; flex: none; margin: 0; }
html body.bt-app .bt-top .icon-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; min-width: 36px;
  padding: 0 10px; margin: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  color: var(--tx2); font-size: 13px; box-shadow: none; cursor: pointer; transition: border-color .2s, color .2s, background .2s;
}
html body.bt-app .bt-top .icon-button:hover { border-color: var(--line2); color: var(--tx); }
html body.bt-app .bt-top .icon-button svg.ic { width: 16px; height: 16px; stroke-width: 2; }
html body.bt-app .bt-top :is(.shell-refresh, .bt-sound, .bt-theme-toggle, .logout-button) { width: 36px; padding: 0; }
html body.bt-app .bt-top .shell-refresh[aria-busy="true"] svg.ic { animation: fa-spin 1s linear infinite; }
html body.bt-app .bt-sound { position: relative; }
html body.bt-app .bt-sound .bt-sound-dot {
  position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--acc);
  box-shadow: 0 0 0 2px var(--bg2); display: none; animation: fa-pulse 2s infinite;
}
html body.bt-app .bt-sound:is([data-level="1"], [data-level="2"]) {
  border-color: var(--acc-line); background: var(--acc-soft); color: var(--acc-tx);
}
html body.bt-app .bt-sound:is([data-level="1"], [data-level="2"]) .bt-sound-dot { display: block; }
html body.bt-app .bt-top .bt-theme-toggle { display: none; }
html[data-theme="dark"] body.bt-app .bt-theme-toggle .bt-ic-light,
html[data-theme="light"] body.bt-app .bt-theme-toggle .bt-ic-dark { display: none; }

/* Main content column. */
html body.bt-app .workspace-main {
  position: relative; width: 100%; max-width: 1440px; min-height: calc(100vh - 160px); margin: 0 auto;
  padding: 28px var(--page-x) 96px; background: transparent; outline: none;
}
html body.bt-app[data-page] .page-heading { display: block; margin: 0 0 var(--sec); padding: 0; max-width: 720px; animation: fa-up .45s var(--ease-out) both; }
html body.bt-app[data-page] .page-heading .eyebrow,
html body.bt-app[data-page] #page-eyebrow {
  display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--fbody); font-size: 12.5px;
  font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--info);
}
html body.bt-app[data-page] #page-eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--info); flex: none; }
html body.bt-app[data-page] .page-heading h1 {
  margin: 10px 0 0; font-family: var(--fh); font-size: 30px; line-height: 36px; font-weight: 650;
  letter-spacing: -0.025em; text-transform: var(--htt); color: var(--tx);
}
html body.bt-app[data-page] .page-heading h1 .today-heading-caption { display: none; }
html body.bt-app[data-page] .page-heading .page-description {
  margin: 8px 0 0; max-width: 720px; font-size: 15px; line-height: 22px; color: var(--tx2); text-wrap: pretty;
}
html body.bt-app .workspace-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1440px;
  width: 100%; margin: 0 auto; padding: 16px var(--page-x) 28px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--tx3); background: transparent;
}
html body.bt-app .workspace-footer a { color: var(--acc-tx); text-decoration: none; }

/* Persistent cockpit panes keep only their content. */
html[data-fa-pane] body.bt-app .bt-frame { display: block; }
html[data-fa-pane] body.bt-app :is(.bt-side, .bt-top, .bt-tabbar, .workspace-footer, .skip-link) { display: none !important; }
html[data-fa-pane] body.bt-app .workspace-main { padding: 0 0 36px; }
html[data-fa-cockpit] body.bt-app #workspace-main { display: grid; }

/* Native cockpit keeps retained iframes measurable without displaying inactive panes. */
html[data-fa-cockpit] body.bt-app #workspace-main { align-content: start; }
html body.bt-app #workspace-main > [data-cockpit-pane] { grid-area: 1 / 1; align-self: start; min-width: 0; }
html[data-fa-cockpit] body.bt-app #workspace-main > iframe.fa-cockpit-pane[hidden][data-cockpit-ready] { display: block !important; visibility: hidden; pointer-events: none; }
html body.bt-app .fa-cockpit-origin-pane { min-width: 0; }
html body.bt-app .fa-cockpit-pane { display: block; width: 100%; height: calc(100dvh - 94px); min-height: 480px; border: 0; background: transparent; }
html[data-fa-pane] body.bt-app .app-shell { display: block; min-height: 0; }
html body.bt-app .fa-clipboard-fallback { position: fixed; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
html body.bt-app :is(.route-page, .shelf-stack, .shelf, .card-grid, .fa-card-body, .shelf-body, .research-layout, .filter-group, .filter-control) { min-width: 0; }
html body.bt-app :is(.route-page, .shelf-stack, .shelf, .fa-card-body, .shelf-body, .research-layout) > * { min-width: 0; }
html body.bt-app :is(pre, code, .card-note) { overflow-wrap: anywhere; }
html body.bt-app pre { max-width: 100%; overflow-x: auto; white-space: pre-wrap; }
html body.bt-app :is(.table-wrap, .mobile-table-scroll) { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
html body.bt-app :is(img, canvas) { max-width: 100%; }
html body.bt-app :is(.fa-chart, .chart-wrap, .money-series-chart) { width: 100%; min-width: 0; }
html body.bt-app :is(.fa-chart, .chart-wrap, .money-series-chart) > svg { width: 100%; display: block; }
html body.bt-app :is(.mobile-filter-open, .mobile-overlay-close) { display: none; }
html body.bt-app .product-route { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 var(--gap); color: var(--tx2); font-size: 12px; }
html body.bt-app .product-route a { display: inline-flex; align-items: center; min-height: 32px; padding: 6px 10px; border-radius: var(--r-ctl); text-decoration: none; }
html body.bt-app .product-route a[aria-current="step"] { background: var(--card3); color: var(--tx); font-weight: 600; }
html body.bt-app .lab-level { min-width: 0; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); }
html body.bt-app .lab-level > summary { cursor: pointer; min-height: 48px; padding: 14px 16px; font-family: var(--fh2); font-size: 16px; font-weight: 600; }
html body.bt-app .lab-level > summary small { margin-left: 10px; color: var(--tx2); font-family: var(--ft); font-size: 12px; font-weight: 500; }
html body.bt-app .lab-level-body { display: grid; gap: var(--gap); min-width: 0; padding: 0 16px 16px; }
html body.bt-app :is(.lab-level, #event-history, #idea-history, #idea-result) { scroll-margin-top: 80px; }
html body.bt-app .mobile-detail { min-width: 0; margin-top: 8px; }
html body.bt-app .mobile-detail > summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; gap: 8px; color: var(--tx2); font-size: 13px; }
html body.bt-app .mobile-detail > .mono { overflow-wrap: anywhere; }
html body.bt-app .card-reason { margin: 8px 0; color: var(--tx2); font-size: 13px; line-height: 1.45; }

/* Mobile tab bar + «Ещё» sheet (hidden on desktop). */
html body.bt-app .bt-tabbar { display: none; }

/* ---------------------------------------------------------------------------------------
   3. Base controls: buttons 40 / 36, segment 32, chips, banners, inputs, tables
   ------------------------------------------------------------------------------------- */
html body.bt-app :is(.button, button.button, a.button, .primary-action, .secondary-action) {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; min-height: 40px;
  padding: 0 16px; border: 1px solid var(--line2); border-radius: var(--r-ctl); background: var(--card);
  color: var(--tx); font-family: var(--fbody); font-size: 14px; font-weight: 600; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer; box-shadow: none;
  transition: transform .15s, filter .15s, border-color .2s, background .2s, color .2s;
}
html body.bt-app :is(.button, .primary-action, .secondary-action):hover { border-color: var(--line2); color: var(--tx); transform: translateY(-1px); }
html body.bt-app :is(.button, .primary-action, .secondary-action):active { transform: scale(.98); }
html body.bt-app :is(.button.primary, .primary-action, button[type="submit"].button, .bt-btn-primary) {
  border-color: transparent; background: var(--acc); color: var(--acc-ink); font-weight: 650;
  box-shadow: 0 8px 22px -10px var(--acc);
}
html body.bt-app :is(.button.primary, .primary-action, .bt-btn-primary):hover { filter: brightness(1.06); color: var(--acc-ink); }
html body.bt-app :is(.button.ghost, .bt-btn-ghost) { border-color: transparent; background: transparent; color: var(--tx2); }
html body.bt-app :is(.button.ghost, .bt-btn-ghost):hover { background: var(--hover); color: var(--tx); }
html body.bt-app :is(.button, .primary-action, .secondary-action):disabled,
html body.bt-app :is(.button, .primary-action, .secondary-action)[aria-disabled="true"] {
  opacity: .5; cursor: not-allowed; transform: none; filter: none; box-shadow: none;
}
/* In-card actions are 36px tall. */
html body.bt-app :is(article, .fa-card, .event-card, .shelf, .card) :is(.button, .primary-action, .secondary-action) {
  height: 36px; min-height: 36px; padding: 0 13px; font-size: 13.5px;
}
/* Segment control 32px. */
html body.bt-app :is(.segmented, .seg, .bt-seg, .today-sport-tabs, .exact-sort-pills, [role="tablist"]) {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: var(--r-ctl);
  background: var(--card); border: 1px solid var(--line);
}
html body.bt-app :is(.segmented, .seg, .bt-seg, [role="tablist"]) > :is(button, a, label),
html body.bt-app :is(.today-sport-pill, .exact-sort-pill, .sr-nobrace-filter-btn, .fa-nobrace-filter-btn) {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; min-height: 32px; padding: 0 12px;
  border: 0; border-radius: calc(var(--r-ctl) - 1px); background: transparent; color: var(--tx2);
  font-family: var(--fbody); font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; box-shadow: none;
}
html body.bt-app :is(.segmented, .seg, .bt-seg, [role="tablist"]) > :is(button, a, label):hover { color: var(--tx); background: var(--hover); }
html body.bt-app :is(.segmented, .seg, .bt-seg, [role="tablist"]) > :is([aria-pressed="true"], [aria-selected="true"], [aria-current], .is-active, .active),
html body.bt-app :is(.today-sport-pill, .exact-sort-pill, .sr-nobrace-filter-btn, .fa-nobrace-filter-btn):is([aria-pressed="true"], .is-active, .active) {
  background: var(--card3); color: var(--tx); box-shadow: inset 0 0 0 1px var(--line2);
}
/* Chips, pills and badges. */
html body.bt-app :is(.pill, .chip, .badge, .bt-chip) {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px;
  border: 0; background: var(--card2); color: var(--tx2); font-family: var(--ft); font-size: 12px;
  font-weight: 600; line-height: 1; white-space: nowrap; box-shadow: none;
}
html body.bt-app :is(.pill, .chip, .badge, .bt-chip):is(.good, .pos, .is-good, .ok, .success) { background: var(--pos-soft); color: var(--pos); }
html body.bt-app :is(.pill, .chip, .badge, .bt-chip):is(.bad, .neg, .is-bad, .error, .danger) { background: var(--neg-soft); color: var(--neg); }
html body.bt-app :is(.pill, .chip, .badge, .bt-chip):is(.warn, .is-warn, .warning) { background: var(--warn-soft); color: var(--warn); }
html body.bt-app :is(.pill, .chip, .badge, .bt-chip):is(.info, .is-info, .market) { background: var(--info-soft); color: var(--info); }
html body.bt-app :is(.pill, .chip, .badge, .bt-chip):is(.ai, .vio) { background: var(--vio-soft); color: var(--vio); }
html body.bt-app :is(.pill, .chip, .badge, .bt-chip):is(.accent, .acc, .primary) { background: var(--acc-soft); color: var(--acc-tx); }
/* Banners. */
html body.bt-app .notice {
  display: flex; align-items: flex-start; gap: 10px; margin: 0 0 var(--gap); padding: 12px 16px;
  border-radius: var(--r-in); border: 1px solid var(--line); background: var(--card2); color: var(--tx2);
  font-size: 13.5px; line-height: 1.45; box-shadow: none;
}
html body.bt-app .notice[hidden] { display: none; }
html body.bt-app .notice.warn { border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: var(--warn-soft); color: var(--tx); }
html body.bt-app .notice.bad { border-color: color-mix(in srgb, var(--neg) 40%, transparent); background: var(--neg-soft); color: var(--tx); }
html body.bt-app .notice.info { border-color: color-mix(in srgb, var(--info) 40%, transparent); background: var(--info-soft); color: var(--tx); }
html body.bt-app .notice.good { border-color: color-mix(in srgb, var(--pos) 40%, transparent); background: var(--pos-soft); color: var(--tx); }
/* Form fields. */
html body.bt-app :is(input[type="text"], input[type="number"], input[type="search"], input[type="date"], select, textarea):not(.fa-bankroll-input) {
  min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-ctl);
  background: var(--card2); color: var(--tx); font-family: var(--fbody); font-size: 13.5px; box-shadow: none;
}
html body.bt-app textarea { padding: 8px 10px; }
html body.bt-app :is(input, select, textarea):focus-visible { border-color: var(--acc-line); outline: 2px solid var(--acc-soft); outline-offset: 0; }
/* Tables. */
html body.bt-app :is(.data-table, table) { border-collapse: collapse; width: 100%; font-size: 13px; color: var(--tx); }
html body.bt-app :is(.data-table, table) th {
  padding: 9px 12px; text-align: left; font-family: var(--ft); font-size: 12px; font-weight: 600; color: var(--tx3);
  border-bottom: 1px solid var(--line); background: transparent; letter-spacing: 0; text-transform: none;
}
html body.bt-app :is(.data-table, table) td { padding: 10px 12px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
html body.bt-app :is(.data-table, table) tbody tr:hover td { background: var(--hover); }
html body.bt-app .table-wrap { overflow-x: auto; border-radius: var(--r-in); border: 1px solid var(--line); background: var(--card); }
/* Disclosures. */
html body.bt-app details.terminal-secondary {
  margin: 0 0 var(--gap); padding: 0; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card);
}
html body.bt-app details.terminal-secondary > summary {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 var(--pad); list-style: none;
  cursor: pointer; font-size: 14px; font-weight: 600; color: var(--tx2); background: transparent; border: 0; border-radius: var(--r-card);
}
html body.bt-app details.terminal-secondary > summary::-webkit-details-marker { display: none; }
html body.bt-app details.terminal-secondary > summary::before {
  content: ""; width: 7px; height: 7px; flex: none; border-right: 2px solid var(--tx3); border-bottom: 2px solid var(--tx3);
  transform: rotate(-45deg); transition: transform .25s;
}
html body.bt-app details.terminal-secondary[open] > summary::before { transform: rotate(45deg); }
html body.bt-app details.terminal-secondary > summary:hover { color: var(--tx); background: var(--hover); }
html body.bt-app details.terminal-secondary[open] > :not(summary) { margin: 0 var(--pad) var(--pad); }
/* Loading / empty states. */
html body.bt-app .loading-card {
  display: grid; place-items: center; gap: 8px; min-height: 180px; padding: var(--pad); border-radius: var(--r-card);
  border: 1px dashed var(--line2); background: var(--card); color: var(--tx2); text-align: center;
}
html body.bt-app .loading-card small { color: var(--tx3); }
html body.bt-app .spinner {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--card3); border-top-color: var(--acc);
  animation: fa-spin .9s linear infinite;
}
@keyframes fa-spin { to { transform: rotate(360deg); } }
@keyframes fa-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes fa-fade-out { from { opacity: 1; } to { opacity: 0; } }

/* ---------------------------------------------------------------------------------------
   4. Card surface and the four archetypes (KPI · Signal · Line event · Whale trade)
   ------------------------------------------------------------------------------------- */
html body.bt-app :is(.fa-card, .event-card, .shelf, .card, .bt-card, .error-card, .metric-card) {
  position: relative; border: 1px solid var(--line); border-radius: var(--r-card);
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -40%), var(--spot), transparent 55%), var(--cardfx, none), var(--card);
  color: var(--tx); box-shadow: var(--shadow);
  transition: transform .3s var(--ease-out), border-color .3s, box-shadow .3s;
}
html body.bt-app :is(.fa-card, .event-card, .bt-card):hover { border-color: var(--line2); }
html body.bt-app :is(.fa-card, .event-card, .bt-card).bt-lift:hover { transform: translateY(-2px); }
html body.bt-app :is(.shelf, .bt-section) { padding: var(--pad); }
html body.bt-app :is(.shelf, .bt-section) > :is(h2, .section-title) {
  margin: 0; font-family: var(--fh2); font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: -0.015em; color: var(--tx);
}
html body.bt-app .shelf-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 0 0 16px; padding: 0; border: 0; background: none; }
html body.bt-app .shelf-header > div { min-width: 0; }
html body.bt-app .shelf-header h2 {
  margin: 0; font-family: var(--fh2); font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: -0.015em;
  color: var(--tx); text-transform: none;
}
html body.bt-app .shelf-header p { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: var(--tx3); }
html body.bt-app .shelf-count {
  flex: none; display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px;
  background: var(--card2); color: var(--tx2); font-family: var(--fn); font-size: 12.5px; font-weight: 600;
}
html body.bt-app .card-note { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: var(--tx3); }
html body.bt-app :is(h2, .h2) { font-family: var(--fh2); letter-spacing: -0.015em; }
html body.bt-app :is(h3, .h3) { font-family: var(--fbody); }
html body.bt-app .shelf-stack { display: flex; flex-direction: column; gap: var(--gap); }
html body.bt-app #page-content > * { animation: fa-up .45s var(--ease-out) both; }
html body.bt-app #page-content > :nth-child(2) { animation-delay: .045s; }
html body.bt-app #page-content > :nth-child(3) { animation-delay: .09s; }
html body.bt-app #page-content > :nth-child(4) { animation-delay: .135s; }
html body.bt-app #page-content > :nth-child(5) { animation-delay: .18s; }
html body.bt-app #page-content > :nth-child(n + 6) { animation-delay: .22s; }

/* 4.1 KPI — 128px, label 13 / value 28 / note 12.5, optional chip and sparkline. */
html body.bt-app .metric-strip {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin: 0 0 var(--sec); padding: 0;
  background: none; border: 0;
}
html body.bt-app .metric-strip:empty { display: none; }
html body.bt-app :is(.metric-strip > .metric, .bt-kpi) {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; min-width: 0;
  min-height: 128px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--cardfx, none), var(--card); box-shadow: var(--shadow); color: var(--tx);
}
html body.bt-app :is(.metric-strip > .metric, .bt-kpi) :is(span, dt, .label, .metric-label, .bt-kpi-label):first-child {
  font-size: 13px; line-height: 18px; font-weight: 500; color: var(--tx2); letter-spacing: 0; text-transform: none; font-family: var(--ft);
}
html body.bt-app :is(.metric-strip > .metric, .bt-kpi) :is(strong, dd, .value, .metric-value, .bt-kpi-value) {
  display: block; margin: 0; font-family: var(--fn); font-size: 28px; line-height: 32px; font-weight: 650;
  letter-spacing: -0.025em; color: var(--tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html body.bt-app :is(.metric-strip > .metric, .bt-kpi) :is(small, .note, .metric-note, .bt-kpi-note) {
  display: block; font-size: 12.5px; line-height: 17px; color: var(--tx3); font-weight: 400;
}
html body.bt-app .bt-kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
html body.bt-app .bt-kpi-chip { font-family: var(--ft); height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; background: var(--card2); color: var(--tx2); }
html body.bt-app .bt-kpi-chip[data-tone="pos"] { background: var(--pos-soft); color: var(--pos); }
html body.bt-app .bt-kpi-chip[data-tone="neg"] { background: var(--neg-soft); color: var(--neg); }
html body.bt-app .bt-kpi-chip[data-tone="warn"] { background: var(--warn-soft); color: var(--warn); }
html body.bt-app .bt-kpi-chip[data-tone="info"] { background: var(--info-soft); color: var(--info); }
html body.bt-app .bt-kpi-value small { display: inline; margin-left: 4px; font-size: 15px; font-weight: 500; color: var(--tx3); font-family: var(--fbody); }
html body.bt-app .bt-kpi-spark { position: absolute; right: 14px; bottom: 14px; width: 84px; height: 28px; overflow: visible; }
html body.bt-app .bt-kpi-spark path { fill: none; stroke: var(--acc); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 400; stroke-dashoffset: 400; animation: fa-draw 1.2s var(--ease-out) forwards; }
html body.bt-app :is(.pos, .is-pos, .is-good, .good-text) { color: var(--pos); }
html body.bt-app :is(.neg, .is-neg, .is-bad, .bad-text) { color: var(--neg); }

/* 4.2 Signal card (open / taken / skipped). */
html body.bt-app .bt-signal { display: flex; flex-direction: column; gap: 14px; padding: var(--pad); height: 100%; }
html body.bt-app .bt-signal.is-taken { border-color: var(--acc-line); box-shadow: 0 0 0 1px var(--acc-line), 0 0 28px -10px var(--acc); }
html body.bt-app .bt-signal.is-skipped { opacity: .55; }
html body.bt-app .bt-meta { font-family: var(--ft); display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12.5px; color: var(--tx3); }
html body.bt-app .bt-meta .bt-league { flex: 1; min-width: 0; line-height: 16px; }
html body.bt-app .bt-conf { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
html body.bt-app .bt-conf i { width: 3px; height: 12px; border-radius: 1px; background: var(--card3); }
html body.bt-app .bt-conf i.on { background: var(--acc); }
html body.bt-app .bt-time {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--tx); font-family: var(--fn); font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
html body.bt-app .bt-title { margin: 0; font-size: 16px; line-height: 22px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--tx); }
html body.bt-app .bt-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--tx3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body.bt-app .bt-bet {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px;
  border-radius: var(--r-in); background: var(--card2); border: 1px solid var(--line);
}
html body.bt-app .bt-bet-k { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--tx3); }
html body.bt-app .bt-bet-pick { margin-top: 4px; font-family: var(--fh2); font-size: 18px; line-height: 22px; font-weight: 650; color: var(--tx); }
html body.bt-app .bt-odds {
  display: inline-grid; place-items: center; min-width: 62px; height: 40px; padding: 0 10px; border-radius: var(--r-in);
  background: var(--acc-soft); box-shadow: inset 0 0 0 1px var(--acc-line); color: var(--acc-tx);
  font-family: var(--fn); font-size: 18px; font-weight: 700; letter-spacing: -.01em;
}
html body.bt-app .bt-metrics {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden;
  border-radius: var(--r-in); border: 1px solid var(--line); background: var(--line);
}
html body.bt-app .bt-metrics > div { padding: 9px 11px; background: var(--card); min-width: 0; }
html body.bt-app .bt-metrics span { font-family: var(--ft); display: block; font-size: 12px; color: var(--tx3); white-space: nowrap; }
html body.bt-app .bt-metrics strong { display: block; margin-top: 2px; font-family: var(--fn); font-size: 14px; font-weight: 650; color: var(--tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body.bt-app .bt-quotes { font-family: var(--ft); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--tx3); }
html body.bt-app .bt-quote { display: inline-flex; gap: 5px; height: 24px; align-items: center; padding: 0 8px; border-radius: 6px; background: var(--card2); }
html body.bt-app .bt-quote b { font-family: var(--fn); color: var(--tx); font-weight: 650; }
html body.bt-app .bt-quote.best b { color: var(--acc-tx); }
html body.bt-app .bt-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; flex-wrap: wrap; }

/* 4.3 Line event: outcome table with three bars (market / AI / BUY). */
html body.bt-app .bt-bars { display: grid; gap: 6px; }
html body.bt-app .bt-bar { position: relative; height: 20px; border-radius: 5px; background: var(--card3); overflow: hidden; }
html body.bt-app .bt-bar > i {
  position: absolute; inset: 0 auto 0 0; width: calc(var(--w, 0) * 1%); border-radius: 5px; background: var(--info);
  transform-origin: left; animation: fa-grow-x .85s var(--ease-out) both;
}
html body.bt-app .bt-bar[data-kind="ai"] > i { background: var(--acc); }
html body.bt-app .bt-bar[data-kind="ai"][data-tone="neg"] > i { background: var(--neg); }
html body.bt-app .bt-bar[data-kind="buy"] > i { background: color-mix(in srgb, var(--tx3) 60%, transparent); }
html body.bt-app .bt-bar[data-kind="buy"][data-tone="warn"] > i { background: var(--warn); }
html body.bt-app .bt-bar > b { position: relative; z-index: 1; display: block; padding: 0 7px; font-family: var(--fn); font-size: 12px; line-height: 20px; font-weight: 650; color: var(--tx); }

/* 4.4 Whale trade: BUY / SELL chip, 30/34 sum. */
html body.bt-app .bt-side-chip { height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; letter-spacing: .04em; }
html body.bt-app .bt-side-chip[data-side="BUY"] { background: var(--pos-soft); color: var(--pos); }
html body.bt-app .bt-side-chip[data-side="SELL"] { background: var(--neg-soft); color: var(--neg); }
html body.bt-app .bt-whale-sum { font-family: var(--fn); font-size: 30px; line-height: 34px; font-weight: 700; letter-spacing: -.02em; }
html body.bt-app .bt-whale-sum[data-side="BUY"] { color: var(--pos); }
html body.bt-app .bt-whale-sum[data-side="SELL"] { color: var(--neg); }
html body.bt-app .is-new-trade { animation: bt-new-ring 2s ease-out 2; }
@keyframes bt-new-ring { 0% { box-shadow: 0 0 0 0 var(--acc-line); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Grids: equal-height rows, actions pinned to the bottom. */
html body.bt-app .bt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--gap); align-items: stretch; }
html body.bt-app .bt-grid > * { min-width: 0; }

/* ---------------------------------------------------------------------------------------
   5. Overlays: detail drawer, ⌘K palette, toasts, focus mode, «Что нового»
   ------------------------------------------------------------------------------------- */
html body .fa-overlay {
  position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-start; justify-content: center;
  padding: 11vh 14px 14px; background: var(--overlay); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: fa-fade .2s both;
}
html body .fa-overlay > .fa-panel {
  width: min(640px, calc(100vw - 28px)); max-height: 72vh; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line2); border-radius: 14px; background: var(--bg2); color: var(--tx);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.75); -webkit-backdrop-filter: none; backdrop-filter: none;
  animation: fa-pop .25s var(--ease-out) both;
}
html body .fa-overlay .fa-palette-input {
  display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 18px; border-bottom: 1px solid var(--line);
  color: var(--tx3); font-size: 18px;
}
html body .fa-overlay .fa-palette-input input {
  flex: 1; height: 100%; min-width: 0; min-height: 0; padding: 0; border: 0 !important; outline: none !important; background: transparent !important;
  color: var(--tx); font-family: var(--fbody); font-size: 16px; box-shadow: none !important;
}
html body .fa-overlay .fa-palette-list { flex: 1; overflow: auto; margin: 0; padding: 6px; list-style: none; }
html body .fa-overlay .fa-palette-list > li {
  display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border-radius: 9px;
  color: var(--tx); font-size: 14px; cursor: pointer;
}
html body .fa-overlay .fa-palette-list > li[aria-selected="true"] { background: var(--acc-soft); box-shadow: inset 0 0 0 1px var(--acc-line); }
html body .fa-overlay .fa-palette-list > li > span:first-child { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .fa-overlay .fa-palette-list .grp { font-size: 12px; color: var(--tx3); }
html body .fa-overlay .fa-palette-list kbd { font-family: var(--fn); font-size: 11.5px; padding: 1px 6px; border-radius: 6px; background: var(--card3); color: var(--tx2); }
html body .fa-overlay .fa-palette-list > li.bt-pal-group {
  min-height: 28px; padding: 8px 12px 4px; cursor: default; font-size: 11.5px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--tx3); background: none !important; box-shadow: none !important;
}
html body .fa-overlay .fa-palette-foot {
  display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--tx3);
}
html body .fa-overlay .fa-palette-foot kbd { font-family: var(--fn); padding: 1px 6px; border-radius: 6px; background: var(--card3); color: var(--tx2); }
html body .fa-overlay .fa-sheet { padding: 22px; }
html body .fa-overlay .fa-sheet-head { display: flex; gap: 12px; align-items: flex-start; }
html body .fa-overlay .fa-sheet-head h2 { margin: 0; font-family: var(--fh2); font-size: 18px; }
html body .fa-overlay .fa-sheet-head p { margin: 4px 0 0; color: var(--tx3); font-size: 13px; }
html body .fa-overlay .fa-sheet-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--acc-soft); color: var(--acc-tx); font-weight: 700; }
html body .fa-overlay .fa-sheet-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
html body .fa-overlay :is(.fa-gloss, .fa-keys) { margin: 16px 0 0; overflow: auto; }
html body .fa-overlay :is(.fa-gloss dt, .fa-keys dt) { font-weight: 600; color: var(--tx); }
html body .fa-overlay :is(.fa-gloss dd, .fa-keys dd) { margin: 2px 0 12px; color: var(--tx2); font-size: 13.5px; }
html body .fa-overlay .fa-keys kbd { font-family: var(--fn); padding: 1px 6px; margin-right: 4px; border-radius: 6px; background: var(--card3); color: var(--tx2); }

/* All three detail drawers stay flush right at min(540px, 100vw), including phones. */
.bt-drawer-scrim {
  position: fixed; inset: 0; z-index: 80; background: var(--overlay); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: fa-fade .3s both;
}
.bt-drawer, .bt-drawer *, .bt-focus, .bt-focus *, .bt-modal, .bt-modal *, .bt-toasts, .bt-toasts * { box-sizing: border-box; }
.bt-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 81; width: min(540px, 100%); display: flex; flex-direction: column;
  background: var(--bg2); color: var(--tx); border-left: 1px solid var(--line2); box-shadow: -30px 0 80px -30px rgba(0, 0, 0, .6);
  animation: fa-in-r .4s var(--ease-drawer) both; font-family: var(--fbody);
}
.bt-drawer.is-closing { animation: fa-out-r .22s ease-in both; }
.bt-drawer-scrim.is-closing { animation: fa-fade-out .22s both; }
.bt-drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
.bt-drawer-head > div { flex: 1; min-width: 0; }
.bt-drawer-kicker { font-family: var(--ft); display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--tx2); }
.bt-drawer-head h2 { margin: 6px 0 0; font-family: var(--fbody); font-size: 21px; line-height: 27px; font-weight: 650; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.bt-drawer-head p { margin: 4px 0 0; font-size: 13px; color: var(--tx3); }
.bt-x {
  display: grid; place-items: center; width: 36px; height: 36px; flex: none; padding: 0; border: 1px solid var(--line);
  border-radius: 10px; background: var(--card); color: var(--tx2); cursor: pointer;
}
.bt-x:hover { color: var(--tx); border-color: var(--line2); }
.bt-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.bt-drawer-body { flex: 1; overflow: auto; padding: 18px 22px 24px; display: flex; flex-direction: column; gap: 16px; }
.bt-drawer-block { padding: 16px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line); }
.bt-drawer-block h3 { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--tx); }
.bt-drawer-hero { display: flex; align-items: center; gap: 14px; }
.bt-drawer-hero .bt-odds { min-width: 76px; height: 54px; border-radius: 13px; font-size: 24px; font-weight: 750; }
.bt-drawer-foot { display: flex; gap: 10px; padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg2); }
.bt-drawer-foot > * { flex: 1; }
.bt-drawer dl.bt-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.bt-drawer dl.bt-kv dt { font-family: var(--ft); font-size: 12px; color: var(--tx3); }
.bt-drawer dl.bt-kv dd { margin: 2px 0 0; font-family: var(--fn); font-size: 15px; font-weight: 650; color: var(--tx); }
.bt-drawer .bt-source-body { font-size: 13.5px; color: var(--tx2); overflow-wrap: anywhere; }
.bt-drawer .bt-source-body :is(article, .fa-card, .event-card) { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; }
.bt-chart { width: 100%; height: 120px; overflow: visible; }
.bt-chart .bt-chart-line { fill: none; stroke: var(--acc); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: fa-draw 1.3s var(--ease-out) forwards; }
.bt-chart .bt-chart-kmin { stroke: var(--warn); stroke-width: 1; stroke-dasharray: 4 4; }
.bt-chart text { font-family: var(--fn); font-size: 10.5px; fill: var(--tx3); }

/* Toasts: right-bottom, 380px, max 3, 3.4s with a countdown strip. */
.bt-toasts { position: fixed; right: 20px; bottom: 20px; z-index: 120; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 20px)); pointer-events: none; }
.bt-toast {
  position: relative; overflow: hidden; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px 16px;
  border-radius: 12px; background: var(--bg2); border: 1px solid var(--line2); color: var(--tx); pointer-events: auto;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .7); animation: fa-toast .3s var(--ease-out) both; font-family: var(--fbody);
}
.bt-toast-ic { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 9px; background: var(--acc-soft); color: var(--acc-tx); }
.bt-toast[data-tone="pos"] .bt-toast-ic { background: var(--pos-soft); color: var(--pos); }
.bt-toast[data-tone="neg"] .bt-toast-ic { background: var(--neg-soft); color: var(--neg); }
.bt-toast[data-tone="warn"] .bt-toast-ic { background: var(--warn-soft); color: var(--warn); }
.bt-toast-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bt-toast b { display: block; font-size: 14px; font-weight: 650; }
.bt-toast span { display: block; margin-top: 2px; font-size: 13px; color: var(--tx2); }
.bt-toast::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--acc);
  transform-origin: left; animation: fa-shrink 3.4s linear both;
}
.bt-toast[data-tone="pos"]::after { background: var(--pos); }
.bt-toast[data-tone="neg"]::after { background: var(--neg); }
.bt-toast[data-tone="warn"]::after { background: var(--warn); }
html body .fa-toast { position: fixed; right: 20px; bottom: 20px; z-index: 120; max-width: 380px; padding: 12px 16px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line2); color: var(--tx); font-size: 13.5px; box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .7); animation: fa-toast .3s var(--ease-out) both; }

/* Focus mode: stack of three cards, drag ±110px to decide, stamps, 64/46/64 buttons. */
.bt-focus {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); background: var(--bg); color: var(--tx);
  background-image: var(--glow, none); animation: fa-fade .25s both; font-family: var(--fbody); overflow-y: auto;
}
.bt-focus-top { width: min(520px, 100%); display: flex; align-items: center; gap: 12px; }
.bt-focus-top h2 { flex: 1; margin: 0; font-family: var(--fh); font-size: 18px; text-transform: var(--htt); letter-spacing: -.01em; }
.bt-focus-progress { width: min(520px, 100%); display: flex; gap: 4px; }
.bt-focus-progress i { flex: 1; height: 4px; border-radius: 2px; background: var(--card3); }
.bt-focus-progress i[data-state="taken"] { background: var(--acc); }
.bt-focus-progress i[data-state="skipped"] { background: var(--neg); }
.bt-focus-progress i[data-state="current"] { background: var(--tx2); }
.bt-focus-stack { position: relative; width: min(520px, 100%); flex: 1; min-height: 340px; max-height: min(560px, calc(100dvh - 230px)); }
.bt-focus-card {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 16px; padding: 24px; overflow: hidden;
  border-radius: 24px; border: 1px solid var(--line2); background: var(--cardfx, none), var(--card);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7); touch-action: none; user-select: none;
  transform: translate(var(--dx, 0px), var(--off, 0px)) rotate(var(--rot, 0deg)) scale(var(--sc, 1));
  transition: transform .4s var(--ease-spring), opacity .3s;
}
.bt-focus-card[data-depth="1"] { --off: 14px; --sc: .95; opacity: .75; }
.bt-focus-card[data-depth="2"] { --off: 28px; --sc: .9; opacity: .45; }
html body:is(.bt-app, .bt-lazy) .bt-focus-card .bt-odds { min-width: 92px; height: 64px; padding: 0 14px; border-radius: 14px; font-size: 30px; }
html body:is(.bt-app, .bt-lazy) .bt-focus-card .bt-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; border: 0; background: none; }
html body:is(.bt-app, .bt-lazy) .bt-focus-card .bt-metrics > div { padding: 10px 8px; border-radius: 12px; background: var(--card2); text-align: center; }
html body:is(.bt-app, .bt-lazy) .bt-focus-card .bt-metrics strong { font-size: 16px; }
.bt-focus-card.is-dragging { transition: none; cursor: grabbing; }
.bt-focus-card.is-out-right { transform: translateX(125%) rotate(16deg); transition: transform .3s ease-in, opacity .3s; opacity: 0; }
.bt-focus-card.is-out-left { transform: translateX(-125%) rotate(-16deg); transition: transform .3s ease-in, opacity .3s; opacity: 0; }
.bt-stamp {
  position: absolute; top: 26px; padding: 6px 14px; border: 3px solid currentColor; border-radius: 10px; font-family: var(--fh);
  font-size: 26px; font-weight: 700; letter-spacing: .08em; opacity: var(--stamp, 0); pointer-events: none;
}
.bt-stamp.take { left: 22px; color: var(--pos); transform: rotate(-12deg); }
.bt-stamp.skip { right: 22px; color: var(--neg); transform: rotate(12deg); }
.bt-focus-actions { flex: none; display: flex; align-items: center; gap: 18px; }
.bt-focus-actions button {
  display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid var(--line2); background: var(--card);
  color: var(--tx); cursor: pointer; transition: transform .15s;
}
.bt-focus-actions button:active { transform: scale(.94); }
.bt-focus-actions .bt-f-skip, .bt-focus-actions .bt-f-take { width: 64px; height: 64px; }
.bt-focus-actions .bt-f-undo { width: 46px; height: 46px; color: var(--tx2); }
.bt-focus-actions .bt-f-skip { color: var(--neg); border-color: color-mix(in srgb, var(--neg) 45%, transparent); }
.bt-focus-actions .bt-f-take { background: var(--acc); color: var(--acc-ink); border-color: transparent; box-shadow: 0 10px 28px -10px var(--acc); }
.bt-focus-actions svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bt-focus-actions .bt-f-undo svg { width: 20px; height: 20px; }
.bt-focus-hint { font-size: 12.5px; color: var(--tx3); }
.bt-focus-hint kbd { font-family: var(--fn); padding: 1px 6px; border-radius: 6px; background: var(--card3); color: var(--tx2); }
.bt-focus-done { display: grid; place-items: center; gap: 10px; text-align: center; padding: 30px; }
.bt-focus-done strong { font-family: var(--fn); font-size: 44px; line-height: 48px; }

/* «Что нового» 600px modal. */
.bt-modal-scrim { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 14px; background: var(--overlay); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fa-fade .2s both; }
.bt-modal { width: min(600px, 100%); max-height: 86vh; overflow: auto; padding: 24px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line2); color: var(--tx); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .75); animation: fa-pop .25s var(--ease-out) both; font-family: var(--fbody); }
.bt-modal h2 { margin: 0; font-family: var(--fh); font-size: 22px; text-transform: var(--htt); }
.bt-modal > p { margin: 6px 0 18px; color: var(--tx2); font-size: 14px; }
.bt-news-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.bt-news-list li { display: flex; gap: 12px; padding: 14px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line); }
.bt-news-list li > span { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--acc-soft); color: var(--acc-tx); }
.bt-news-list li svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bt-news-list b { display: block; font-size: 14px; }
.bt-news-list small { display: block; margin-top: 3px; font-size: 13px; color: var(--tx2); line-height: 1.45; }
.bt-modal-foot { display: flex; justify-content: flex-end; margin-top: 18px; }
.bt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-ctl);
  border: 1px solid var(--line2); background: var(--card); color: var(--tx); font-family: var(--fbody); font-size: 14px; font-weight: 600; cursor: pointer;
}
.bt-btn.primary { border-color: transparent; background: var(--acc); color: var(--acc-ink); font-weight: 650; box-shadow: 0 8px 22px -10px var(--acc); }
.bt-btn.small { height: 36px; padding: 0 13px; font-size: 13.5px; }
.bt-btn:disabled { opacity: .5; cursor: not-allowed; }
.bt-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
body.bt-locked { overflow: hidden; }

/* ---------------------------------------------------------------------------------------
   6. Responsive: rail below 1180, phone layout below 760
   ------------------------------------------------------------------------------------- */
@media (max-width: 1599px) {
  html body.bt-app .bt-top .freshness { max-width: 260px; }
}
@media (max-width: 1415px) {
  html body.bt-app .bt-top .bt-lazy-link { display: none; }
  html body.bt-app .bt-bank .fa-bankroll-flat-pill { display: none; }
  html body.bt-app .shell-commands kbd { display: none; }
}
@media (max-width: 1179px) and (min-width: 760px) {
  html body.bt-app { --side: 76px; }
  html body.bt-app .bt-side { padding: 18px 12px 14px; }
  html body.bt-app .bt-brand { justify-content: center; padding: 2px 0 18px; }
  html body.bt-app :is(.bt-brand .brand-name, .bt-search span, .bt-search kbd, .side-nav-label, .side-nav > a > span, .bt-nav-badge, .nav-key, .side-more > summary span, .side-more > summary .chev, .bt-status, .bt-news, .bt-theme-thumb) { display: none !important; }
  html body.bt-app .bt-search { justify-content: center; padding: 0; }
  html body.bt-app .bt-side .side-nav > a { justify-content: center; padding: 0; }
  html body.bt-app .bt-side .side-more > summary { justify-content: center; padding: 0; }
  html body.bt-app .bt-side .side-more > a { margin-left: 0; justify-content: center; font-size: 0; }
  html body.bt-app .bt-side .side-more > a .bt-dot { background: var(--tx3); width: 6px; height: 6px; }
  html body.bt-app .bt-theme-seg { margin: 0 auto; flex-direction: column; }
  html body.bt-app .bt-top .freshness { display: none; }
}
@media (max-width: 1100px) and (min-width: 760px) {
  html body.bt-app .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 759px) {
  html body.bt-app { --bt-top-h: 64px; }
  html body.bt-app .bt-frame { display: block; }
  html body.bt-app .bt-side { display: none; }
  html body.bt-app .app-shell { padding: 0; margin: 0; }
  html body.bt-app .bt-top { position: sticky; top: 0; gap: 8px; padding: 0 var(--page-x); padding-top: env(safe-area-inset-top); height: calc(var(--bt-top-h) + env(safe-area-inset-top)); }
  html body.bt-app .bt-top-brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: var(--tx); text-decoration: none; }
  html body.bt-app .bt-top-brand .bt-mark { width: 31px; height: 31px; flex: none; margin: 0 2px; }
  html body.bt-app .bt-top-title { font-size: 15px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html body.bt-app .bt-top :is(.shell-context, .fa-header-quant-bar, .logout-button) { display: none; }
  html body.bt-app .bt-top .appbar-status { gap: 8px; }
  html body.bt-app .bt-top .shell-commands { width: 36px; padding: 0; }
  html body.bt-app .bt-top .bt-theme-toggle { display: inline-flex; }
  html body.bt-app .workspace-main { padding: 18px var(--page-x) calc(96px + env(safe-area-inset-bottom)); min-height: 0; }
  html body.bt-app[data-page] .page-heading { margin-bottom: var(--sec); }
  html body.bt-app[data-page] .page-heading h1 { font-size: 24px; line-height: 30px; }
  html body.bt-app[data-page] .page-heading .page-description { font-size: 14px; line-height: 20px; }
  html body.bt-app .workspace-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
  html body.bt-app .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
  html body.bt-app :is(.metric-strip > .metric, .bt-kpi) { min-height: 108px; padding: 14px 14px; }
  html body.bt-app :is(.metric-strip > .metric, .bt-kpi) :is(strong, dd, .value, .metric-value, .bt-kpi-value) { font-size: 21px; line-height: 26px; }
  html body.bt-app .bt-kpi-chip { display: none; }
  html body.bt-app .bt-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html body.bt-app .bt-actions > * { flex: 1 1 auto; }
  html body.bt-app .bt-tabbar {
    position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 50;
    display: flex; gap: 0; height: auto; min-height: 58px; padding: 6px; margin: 0; border-radius: 18px;
    background: var(--glass); -webkit-backdrop-filter: saturate(1.5) blur(16px); backdrop-filter: saturate(1.5) blur(16px);
    border: 1px solid var(--line2); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
  }
  html body.bt-app .bt-tabbar > :is(a, button) {
    flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    height: 50px; min-height: 50px; padding: 5px 0; margin: 0; border: 0; border-radius: 12px; background: transparent;
    color: var(--tx3); font-family: var(--fbody); font-size: 11.5px; font-weight: 600; text-decoration: none; box-shadow: none;
  }
  html body.bt-app .bt-tabbar > :is(a, button) svg.ic { width: 20px; height: 20px; }
  html body.bt-app .bt-tabbar > [aria-current="page"] { background: var(--nav-mon); color: var(--acc-tx); }
  html body.bt-app .bt-tabbar > :is(a, button) span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .bt-toasts { right: 10px; left: 10px; width: auto; bottom: calc(88px + env(safe-area-inset-bottom)); }
  html body .fa-toast { right: 10px; left: 10px; bottom: calc(88px + env(safe-area-inset-bottom)); }
  html body.bt-app .fa-cockpit-pane { height: calc(100dvh - 140px); min-height: 360px; }
  html body.bt-app .product-route { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html body.bt-app .product-route a { justify-content: center; min-height: 40px; text-align: center; }
  html body.bt-app .product-route [data-route-back] { grid-column: 1 / -1; justify-content: flex-start; }
  html body.bt-app :is(.fa-card-head, .shelf-header, .fa-hero-head, .card-topline, .card-actions, .fa-card-foot) { flex-wrap: wrap; }
  html body.bt-app .mobile-filter-open { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 40px; margin: 4px 0 12px; padding: 10px 14px; color: var(--tx); background: var(--card); border: 1px solid var(--line2); border-radius: var(--r-ctl); }
  html body.bt-app.mobile-dialog-open { overflow: hidden; }
  html body.bt-app dialog.mobile-filter-dialog { position: fixed; inset: 0; margin: 0; width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; padding: 0; border: 0; border-radius: 0; color: var(--tx); background: var(--bg2); overflow-y: auto; overscroll-behavior: contain; }
  html body.bt-app dialog.mobile-filter-dialog::backdrop { background: var(--overlay); }
  html body.bt-app .mobile-filter-dialog .mobile-dialog-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(8px + env(safe-area-inset-top)) 14px 8px; border-bottom: 1px solid var(--line); background: var(--bg2); }
  html body.bt-app .mobile-filter-dialog .mobile-dialog-header h2 { margin: 0; }
  html body.bt-app .mobile-filter-dialog .mobile-dialog-body { padding: 16px 14px calc(24px + env(safe-area-inset-bottom)); }
  html body.bt-app .mobile-filter-dialog :is(.filter-group, .filter-control) { flex: 1 1 100%; min-width: 0; }
  html body.bt-app .mobile-filter-dialog :is(input, select) { max-width: 100%; }
  html body:is(.bt-app, .bt-lazy) .bt-focus-card .bt-metrics { gap: 6px; }
  html body:is(.bt-app, .bt-lazy) .bt-focus-card .bt-metrics > div { padding: 8px 2px; }
  html body:is(.bt-app, .bt-lazy) .bt-focus-card .bt-metrics span { font-size: 11px; }
  html body:is(.bt-app, .bt-lazy) .bt-focus-card .bt-metrics strong { font-size: 14px; }
}

/* «Ещё» bottom sheet (dialog): radius 18 on top, above the tab bar. */
html body.bt-app dialog.bt-sheet {
  position: fixed; inset: auto 10px calc(86px + env(safe-area-inset-bottom)) 10px; width: auto; max-width: none;
  max-height: calc(100dvh - 120px); margin: 0; padding: 10px; overflow: auto; border-radius: 18px;
  border: 1px solid var(--line2); background: var(--bg2); color: var(--tx); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7);
  animation: fa-toast .3s var(--ease-out) both;
}
html body.bt-app dialog.bt-sheet::backdrop { background: var(--overlay); }
html body.bt-app dialog.bt-sheet .mobile-dialog-header { display: flex; align-items: center; gap: 10px; padding: 4px 6px 10px; border: 0; background: none; position: static; }
html body.bt-app dialog.bt-sheet .mobile-dialog-header h2 { flex: 1; margin: 0; font-family: var(--fh); font-size: 15px; text-transform: var(--htt); color: var(--tx); }
html body.bt-app dialog.bt-sheet .bt-sheet-grip { display: none; }
html body.bt-app dialog.bt-sheet .mobile-dialog-body { padding: 0; }
html body.bt-app dialog.bt-sheet .mobile-menu-links { display: flex; flex-direction: column; gap: 0; }
html body.bt-app dialog.bt-sheet .mobile-menu-links > a {
  display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 12px; border-radius: 12px; color: var(--tx);
  font-size: 15px; text-decoration: none; background: transparent; border: 0;
}
html body.bt-app dialog.bt-sheet .mobile-menu-links > a:hover { background: var(--hover); }
html body.bt-app dialog.bt-sheet .mobile-menu-links > a[aria-current="page"] { background: var(--nav-mon); color: var(--acc-tx); }
html body.bt-app dialog.bt-sheet .mobile-menu-links > a svg.ic { color: var(--tx3); }
html body.bt-app dialog.bt-sheet :is(.bt-sheet-actions, .mobile-menu-themes) { display: flex; gap: 8px; padding: 10px 2px 2px; border-top: 1px solid var(--line); margin-top: 8px; }
html body.bt-app dialog.bt-sheet :is(.bt-sheet-actions, .mobile-menu-themes) > button { flex: 1; height: 44px; min-height: 44px; padding: 0 8px; font-size: 13px; }
html body.bt-app dialog.bt-sheet .mobile-menu-themes > [aria-pressed="true"] { background: var(--acc-soft); color: var(--acc-tx); border-color: var(--acc-line); }
@media (min-width: 760px) {
  html body.bt-app dialog.bt-sheet { inset: auto auto 20px 20px; width: 420px; }
}

/* Reduced motion and the explicit motion=off switch. */
@media (prefers-reduced-motion: reduce) {
  html body.bt-app *, html body.bt-app *::before, html body.bt-app *::after,
  .bt-drawer, .bt-focus, .bt-focus-card, .bt-toast, .bt-modal { animation-duration: .001ms !important; animation-delay: 0ms !important; transition: none !important; }
}
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; transition: none !important; }

/* UHD uses native layout pixels: pointer/drag coordinates and control heights stay intact.
   The content cap is applied to the actual shell, independently of legacy --page-max.
   Important type overrides are limited to bridge tokens and the five existing market
   selectors approved in ROOT_UHD_IMPORTANT_APPROVAL.json. */
@media screen and (min-width: 2050px) {
  html body:is(.bt-app, .bt-lazy, .bt-login) {
    --bt-content-max: 1800px;
    --bt-body-size: 16px;
    --bt-meta-size: 14px;
    --bt-card-size: 18px;
    --bt-block-size: 22px;
    --bt-heading-size: 34px;
    --bt-number-size: 34px;
    --bt-number-line: 40px;
    --bt-small-number: 20px;
    --bt-caption-line: 20px;
    --fs-micro: 14px !important;
    --fs-meta: 14px !important;
    --fs-label: 14px !important;
    --fs-body: 16px !important;
    --fs-lead: 18px !important;
    --fs-card: 18px !important;
    --fs-block: 22px !important;
    --fs-h1: 34px !important;
    --fs-num: 34px !important;
    --side: 280px;
    --pad: 24px;
    --gap: 20px;
    --sec: 36px;
    --page-x: 40px;
    font-size: var(--bt-body-size);
  }
  html body.bt-app :is(.workspace-main, .workspace-footer) {
    max-width: var(--bt-content-max);
  }
  html body.bt-app .workspace-main { padding-top: 36px; }
  html body.bt-app .lazy-content.container { width: 100%; max-width: 100%; min-width: 0; }
  html body.bt-app[data-page] .page-heading { max-width: 960px; }
  html body.bt-app[data-page] .page-heading.has-bt-since {
    max-width: none;
    grid-template-columns: minmax(0, 1fr) minmax(0, 720px);
    gap: var(--gap);
  }
  html body.bt-app[data-page] .bt-today-since { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  html body.bt-app[data-page] .page-heading h1 {
    font-size: var(--bt-heading-size); line-height: 1.2; overflow-wrap: anywhere;
  }
  html body.bt-app[data-page] .page-heading .page-description {
    max-width: 960px; font-size: var(--bt-body-size); line-height: 1.5;
  }
  html body.bt-app :is(.workspace-footer, .bt-brand small, .bt-search, .side-nav-label,
    .bt-status .health-pill, .bt-status-sub, .bt-mode, .bt-news, .bt-nav-badge, .nav-key,
    .bt-search kbd, .shell-commands kbd, .bt-top .shell-context, .bt-clock .appbar-clock,
    .bt-tz, .bt-top .freshness, .bt-top .bt-lazy-link, .bt-top #sr-header-trigger-btn,
    .bt-bank, .bt-bank .fa-bankroll-flat-pill, .bt-top .icon-button) { font-size: var(--bt-meta-size); }
  html body.bt-app .bt-brand strong { font-size: var(--bt-small-number); line-height: 24px; }
  html body.bt-app .bt-brand .brand-name { gap: 6px; }
  html body.bt-app .bt-brand small { line-height: 24px; }
  html body.bt-app .bt-side :is(.side-nav > a, .side-more > summary, .side-more > a) { font-size: var(--bt-body-size); }
  html body.bt-app .bt-bank .fa-bankroll-input { width: 90px; font-size: var(--bt-body-size); }
  html body.bt-app .bt-top { gap: 16px; }
  html body.bt-app[data-page] #workspace-main :is(span, strong, b, em, time, code) { font-size: var(--bt-body-size); }
  html body.bt-app[data-page] #workspace-main :is(p, td, li, dd, .notice, .empty, .empty-box, .empty-state,
    .tp-empty, .aic-empty, .sr-empty-state, .stitch-chart-unavailable) {
    font-size: var(--bt-body-size); line-height: 1.5;
  }
  html body.bt-app[data-page] #workspace-main :is(h3, h4) { font-size: var(--bt-card-size); line-height: 1.4; }
  html body.bt-app[data-page] #workspace-main :is(h5, h6) { font-size: var(--bt-meta-size); line-height: 1.5; }
  html body.bt-app[data-page] #workspace-main :is(.route-page, .shelf-stack, .card-grid,
    .hot-signal-grid, .today-signal-grid, .today-queued-grid, .bt-grid, .health-grid,
    .results-model-grid, .risk-overview, .strategy-results-grid, .singles-grid, .express-grid,
    .stats-grid, .lazy-stats-grid, .mc-grid, .bt-signal, .bt-whale, .bet-card, .express-card) { gap: var(--gap); }
  html body.bt-app[data-page] #workspace-main :is(.fa-card-body, .shelf-body, .bt-bet, .bt-ln-body,
    .bt-wh-metrics, .bt-metrics, .bt-actions, .bt-dock, .bt-ln-actions, .bt-wh-foot,
    .card-top, .card-topline, .shelf-header, .fa-card-head, .fa-card-foot, .route-footer) { min-width: 0; }
  html body.bt-app[data-page] #workspace-main :is(.shelf-header, .fa-card-head, .fa-card-foot,
    .bt-meta, .bt-quotes, .bt-actions, .bt-dock, .bt-ln-actions, .bt-wh-foot, .card-top,
    .route-footer, .section-head, .express-title-row) { flex-wrap: wrap; }
  html body.bt-app[data-page] #workspace-main :is(.bt-title, .bt-sub, .bt-ln-title, .exact-event-title,
    .exact-market-title, .match-title, .bt-wh-title, .bt-decision-main strong) {
    min-width: 0; white-space: normal; overflow: visible; text-overflow: clip;
    overflow-wrap: anywhere; line-height: 1.4;
  }
  html body.bt-app[data-page] #workspace-main :is(.bt-title, .bt-ln-title, .bt-wh-title, .match-title,
    .fa-card-title, .express-title, .bt-bet-pick, .bet-selection, .health-card h3) { font-size: var(--bt-card-size); }
  html body.bt-app[data-page] #workspace-main :is(h2, .section-title) { font-size: var(--bt-block-size); line-height: 1.35; }
  html body.bt-app[data-page] #workspace-main .stitch-verdict-title {
    font-size: var(--bt-card-size); line-height: 1.4; overflow-wrap: anywhere;
  }
  html body.bt-app[data-page] #workspace-main :is(small, label, dt, th, caption, figcaption, summary,
    .eyebrow, #page-eyebrow, .card-note, .card-reason, .fa-card-meta, .fact, .card-topline,
    .bt-sub, .bt-meta, .bt-time, .bt-bet-k, .bt-book, .bt-metrics span, .bt-quotes,
    .bt-kpi-label, .bt-kpi-note, .bt-kpi-chip, .bt-mini span, .bt-status-pills .pill,
    .shelf-count, .pill, .chip, .badge, .bt-chip, .product-route, .bt-side-chip,
    .since-visit-badge, .since-visit-card, .since-visit-note, .since-visit-scope, .since-visit-list,
    .today-event-meta, .today-dock-label, .today-bookie-pill, .fa-cockpit-book,
    .today-evidence-row > div:first-child, .hot-quote > span, .fa-factor-chip,
    .fa-v3-factors-summary, .fa-v3-math-shelf, .fa-v3-math-shelf__cell, .fa-v3-shelf-cell,
    .fa-line-shopping, .fa-line-shopping-details, .fa-v3-factors-summary,
    .sr-kpi-label, .sr-kpi-sub, .sr-page-status, .sr-factor-badge, .sr-strategy-sub,
    .sr-metric-item > span, .sr-bookie-pill, .sr-luna-note, .sr-history-row,
    .bt-ln-observation, .line-pagination, .bt-ln-meta, .bt-ln-league, .bt-ln-status, .bt-ln-head, .bt-ln-foot, .bt-ln-details,
    .bt-ln-ai-meta, .bt-ln-sources > span, .line-foot, .line-read-status, .line-coverage,
    .exact-line-sort-label, .result-count, .exact-competition, .a-top-trade, .a-top-trades-head,
    .bt-sm-label, .bt-sm-custom, .bt-live-pill, .stitch-flow-tag, .bt-wh-new,
    .bt-wh-count, .bt-wh-analog, .bt-wh-metrics span, .ms-execution, .ms-side,
    .ms-syndicate-badge, .ms-wallet-passport-badge, .ms-lead-lag-badge, .ms-verdict-badge,
    .ms-syndicate-breakdown, .ms-bk-howto, .ms-note, .ms-identity, .sm-threshold-card,
    .stitch-follow-explainer, .metric-label, .metric-note, .metric-tile > span,
    .results-portfolio-pill, .results-period-pill, .results-snapshot, .stitch-verdict-sub, .ledger-mode-note,
    .ledger-reset-note, .ledger-pagination, .ledger-coverage, .ledger-time, .live-status, .sr-reasons,
    .bt-wl-legend, .bt-wl-axis, .bt-wl-cap, .bt-wl-big span, .strategy-detail-metric span,
    .morning-stamp, .morning-period, .morning-hour, .morning-tag, .mb-muted, .mb-eyebrow,
    .mb-badge, .mb-card-top, .mb-wallet, .mb-stake, .bt-decision-kind, .bt-decision-num time,
    .aic-meta, .aic-eyebrow, .aic-kpi span, .aic-metrics span, .aic-badge, .aic-risk,
    .bt-ai-step, .bt-ai-spend, .bt-ai-model > i, .bt-duel-head, .bt-duel-foot,
    .tp-kpi-card > span, .tp-sport-pill, .tp-consensus-badge, .tp-stat-pill,
    .health-state, .health-times, .health-facts, .health-list, .health-overview,
    .system-action header span, .system-action dd, .fa-group-f, .stitch-ai-route-label,
    .stat-label, .stat-sub, .lazy-stat-label, .section-pill, .match-meta, .time-pill,
    .bet-action-label, .m-label, .route-badge, .express-Sub, .leg-match, .leg-pick,
    .leg-contrib, .hedge-box, .compare-box, .mc-card-label, .mc-card-pill, .mc-card-foot,
    .pool-tier-badge, .lazy-method, .portfolio-warning, .lazy-source-wrap, .lazy-source-chip,
    .lazy-owner-profit-label, .lazy-owner-profit-note, .lazy-owner-chip, .lazy-freshness-status,
    .lazy-filter-pill, .lazy-filter-count, .lazy-movement-meta, .source-strategy-line,
    .ideas-funnel-cell span,
    .sr-inline-banner-label, .sr-inline-banner-cta, .fa-bankroll-guard-badge,
    .fa-se-hedge-badge, .fa-se-kpi-bar span, .fa-trend-roi-label, .fa-trend-empty,
    .fa-se-sport, .fa-se-link-leg, .today-capacity, .bt-vip-tag, .research-status,
    .research-muted, .live-tennis-freshness, .live-tennis-label) {
    font-size: var(--bt-meta-size); line-height: 1.5;
  }
  html body.bt-app[data-page] #workspace-main :is(button, a, .button, .primary-action, .secondary-action,
    .bt-btn, .bt-btn-primary, .bt-btn-secondary, .bt-btn-ghost, input, select, textarea,
    .segmented > a, .seg > a, .bt-seg > a, .bt-dock > a, .bt-ln-actions > a) {
    font-size: var(--bt-meta-size);
  }
  html body.bt-app[data-page] #workspace-main #idea-scan :is(button, .button) { font-size: var(--bt-meta-size); }
  /* These five loaded selectors already have important fixed type in bt-markets.css. */
  html body.bt-app .bt-ln-sources .exact-source-button {
    font-size: var(--bt-meta-size) !important; line-height: var(--bt-caption-line) !important;
  }
  html body.bt-app[data-page="polymarket"] #flow-custom-minimum {
    font-size: var(--bt-meta-size) !important; line-height: var(--bt-caption-line) !important;
  }
  html body.bt-app[data-page="polymarket"] .ms-event.exact-deal.bt-whale .exact-deal-amount .ms-total.bt-whale-sum {
    font-size: var(--bt-number-size) !important; line-height: var(--bt-number-line) !important;
  }
  html body.bt-app[data-page="polymarket"] .ms-event.exact-deal.bt-whale .exact-deal-amount .exact-deal-outcome {
    font-size: var(--bt-meta-size) !important; line-height: var(--bt-caption-line) !important;
  }
  html body.bt-app[data-page="polymarket"] .ms-event.exact-deal.bt-whale .exact-deal-amount .ms-execution-odds {
    font-size: var(--bt-meta-size) !important; line-height: var(--bt-caption-line) !important;
  }
  html body.bt-app[data-page] #workspace-main :is(.metric-strip > .metric, .bt-kpi, .sr-kpi,
    .tp-kpi-card, .stat-card, .lazy-stat-card, .mb-kpi) { min-width: 0; padding: var(--pad); }
  html body.bt-app[data-page] #workspace-main :is(.metric-strip > .metric, .bt-kpi, .sr-kpi,
    .tp-kpi-card, .stat-card, .lazy-stat-card, .mb-kpi) :is(strong, .value, .metric-value,
    .bt-kpi-value, .sr-kpi-value, .stat-value, .stat-val, .lazy-stat-value),
  html body.bt-app[data-page] #workspace-main :is(.bt-whale-sum, .sr-kpi-val,
    .fa-hero-num, .aic-kpi strong, .morning-metric > strong, .lazy-stat-value) {
    font-size: var(--bt-number-size); line-height: var(--bt-number-line);
    white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere;
  }
  html body.bt-app[data-page] #workspace-main :is(.metric-strip > .metric, .bt-kpi) :is(span, dt, .label):first-child {
    font-size: var(--bt-meta-size); line-height: 1.5;
  }
  html body.bt-app[data-page] #workspace-main :is(.bt-metrics strong, .m-val, .bt-mini strong) {
    font-size: var(--bt-small-number); line-height: 1.4;
  }
  html body.bt-app[data-page] #workspace-main .mb-kpi.is-text strong {
    font-size: var(--bt-body-size); line-height: 1.5; font-family: var(--fbody);
  }
  html body.bt-app[data-page] #workspace-main .bt-mini :is(span, strong) {
    white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere;
  }
  html body.bt-app[data-page] #workspace-main .bt-metrics :is(span, strong) { white-space: normal; overflow-wrap: anywhere; }
  html body.bt-app[data-page] #workspace-main .bt-metrics > div { padding: 12px; }
  html body.bt-app[data-page] #workspace-main :is(.bt-signal, .bet-card, .express-card) { height: auto; }
  html body.bt-app[data-page] #workspace-main :is(.bt-grid, .singles-grid) {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  }
  html body.bt-app[data-page] #workspace-main .express-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr)); }
  html body.bt-app[data-page] #workspace-main :is(.empty, .empty-state, .loading-card, .sr-empty-state) { min-height: 160px; }
  html body.bt-app .workspace-footer { flex-wrap: wrap; }
  html body:is(.bt-app, .bt-lazy) :is(.bt-drawer, .bt-focus, .bt-modal, .fa-overlay) {
    font-size: var(--bt-body-size);
  }
  html body:is(.bt-app, .bt-lazy) :is(.bt-drawer, .bt-focus, .bt-modal, .fa-overlay) :is(p, small,
    dt, dd, .bt-meta, .bt-sub, .bt-bet-k, .bt-metrics span, .bt-focus-hint, .bt-drawer-kicker,
    .bt-source-body, .fa-palette-foot, .fa-palette-list .grp, .fa-palette-list kbd,
    .fa-palette-list > li.bt-pal-group) { font-size: var(--bt-meta-size); line-height: 1.5; }
  html body:is(.bt-app, .bt-lazy) :is(.bt-drawer, .bt-focus, .bt-modal) :is(.bt-title, h3) {
    font-size: var(--bt-card-size); white-space: normal; overflow-wrap: anywhere; line-height: 1.4;
  }
  html body:is(.bt-app, .bt-lazy) .fa-overlay .fa-palette-list > li { font-size: var(--bt-body-size); min-height: 44px; }
  html body:is(.bt-app, .bt-lazy) .fa-overlay .fa-palette-input input { font-size: var(--bt-body-size); }
  html body:is(.bt-app, .bt-lazy) .bt-drawer-body { gap: var(--gap); padding: var(--pad); }
  html body:is(.bt-app, .bt-lazy) :is(.bt-drawer-foot, .bt-drawer-head) { flex-shrink: 0; }
  html body:is(.bt-app, .bt-lazy) .bt-drawer-foot { flex-wrap: wrap; }
  html body:is(.bt-app, .bt-lazy) .bt-focus-card .bt-metrics strong { font-size: var(--bt-small-number); }
  html body.bt-login :is(.bt-login-name small, .login-form label, .bt-login-foot, .bt-login-head p, .login-error) {
    font-size: var(--bt-meta-size); line-height: 1.5;
  }
  html body.bt-login .bt-login-card { width: min(440px, 100%); padding: var(--pad); gap: 20px; }
  html body.bt-login .login-form :is(input, button) { font-size: var(--bt-body-size); }
}
@media screen and (min-width: 2800px) {
  html body:is(.bt-app, .bt-lazy, .bt-login) {
    --bt-content-max: 2200px;
    --bt-body-size: 18px;
    --bt-meta-size: 16px;
    --bt-card-size: 20px;
    --bt-block-size: 24px;
    --bt-heading-size: 38px;
    --bt-number-size: 38px;
    --bt-number-line: 44px;
    --bt-small-number: 22px;
    --bt-caption-line: 24px;
    --fs-micro: 16px !important;
    --fs-meta: 16px !important;
    --fs-label: 16px !important;
    --fs-body: 18px !important;
    --fs-lead: 20px !important;
    --fs-card: 20px !important;
    --fs-block: 24px !important;
    --fs-h1: 38px !important;
    --fs-num: 38px !important;
    --side: 304px;
    --pad: 28px;
    --gap: 24px;
    --sec: 40px;
    --page-x: 48px;
  }
  html body.bt-app[data-page] .page-heading.has-bt-since { grid-template-columns: minmax(0, 1fr) minmax(0, 800px); }
  html body.bt-app[data-page] #workspace-main :is(.bt-grid, .singles-grid) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr)); }
  html body.bt-app[data-page] #workspace-main .express-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 560px), 1fr)); }
  html body.bt-login .bt-login-card { width: min(480px, 100%); }
}
