/* tokens.css — палитра, шрифты, каркас. Значения из §4 методички. */

/* ── Шрифты: лежат в самом портале, извне ничего не грузится ── */
@font-face {
  font-family: 'Onest';
  src: url('../fonts/Onest.ttf');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono.ttf');
  font-weight: 100 800;
  font-display: swap;
}

:root {
  /* Каркас */
  --navbar-h: 60px;   /* шапка */
  --side-w: 224px;    /* меню слева */
  --side-cw: 62px;    /* меню свёрнутое */
  --ctrl-h: 32px;     /* высота контролов */

  /* Скругления */
  --r-btn: 9px;  --r-btn-sm: 7px;
  --r-card: 14px; --r-tile: 11px; --r-badge: 6px;

  /* Шрифтовые стеки */
  --font-sans: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* ── Светлая тема ── */
  --background:            44 33% 95%;
  --foreground:            220 18% 7%;
  --card:                  0 0% 100%;
  --card-foreground:       220 18% 7%;
  --popover:               0 0% 100%;
  --popover-foreground:    220 18% 7%;
  --primary:               17 86% 53%;
  --primary-foreground:    0 0% 100%;
  --secondary:             44 28% 90%;
  --secondary-foreground:  220 18% 7%;
  --muted:                 44 28% 90%;
  --muted-foreground:      219 12% 34%;
  --accent:                22 80% 92%;
  --accent-foreground:     17 86% 45%;
  --destructive:           15 90% 41%;
  --destructive-foreground:0 0% 100%;
  --border:                44 23% 87%;
  --input:                 44 23% 87%;
  --ring:                  17 86% 53%;
  --side-bg:               220 18% 7%;

  /* Статусы */
  --ok: 154 63% 33%;  --warn: 35 87% 42%;  --bad: 15 90% 41%;
  /* Метки */
  --blue: 213 45% 40%;  --purple: 236 48% 48%;  --teal: 176 60% 28%;
}

/* ── Тёмная тема: класс .dark вешается на <html> кнопкой-солнышком ── */
.dark {
  --background: 38 13% 7%;
  --foreground: 45 35% 93%;
  --card: 40 18% 10%;
  --card-foreground:       44 30% 93%;
  --popover: 40 18% 10%;
  --popover-foreground:    44 30% 93%;
  --primary: 18 88% 56%;
  --primary-foreground: 30 30% 8%;
  --secondary: 38 20% 13%;
  --secondary-foreground:  44 30% 93%;
  --muted: 38 20% 13%;
  --muted-foreground: 42 12% 66%;
  --accent: 30 22% 14%;
  --accent-foreground:     22 90% 78%;
  --destructive: 11 80% 59%;
  --destructive-foreground:0 0% 100%;
  --border: 39 17% 16%;
  --input: 39 17% 16%;
  --ring: 18 88% 56%;
  --side-bg: 38 22% 5%;

  /* Статусы и метки — светлее, чтобы читались на тёмном */
  --ok: 152 47% 52%;  --warn: 40 71% 55%;  --bad: 11 80% 59%;
  --blue: 213 60% 62%;  --purple: 236 60% 70%;  --teal: 176 55% 45%;
}
