/* riderOK: система оформления. Все цвета, отступы, радиусы, тени и размеры шрифта — здесь, в переменных.
   Две темы: светлая (по умолчанию) и тёмная. Тёмная включается системой (prefers-color-scheme)
   или выбором в «Настройках» (data-theme="dark" / "light" на <html>). */

@font-face { font-family: "Inter"; font-weight: 100 900; font-display: swap;
  src: url("/fonts/inter-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-weight: 100 900; font-display: swap;
  src: url("/fonts/inter-latin-wght-normal.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 {
  color-scheme: light;
  /* шрифты и размеры */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --fs-xs: 12px; --fs-sm: 14px; --fs-md: 16px; --fs-lg: 18px; --fs-xl: 22px; --fs-2xl: 28px; --fs-3xl: 34px;
  /* отступы */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
  /* радиусы */
  --r-sm: 8px; --r-md: 10px; --r-lg: 12px; --r-pill: 999px;
  /* высота кнопок и полей: на телефоне не меньше 44 px */
  --tap: 44px;

  /* цвета: светлая тема */
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f2f5;
  --hover: #f4f5f8;
  --border: #e4e6eb;
  --border-strong: #cdd1d9;
  --text: #15171c;
  --text-2: #444a58;
  --muted: #5f6675;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-fg: #ffffff;
  --accent-soft: #eceefe;
  --accent-text: #4338ca;
  --danger: #c4281c;
  --danger-soft: #fdecea;
  --focus: #6366f1;
  /* статусы: фон / текст / рамка */
  --st-ok-bg: #e7f6ec;      --st-ok-fg: #05603a;      --st-ok-bd: #a6dbbd;
  --st-warn-bg: #fff4d6;    --st-warn-fg: #8a4500;    --st-warn-bd: #f0cf7d;
  --st-bad-bg: #fde7e5;     --st-bad-fg: #a8231a;     --st-bad-bd: #f2b4af;
  --st-info-bg: #e5efff;    --st-info-fg: #1849a9;    --st-info-bd: #a9c6f5;
  --st-none-bg: #eceef2;    --st-none-fg: #4b5160;    --st-none-bd: #d3d7de;
  /* тени */
  --shadow-sm: 0 1px 2px rgb(16 24 40 / .05);
  --shadow-md: 0 4px 12px -2px rgb(16 24 40 / .08), 0 2px 4px -2px rgb(16 24 40 / .05);
  --shadow-lg: 0 16px 32px -8px rgb(16 24 40 / .16);
  --header-bg: rgb(246 247 249 / .86);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d0e11;
    --surface: #15171c;
    --surface-2: #1c1f26;
    --hover: #1a1d23;
    --border: #272b34;
    --border-strong: #3a404c;
    --text: #eceef2;
    --text-2: #b9bfcb;
    --muted: #949bab;
    --accent: #5a5de8;
    --accent-hover: #4f52e0;
    --accent-fg: #ffffff;
    --accent-soft: #23254a;
    --accent-text: #a5a8ff;
    --danger: #ff8a80;
    --danger-soft: #3a1b19;
    --focus: #8b8ef7;
    --st-ok-bg: #11301f;      --st-ok-fg: #7ee0a5;      --st-ok-bd: #1f5a3a;
    --st-warn-bg: #3a2c0b;    --st-warn-fg: #f6c767;    --st-warn-bd: #6b4f14;
    --st-bad-bg: #3d1816;     --st-bad-fg: #ff9d95;     --st-bad-bd: #7a2b26;
    --st-info-bg: #14284d;    --st-info-fg: #8fb8ff;    --st-info-bd: #2a4c88;
    --st-none-bg: #23262e;    --st-none-fg: #b0b6c3;    --st-none-bd: #3a3f4a;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
    --shadow-md: 0 4px 12px -2px rgb(0 0 0 / .5);
    --shadow-lg: 0 16px 32px -8px rgb(0 0 0 / .6);
    --header-bg: rgb(13 14 17 / .86);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0e11;
  --surface: #15171c;
  --surface-2: #1c1f26;
  --hover: #1a1d23;
  --border: #272b34;
  --border-strong: #3a404c;
  --text: #eceef2;
  --text-2: #b9bfcb;
  --muted: #949bab;
  --accent: #5a5de8;
  --accent-hover: #4f52e0;
  --accent-fg: #ffffff;
  --accent-soft: #23254a;
  --accent-text: #a5a8ff;
  --danger: #ff8a80;
  --danger-soft: #3a1b19;
  --focus: #8b8ef7;
  --st-ok-bg: #11301f;      --st-ok-fg: #7ee0a5;      --st-ok-bd: #1f5a3a;
  --st-warn-bg: #3a2c0b;    --st-warn-fg: #f6c767;    --st-warn-bd: #6b4f14;
  --st-bad-bg: #3d1816;     --st-bad-fg: #ff9d95;     --st-bad-bd: #7a2b26;
  --st-info-bg: #14284d;    --st-info-fg: #8fb8ff;    --st-info-bd: #2a4c88;
  --st-none-bg: #23262e;    --st-none-fg: #b0b6c3;    --st-none-bd: #3a3f4a;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
  --shadow-md: 0 4px 12px -2px rgb(0 0 0 / .5);
  --shadow-lg: 0 16px 32px -8px rgb(0 0 0 / .6);
  --header-bg: rgb(13 14 17 / .86);
}

/* Печать и «Сохранить как PDF»: всегда светлая тема, какая бы ни была выбрана */
@media print {
  :root, :root:not([data-theme="light"]), :root[data-theme="dark"] {
    color-scheme: light;
    --bg: #ffffff; --surface: #ffffff; --surface-2: #f1f2f5; --hover: #ffffff;
    --border: #d5d8df; --border-strong: #b4b9c4; --text: #111318; --text-2: #333844; --muted: #4f5563;
    --accent: #4f46e5; --accent-fg: #ffffff; --accent-soft: #eceefe; --accent-text: #4338ca; --danger: #c4281c;
    --st-ok-bg: #e7f6ec; --st-ok-fg: #05603a; --st-ok-bd: #a6dbbd;
    --st-warn-bg: #fff4d6; --st-warn-fg: #8a4500; --st-warn-bd: #f0cf7d;
    --st-bad-bg: #fde7e5; --st-bad-fg: #a8231a; --st-bad-bd: #f2b4af;
    --st-info-bg: #e5efff; --st-info-fg: #1849a9; --st-info-bd: #a9c6f5;
    --st-none-bg: #eceef2; --st-none-fg: #4b5160; --st-none-bd: #d3d7de;
    --shadow-sm: none; --shadow-md: none; --shadow-lg: none;
  }
}
