/* DentMate — токены дизайна (источник: assets/design-tokens.json, docs/brand-guidelines.md).
   Имя бренда в токенах не встречается. Тёмная тема — полноценная, не инверсия. */
/* Шрифты локально (OFL): Inter, JetBrains Mono, Source Serif 4. Без обращений к Google Fonts (GDPR). */
/* Inter · cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/Inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* Inter · latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/Inter-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Inter · latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/Inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* JetBrains Mono · cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/JetBrainsMono-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* JetBrains Mono · latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/JetBrainsMono-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* JetBrains Mono · latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/JetBrainsMono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Source Serif 4 · cyrillic */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/SourceSerif4-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* Source Serif 4 · latin-ext */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/SourceSerif4-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Source Serif 4 · latin */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/SourceSerif4-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font-display: 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --bg: #FAF9F7;
  --bg-subtle: #F3F1EC;
  --surface: #FFFFFF;
  --surface-2: #FFFFFF;
  --surface-sunken: #F3F1EC;
  --text: #16181A;
  --text-muted: #6B665F;
  --text-subtle: #5C5852;
  --border: #E7E3DB;
  --border-strong: #D9D4CA;
  --border-control: #8C867D;
  --accent: #1D5249;
  --accent-hover: #256A5E;
  --on-accent: #FFFFFF;
  --accent-tint: #DCEEE8;
  --accent-tint-2: #EDF6F3;
  --value: #8A5A12;
  --value-tint: #F6EBD6;
  --success: #1E7A4F;
  --success-tint: #E1F1E8;
  --warning: #9A3412;
  --warning-tint: #FBE9DF;
  --info: #2D5C8A;
  --info-tint: #E3ECF5;
  --danger: #B42318;
  --danger-tint: #FBE4E1;
  --on-danger: #FFFFFF;
  --focus: #1D5249;
  --disabled: #A8A29A;
  --scrim: rgba(14, 16, 17, 0.45);

  --e1: 0 1px 2px rgba(22,24,26,0.06);
  --e2: 0 4px 16px rgba(22,24,26,0.08);
  --e3: 0 12px 40px rgba(22,24,26,0.12);
  --ring-card: 0 0 0 1px rgba(22,24,26,0.05);

  --r-sm: 8px; --r-md: 12px; --r-lg: 20px; --r-pill: 999px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  --d-instant: 100ms; --d-fast: 160ms; --d-base: 240ms; --d-slow: 360ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-enter: cubic-bezier(0, 0, 0.2, 1);
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --ease-spring: cubic-bezier(0.34, 1.2, 0.64, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1011; --bg-subtle: #16181A; --surface: #1C1F21; --surface-2: #25292B; --surface-sunken: #16181A;
    --text: #ECEAE5; --text-muted: #A19C94; --text-subtle: #A19C94;
    --border: #34393C; --border-strong: #3F4548; --border-control: #6E7478;
    --accent: #8CCBBB; --accent-hover: #DCEEE8; --on-accent: #0E1011;
    --accent-tint: #1D3A35; --accent-tint-2: #182A27;
    --value: #E6B96A; --value-tint: #3A2E18;
    --success: #6FCF97; --success-tint: #17302A; --warning: #F0A35E; --warning-tint: #3A2617;
    --info: #8DB8E8; --info-tint: #1B2A3A; --danger: #F97066; --danger-tint: #3D1C1A; --on-danger: #0E1011;
    --focus: #8CCBBB; --disabled: #4A5053; --scrim: rgba(0,0,0,0.6);
    --e1: none; --e2: none; --e3: 0 12px 40px rgba(0,0,0,0.5); --ring-card: 0 0 0 1px #2B3033;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1011; --bg-subtle: #16181A; --surface: #1C1F21; --surface-2: #25292B; --surface-sunken: #16181A;
  --text: #ECEAE5; --text-muted: #A19C94; --text-subtle: #A19C94;
  --border: #34393C; --border-strong: #3F4548; --border-control: #6E7478;
  --accent: #8CCBBB; --accent-hover: #DCEEE8; --on-accent: #0E1011;
  --accent-tint: #1D3A35; --accent-tint-2: #182A27;
  --value: #E6B96A; --value-tint: #3A2E18;
  --success: #6FCF97; --success-tint: #17302A; --warning: #F0A35E; --warning-tint: #3A2617;
  --info: #8DB8E8; --info-tint: #1B2A3A; --danger: #F97066; --danger-tint: #3D1C1A; --on-danger: #0E1011;
  --focus: #8CCBBB; --disabled: #4A5053; --scrim: rgba(0,0,0,0.6);
  --e1: none; --e2: none; --e3: 0 12px 40px rgba(0,0,0,0.5); --ring-card: 0 0 0 1px #2B3033;
  color-scheme: dark;
}

/* Палитра-кандидат Plum (сравнение с Kelp до Р25): ?palette=plum, запоминается в localStorage dm-palette.
   Светлота и роли — как у Kelp, тон сливовый (OKLCH h≈322). Brass, статусы и нейтральные не меняются. */
:root[data-palette="plum"] {
  --accent: #4A2A4F; --accent-hover: #613A66; --on-accent: #FFFFFF;
  --accent-tint: #F2E4F4; --accent-tint-2: #F8F1F9; --focus: #4A2A4F;
}
@media (prefers-color-scheme: dark) {
  :root[data-palette="plum"]:not([data-theme="light"]) {
    --accent: #CFB0D3; --accent-hover: #F2E4F4; --on-accent: #0E1011;
    --accent-tint: #3F2C42; --accent-tint-2: #2D212F; --focus: #CFB0D3;
  }
}
:root[data-palette="plum"][data-theme="dark"] {
  --accent: #CFB0D3; --accent-hover: #F2E4F4; --on-accent: #0E1011;
  --accent-tint: #3F2C42; --accent-tint-2: #2D212F; --focus: #CFB0D3;
}
:root[data-palette="plum"] { --toast-accent: #CFB0D3; }
