/* Minta Finance — DESIGN SYSTEM V2.3 (Direction D): tokens.
   ГЕНЕРИРУЕТСЯ: node scripts/ds/build-v23.mjs из docs/design/v2.3-research/system/ds/tokens.src.mjs. Руками не править.
   Имена — DS V1 (docs/design/v2.2/tokens.css), значения — Direction D; новые токены помечены в DESIGN-SYSTEM-V2.3.md §2.
   Равенство с токенами прототипа держит src/web/ds-v23-tokens.test.ts. Литеральные цвета допустимы ТОЛЬКО здесь. */
:root{
  /* ── цвет ── */
  --background: #F2F1ED;
  --background-sidebar: #F2F1ED;
  --surface: #FFFFFF;
  --surface-sunken: #F7F6F3;
  --surface-muted: #ECEBE6;
  --surface-raised: #FFFFFF;
  --border: #E6E4DE;
  --border-strong: #D9D7D0;
  --border-emphasis: #BEBCB4;
  --border-control: #868A92;
  --text-primary: #15171A;
  --text-secondary: #3F434A;
  --text-muted: #5B5F67;
  --text-subtle: #666A72;
  --text-disabled: #868A92;
  --text-inverse: #FFFFFF;
  --action-primary: #15171A;
  --action-primary-hover: #2A2D32;
  --action-primary-pressed: #3A3D42;
  --action-secondary-hover: #ECEBE6;
  --action-destructive: #B42318;
  --action-destructive-hover: #9A1D14;
  --action-destructive-pressed: #7A1A12;
  --focus-ring: #0B6F61;
  --accent-mint: #0F8C7A;
  --accent-mint-strong: #0B6F61;
  --accent-mint-subtle: #E2F2EE;
  --accent-mint-border: #9FD3C8;
  --row-selected: #EAF5F2;
  --row-hover: var(--surface-sunken);
  --row-flagged: #FFF7F5;
  --row-changed: #F3FAF7;
  --row-current: var(--row-selected);
  --positive: #16733A;
  --positive-subtle: #E6F2E9;
  --positive-strong: #12592D;
  --negative: #B42318;
  --negative-subtle: #FBEAE7;
  --negative-strong: #7A1A12;
  --negative-border: #EBB3AB;
  --warning: #8A5300;
  --warning-subtle: #FBF0DC;
  --warning-strong: #6E4300;
  --warning-border: #E9C98E;
  --warning-icon: #B87400;
  --information: #2F5B8F;
  --information-subtle: #E8EEF6;
  --information-strong: #23466F;
  --delta-good: var(--positive);
  --delta-bad: var(--warning);
  --delta-neutral: var(--text-muted);
  --chart-income: #1E9C86;
  --chart-expense: #2B2E34;
  --chart-neutral: #B9BCC1;
  --chart-forecast: #3F434A;
  --chart-grid: #ECEBE6;
  --chart-gap-band: rgba(180,35,24,.08);
  --chart-gap-fill: rgba(180,35,24,.14);
  --chart-cat-1: #2F4F9A;
  --chart-cat-2: #A88A57;
  --chart-cat-3: #8E2F63;
  --chart-cat-4: #4B9BC7;
  --chart-cat-5: #8A62B9;
  --chart-cat-6: #5E6A80;
  --scrim: rgba(21,23,26,.42);
  --inverse-background: #1B1D21;
  --inverse-surface: #2A2D32;
  --inverse-surface-raised: #2E3137;
  --inverse-border: #3A3D42;
  --inverse-border-strong: #4A4D52;
  --inverse-text-primary: #E7E6E1;
  --inverse-text-secondary: #C9CCD1;
  --inverse-text-muted: #A7A9AE;
  --inverse-positive: #7FD1A0;
  --inverse-accent: #7FD1C1;
  --environment-marker: #E2A23A;
  /* ── шрифт ── */
  --font-family-ui: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-family-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  /* ── шкала шрифта, 1440. --type-X: font-шорткат; -size/-lh/-weight/-tracking — части. На ≥1800 и на телефоне переопределяются ТОЛЬКО -size и -lh ── */
  --type-money-hero-size: 48px; --type-money-hero-lh: 52px; --type-money-hero-weight: 600; --type-money-hero-tracking: -0.025em;
  --type-money-hero: var(--type-money-hero-weight) var(--type-money-hero-size)/var(--type-money-hero-lh) var(--font-family-ui);
  --type-money-large-size: 30px; --type-money-large-lh: 36px; --type-money-large-weight: 600; --type-money-large-tracking: -0.015em;
  --type-money-large: var(--type-money-large-weight) var(--type-money-large-size)/var(--type-money-large-lh) var(--font-family-ui);
  --type-display-size: 32px; --type-display-lh: 40px; --type-display-weight: 600; --type-display-tracking: -0.01em;
  --type-display: var(--type-display-weight) var(--type-display-size)/var(--type-display-lh) var(--font-family-ui);
  --type-page-title-size: 26px; --type-page-title-lh: 32px; --type-page-title-weight: 600; --type-page-title-tracking: -0.01em;
  --type-page-title: var(--type-page-title-weight) var(--type-page-title-size)/var(--type-page-title-lh) var(--font-family-ui);
  --type-verdict-size: 16px; --type-verdict-lh: 22px; --type-verdict-weight: 500; --type-verdict-tracking: 0;
  --type-verdict: var(--type-verdict-weight) var(--type-verdict-size)/var(--type-verdict-lh) var(--font-family-ui);
  --type-section-title-size: 18px; --type-section-title-lh: 26px; --type-section-title-weight: 600; --type-section-title-tracking: 0;
  --type-section-title: var(--type-section-title-weight) var(--type-section-title-size)/var(--type-section-title-lh) var(--font-family-ui);
  --type-subsection-size: 15px; --type-subsection-lh: 22px; --type-subsection-weight: 600; --type-subsection-tracking: 0;
  --type-subsection: var(--type-subsection-weight) var(--type-subsection-size)/var(--type-subsection-lh) var(--font-family-ui);
  --type-body-large-size: 15px; --type-body-large-lh: 22px; --type-body-large-weight: 400; --type-body-large-tracking: 0;
  --type-body-large: var(--type-body-large-weight) var(--type-body-large-size)/var(--type-body-large-lh) var(--font-family-ui);
  --type-body-size: 14px; --type-body-lh: 20px; --type-body-weight: 400; --type-body-tracking: 0;
  --type-body: var(--type-body-weight) var(--type-body-size)/var(--type-body-lh) var(--font-family-ui);
  --type-item-title-size: 14.5px; --type-item-title-lh: 20px; --type-item-title-weight: 600; --type-item-title-tracking: 0;
  --type-item-title: var(--type-item-title-weight) var(--type-item-title-size)/var(--type-item-title-lh) var(--font-family-ui);
  --type-label-size: 13.5px; --type-label-lh: 19px; --type-label-weight: 500; --type-label-tracking: 0;
  --type-label: var(--type-label-weight) var(--type-label-size)/var(--type-label-lh) var(--font-family-ui);
  --type-meta-size: 13px; --type-meta-lh: 18px; --type-meta-weight: 400; --type-meta-tracking: 0;
  --type-meta: var(--type-meta-weight) var(--type-meta-size)/var(--type-meta-lh) var(--font-family-ui);
  --type-caption-size: 12.5px; --type-caption-lh: 18px; --type-caption-weight: 400; --type-caption-tracking: 0;
  --type-caption: var(--type-caption-weight) var(--type-caption-size)/var(--type-caption-lh) var(--font-family-ui);
  --type-caption-strong-size: 12.5px; --type-caption-strong-lh: 18px; --type-caption-strong-weight: 600; --type-caption-strong-tracking: 0;
  --type-caption-strong: var(--type-caption-strong-weight) var(--type-caption-strong-size)/var(--type-caption-strong-lh) var(--font-family-ui);
  --type-table-size: 14.5px; --type-table-lh: 20px; --type-table-weight: 400; --type-table-tracking: 0;
  --type-table: var(--type-table-weight) var(--type-table-size)/var(--type-table-lh) var(--font-family-ui);
  --type-table-head-size: 12.5px; --type-table-head-lh: 16px; --type-table-head-weight: 500; --type-table-head-tracking: 0;
  --type-table-head: var(--type-table-head-weight) var(--type-table-head-size)/var(--type-table-head-lh) var(--font-family-ui);
  --type-money-size: 14.5px; --type-money-lh: 20px; --type-money-weight: 600; --type-money-tracking: 0;
  --type-money: var(--type-money-weight) var(--type-money-size)/var(--type-money-lh) var(--font-family-ui);
  --type-report-size: 14px; --type-report-lh: 20px; --type-report-weight: 400; --type-report-tracking: 0;
  --type-report: var(--type-report-weight) var(--type-report-size)/var(--type-report-lh) var(--font-family-ui);
  --type-nav-size: 14px; --type-nav-lh: 20px; --type-nav-weight: 500; --type-nav-tracking: 0;
  --type-nav: var(--type-nav-weight) var(--type-nav-size)/var(--type-nav-lh) var(--font-family-ui);
  --type-button-size: 13.5px; --type-button-lh: 18px; --type-button-weight: 600; --type-button-tracking: 0;
  --type-button: var(--type-button-weight) var(--type-button-size)/var(--type-button-lh) var(--font-family-ui);
  --type-button-sm-size: 13px; --type-button-sm-lh: 16px; --type-button-sm-weight: 600; --type-button-sm-tracking: 0;
  --type-button-sm: var(--type-button-sm-weight) var(--type-button-sm-size)/var(--type-button-sm-lh) var(--font-family-ui);
  --type-button-xs-size: 12.5px; --type-button-xs-lh: 16px; --type-button-xs-weight: 600; --type-button-xs-tracking: 0;
  --type-button-xs: var(--type-button-xs-weight) var(--type-button-xs-size)/var(--type-button-xs-lh) var(--font-family-ui);
  --type-micro-size: 12px; --type-micro-lh: 16px; --type-micro-weight: 500; --type-micro-tracking: 0.02em;
  --type-micro: var(--type-micro-weight) var(--type-micro-size)/var(--type-micro-lh) var(--font-family-ui);
  --type-technical-size: 12px; --type-technical-lh: 16px; --type-technical-weight: 400; --type-technical-tracking: 0;
  --type-technical: var(--type-technical-weight) var(--type-technical-size)/var(--type-technical-lh) var(--font-family-mono);
  --size-fraction-hero: .5em;   /* «,40» и «₽» рядом с money-hero */
  --size-fraction-large: .6em;  /* то же рядом с money-large */
  /* ── пространство ── */
  --space-0: 0px;
  --space-1: 2px;
  --space-2: 4px;
  --space-3: 6px;
  --space-4: 8px;
  --space-5: 12px;
  --space-6: 16px;
  --space-7: 20px;
  --space-8: 24px;
  --space-9: 32px;
  --space-10: 40px;
  --space-11: 48px;
  --space-12: 64px;
  /* ── радиусы (ТОЛЬКО из шкалы) ── */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 14px;
  --radius-pill: 999px;
  /* ── значки, контролы ── */
  --icon-xs: 12px;
  --icon-sm: 14px;
  --icon-md: 16px;
  --icon-lg: 18px;
  --icon-xl: 22px;
  --icon-2xl: 24px;
  --control-xs: 28px;
  --control-sm: 30px;
  --control-md: 34px;
  --control-lg: 40px;
  --control-touch: 44px;
  --control-touch-lg: 48px;
  --target-min: 24px;
  /* ── граница, кольцо фокуса ── */
  --border-width: 1px; --border-width-strong: 2px;
  --focus-ring-width: 2px; --focus-ring-offset: 2px;
  /* ── тени ── */
  --shadow-none: none;
  --shadow-panel: 0 0 0 1px var(--border);
  --shadow-raised: 0 0 0 1px var(--border), 0 1px 2px rgba(21,23,26,.05);
  --shadow-overlay: 0 16px 40px rgba(21,23,26,.18), 0 0 0 1px rgba(21,23,26,.08);
  --shadow-sticky-edge: 6px 0 8px -6px rgba(21,23,26,.18);
  --shadow-focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--focus-ring);
  --shadow-hairline-bottom: 0 1px 0 var(--border);
  --shadow-hairline-top: 0 -1px 0 var(--border);
  --shadow-line-bottom: 0 1px 0 var(--border-strong);
  --shadow-active-underline: inset 0 -2px 0 var(--text-primary);
  --shadow-row-selected: inset 0 1px 0 var(--accent-mint-border), inset 0 -1px 0 var(--accent-mint-border);
  --shadow-ring-selected: inset 0 0 0 1px var(--accent-mint-border);
  --shadow-ring-negative: inset 0 0 0 1px var(--negative-border);
  --shadow-ring-error: 0 0 0 1px var(--negative);
  --shadow-sheet-backdrop: 0 0 0 100vmax var(--scrim);
  --shadow-ring-warning: inset 0 0 0 1px var(--warning-border);
  --shadow-ring-strong: 0 0 0 1px var(--border-emphasis);
  --shadow-sticky-edge-left: -6px 0 8px -6px rgba(21,23,26,.18);
  /* ── движение, слои ── */
  --duration-fast: 120ms; --duration-base: 180ms; --duration-slow: 240ms;
  --ease-standard: cubic-bezier(.2,0,0,1); --ease-exit: cubic-bezier(.4,0,1,1);
  --z-base: 0;
  --z-sticky: 10;
  --z-sidebar: 20;
  --z-dropdown: 100;
  --z-drawer: 200;
  --z-modal: 300;
  --z-toast: 400;
  --z-tooltip: 500;
  /* ── раскладка ── */
  --layout-gutter: 32px;
  --layout-gap: 20px;
  --layout-sidebar: 240px;
  --layout-sidebar-rail: 56px;
  --layout-rail: 392px;
  --layout-inspector: 376px;
  --layout-table-min: 720px;
  --layout-ctxbar-h: 56px;
  --layout-mobile-bar: 0px;
  --layout-content-max: 1760px;
  /* ── плотность (V1: comfortable / standard / compact). Значения применяются через [data-density] ниже ── */
  --density-comfortable-row: 48px;
  --density-comfortable-header: 40px;
  --density-comfortable-input: 40px;
  --density-comfortable-toolbar: 56px;
  --density-comfortable-cell-px: 12px;
  --density-comfortable-panel: 20px;
  --density-comfortable-gap: 16px;
  --density-comfortable-icon: 18px;
  --density-comfortable-font: 15px;
  --density-comfortable-hit: 40px;
  --density-comfortable-group: 36px;
  --density-comfortable-head-gap: 16px;
  --density-standard-row: 42px;
  --density-standard-header: 34px;
  --density-standard-input: 34px;
  --density-standard-toolbar: 56px;
  --density-standard-cell-px: 12px;
  --density-standard-panel: 20px;
  --density-standard-gap: 12px;
  --density-standard-icon: 16px;
  --density-standard-font: 14.5px;
  --density-standard-hit: 34px;
  --density-standard-group: 32px;
  --density-standard-head-gap: 12px;
  --density-compact-row: 34px;
  --density-compact-header: 30px;
  --density-compact-input: 30px;
  --density-compact-toolbar: 48px;
  --density-compact-cell-px: 10px;
  --density-compact-panel: 16px;
  --density-compact-gap: 8px;
  --density-compact-icon: 16px;
  --density-compact-font: 14px;
  --density-compact-hit: 30px;
  --density-compact-group: 24px;
  --density-compact-head-gap: 8px;
  /* по умолчанию — standard */
  --row-height: var(--density-standard-row); --header-height: var(--density-standard-header); --control-height: var(--density-standard-input);
  --cell-padding-x: var(--density-standard-cell-px); --panel-padding: var(--density-standard-panel); --table-font-size: var(--density-standard-font); --hit-area: var(--density-standard-hit);
  --group-height: var(--density-standard-group); --page-head-gap: var(--density-standard-head-gap);
}

/* ── ≥1800: тот же состав, больше данных (P10). Меняются только -size/-lh и раскладка ── */
@media (min-width:1800px){
  :root{
    --type-money-hero-size: 52px; --type-money-hero-lh: 56px;
    --type-money-large-size: 34px; --type-money-large-lh: 40px;
    --type-page-title-size: 28px; --type-page-title-lh: 34px;
    --type-verdict-size: 17px; --type-verdict-lh: 24px;
    --type-section-title-size: 20px; --type-section-title-lh: 28px;
    --type-body-large-size: 16px; --type-body-large-lh: 24px;
    --type-label-size: 14px; --type-label-lh: 20px;
    --type-table-size: 15.5px; --type-table-lh: 22px;
    --type-money-size: 15.5px; --type-money-lh: 22px;
    --layout-gutter: 40px;
    --layout-gap: 24px;
    --layout-sidebar: 256px;
    --layout-sidebar-rail: 56px;
    --layout-rail: 440px;
    --layout-inspector: 420px;
    --layout-table-min: 720px;
    --layout-ctxbar-h: 56px;
    --layout-mobile-bar: 0px;
    --layout-content-max: 1760px;
    --density-standard-row: 46px;
    --density-compact-row: 36px;
  }
}

/* ── телефон (<768). Шкала ВЫВЕДЕНА правилом, а не нарисована: см. tokens.src.mjs (M1/M2/M3) и DESIGN-SYSTEM-V2.3.md ── */
@media (max-width:767px){
  :root{
    --type-money-hero-size: 40px; --type-money-hero-lh: 44px;
    --type-money-large-size: 26px; --type-money-large-lh: 32px;
    --type-display-size: 26px; --type-display-lh: 32px;
    --type-page-title-size: 22px; --type-page-title-lh: 28px;
    --type-verdict-size: 16px; --type-verdict-lh: 22px;
    --type-section-title-size: 18px; --type-section-title-lh: 26px;
    --type-subsection-size: 15px; --type-subsection-lh: 22px;
    --type-body-large-size: 15px; --type-body-large-lh: 22px;
    --type-body-size: 14px; --type-body-lh: 20px;
    --type-item-title-size: 14.5px; --type-item-title-lh: 20px;
    --type-label-size: 13.5px; --type-label-lh: 19px;
    --type-meta-size: 13px; --type-meta-lh: 18px;
    --type-caption-size: 12.5px; --type-caption-lh: 18px;
    --type-caption-strong-size: 12.5px; --type-caption-strong-lh: 18px;
    --type-table-size: 14.5px; --type-table-lh: 20px;
    --type-table-head-size: 12.5px; --type-table-head-lh: 16px;
    --type-money-size: 14.5px; --type-money-lh: 20px;
    --type-report-size: 14px; --type-report-lh: 20px;
    --type-nav-size: 14px; --type-nav-lh: 20px;
    --type-button-size: 15px; --type-button-lh: 20px;
    --type-button-sm-size: 14px; --type-button-sm-lh: 18px;
    --type-button-xs-size: 13px; --type-button-xs-lh: 16px;
    --type-micro-size: 12px; --type-micro-lh: 16px;
    --layout-gutter: 16px;
    --layout-gap: 12px;
    --layout-sidebar: 0px;
    --layout-sidebar-rail: 0px;
    --layout-rail: 100%;
    --layout-inspector: 100vw;
    --layout-table-min: 0px;
    --layout-ctxbar-h: 60px;
    --layout-mobile-bar: 60px;
    --layout-content-max: 100%;
    --row-height: 52px; --header-height: 40px; --control-height: var(--control-touch); --cell-padding-x: var(--space-6); --panel-padding: var(--space-6); --table-font-size: var(--type-body-large-size); --hit-area: var(--control-touch);
  }
}

[data-density=comfortable]{--row-height: var(--density-comfortable-row); --header-height: var(--density-comfortable-header); --control-height: var(--density-comfortable-input); --cell-padding-x: var(--density-comfortable-cell-px); --panel-padding: var(--density-comfortable-panel); --table-font-size: var(--density-comfortable-font); --hit-area: var(--density-comfortable-hit); --group-height: var(--density-comfortable-group); --page-head-gap: var(--density-comfortable-head-gap)}
[data-density=standard]{--row-height: var(--density-standard-row); --header-height: var(--density-standard-header); --control-height: var(--density-standard-input); --cell-padding-x: var(--density-standard-cell-px); --panel-padding: var(--density-standard-panel); --table-font-size: var(--density-standard-font); --hit-area: var(--density-standard-hit); --group-height: var(--density-standard-group); --page-head-gap: var(--density-standard-head-gap)}
[data-density=compact]{--row-height: var(--density-compact-row); --header-height: var(--density-compact-header); --control-height: var(--density-compact-input); --cell-padding-x: var(--density-compact-cell-px); --panel-padding: var(--density-compact-panel); --table-font-size: var(--density-compact-font); --hit-area: var(--density-compact-hit); --group-height: var(--density-compact-group); --page-head-gap: var(--density-compact-head-gap)}
@media (prefers-reduced-motion: reduce){*,*::before,*::after{transition-duration:0ms!important;animation-duration:0ms!important;scroll-behavior:auto!important}}

/* ── V2.2-совместимость
   Размерные токены V1, значения которых V2.3 изменил (control-lg 44→40, touch 48→44, radius-lg 10→12…) и шрифтовые роли (label 13→13.5, caption 12→12.5, money 500→600…). Слои V2.2 (public/ds/components.css, legacy-bridge.css)
   берут их отсюда и держат прежнюю геометрию (оболочка V2.2: полоса значков 56 px, шапка 56 px — проверка e2e/90); слой V2.3 их не использует. Значения — из docs/design/v2.2/tokens.css. */
:root{
  --v22-control-xs: 26px;
  --v22-control-md: 36px;
  --v22-control-lg: 44px;
  --v22-control-touch: 48px;
  --v22-icon-lg: 20px;
  --v22-icon-xl: 24px;
  --v22-radius-lg: 10px;
  --v22-type-label: 500 13px/18px var(--font-family-ui);
  --v22-type-caption: 400 12px/16px var(--font-family-ui);
  --v22-type-micro: 500 11px/14px var(--font-family-ui);
  --v22-type-money: 500 14px/20px var(--font-family-ui);
  --v22-type-table: 400 14px/20px var(--font-family-ui);
  --v22-type-section-title: 600 15px/22px var(--font-family-ui);
  --v22-type-subsection: 600 17px/24px var(--font-family-ui);
  --v22-type-page-title: 600 22px/28px var(--font-family-ui);
  --v22-type-money-large: 600 24px/32px var(--font-family-ui);
  --v22-type-money-hero: 600 40px/48px var(--font-family-ui);
}
