/* Экстрабас · Автопарк — шрифты и цветовые токены.
   Общий файл для всех разделов: хаба, «Расхода топлива» и «Сервисного графика».
   Тема задаётся атрибутом data-theme на <html> (light | dark); его ставит
   скрипт в <head> до отрисовки — по выбору пользователя или по системе.
   Шрифты лежат рядом (static/fonts), интернет на сервере не нужен.
   Inter и IBM Plex Mono — лицензия SIL OFL (тексты в static/fonts). */

/* ---------- шрифты ---------- */
@font-face { font-family: 'Inter Variable'; font-style: normal; font-display: swap; font-weight: 100 900; src: url('fonts/inter-cyrillic-wght-normal.woff2') format('woff2-variations'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Inter Variable'; font-style: normal; font-display: swap; font-weight: 100 900; src: url('fonts/inter-latin-ext-wght-normal.woff2') format('woff2-variations'); 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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Inter Variable'; font-style: normal; font-display: swap; font-weight: 100 900; src: url('fonts/inter-latin-wght-normal.woff2') format('woff2-variations'); 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: 'IBM Plex Mono'; font-style: normal; font-display: swap; font-weight: 500; src: url('fonts/ibm-plex-mono-cyrillic-500-normal.woff2') format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-display: swap; font-weight: 500; src: url('fonts/ibm-plex-mono-latin-ext-500-normal.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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-display: swap; font-weight: 500; src: url('fonts/ibm-plex-mono-latin-500-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; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-display: swap; font-weight: 600; src: url('fonts/ibm-plex-mono-cyrillic-600-normal.woff2') format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-display: swap; font-weight: 600; src: url('fonts/ibm-plex-mono-latin-ext-600-normal.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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-display: swap; font-weight: 600; src: url('fonts/ibm-plex-mono-latin-600-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; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-display: swap; font-weight: 700; src: url('fonts/ibm-plex-mono-cyrillic-700-normal.woff2') format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-display: swap; font-weight: 700; src: url('fonts/ibm-plex-mono-latin-ext-700-normal.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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-display: swap; font-weight: 700; src: url('fonts/ibm-plex-mono-latin-700-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;
  --paper:#edf1f5; --card:#ffffff; --panel:#f5f7fa; --hover:#edf1f6;
  --line:#d9e1ea; --line-2:#e8edf3; --line-strong:#bfcbd8; --field:#8fa1b3;
  --ink:#0f1c2e; --ink-2:#33465c; --muted:#596a7f; --faint:#8797aa;
  --brand:#1d4e89; --brand-ink:#173f70; --brand-wash:#e2ecf7; --on-brand:#ffffff;
  /* статусы: текст, подложка, рамка, тёмный текст сообщений, заливка шкал */
  --ok:#14633a;    --ok-wash:#e4f3ea;    --ok-line:#b4d8c2;    --ok-ink:#0f4a2b;
  --watch:#7a4f00; --watch-wash:#f9efd9; --watch-line:#e3b768; --watch-ink:#5c3b00;
  --due:#9a420a;   --due-wash:#fde6d3;   --due-line:#efb98f;   --due-ink:#6f2e05;
  --alert:#a3241b; --alert-wash:#fbe4e2; --alert-line:#f0b7b0; --alert-ink:#6e140e;
  --info:#33465c;  --info-wash:#e9eef4;  --info-line:#cbd6e2;
  --bar-ok:#2f9e63; --bar-watch:#d39a2a; --bar-due:#e0752a; --bar-alert:#d23b3b; --track:#e3e9ed;
  /* те же цвета статусов под другими именами — для страницы графика,
     где --ok/--due означают заливку, а не текст */
  --t-ok:#14633a; --t-watch:#7a4f00; --t-due:#9a420a; --t-alert:#a3241b;
  --plate:#ffffff; --plate-ink:#111a20;
  --hdr:#ffffff;
  --inv-bg:#0f1c2e; --inv-ink:#ffffff; --inv-muted:#9fb0ba;
  --scrim:rgba(17,26,32,.45);
  --shadow:0 1px 2px rgba(17,26,32,.05),0 8px 28px -14px rgba(17,26,32,.20);
  --shadow-lg:0 24px 60px -24px rgba(17,26,32,.45);
  --chart-norm:#5b6b77;
  --sans:'Inter Variable','Inter',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --mono:'IBM Plex Mono',ui-monospace,Consolas,'Courier New',monospace;
  --r:14px; --r-s:10px;
  /* имена из прежних версий шаблонов */
  --diesel:var(--brand); --slate:var(--ink-2); --mute:var(--muted);
}

/* ---------- тёмная тема ---------- */
:root[data-theme="dark"]{
  color-scheme:dark;
  --paper:#0a1220; --card:#101a2b; --panel:#142036; --hover:#17253d;
  --line:#22324a; --line-2:#1a283d; --line-strong:#33465f; --field:#4a5d78;
  --ink:#e4ecf6; --ink-2:#b4c3d6; --muted:#8a9bb2; --faint:#62738c;
  --brand:#3368b8; --brand-ink:#9cc4f5; --brand-wash:#132c4a; --on-brand:#ffffff;
  --ok:#7ad8a4;    --ok-wash:#0f2b1d;    --ok-line:#1f5a3b;    --ok-ink:#b6ecd0;
  --watch:#efc36c; --watch-wash:#2d230c; --watch-line:#6b5115; --watch-ink:#f5d89a;
  --due:#f7a86a;   --due-wash:#33200f;   --due-line:#73431c;   --due-ink:#fbcda6;
  --alert:#ff9289; --alert-wash:#381716; --alert-line:#7a2f2a; --alert-ink:#ffc2bc;
  --info:#b4c3d6;  --info-wash:#142036;  --info-line:#2a3d57;
  --bar-ok:#3fbf7f; --bar-watch:#e0ab45; --bar-due:#ef8b40; --bar-alert:#f0635a; --track:#24313a;
  --t-ok:#7ad8a4; --t-watch:#efc36c; --t-due:#f7a86a; --t-alert:#ff9289;
  --plate:#e6ecef; --plate-ink:#0c1115;
  --hdr:#0c1627;
  --inv-bg:#22324a; --inv-ink:#ffffff; --inv-muted:#b3c1ca;
  --scrim:rgba(0,0,0,.6);
  --shadow:0 1px 2px rgba(0,0,0,.3),0 12px 32px -18px rgba(0,0,0,.8);
  --shadow-lg:0 24px 60px -20px rgba(0,0,0,.85);
  --chart-norm:#8d9eaa;
}
