/* Portal-wide numerical contract. Loaded after component styles; local font shorthands
   must not reset numerical weight, spacing or glyph features. Components may vary size. */
html.look-flat.look-accent body.v2.v3[data-marketplace] {
  --number-font:Onest,Arial,sans-serif;
  --number-spacing:0;
  --number-metric-weight:700;
  --number-table-weight:400;
  --number-metric-size:24px;
  --number-metric-line:28px;
  --number-secondary-size:20px;
  --number-secondary-line:24px;
  --number-table-size:15px;
  --number-table-line:20px;
  --number-title-slot:20px;
  --warn-fg:var(--v3-red);
  --err-fg:var(--v3-red);
  --ok-fg:var(--v3-green);
}
html.look-flat.look-accent body.v2.v3[data-marketplace] :is(
  .kpi__value,.fbo-tile .v,.v3-home-totals b,.v3-home-buyout strong,
  .drr-m .v,.drr-claim .hl,.drr-badge,.sales-moves__n,.sales-todo__n,.stat b,.calc-head b,
  .v3-metric strong,.v3-chart-total,.v3-mini b,.sales-product__num b,
  .auth-demo__stats b,.auth-demo__dial>b,.auth-demo__legend b,
  .ledger__main,.wbap-bound b,.fp-hero__when b,
  .hk__mp b,.kpi__mp b,.fbs-counts b,
  td.num,td.num :is(b,strong,span,input),td[data-v3-number],
  td[data-v3-number] :is(b,strong,span,input),input[type=number],input[inputmode=decimal],input[inputmode=numeric],
  [data-display-number],svg text
) {
  font-family:var(--number-font)!important;
  font-weight:var(--number-weight,var(--number-metric-weight))!important;
  font-style:normal!important;
  letter-spacing:var(--number-spacing)!important;
}
html.look-flat.look-accent body.v2.v3[data-marketplace] :is(td.num,td[data-v3-number],input[type=number],input[inputmode=decimal],input[inputmode=numeric],svg text) {
  --number-weight:var(--number-table-weight);
}
html.look-flat.look-accent body.v2.v3[data-marketplace] svg text:is([font-weight="700"],[font-weight="800"],.comparison-caption) {
  --number-weight:var(--number-metric-weight);
}
html.look-flat.look-accent body.v2.v3[data-marketplace] svg text:is([font-size="40"],[font-size="34"])[font-weight] { font-size:var(--number-metric-size)!important; }
html.look-flat.look-accent body.v2.v3[data-marketplace] :is(
  td.num,td.num :is(b,strong,span,input),td[data-v3-number],
  td[data-v3-number] :is(b,strong,span,input),input[type=number],input[inputmode=decimal],input[inputmode=numeric]
) { font-size:var(--number-table-size)!important;line-height:var(--number-table-line)!important;text-align:center!important; }
html.look-flat.look-accent body.v2.v3[data-marketplace] :is(
  td.num,td.num :is(b,strong,span,input),td[data-v3-number],
  td[data-v3-number] :is(b,strong,span,input),input[type=number],input[inputmode=decimal],input[inputmode=numeric]
) { font-variant-numeric:tabular-nums!important;font-feature-settings:"tnum"!important; }

/* Approved scale (12.10.2026, revised): 24/28 for the main figures, 20/24 for the secondary ones (per-marketplace
   split, list counters). One shared fit scale per group; never stretch or clip digits. */
html.look-flat.look-accent body.v2.v3[data-marketplace] :is(
  .kpi__value,.fbo-tile .v,.v3-home-totals b,.v3-home-buyout strong,
  .drr-m .v,.drr-claim .hl,.sales-moves__n,.sales-todo__n,.stat b,.calc-head b,
  .v3-metric strong,.v3-chart-total,.auth-demo__stats b,.auth-demo__dial>b,
  .ledger__main,.wbap-bound b,.fp-hero__when b,
  .fbs-counts b,.chart-series-summary__value,
  .v3-mini b,.sales-product__num b,.auth-demo__legend b,.hk__mp b,.kpi__mp b
) {
  --number-size:var(--number-metric-size);--number-line:var(--number-metric-line);
  font-size:calc(var(--number-size)*var(--number-fit-scale,1))!important;
  line-height:calc(var(--number-line)*var(--number-fit-scale,1))!important;
  letter-spacing:0!important;min-width:0;max-width:100%;white-space:nowrap;
  font-family:var(--number-font)!important;font-weight:700!important;
  font-variant-numeric:normal!important;font-feature-settings:normal!important;
}
html.look-flat.look-accent body.v2.v3[data-marketplace][data-marketplace] :is(
  .sales-todo__n,.v3-mini b,.sales-product__num b,.auth-demo__legend b,.hk__mp b,.kpi__mp b
) { --number-size:var(--number-secondary-size);--number-line:var(--number-secondary-line); }
html.look-flat.look-accent body.v2.v3[data-marketplace] :is(.v3-home-totals button,.v3-metric,.auth-demo__stats>div) { padding:12px 16px;min-height:84px;gap:0; }
html.look-flat.look-accent body.v2.v3[data-marketplace] :is(.v3-home-totals button b,.v3-metric strong,.auth-demo__stats b) { margin-top:6px; }
html.look-flat.look-accent body.v2.v3[data-marketplace] .fbo-tile .v { margin-top:4px; }
html.look-flat.look-accent body.v2.v3[data-marketplace] :is(.hk__mp,.kpi__mp) { margin:6px 0 0;gap:4px 16px; }
html.look-flat.look-accent body.v2.v3[data-marketplace] .v2-feature-chart .kpi__row { margin:8px 0!important; }

/* Platform colours (owner, 12.10.2026): Ozon figures blue, Wildberries figures lilac. Mixed totals stay neutral. */
html.look-flat.look-accent body.v2.v3[data-marketplace] .kpi__mp-ozon b { color:var(--v3-ozon)!important; }
html.look-flat.look-accent body.v2.v3[data-marketplace] .kpi__mp-wb b { color:var(--v3-wb)!important; }
html.look-flat.look-accent body.v2.v3[data-marketplace] .today-strip .fbo-tile[data-mp=ozon] .v { color:var(--v3-ozon)!important; }
html.look-flat.look-accent body.v2.v3[data-marketplace] .today-strip .fbo-tile[data-mp=wb] .v { color:var(--v3-wb)!important; }
html.look-flat.look-accent body.v2.v3[data-marketplace] :is(.kpi__title,.fbo-tile .k) { min-height:var(--number-title-slot); }
html.look-flat.look-accent body.v2.v3[data-marketplace] .kpi__row { flex-wrap:wrap;gap:8px; }
html.look-flat.look-accent body.v2.v3[data-marketplace] .kpi__value small { white-space:normal; }
html.look-flat.look-accent body.v2.v3[data-marketplace] .chart-series-summary { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:12px 0 0;color:rgba(255,255,255,.85); }
html.look-flat.look-accent body.v2.v3[data-marketplace] .chart-series-summary__item { display:flex;flex-direction:column;min-width:0;padding:12px 16px;border:1px solid #ffffff55;border-radius:12px; }
html.look-flat.look-accent body.v2.v3[data-marketplace] .chart-series-summary__label { min-height:40px;font:400 13px/20px var(--font);white-space:normal; }
html.look-flat.look-accent body.v2.v3[data-marketplace] .chart-series-summary__value { display:block;color:#fff; }
html.look-flat.look-accent body.v2.v3[data-marketplace] .chart-series-summary__item--comparison .chart-series-summary__value { color:rgba(255,255,255,.75); }
html.look-flat.look-accent body.v2.v3[data-marketplace] .chart-series-summary__date { font:400 12px/20px var(--font);margin-top:4px; }
@media(max-width:480px){html.look-flat.look-accent body.v2.v3[data-marketplace] .chart-series-summary { grid-template-columns:minmax(0,1fr); } }

/* Equal title slots keep values aligned even when a neighbouring title wraps. */
html.look-flat.look-accent body.v2.v3[data-marketplace] :is(
  .kpi__title,.fbo-tile .k,.drr-m .k,.v3-home-totals button>span,
  .auth-demo__stats>div>span,.v3-metric>span,.v3-mini>div>span,.sales-product__num>span,.chart-series-summary__label
) { min-height:var(--number-title-slot)!important; }
html.look-flat.look-accent body.v2.v3[data-marketplace] :is(.v3-home-totals button,.auth-demo__stats>div,.v3-metric,.v3-mini>div,.sales-product__num) {
  display:flex;flex-direction:column;align-items:stretch;
}
html.look-flat.look-accent body.v2.v3[data-marketplace] :is(.auth-demo__stats,.v3-mini,.sales-product__nums) { align-items:stretch;gap:12px; }

/* A single semantic red/green/blue per theme, also for legacy status classes. */
html.look-flat.look-accent body.v2.v3[data-marketplace] :is(
  .delta--bad,.delta--down,.v--bad,.state--bad,.soon--red,.soon--amber,
  .bad,.negative,.num .warning,.num .warn,.fbo-tile--bad .v
) { color:var(--v3-red)!important; }
/* The ONE yellow: --v3-amber (both themes). «Мало» / «8–14 дней» / needs a look; red stays for 0 and «до 7 дней». */
html.look-flat.look-accent body.v2.v3[data-marketplace] :is(.state--low,.state--warn) { color:var(--v3-amber)!important; }
html.look-flat.look-accent body.v2.v3[data-marketplace] :is(.delta--good,.delta--up,.v--good,.v--ok,.state--ok,.good) { color:var(--v3-green)!important; }
html.look-flat.look-accent body.v2.v3[data-marketplace] .soon--calm { color:var(--text)!important; }
html.look-flat.look-accent body.v2.v3[data-marketplace] svg text:is([fill="#ff0000" i],[fill="#ef4444" i],[fill="red" i]) { fill:var(--v3-red)!important; }
html.look-flat.look-accent body.v2.v3[data-marketplace] svg text:is([fill="#009900" i],[fill="#059669" i],[fill="green" i]) { fill:var(--v3-green)!important; }
html.look-flat.look-accent body.v2.v3[data-marketplace] svg text:is([fill="#005bff" i],[fill="#1d4ed8" i],[fill="#2563eb" i]) { fill:var(--v3-blue)!important; }
html.look-flat.look-accent body.v2.v3[data-marketplace] svg text:is([fill="#C800A1" i],[fill="#470A68" i],[fill="#981D97" i]) { fill:var(--v3-wb)!important; }
html.look-flat.look-accent body.v2.v3[data-marketplace] svg text:is([fill="#000" i],[fill="#000000" i],[fill="black" i],[fill="#111" i]) { fill:var(--text)!important; }
html.look-flat.look-accent body.v2.v3[data-marketplace] svg text:is([fill="#737373" i],[fill="#6b7280" i]) { fill:var(--muted)!important; }
html.look-flat.look-accent body.v2.v3[data-marketplace] .note__star { color:var(--muted)!important; }
html.look-flat.look-accent body.v2.v3[data-marketplace] .note__star:is(.is-on,:hover) { color:var(--v3-blue)!important; }
html.look-flat.look-accent body.v2.v3[data-marketplace] .today-strip .fbo-tile { border:1px solid var(--line); }
/* Six today cards form complete rows, with room for six-digit amounts at 36px. */
html.look-flat.look-accent body.v2.v3[data-marketplace] .today-strip .fbo-tiles { grid-template-columns:repeat(6,minmax(0,1fr)); }
@media(max-width:1300px){html.look-flat.look-accent body.v2.v3[data-marketplace] .today-strip .fbo-tiles { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:760px){html.look-flat.look-accent body.v2.v3[data-marketplace] .today-strip .fbo-tiles { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:480px){html.look-flat.look-accent body.v2.v3[data-marketplace] .today-strip .fbo-tiles { grid-template-columns:minmax(0,1fr); } }
html.look-flat.look-accent[data-theme=dark] body.v2.v3[data-marketplace] .today-strip .fbo-tile { background:var(--v3-band)!important; }

/* Detail tables stay inside the visible parent viewport. Narrow details use
   labelled rows, preserving every value and native links without sideways scroll. */
html.look-flat.look-accent body.v2.v3[data-marketplace] .tablewrap tr.wh-detail>td { padding:12px 16px 16px!important;background:var(--v3-band)!important; }
html.look-flat.look-accent body.v2.v3[data-marketplace] :is(.wh-detail__in,.v3-detail-container) { container-type:inline-size;container-name:table-detail;min-width:0;max-width:100%;padding:0; }
html.look-flat.look-accent body.v2.v3[data-marketplace] .v3-detail-container { width:100%;position:sticky;left:0; }
html.look-flat.look-accent body.v2.v3[data-marketplace] table[data-v3-detail] { width:100%!important;min-width:0!important;table-layout:fixed;border-collapse:collapse;background:var(--surface); }
html.look-flat.look-accent body.v2.v3[data-marketplace] table[data-v3-detail] :is(th,td) { padding:10px 12px!important;vertical-align:middle;white-space:normal!important;overflow-wrap:anywhere;word-break:normal;min-width:0;border-bottom:1px solid var(--line); }
html.look-flat.look-accent body.v2.v3[data-marketplace] table[data-v3-detail] th { position:static!important;width:auto!important;height:auto;font:600 13px/18px var(--font);color:var(--muted);background:var(--v3-band); }
html.look-flat.look-accent body.v2.v3[data-marketplace] .v3-detail-value { display:block;min-width:0;max-width:100%;white-space:normal!important;overflow-wrap:anywhere; }
html.look-flat.look-accent body.v2.v3[data-marketplace] .v3-detail-value :is(span,a) { white-space:normal!important;overflow-wrap:anywhere; }
html.look-flat.look-accent body.v2.v3[data-marketplace] .v3-detail-value :is(input,select) { min-width:0;max-width:100%;box-sizing:border-box; }
html.look-flat.look-accent body.v2.v3[data-marketplace] .v3-table-modes { flex-wrap:wrap;min-width:0;max-width:100%; }
@container table-detail (max-width:600px){
 table[data-v3-detail],table[data-v3-detail]>tbody{display:block}
 table[data-v3-detail] tr:has(th){position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}
 table[data-v3-detail] tr:has(td){display:block;border:1px solid var(--line);border-radius:10px;margin-bottom:12px;overflow:hidden}
 table[data-v3-detail] td[data-v3-detail-label]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:center;width:auto!important}
 table[data-v3-detail] td[data-v3-detail-label]::before{content:attr(data-v3-detail-label);text-align:left;color:var(--muted);font:400 13px/18px var(--font)}
 table[data-v3-detail] tr:last-child{margin-bottom:0}
 table[data-v3-detail] td:last-child{border-bottom:0}
}
