/* tokens.css — единые дизайн-токены локальных инструментов данных. v2 (2026-08-12)
   Светлые темы only. Имена существующих токенов не менять — только добавление.
   Применение: SerpWatcher, Вебмастер-монитор, CourtDesk, PDFtoText, CourtPulse. */

:root,
[data-theme="light"] {
  color-scheme: light;

  /* поверхности */
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f5;
  --border: #e3e6ea;
  --border-strong: #d0d5db;

  /* текст */
  --text: #1a1d21;
  --text-2: #5c6570;
  --text-3: #9aa3ad;

  /* акцент, ссылки */
  --accent: #2563eb;
  --accent-soft: #e8effd;
  --accent-hover: #1d4ed8;
  --link: var(--accent);
  --link-hover: var(--accent-hover);

  /* семантика */
  --good: #16a34a;  --good-soft: #ecfdf5;
  --bad: #dc2626;   --bad-soft: #fef2f2;
  --warn: #d97706;  --warn-soft: #fffbeb;
  --info: #0891b2;  --info-soft: #ecfeff;
  --neutral: #6b7280; --neutral-soft: #f3f4f6;

  /* типы запросов (комм. — хардкод, зафиксирован) */
  --type-kom: #1e3a8a;
  --type-info: #065f46;
  --type-lok: #9a3412;

  /* таблицы */
  --table-head-bg: #f1f3f5;
  --table-stripe: #fafbfc;
  --table-row-hover: #f1f3f5;
  --table-row-selected: #e8effd;
  --table-row-selected-border: #2563eb;
  --hover: #f1f3f5;

  /* фильтры/чипы */
  --chip-bg: #f1f3f5;
  --chip-active-bg: #e8effd;
  --chip-active-text: #1d4ed8;

  /* инстанции судов (CourtDesk) */
  --court-raion: #4338ca; --court-raion-soft: #eef2ff;
  --court-mir: #0f766e;   --court-mir-soft: #f0fdfa;
  --court-apel: #6d28d9;  --court-apel-soft: #f5f3ff;
  --court-kass: #be185d;  --court-kass-soft: #fdf2f8;

  /* статусы доступности (CourtPulse) — алиасы семантики */
  --st-ok: var(--good);        --st-ok-soft: var(--good-soft);
  --st-banned: var(--bad);     --st-banned-soft: var(--bad-soft);
  --st-dns: var(--neutral);    --st-dns-soft: var(--neutral-soft);
  --st-timeout: var(--warn);   --st-timeout-soft: var(--warn-soft);

  /* шрифты */
  --font-main: "Segoe UI", system-ui, Roboto, Arial, sans-serif;
  --font-mono: "Cascadia Mono", Consolas, "JetBrains Mono", monospace;
  --font-serif: Georgia, "Times New Roman", serif;
  --font: var(--font-main);

  /* геометрия */
  --r-s: 6px; --r-m: 8px; --r-l: 12px; --r-pill: 999px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;
  --shadow-s: 0 1px 2px rgb(0 0 0 / .05);
  --shadow-m: 0 2px 10px rgb(0 0 0 / .08);
  --focus-ring: 0 0 0 3px rgb(37 99 235 / .25);
  --backdrop: rgb(26 29 33 / .35);
  --dur: 180ms;
  --nav-h: 48px;
}

[data-theme="shtil"] {
  --bg: #eef2f6;
  --accent: #0e7490;
  --accent-soft: #e0eff4;
  --accent-hover: #155e75;
  --type-kom: #155e75;
  --type-info: #0e6440;
  --type-lok: #92400e;
  --table-row-selected: #e0eff4;
  --table-row-selected-border: #0e7490;
  --chip-active-bg: #e0eff4;
  --chip-active-text: #0e7490;
  --focus-ring: 0 0 0 3px rgb(14 116 144 / .25);
}

/* масштаб: fs-1..fs-5 */
:root, [data-scale="m"] { --fs-1: 12px; --fs-2: 13px; --fs-3: 14px; --fs-4: 16px; --fs-5: 20px; }
[data-scale="s"]        { --fs-1: 11px; --fs-2: 12px; --fs-3: 13px; --fs-4: 15px; --fs-5: 18px; }
[data-scale="l"]        { --fs-1: 13px; --fs-2: 14px; --fs-3: 16px; --fs-4: 18px; --fs-5: 24px; }

/* шрифтовая схема */
[data-font="mono"]    { --font: var(--font-mono); }
[data-font="antiqua"] { --font: var(--font-serif); }

/* минимум базы, чтобы tokens.css был самодостаточен */
body {
  margin: 0;
  font: 400 var(--fs-3)/1.45 var(--font);
  color: var(--text);
  background: var(--bg);
}
.num, td.num { font-variant-numeric: tabular-nums; text-align: right; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-s); }
