/* =========================================================
   МелМК — дизайн-токены (имена переменных сохранены)
   ========================================================= */

/* Manrope — латиница + кириллица (локально) */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-cyr-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-cyr-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  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;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-cyr-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  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;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-cyr-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  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;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-display: "Manrope", "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --touch: 44px;
  --header-h: 64px;
  --nav-h: 72px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  --shadow-sm: 0 2px 8px rgb(79 70 229 / 6%), 0 1px 2px rgb(15 23 42 / 4%);
  --shadow-md: 0 12px 32px rgb(79 70 229 / 12%), 0 4px 12px rgb(15 23 42 / 6%);
  --shadow-glow: 0 0 0 4px rgb(99 102 241 / 18%), 0 8px 28px rgb(14 165 233 / 20%);
  --transition: 220ms cubic-bezier(0.22, 1, 0.36, 1);

  --bg: #f4f1fb;
  --bg-elev: #fffcff;
  --bg-muted: #ebe6f7;
  --text: #1e1433;
  --text-muted: #6b6280;
  --border: #ddd4f0;
  --accent: #5b4dff;
  --accent-hover: #4739e8;
  --accent-soft: #e8e4ff;
  --accent-2: #0ea5e9;
  --accent-3: #ec4899;
  --danger: #e11d48;
  --warn: #d97706;
  --success: #059669;
  --now: #5b4dff;
  --next: #0ea5e9;
  --changed: #fff1f7;
  --type-lecture: #5b4dff;
  --type-practice: #0ea5e9;
  --type-lab: #d97706;
  --type-exam: #e11d48;
  --type-consult: #a855f7;
  --type-other: #6b6280;
  --overlay: rgb(30 20 51 / 48%);
  --focus: #5b4dff;
  --glass: rgb(255 252 255 / 72%);
  --glass-border: rgb(255 255 255 / 55%);
  --hero-grad: linear-gradient(135deg, #5b4dff 0%, #7c3aed 45%, #0ea5e9 100%);
  --surface-grad: linear-gradient(180deg, #fffcff 0%, #f7f4ff 100%);
  --theme-color: #5b4dff;
}

[data-theme="dark"] {
  --bg: #0b1020;
  --bg-elev: #151b2e;
  --bg-muted: #1e2640;
  --text: #eef1ff;
  --text-muted: #9aa3c7;
  --border: #2a3352;
  --accent: #8b7cff;
  --accent-hover: #a59bff;
  --accent-soft: #23204a;
  --accent-2: #38bdf8;
  --accent-3: #f472b6;
  --danger: #fb7185;
  --warn: #fbbf24;
  --success: #34d399;
  --now: #8b7cff;
  --next: #38bdf8;
  --changed: #3a1f33;
  --type-lecture: #a5b4fc;
  --type-practice: #38bdf8;
  --type-lab: #fbbf24;
  --type-exam: #fb7185;
  --type-consult: #d8b4fe;
  --type-other: #9aa3c7;
  --overlay: rgb(4 8 20 / 62%);
  --focus: #8b7cff;
  --glass: rgb(21 27 46 / 72%);
  --glass-border: rgb(255 255 255 / 8%);
  --hero-grad: linear-gradient(135deg, #4338ca 0%, #6d28d9 50%, #0284c7 100%);
  --surface-grad: linear-gradient(180deg, #151b2e 0%, #111827 100%);
  --theme-color: #4338ca;
  --shadow-sm: 0 2px 10px rgb(0 0 0 / 35%);
  --shadow-md: 0 16px 40px rgb(0 0 0 / 45%);
  --shadow-glow: 0 0 0 4px rgb(139 124 255 / 22%), 0 10px 32px rgb(56 189 248 / 18%);
}
