/* ADV — STORES tab, mobile (flag-gated, ≤1024px).
 *
 * Every rule below is scoped to body.stm-active so the desktop Stores tab
 * (the same SPA when the flag is off) renders byte-identically. The dispatcher
 * in public/js/main.js (renderStoresDispatch) adds/removes the body class.
 *
 * Token vocabulary mirrors public/css/mb-mobile.css exactly (the canonical
 * PR #27 mobile design system). Because index.html does NOT load mb-mobile.css,
 * the tokens are re-declared here on body.stm-active — scoped, not :root, so
 * they never leak into or collide with the desktop dashboard.css cascade.
 *
 * See docs/design/mobile-design-system.md (v0.2) for the full system.
 */

/* ─── TOKENS (scoped — identical values to mb-mobile.css:12-69) ─────── */
body.stm-active {
  /* surfaces */
  --bg:            #0A1118;
  --bg-2:          #0E1620;
  --card:          #111B27;
  --card-2:        #16212F;
  --card-3:        #1B2838;
  --overlay:       rgba(7,12,18,0.72);
  --border:        rgba(255,255,255,0.06);
  --border-2:      rgba(255,255,255,0.10);
  --divider:       rgba(255,255,255,0.05);

  /* text */
  --t-1:           #E6EDF3;
  --t-2:           #9AA7B6;
  --t-3:           #5B6776;
  --t-on-accent:   #FFFFFF;

  /* primary (#006FA0) */
  --p:             #006FA0;
  --p-hover:       #0A85BC;
  --p-press:       #00567C;
  --p-soft:        rgba(0,111,160,0.14);
  --p-ring:        rgba(0,111,160,0.45);

  /* status ramp */
  --standout:      #22C55E;  --standout-bg: rgba(34,197,94,0.13);
  --solid:         #3B82F6;  --solid-bg:    rgba(59,130,246,0.13);
  --mixed:         #F59E0B;  --mixed-bg:    rgba(245,158,11,0.13);
  --watch:         #EF4444;  --watch-bg:    rgba(239,68,68,0.13);

  /* spacing scale (4-base) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px; --s8: 40px; --s9: 56px;

  /* radii */
  --r1: 6px; --r2: 10px; --r3: 14px; --r4: 18px; --r5: 24px; --r-pill: 999px;

  /* type scale */
  --f-display: clamp(48px, 14vw, 64px);
  --f-h1: 22px;
  --f-h2: 18px;
  --f-h3: 15px;
  --f-body: 14px;
  --f-small: 12px;
  --f-eyebrow: 11px;

  /* shadows */
  --shadow-1: 0 1px 0 rgba(255,255,255,0.02), 0 1px 2px rgba(0,0,0,0.4);
  --shadow-2: 0 6px 24px rgba(0,0,0,0.45), 0 2px 6px rgba(0,0,0,0.3);
  --shadow-sheet: 0 -10px 40px rgba(0,0,0,0.55);

  /* motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --d1: 120ms; --d2: 220ms; --d3: 320ms;

  /* breakpoint constant (documented; used in the query below) */
  --bp-mobile-max: 1024px;
}

/* Every mobile-only style sits inside the 1024px query (design system §1.2).
   Activation is additionally JS-gated (main.js: isMobileEnabled() &&
   matchMedia('(max-width:1024px)')), so styles only apply when both the class
   is present AND the viewport is ≤1024px. Above 1024 nothing here applies —
   the desktop Stores tab is untouched. */
@media (max-width: 1024px) {

  /* ─── RESET / BASE ───────────────────────────────────────────────
     Scoped INSIDE .stm-root (which wraps the whole mobile UI, including the
     sheet) — NOT under bare body.stm-active. This SPA tab coexists in the DOM
     with the desktop chrome (header, filter bar, nav tabs); a `body.stm-active
     button {…}` reset would strip those buttons while the flag is active. */
  body.stm-active .stm-root, body.stm-active .stm-root * { box-sizing: border-box; }
  body.stm-active .stm-root button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; padding: 0; }
  body.stm-active .stm-root .num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }
  body.stm-active .stm-root .mono { font-family: 'DM Mono', ui-monospace, Menlo, monospace; }

  /* Show the mobile root, hide the desktop content. JS also toggles these
     imperatively (mirrors overview-mobile); these are belt-and-suspenders. */
  body.stm-active #stores-content { display: none !important; }
  body.stm-active #stores-mobile-root { display: block; }

  /* ─── ROOT / SCROLL ──────────────────────────────────────────── */
  body.stm-active .stm-root {
    font-family: 'DM Sans', 'Inter', -apple-system, system-ui, sans-serif;
    color: var(--t-1);
    background: var(--bg);
    font-size: var(--f-body);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    margin: 0 calc(-1 * var(--sp-4, 16px));   /* cancel #main horizontal padding */
    padding: 0;
    min-height: calc(100dvh - 210px);
    position: relative;
    overscroll-behavior: contain;
  }
  body.stm-active .stm-scroll { padding: var(--s4) var(--s4) var(--s8); }

  /* ─── FILTER CHIP ROW ────────────────────────────────────────── */
  body.stm-active .stm-filterbar {
    display: flex; gap: var(--s2); align-items: center;
    overflow-x: auto; scrollbar-width: none;
    margin: 0 calc(-1 * var(--s4)); padding: 0 var(--s4) var(--s3);
    -webkit-overflow-scrolling: touch;
  }
  body.stm-active .stm-filterbar::-webkit-scrollbar { display: none; }
  body.stm-active .stm-chip {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
    height: 34px; padding: 0 var(--s3);
    background: var(--card-2); border: 1px solid var(--border);
    border-radius: var(--r-pill); color: var(--t-2);
    font-size: var(--f-small); font-weight: 600; white-space: nowrap;
    transition: background var(--d1) var(--ease), border-color var(--d1) var(--ease), color var(--d1) var(--ease);
  }
  body.stm-active .stm-chip .stm-chip-val { color: var(--t-1); }
  body.stm-active .stm-chip .stm-chip-caret { color: var(--t-3); font-size: 10px; }
  body.stm-active .stm-chip:hover, body.stm-active .stm-chip:active { background: var(--card-3); color: var(--t-1); }
  body.stm-active .stm-chip.stm-chip-on {
    background: var(--p-soft); border-color: var(--p); color: var(--p-hover);
  }
  body.stm-active .stm-chip.stm-chip-on .stm-chip-val { color: var(--p-hover); }
  body.stm-active .stm-chip-clear { color: var(--watch); }

  /* ─── SEGMENTED CONTROL (ALL / LIGHTNING / THUNDER) ──────────── */
  /* Non-sticky: the SPA's existing fixed top chrome (logo/filter/nav) still
     renders above the mobile panel in this per-tab rollout, so a top-sticky
     control would collide with it. Kept at the top of the scroll content. */
  body.stm-active .stm-seg {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--r2); padding: 3px; margin-bottom: var(--s4);
  }
  body.stm-active .stm-seg-btn {
    height: 36px; border-radius: 8px; color: var(--t-2);
    font-size: var(--f-small); font-weight: 700; letter-spacing: 0.04em;
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    transition: background var(--d1) var(--ease), color var(--d1) var(--ease);
  }
  body.stm-active .stm-seg-btn.stm-seg-on { background: var(--p); color: var(--t-on-accent); }
  body.stm-active .stm-seg-btn .stm-seg-ico { font-size: 12px; }

  /* ─── KPI GRID (2×2 at 380, 1×4 ≥560) ────────────────────────── */
  body.stm-active .stm-kpi-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3);
    margin-bottom: var(--s5);
  }
  body.stm-active .stm-kpi {
    background: var(--card-2); border: 1px solid var(--border-2);
    border-radius: var(--r3); padding: var(--s4);
    min-width: 0; min-height: 92px;
  }
  body.stm-active .stm-kpi-label {
    color: var(--t-2); font-size: var(--f-eyebrow); letter-spacing: 0.12em;
    text-transform: uppercase; font-weight: 600; margin-bottom: var(--s2);
  }
  body.stm-active .stm-kpi-value {
    font-size: 26px; font-weight: 700; line-height: 1; letter-spacing: -0.02em;
    color: var(--t-1); font-variant-numeric: tabular-nums;
  }
  body.stm-active .stm-kpi-sub { color: var(--t-3); font-size: var(--f-small); margin-top: 6px; }
  body.stm-active .stm-kpi-delta { font-size: var(--f-small); font-weight: 600; margin-top: 4px; display: inline-flex; gap: 4px; }
  body.stm-active .stm-delta-up   { color: var(--standout); }
  body.stm-active .stm-delta-down { color: var(--watch); }
  body.stm-active .stm-delta-flat { color: var(--t-3); }
  /* accent value tints (parity with desktop kpiCard color args) */
  body.stm-active .stm-kpi.stm-kpi-rev .stm-kpi-value   { color: var(--standout); }
  body.stm-active .stm-kpi.stm-kpi-gross .stm-kpi-value { color: var(--solid); }
  @media (min-width: 560px) {
    body.stm-active .stm-kpi-grid { grid-template-columns: repeat(4, 1fr); }
  }

  /* ─── SECTION HEADING + SORT CONTROL ─────────────────────────── */
  body.stm-active .stm-section-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: var(--s3);
  }
  /* Section header — mirrors overview-mobile's .ovm-pipe-label: accent bar +
     uppercase 13px/600 title. */
  body.stm-active .stm-eyebrow {
    display: inline-flex; align-items: center; gap: var(--s2);
    color: var(--t-1); font-size: 13px; font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase;
  }
  body.stm-active .stm-eyebrow::before {
    content: ''; width: 3px; height: 15px; border-radius: 2px; background: var(--p);
  }
  body.stm-active .stm-count { color: var(--t-3); font-size: var(--f-small); font-weight: 500; }
  body.stm-active .stm-sortbar {
    display: flex; gap: var(--s2); align-items: center;
    overflow-x: auto; scrollbar-width: none;
    margin: 0 calc(-1 * var(--s4)) var(--s3); padding: 0 var(--s4) 2px;
    -webkit-overflow-scrolling: touch;
  }
  body.stm-active .stm-sortbar::-webkit-scrollbar { display: none; }
  body.stm-active .stm-sort-label { flex: 0 0 auto; color: var(--t-3); font-size: var(--f-eyebrow); letter-spacing: 0.1em; text-transform: uppercase; }
  body.stm-active .stm-sort-btn {
    flex: 0 0 auto; height: 30px; padding: 0 var(--s3);
    background: var(--card); border: 1px solid var(--border); border-radius: var(--r-pill);
    color: var(--t-2); font-size: var(--f-small); font-weight: 600; white-space: nowrap;
    display: inline-flex; align-items: center; gap: 5px;
  }
  body.stm-active .stm-sort-btn.stm-sort-on { background: var(--p-soft); border-color: var(--p); color: var(--p-hover); }
  body.stm-active .stm-sort-btn .stm-sort-dir { font-size: 9px; }

  /* ─── STORE CARDS ────────────────────────────────────────────── */
  body.stm-active .stm-store-list { display: grid; gap: var(--s3); }
  body.stm-active .stm-store {
    display: block; width: 100%; text-align: left;
    background: var(--card-2); border: 1px solid var(--border-2);
    border-radius: var(--r3); padding: var(--s4);
    position: relative; transition: background var(--d1) var(--ease), border-color var(--d1) var(--ease);
  }
  body.stm-active .stm-store:hover, body.stm-active .stm-store:active { background: var(--card-3); border-color: var(--p); }
  /* Row 1 — name + dominant Total Gross + drill caret */
  body.stm-active .stm-store-row1 {
    display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: var(--s3);
    margin-bottom: var(--s2);
  }
  body.stm-active .stm-store-name { font-weight: 700; font-size: var(--f-h3); color: var(--t-1); min-width: 0; }
  body.stm-active .stm-store-gross { font-size: var(--f-h2); font-weight: 700; color: var(--t-1); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
  body.stm-active .stm-store-caret { color: var(--t-3); font-size: 16px; line-height: 1; }

  /* Row 2 — Total-Gross-share bar (this store ÷ max in the filtered list) + compact units */
  body.stm-active .stm-store-row2 { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s2); }
  body.stm-active .stm-store-bar {
    flex: 1 1 auto; min-width: 0; height: 6px; border-radius: var(--r-pill);
    background: var(--border-2); overflow: hidden;
  }
  body.stm-active .stm-store-bar > i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--p); }
  body.stm-active .stm-store-units { flex: 0 0 auto; color: var(--t-2); font-size: var(--f-small); white-space: nowrap; }
  body.stm-active .stm-store-units .stm-nu { color: var(--t-3); }

  /* Row 3 — inline badged secondary metrics (replaces the old label header row) */
  body.stm-active .stm-store-row3 { display: flex; align-items: center; gap: var(--s2); font-size: var(--f-small); }
  body.stm-active .stm-im { display: inline-flex; align-items: baseline; gap: 5px; }
  body.stm-active .stm-im-k { color: var(--t-3); font-size: 10px; letter-spacing: 0.04em; }
  body.stm-active .stm-im-sep { color: var(--t-3); }

  /* .stm-metric-label / .stm-metric-val — retained for the drill-down store summary (§9.6) */
  body.stm-active .stm-metric-label { color: var(--t-3); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 3px; }
  body.stm-active .stm-metric-val { color: var(--t-1); font-size: var(--f-h3); font-weight: 700; font-variant-numeric: tabular-nums; }

  /* ─── STATUS BADGE (bm()-derived: standout/mixed/watch) ──────── */
  body.stm-active .stm-badge {
    display: inline-block; padding: 2px 7px; border-radius: var(--r-pill);
    font-size: var(--f-small); font-weight: 700; font-variant-numeric: tabular-nums;
  }
  body.stm-active .stm-badge[data-band="standout"] { background: var(--standout-bg); color: var(--standout); }
  body.stm-active .stm-badge[data-band="mixed"]    { background: var(--mixed-bg);    color: var(--mixed); }
  body.stm-active .stm-badge[data-band="watch"]    { background: var(--watch-bg);    color: var(--watch); }
  body.stm-active .stm-badge[data-band="neutral"]  { background: var(--card-3);      color: var(--t-2); }

  /* ─── EMPTY / LOADING / ERROR STATES ─────────────────────────── */
  body.stm-active .stm-state {
    text-align: center; padding: var(--s9) var(--s5);
    display: flex; flex-direction: column; align-items: center; gap: var(--s3);
  }
  body.stm-active .stm-state-icon {
    width: 48px; height: 48px; border-radius: var(--r-pill);
    display: grid; place-items: center; font-size: 22px;
    background: var(--card-2); color: var(--t-3);
  }
  body.stm-active .stm-state-icon.stm-state-err { background: var(--watch-bg); color: var(--watch); }
  body.stm-active .stm-state-title { color: var(--t-1); font-weight: 700; font-size: var(--f-h3); }
  body.stm-active .stm-state-sub { color: var(--t-2); font-size: var(--f-small); max-width: 32ch; line-height: 1.5; }
  body.stm-active .stm-state-cta {
    margin-top: var(--s2); height: 38px; padding: 0 var(--s5);
    background: var(--p); color: var(--t-on-accent); border-radius: var(--r2);
    font-size: var(--f-small); font-weight: 700;
  }
  body.stm-active .stm-skel {
    background: linear-gradient(90deg, var(--card) 25%, var(--card-2) 37%, var(--card) 63%);
    background-size: 400% 100%; animation: stm-shimmer 1.4s ease infinite; border-radius: var(--r2);
  }
  body.stm-active .stm-skel-kpi { height: 78px; }
  body.stm-active .stm-skel-row { height: 96px; margin-bottom: var(--s2); }
  @keyframes stm-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

  /* ─── SCRIM + SHEET (filter sheet + per-store drill-down) ────── */
  /* z-index ≥1000: above the sticky chrome (#sticky-header is z-index:100).
     Matches the platform overlay convention (overview sheet, desktop drill-overlay
     and info-modal all sit at 1000). Below the toast (2000). */
  body.stm-active .stm-scrim {
    position: fixed; inset: 0; background: var(--overlay);
    opacity: 0; pointer-events: none; transition: opacity var(--d2) var(--ease);
    z-index: 1000;
  }
  body.stm-active .stm-scrim.stm-open { opacity: 1; pointer-events: auto; }
  body.stm-active .stm-sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1010;
    background: var(--bg-2); border-top-left-radius: var(--r4); border-top-right-radius: var(--r4);
    box-shadow: var(--shadow-sheet);
    max-height: 88vh; display: flex; flex-direction: column;
    transform: translateY(100%); transition: transform var(--d3) var(--ease);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  body.stm-active .stm-sheet.stm-open { transform: translateY(0); }
  body.stm-active .stm-sheet.stm-fullscreen { max-height: 100vh; height: 100%; border-radius: 0; }
  body.stm-active .stm-sheet-handle {
    width: 36px; height: 4px; border-radius: var(--r-pill); background: var(--border-2);
    margin: var(--s3) auto var(--s2);
  }
  body.stm-active .stm-sheet-head {
    display: flex; align-items: center; gap: var(--s3);
    padding: var(--s2) var(--s4) var(--s3); border-bottom: 1px solid var(--divider);
  }
  body.stm-active .stm-sheet-eyebrow { color: var(--t-3); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; }
  body.stm-active .stm-sheet-eyebrow:empty { display: none; }
  body.stm-active .stm-sheet-title { flex: 1; font-weight: 700; font-size: var(--f-h2); color: var(--t-1); min-width: 0; }
  body.stm-active .stm-sheet-close {
    width: 32px; height: 32px; border-radius: var(--r-pill); background: var(--card-2);
    color: var(--t-2); display: grid; place-items: center; flex: 0 0 auto;
  }
  body.stm-active .stm-sheet-close svg { width: 14px; height: 14px; }
  body.stm-active .stm-sheet-body { padding: var(--s4); overflow-y: auto; -webkit-overflow-scrolling: touch; }

  /* Sticky KPI strip inside the drill-down sheet */
  body.stm-active .stm-sheet-sticky {
    position: sticky; top: 0; z-index: 2; background: var(--bg-2);
    padding: var(--s3) var(--s4); border-bottom: 1px solid var(--divider);
  }
  body.stm-active .stm-sheet-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2); }
  body.stm-active .stm-sheet-kpi { background: transparent; border: 0; padding: 0; }
  body.stm-active .stm-sheet-kpi .stm-kpi-label { font-size: 9px; }
  body.stm-active .stm-sheet-kpi .stm-kpi-value { font-size: 17px; }

  /* Drill-down store summary — every remaining desktop table column for the
     store, so the drill-down covers 100% of the desktop row. */
  body.stm-active .stm-store-summary {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3) var(--s2);
    background: var(--card); border: 1px solid var(--border); border-radius: var(--r2);
    padding: var(--s4); margin-bottom: var(--s4);
  }
  body.stm-active .stm-sum-cell { min-width: 0; }

  /* ─── FILTER SHEET BODY ──────────────────────────────────────── */
  body.stm-active .stm-fs-label { color: var(--t-3); font-size: var(--f-eyebrow); letter-spacing: 0.12em; text-transform: uppercase; margin: var(--s4) 0 var(--s2); }
  body.stm-active .stm-fs-label:first-child { margin-top: 0; }
  body.stm-active .stm-fs-row { display: flex; flex-wrap: wrap; gap: var(--s2); }
  body.stm-active .stm-pill {
    height: 38px; padding: 0 var(--s4); border-radius: var(--r2);
    background: var(--card); border: 1px solid var(--border); color: var(--t-2);
    font-size: var(--f-small); font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
  }
  body.stm-active .stm-pill.stm-pill-on { background: var(--p-soft); border-color: var(--p); color: var(--p-hover); }
  body.stm-active .stm-fs-select {
    width: 100%; height: 42px; padding: 0 var(--s3);
    background: var(--card); border: 1px solid var(--border); border-radius: var(--r2);
    color: var(--t-1); font-size: var(--f-body); font-family: inherit;
    appearance: none; -webkit-appearance: none;
  }
  body.stm-active .stm-fs-dates { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
  body.stm-active .stm-fs-date {
    width: 100%; height: 42px; padding: 0 var(--s3);
    background: var(--card); border: 1px solid var(--border); border-radius: var(--r2);
    color: var(--t-1); font-size: var(--f-body); font-family: inherit;
  }
  body.stm-active .stm-fs-actions { display: flex; gap: var(--s2); margin-top: var(--s5); }
  body.stm-active .stm-fs-apply { flex: 1; height: 46px; background: var(--p); color: var(--t-on-accent); border-radius: var(--r2); font-size: var(--f-body); font-weight: 700; }
  body.stm-active .stm-fs-clear { height: 46px; padding: 0 var(--s5); background: var(--card-2); color: var(--t-2); border-radius: var(--r2); font-size: var(--f-body); font-weight: 600; }

  /* ─── DEAL CARDS (drill-down list) ───────────────────────────── */
  body.stm-active .stm-deal-filters {
    display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none;
    margin: 0 calc(-1 * var(--s4)) var(--s3); padding: 0 var(--s4) 2px;
  }
  body.stm-active .stm-deal-filters::-webkit-scrollbar { display: none; }
  body.stm-active .stm-deal-select {
    flex: 0 0 auto; height: 32px; padding: 0 var(--s3); max-width: 44vw;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--r-pill);
    color: var(--t-1); font-size: var(--f-small); font-family: inherit;
    appearance: none; -webkit-appearance: none;
  }
  body.stm-active .stm-deals { display: grid; gap: var(--s2); }
  body.stm-active .stm-deal {
    display: block; width: 100%; text-align: left;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--r2);
    padding: var(--s3) var(--s4);
  }
  body.stm-active .stm-deal-top { display: grid; grid-template-columns: 1fr auto; gap: var(--s2) var(--s3); align-items: baseline; }
  body.stm-active .stm-deal-model { font-weight: 700; font-size: var(--f-h3); color: var(--t-1); }
  body.stm-active .stm-deal-make { color: var(--t-3); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
  body.stm-active .stm-deal-price { font-size: var(--f-h2); font-weight: 700; color: var(--t-1); font-variant-numeric: tabular-nums; text-align: right; }
  body.stm-active .stm-deal-meta { color: var(--t-2); font-size: var(--f-small); display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 4px; }
  body.stm-active .stm-deal-meta .stm-sep { color: var(--t-3); }
  body.stm-active .stm-deal-soldby { color: var(--t-2); font-size: var(--f-small); text-align: right; }
  body.stm-active .stm-deal-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s3); }
  body.stm-active .stm-deal-chip {
    display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 8px;
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-pill);
    font-size: var(--f-small);
  }
  body.stm-active .stm-deal-chip .stm-k { color: var(--t-3); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; }
  body.stm-active .stm-deal-chip .stm-v { color: var(--t-1); font-weight: 600; font-variant-numeric: tabular-nums; }
  body.stm-active .stm-deal-chip .stm-v.stm-neg { color: var(--watch); }
  body.stm-active .stm-deal-detail {
    display: none; margin-top: var(--s3); padding-top: var(--s3);
    border-top: 1px solid var(--divider);
    grid-template-columns: 1fr 1fr; gap: var(--s3);
  }
  body.stm-active .stm-deal.stm-deal-open .stm-deal-detail { display: grid; }
  body.stm-active .stm-deal-field .stm-k { color: var(--t-3); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 3px; }
  body.stm-active .stm-deal-field .stm-v { color: var(--t-1); font-size: var(--f-small); font-weight: 600; }

  /* Reduced motion */
  @media (prefers-reduced-motion: reduce) {
    body.stm-active .stm-sheet, body.stm-active .stm-scrim, body.stm-active .stm-chip,
    body.stm-active .stm-seg-btn, body.stm-active .stm-skel { transition: none; animation: none; }
  }
}
