/* ==========================================================================
   sudfact.ru · Black Label ред. 5 · подтема VIP Console — слой поверх app.css
   Слово владельца 06.11.2026: «переведи его на Black Label VIP».
   Порядок подключения (после app.css и стилей шаблонов, перед </head>):
     /static/vip/premium-canon.tokens.css → /static/vip/black-label-vip-tokens.css → /static/vip/sudfact-vip.css
   Шаблоны и app.css не правятся: прежние имена sudfact читают значения VIP, числа в правилах перекрыты здесь.
   Собран генератором (agents/epsilon/design/sudfact/patch/README.md). Руками не править — перегенерировать.
   ========================================================================== */

/* 1. Шрифты канона */
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 200 900; font-display: swap; src: url('/static/vip/fonts/SourceSerif4-VF.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-style: italic; font-weight: 200 900; font-display: swap; src: url('/static/vip/fonts/SourceSerif4-Italic-VF.woff2') format('woff2'); }
@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/static/vip/fonts/FiraSans-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/static/vip/fonts/FiraSans-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('/static/vip/fonts/FiraSans-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Fira Sans'; font-style: italic; font-weight: 400; font-display: swap; src: url('/static/vip/fonts/FiraSans-Italic.woff2') format('woff2'); }
@font-face { font-family: 'Fira Sans Condensed'; font-style: normal; font-weight: 500; font-display: swap; src: url('/static/vip/fonts/FiraSansCondensed-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Fira Sans Condensed'; font-style: normal; font-weight: 600; font-display: swap; src: url('/static/vip/fonts/FiraSansCondensed-SemiBold.woff2') format('woff2'); }
/* JetBrains Mono — прежние подмножества sudfact (/static/fonts/fonts.css), то же семейство канона */

/* 2. Прежние имена sudfact → значения VIP. Те же селекторы, что у тем app.css, с той же силой. */
:root, :root[data-theme="light"] {
  --bg: var(--vip-bg-canvas);
  --surface: var(--vip-surface-card);
  --surface-2: var(--vip-surface-panel);
  --text: var(--vip-text-body);
  --muted: var(--vip-text-muted);
  --faint: var(--vip-text-muted);
  --text-muted: var(--vip-text-muted);
  --text-dim: var(--vip-text-muted);
  --accent: var(--vip-accent-verdigris);
  --accent-hover: #1D4B3E;
  --mint: var(--vip-accent-verdigris);
  --on-accent: #FAF9F6;
  --ring: var(--vip-accent-brass);
  --gold: var(--vip-accent-brass);
  --gold-hover: #B08D4F;
  --brass: #B08D4F;
  --rose: var(--vip-accent-crimson);
  --border: var(--vip-border-card);
  --bg-card: var(--vip-surface-card);
  --surface-card: var(--vip-surface-card);
  --surface-quiet: var(--vip-surface-panel);
  --surface-focal: var(--vip-surface-elevated);
  --surface-hover: var(--vip-surface-panel);
  --accent-soft: var(--vip-surface-panel);
  --fg: var(--vip-text-body);
  --fg-muted: var(--vip-text-muted);
  --text-ink: var(--vip-text-ink);
  --text-body: var(--vip-text-body);
  --hairline: var(--vip-border-card);
  --accent-action: var(--vip-accent-verdigris);
  --accent-action-hover: #1D4B3E;
  --accent-struct: #B08D4F;
  --accent-struct-text: var(--vip-accent-brass);
  --chart-1: #7A5E32;
  --chart-2: #245E4E;
  --chart-3: #1F3F7A;
  --chart-4: #616475;
  --chart-5: #5C6B47;
  --chart-6: #8A5A1F;
  --chart-7: #6E6250;
  --chart-8: #7E8190;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-sans: 'Fira Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;
}
:root[data-theme="dark"] {
  --bg: var(--vip-bg-canvas);
  --surface: var(--vip-surface-card);
  --surface-2: var(--vip-surface-elevated);
  --text: var(--vip-text-body);
  --muted: var(--vip-text-muted);
  --faint: var(--vip-text-muted);
  --text-muted: var(--vip-text-muted);
  --text-dim: var(--vip-text-muted);
  --accent: var(--vip-accent-verdigris);
  --accent-hover: #A6D2C1;
  --mint: var(--vip-accent-verdigris);
  --on-accent: #08080A;
  --ring: var(--vip-accent-brass);
  --gold: var(--vip-accent-brass);
  --gold-hover: #D8B486;
  --brass: #C19A6B;
  --rose: var(--vip-accent-crimson);
  --border: var(--vip-border-card);
  --bg-card: var(--vip-surface-card);
  --surface-card: var(--vip-surface-card);
  --surface-quiet: var(--vip-surface-elevated);
  --surface-focal: var(--vip-surface-elevated);
  --surface-hover: var(--vip-surface-elevated);
  --accent-soft: var(--vip-surface-elevated);
  --fg: var(--vip-text-body);
  --fg-muted: var(--vip-text-muted);
  --text-ink: var(--vip-text-ink);
  --text-body: var(--vip-text-body);
  --hairline: var(--vip-border-card);
  --accent-action: var(--vip-accent-verdigris);
  --accent-action-hover: #A6D2C1;
  --accent-struct: #C19A6B;
  --accent-struct-text: var(--vip-accent-brass);
  --chart-1: #C19A6B;
  --chart-2: #8FC4B0;
  --chart-3: #A8B6D8;
  --chart-4: #9B9AA9;
  --chart-5: #A8B894;
  --chart-6: #E0A96D;
  --chart-7: #C6B69A;
  --chart-8: #7E7B8C;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-sans: 'Fira Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: var(--vip-bg-canvas);
    --surface: var(--vip-surface-card);
    --surface-2: var(--vip-surface-elevated);
    --text: var(--vip-text-body);
    --muted: var(--vip-text-muted);
    --faint: var(--vip-text-muted);
    --text-muted: var(--vip-text-muted);
    --text-dim: var(--vip-text-muted);
    --accent: var(--vip-accent-verdigris);
    --accent-hover: #A6D2C1;
    --mint: var(--vip-accent-verdigris);
    --on-accent: #08080A;
    --ring: var(--vip-accent-brass);
    --gold: var(--vip-accent-brass);
    --gold-hover: #D8B486;
    --brass: #C19A6B;
    --rose: var(--vip-accent-crimson);
    --border: var(--vip-border-card);
    --bg-card: var(--vip-surface-card);
    --surface-card: var(--vip-surface-card);
    --surface-quiet: var(--vip-surface-elevated);
    --surface-focal: var(--vip-surface-elevated);
    --surface-hover: var(--vip-surface-elevated);
    --accent-soft: var(--vip-surface-elevated);
    --fg: var(--vip-text-body);
    --fg-muted: var(--vip-text-muted);
    --text-ink: var(--vip-text-ink);
    --text-body: var(--vip-text-body);
    --hairline: var(--vip-border-card);
    --accent-action: var(--vip-accent-verdigris);
    --accent-action-hover: #A6D2C1;
    --accent-struct: #C19A6B;
    --accent-struct-text: var(--vip-accent-brass);
    --chart-1: #C19A6B;
    --chart-2: #8FC4B0;
    --chart-3: #A8B6D8;
    --chart-4: #9B9AA9;
    --chart-5: #A8B894;
    --chart-6: #E0A96D;
    --chart-7: #C6B69A;
    --chart-8: #7E7B8C;
    --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --font-sans: 'Fira Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', Consolas, monospace;
  }
}

/* 3. Числа в правилах app.css: радиус > 4 px и оттенки прежней палитры */
.case-card { border-radius: var(--radius-card, 4px); }
.stat-table { border-radius: var(--radius-card, 4px); }
.hero-card { border-radius: var(--radius-card, 4px); }
.outcome-business_victory,
.outcome-partial,
.outcome-cpc_125_satisfied,
.outcome-return_to_prosecutor,
.outcome-soft_measure_satisfied,
.outcome-detention_denied,
.outcome-acquittal_verdict,
.outcome-case_terminated { border-color: color-mix(in srgb, var(--accent-action) 30%, transparent); }
.outcome-fns_victory,
.outcome-cpc_125_denied,
.outcome-no_return,
.outcome-soft_measure_denied,
.outcome-detention_granted,
.outcome-guilty_verdict { border-color: color-mix(in srgb, var(--status-bad) 30%, transparent); }
.q-disclaimer { border-radius: var(--radius-card, 4px); }
.q-card { border-radius: var(--radius-card, 4px); }
.builder { border-radius: var(--radius-card, 4px); }
.preset-card { border-radius: var(--radius-card, 4px); }
.chip-cat { border-color: color-mix(in srgb, var(--accent-action) 25%, transparent); }
.chip-amount { border-color: color-mix(in srgb, var(--accent-struct) 25%, transparent); }
.chip-outcome-BUSINESS_VICTORY,
.chip-outcome-PARTIAL,
.chip-outcome-CPC_125_SATISFIED,
.chip-outcome-RETURN_TO_PROSECUTOR,
.chip-outcome-SOFT_MEASURE_SATISFIED,
.chip-outcome-DETENTION_DENIED,
.chip-outcome-ACQUITTAL_VERDICT,
.chip-outcome-CASE_TERMINATED { border-color: color-mix(in srgb, var(--accent-action) 30%, transparent); }
.chip-outcome-FNS_VICTORY,
.chip-outcome-CPC_125_DENIED,
.chip-outcome-NO_RETURN,
.chip-outcome-SOFT_MEASURE_DENIED,
.chip-outcome-DETENTION_GRANTED,
.chip-outcome-GUILTY_VERDICT { border-color: color-mix(in srgb, var(--status-bad) 30%, transparent); }
.case-preview mark { background: color-mix(in srgb, var(--accent-struct) 22%, transparent); }
.direct-answer { background: linear-gradient(120deg, color-mix(in srgb, var(--accent-struct) 10%, transparent), color-mix(in srgb, var(--accent-action) 6%, transparent)); border-radius: var(--radius-card, 4px); }
.confidence-note { background: color-mix(in srgb, var(--accent-struct) 7%, transparent); border: 1px dashed color-mix(in srgb, var(--accent-struct) 40%, transparent); }
.bar-relevant { background: linear-gradient(90deg, var(--mint), color-mix(in srgb, var(--accent-action) 30%, transparent)); }
.bar-target { background: linear-gradient(90deg, var(--gold), color-mix(in srgb, var(--accent-struct) 30%, transparent)); }
.bar-now { box-shadow: 0 0 8px color-mix(in srgb, var(--accent-struct) 40%, transparent); }
.progress-start { background: linear-gradient(90deg, var(--rose), color-mix(in srgb, var(--status-bad) 30%, transparent)); }
.progress-mid { background: linear-gradient(90deg, var(--gold), color-mix(in srgb, var(--accent-struct) 30%, transparent)); }
.progress-done { background: linear-gradient(90deg, var(--mint), color-mix(in srgb, var(--accent-action) 50%, transparent)); }
.row-current td { background: color-mix(in srgb, var(--accent-struct) 6%, transparent); }
.period-chip-active { background: color-mix(in srgb, var(--accent-struct) 10%, transparent); }
.bar-l4 { background: color-mix(in srgb, var(--text-muted) 15%, transparent); }
.bar-l3 { background: color-mix(in srgb, var(--accent-struct) 22%, transparent); }
.bar-l2 { background: color-mix(in srgb, var(--accent-action) 30%, transparent); }
.preset-card-warn { color: var(--status-warn); }
.theme-toggle { border-radius: var(--radius-chip, 2px); }
@media print { .case-card { border-color: var(--hairline) !important; } }
@media print { .stat-table { border-color: var(--hairline) !important; } }
.cite-box { border-radius: var(--radius-card, 4px); }
.offer-card { border-radius: var(--radius-card, 4px); }
.case-next { border-radius: var(--radius-card, 4px); }
.ent-verdict { border-radius: var(--radius-card, 4px); }

/* 4. Числа в стилях шаблонов: та же замена, на ступень сильнее (стили шаблонов стоят в body) */
/* api_docs.html */
html body .api-card { border-radius: var(--radius-card, 4px); }
html body .api-ep { border-radius: var(--radius-card, 4px); }
html body .api-m { border-radius: var(--radius-card, 4px); }
html body pre.api-pre { border-radius: var(--radius-card, 4px); }
/* _layout.html */
html body .cab-link { border-radius: var(--radius-card, 4px); }
html body .cab-stub { border-radius: var(--radius-card, 4px); }
/* billing.html */
html body .bill-flash { border-radius: var(--radius-card, 4px); }
html body .bill-wallet { border-radius: var(--radius-card, 4px); }
html body .bill-preset { border-radius: var(--radius-card, 4px); }
html body .bill-topup input { border-radius: var(--radius-card, 4px); }
html body .bill-period { border-radius: var(--radius-card, 4px); }
html body .bill-card { border-radius: var(--radius-card, 4px); }
html body .bill-btn { border-radius: var(--radius-chip, 2px); }
/* dashboard.html */
html body .dash-card { border-radius: var(--radius-card, 4px); }
html body .dash-block { border-radius: var(--radius-card, 4px); }
html body .dash-inv { border-radius: var(--radius-card, 4px); }
html body .dash-cta { border-radius: var(--radius-card, 4px); }
/* export.html */
html body .exp-flash { border-radius: var(--radius-card, 4px); }
html body .exp-head { border-radius: var(--radius-card, 4px); }
html body .exp-item { border-radius: var(--radius-card, 4px); }
html body .exp-btn { border-radius: var(--radius-chip, 2px); }
/* settings.html */
html body .set-flash { border-radius: var(--radius-card, 4px); }
html body .set-sec { border-radius: var(--radius-card, 4px); }
html body .set-input { border-radius: var(--radius-card, 4px); }
html body .set-btn { border-radius: var(--radius-chip, 2px); }
/* watches.html */
html body .wt-flash { border-radius: var(--radius-card, 4px); }
html body .wt-head { border-radius: var(--radius-card, 4px); }
html body .wt-form { border-radius: var(--radius-card, 4px); }
html body .wt-form input[type=text], html body .wt-form select { border-radius: var(--radius-card, 4px); }
html body .wt-btn { border-radius: var(--radius-chip, 2px); }
html body .wt-item { border-radius: var(--radius-card, 4px); }
html body .wt-rm { border-radius: var(--radius-card, 4px); }
/* case.html */
html body .case-verdict { border-radius: var(--radius-card, 4px); }
/* categories.html */
html body .rub-btn { border-radius: var(--radius-chip, 2px); }
html body .rub-card { border-radius: var(--radius-card, 4px); }
html body .rub-mark { border-radius: var(--radius-card, 4px); }
/* category.html */
html body .lvp { border-radius: var(--radius-card, 4px); }
html body .outcome-bar { border-radius: var(--radius-card, 4px); }
html body .thin-note { border-radius: var(--radius-card, 4px); }
html body .cite { border-radius: var(--radius-card, 4px); }
/* entity.html */
html body .lvp { border-radius: var(--radius-card, 4px); }
html body .cite { border-radius: var(--radius-card, 4px); }
/* error.html */
html body .err__home { border-radius: var(--radius-card, 4px); }
/* index.html */
html body .htree-node { border-radius: var(--radius-card, 4px); }
html body a.htree-leaf { border-radius: var(--radius-card, 4px); }
/* index.html */
html body .sf-corpus { border-radius: var(--radius-card, 4px); }
html body .sf-field { border-radius: var(--radius-card, 4px); }
html body .sf-go { border-radius: var(--radius-card, 4px); }
html body .sf-chip { border-radius: var(--radius-chip, 2px); }
html body .sf-ready-card { border-radius: var(--radius-card, 4px); }
/* offer.html */
html body .lg-sum { border-radius: var(--radius-card, 4px); }
/* norm_detail.html */
html body .nd-hero { border-radius: var(--radius-card, 4px); }
html body .nd-box { border-radius: var(--radius-card, 4px); }
html body .nd-stat { border-radius: var(--radius-card, 4px); }
html body .nd-cta-bar { border-radius: var(--radius-card, 4px); }
html body .nd-cta-btn { border-radius: var(--radius-chip, 2px); }
html body .nd-case-card { border-radius: var(--radius-card, 4px); }
html body .nd-rel-item { border-radius: var(--radius-card, 4px); }
/* norms_index.html */
html body .nl-hero { border-radius: var(--radius-card, 4px); }
html body .nl-metric-card { border-radius: var(--radius-card, 4px); }
html body .nl-card { border-radius: var(--radius-card, 4px); }
/* q.html */
html body .q-offer { border-radius: var(--radius-card, 4px); }
html body .q-offer-price { border-radius: var(--radius-card, 4px); }
html body .q-offer-free { border-radius: var(--radius-card, 4px); }
html body .law-vs-practice { border-radius: var(--radius-card, 4px); }
html body .outcome-bar { border-radius: var(--radius-card, 4px); }
html body .cite-box { border-radius: var(--radius-card, 4px); }
html body .plain-answer { background: color-mix(in srgb, var(--accent-action) 8%, transparent); border-radius: var(--radius-card, 4px); }
html body .headline-caveat { background: color-mix(in srgb, var(--status-bad) 8%, transparent); border-radius: var(--radius-card, 4px); }
html body .finality-note { background: color-mix(in srgb, var(--accent-struct) 8%, transparent); border-radius: var(--radius-card, 4px); }

/* 5. Элементы VIP там, где у них есть смысл на sudfact */
h1, h2, h3, h4 { color: var(--text-ink); }
/* одна строка запроса — «окно команды»: двойная фаска 4/2 px */
html body .sf-input { background: var(--vip-surface-bezel); padding: 5px; border: 1px solid var(--vip-border-subtle); border-radius: var(--radius-card, 4px); }
html body .sf-input input[type="text"], html body .sf-input textarea { background: var(--vip-surface-card); border: 1px solid var(--vip-border-card); border-radius: var(--radius-inner, 2px); color: var(--text-ink); }
/* прямой ответ — число с клеймом: ровная карточка и латунная засечка вместо тёплого градиента */
html body .direct-answer { background: var(--vip-surface-card); border: 1px solid var(--vip-border-card); border-top: 2px solid var(--accent-struct); }
/* одно насыщенное действие — мята / патина; латунная кнопка в VIP не применяется */
html body .btn-primary { background: var(--accent-action); color: var(--text-on-action); border-color: transparent; }
html body .btn-primary:hover { background: var(--accent-action-hover); color: var(--text-on-action); }
/* номер дела — число: моно и чернила, не латунь */
html body .case-no-large { color: var(--text-ink); }
/* код в тексте — капсула кода */
html body main code { font-family: var(--font-mono); font-size: .88em; padding: .1em .45em; border-radius: var(--radius-chip, 2px);
  background: var(--vip-pill-bg); color: var(--vip-pill-text); border: 1px solid var(--vip-pill-border); }
::selection { background: color-mix(in srgb, var(--vip-cobalt-core) 28%, transparent); }
/* метки и подписи внутри консоли стоят на обойме: приглушённый там даёт 4,40:1 — текстом тела */
html body .sf-input .sf-inlabel, html body .sf-input label { color: var(--vip-text-body); }
/* главное число среза — моно, как любое число канона (было антиквой) */
html body .hero-value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
/* заголовок раздела дела — чернилами: приглушённый h2 в светлой теме давал 5,18 при пороге заголовка 7 */
html body .case-body h2 { color: var(--text-ink); }
/* встроенные радиусы шаблонов больше 4 px (блок «Прикладные инструменты» и подобные) — к закону 0–4 */
html body [style*="border-radius:5px"], html body [style*="border-radius: 5px"], html body [style*="border-radius:6px"], html body [style*="border-radius: 6px"], html body [style*="border-radius:7px"], html body [style*="border-radius: 7px"], html body [style*="border-radius:8px"], html body [style*="border-radius: 8px"], html body [style*="border-radius:9px"], html body [style*="border-radius: 9px"], html body [style*="border-radius:10px"], html body [style*="border-radius: 10px"], html body [style*="border-radius:11px"], html body [style*="border-radius: 11px"], html body [style*="border-radius:12px"], html body [style*="border-radius: 12px"], html body [style*="border-radius:13px"], html body [style*="border-radius: 13px"], html body [style*="border-radius:14px"], html body [style*="border-radius: 14px"], html body [style*="border-radius:15px"], html body [style*="border-radius: 15px"], html body [style*="border-radius:16px"], html body [style*="border-radius: 16px"], html body [style*="border-radius:17px"], html body [style*="border-radius: 17px"], html body [style*="border-radius:18px"], html body [style*="border-radius: 18px"], html body [style*="border-radius:19px"], html body [style*="border-radius: 19px"], html body [style*="border-radius:20px"], html body [style*="border-radius: 20px"], html body [style*="border-radius:21px"], html body [style*="border-radius: 21px"], html body [style*="border-radius:22px"], html body [style*="border-radius: 22px"], html body [style*="border-radius:23px"], html body [style*="border-radius: 23px"], html body [style*="border-radius:24px"], html body [style*="border-radius: 24px"] { border-radius: var(--radius-card, 4px) !important; }
/* страница ошибки (error.html, своя <html>; слой подключён 06.11): кнопка — одно действие мятой, код — число моно */
html body .err__home { background: var(--accent-action); color: var(--text-on-action); }
html body .err__home:hover { background: var(--accent-action-hover); color: var(--text-on-action); }
html body .err__code { font-family: var(--font-mono); font-weight: 500; color: var(--text-ink); }

/* 6. Телефон: то, что вылезало за 375 px ещё до VIP (главная +44, дело +192, ИНН +481 px, замер 06.11) */
@media (max-width: 640px) {
  html body .sf-calc-case, html body .sf-calc-case-meta { flex-wrap: wrap; min-width: 0; overflow-wrap: anywhere; }
  html body .sf-calc-case-meta > *, html body .sf-calc-case-out { min-width: 0; overflow-wrap: anywhere; white-space: normal; }
  html body .case-actions-bar, html body .ent-cta { flex-wrap: wrap; max-width: 100%; }
  html body .case-actions-bar .btn, html body .ent-cta .btn { white-space: normal; max-width: 100%; }
  html body .tbl-scroll { overflow-x: auto; max-width: 100%; }
  html body .chip-row { flex-wrap: wrap; max-width: 100%; }
  html body .chip-row .chip { white-space: normal; max-width: 100%; overflow-wrap: anywhere; }
}
