/* «Траектория» — визуальный слой поверх app.css, forms.css и shell.css.
   Подключается последним и перестраивает весь сайт без правки шаблонов.

   Идея: трамплин — это прыжок, а Петропавловск — северный снежный город. Одна примета —
   золотая кривая траектории (логотип, главный экран, индикаторы прогресса). Всё остальное
   спокойное: снежный фон, белые поверхности, ночной синий текст, синий цвет действий.

   Цвета: снег #F4F7FA, поверхность #FFFFFF, ночь #13213A, прыжок #2453E8,
   берёзовое золото #F2B21B, ель #127A55, рябина #C4401F.
   Шрифт: Onest (есть все казахские буквы). Моноширинный — только для кодов и клавиш.
   Скругления по иерархии: крупные блоки 20px, кнопки и поля 12px, метки — пилюли. */

:root {
  --bg: #f4f7fa;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --ink: #13213a;
  --muted: #586880;
  --faint: #a7b3c3;
  --line: #dfe6ee;
  --field: #c8d2de;
  --panel: #eef2f7;
  --accent: #2453e8;
  --accent-ink: #1a3fb8;
  --accent-soft: #e8eeff;
  --on-accent: #ffffff;
  --gold: #f2b21b;
  --gold-soft: #fff4d6;
  --gold-ink: #7a5400;
  --ok: #127a55;
  --ok-soft: #e3f4ec;
  --warn: #c4401f;
  --warn-soft: #fcebe5;
  --f-display: "Onest", "Segoe UI", system-ui, sans-serif;
  --f-body: "Onest", "Segoe UI", system-ui, sans-serif;
  /* Моноширинный шрифт — только для кода, клавиш и номеров карт и чеков (--f-code).
     Старые подписи «ведомости» ссылались на --f-mono: теперь это основной шрифт. */
  --f-code: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --f-mono: var(--f-body);
  --r-l: 20px;
  --r-m: 12px;
  --r-s: 8px;
  --r-xs: 6px;                       /* мелкие метки, клетки сетки, пути */
  --r-xl: 28px;                      /* крупные панели-витрины: вход, ошибка, последний призыв */
  --shadow: 0 1px 2px rgba(19, 33, 58, .06), 0 18px 40px -18px rgba(19, 33, 58, .28);
  --header-h: 56px;                  /* шапка — одна строка (shell.css) */
  /* Заливка акцентом под текстом --on-accent (кнопки, бейджи, выбранные сегменты, полосы прогресса).
     В светлой теме — тот же --accent (и фирменный цвет вуза), в тёмной — своя, глубже ссылок. */
  --accent-fill: var(--accent);
  --accent-fill-ink: var(--accent-ink);
  --raised: var(--surface);          /* меню, диалоги, палитра команд — в тёмной теме на ступень светлее блоков */
  --hover: var(--surface-2);         /* подсветка пункта меню */
  --seg-on: var(--surface);          /* выбранный сегмент переключателя-пилюли */
  --seg-shadow: 0 1px 2px rgba(19, 33, 58, .12);
  --lift: 0 0 #0000;                 /* блик сверху у блоков: только в тёмной теме */
  --scrim: rgba(11, 20, 36, .5);     /* затемнение под диалогом */
  /* Ночь — фирменный цвет «Траектории», в обеих темах один: плитка логотипа, панель входа, цифры на золоте */
  --night: #13213a;
  --night-ink: #f4f7fa;
  --night-muted: #a9b7cc;
  color-scheme: light;
}
/* Тёмная тема — графит с едва заметным холодным оттенком (как шкала slate у Radix), а не насыщенный
   ночной синий. Высота показывается светлее поверхностью и тонким бликом сверху (--lift), а не тяжёлой
   тенью: фон #101114 → блоки #17181c → меню и диалоги #1f2126. Акцент разделён: --accent — мягкий
   барвинок для ссылок и акцентного текста, --accent-fill — глубокая заливка кнопок с белым текстом
   (контраст 4,98:1). Мягкие фоны статусов — полупрозрачные оттенки своего цвета поверх поверхности.
   Палитра и контрасты: docs/design/dark/README.md. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #101114; --surface: #17181c; --surface-2: #1e2025; --panel: #1e2025; --raised: #1f2126; --hover: rgba(255, 255, 255, .06);
  --ink: #ecedf0; --muted: #a3a8b2; --faint: #646a74; --line: #2a2d33; --field: #3a3e46;
  --accent: #9db0ff; --accent-ink: #bccaff; --accent-soft: rgba(116, 143, 252, .16);
  --accent-fill: #4263eb; --accent-fill-ink: #3b5bdb; --on-accent: #ffffff;
  --gold: #f5c04a; --gold-soft: rgba(245, 192, 74, .14); --gold-ink: #f7d27a;
  --ok: #4cc38a; --ok-soft: rgba(76, 195, 138, .14); --warn: #f2876a; --warn-soft: rgba(242, 135, 106, .14);
  --seg-on: #2c2f36; --seg-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 1px 2px rgba(0, 0, 0, .4);
  --lift: inset 0 1px 0 rgba(255, 255, 255, .04);
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 1px 2px rgba(0, 0, 0, .3), 0 16px 36px -18px rgba(0, 0, 0, .7);
  --scrim: rgba(5, 6, 8, .62);
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #101114; --surface: #17181c; --surface-2: #1e2025; --panel: #1e2025; --raised: #1f2126; --hover: rgba(255, 255, 255, .06);
  --ink: #ecedf0; --muted: #a3a8b2; --faint: #646a74; --line: #2a2d33; --field: #3a3e46;
  --accent: #9db0ff; --accent-ink: #bccaff; --accent-soft: rgba(116, 143, 252, .16);
  --accent-fill: #4263eb; --accent-fill-ink: #3b5bdb; --on-accent: #ffffff;
  --gold: #f5c04a; --gold-soft: rgba(245, 192, 74, .14); --gold-ink: #f7d27a;
  --ok: #4cc38a; --ok-soft: rgba(76, 195, 138, .14); --warn: #f2876a; --warn-soft: rgba(242, 135, 106, .14);
  --seg-on: #2c2f36; --seg-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 1px 2px rgba(0, 0, 0, .4);
  --lift: inset 0 1px 0 rgba(255, 255, 255, .04);
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 1px 2px rgba(0, 0, 0, .3), 0 16px 36px -18px rgba(0, 0, 0, .7);
  --scrim: rgba(5, 6, 8, .62);
  color-scheme: dark; }

/* ——— Движение (REDESIGN §3.5): одни токены на весь сайт, в обеих темах одинаковые ———
   quick — наведение, нажатие, переключатели; base — меню, подсказки, раскрытие; move — шторки, панели, превью;
   camera — перелёт камеры Холста. ease-out — появление, ease-spring — небольшая упругость панелей и выделения.
   При «уменьшить движение» все времена нулевые: состояния те же, только мгновенно. */
:root {
  --t-quick: 120ms;
  --t-base: 200ms;
  --t-move: 320ms;
  --t-camera: 400ms;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.3, 1.3, .5, 1);
}
@media (prefers-reduced-motion: reduce) {
  :root { --t-quick: 0ms; --t-base: 0ms; --t-move: 0ms; --t-camera: 0ms; }
  /* Длительности, записанные числом в старых файлах, тоже гаснут */
  *, *::before, *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation-duration: 0s !important;
    animation-delay: 0s !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* ——— Шкала шрифта (REDESIGN §3.2), шаг ≈1,2. Крупный h1 (36) — у Витрины, Документа и Карточки;
   Пульт, Каталог, Холст, Мессенджер и Расписание держат компактный h1 (--fs-h3, 22) в своих файлах.
   Голый h3 — подзаголовок раздела внутри страницы (--fs-sub); класс .h3 — заголовок блока 22. ——— */
:root {
  --fs-caption: 12px;
  --fs-small: 13.5px;
  --fs-body: 15.5px;
  --fs-sub: 18px;
  --fs-h3: 22px;
  --fs-h2: 28px;
  --fs-h1: 36px;
  --fs-display: clamp(44px, 6vw, 72px);
  --lh-body: 1.55;      /* текст */
  --lh-snug: 1.3;       /* подзаголовки, подписи в две строки */
  --lh-tight: 1.1;      /* заголовки */
  --lh-display: 1;      /* витрина */
}
/* Телефон: заголовки на ступень меньше — длинные казахские слова не ломают строку */
@media (max-width: 560px) { :root { --fs-h1: 30px; --fs-h2: 24px; --fs-h3: 20px; } }

/* ——— Текст ——— */
body { font-size: var(--fs-body); line-height: var(--lh-body); font-feature-settings: "ss01"; }
h1, .h1 { font-size: var(--fs-h1); font-weight: 800; letter-spacing: -0.035em; line-height: var(--lh-tight); }
h2, .h2 { font-size: var(--fs-h2); font-weight: 750; letter-spacing: -0.02em; line-height: var(--lh-tight); }
h3 { font-size: var(--fs-sub); font-weight: 650; letter-spacing: -0.01em; line-height: var(--lh-snug); text-transform: none; }
.h3 { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; text-transform: none; }
.display { font-size: var(--fs-display); font-weight: 800; letter-spacing: -0.045em; line-height: var(--lh-display); }
.sub { font-size: var(--fs-sub); line-height: var(--lh-snug); }
.small { font-size: var(--fs-small); }
.caption { font-size: var(--fs-caption); line-height: 1.4; color: var(--muted); }
.lead { font-size: var(--fs-sub); line-height: var(--lh-body); }
/* Цифры, которые сравнивают глазами, — одной ширины: таблицы, плитки цифр, счётчики, время */
table, .kpi b, .kpis, .w-big, .score, .count, .badge, .bell-dot, time, .num { font-variant-numeric: tabular-nums; }
.eyebrow, .eyebrow.accent { font: 600 13.5px var(--f-body); letter-spacing: 0; text-transform: none; color: var(--muted); }
.eyebrow.accent { color: var(--accent); }
.code { font-family: var(--f-body); font-size: 13.5px; color: var(--muted); }
.pill { font: 600 12px var(--f-body); letter-spacing: 0; text-transform: none; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 3px 10px; }
.pill.case, .pill.ok { color: var(--accent); background: var(--accent-soft); }
.tag { font: 600 12px var(--f-body); letter-spacing: 0; text-transform: none; border-radius: 999px; padding: 3px 10px; border-color: transparent; background: var(--surface-2); }
.tag.accent { background: var(--accent-soft); border-color: transparent; }
.tag.ok { background: var(--ok-soft); border-color: transparent; }
.tag.warn { background: var(--warn-soft); border-color: transparent; }
.chip { font: 500 13.5px var(--f-body); }
.chip.hit, .chip.miss { border-radius: 999px; padding: 2px 10px; }
.chip.hit { background: var(--accent-soft); }
.chip.miss { background: var(--warn-soft); }
.chip.hit::before { content: "✓ "; } .chip.miss::before { content: "+ "; }
.chips { gap: 6px; }
.reqs { font-family: var(--f-body); font-size: 14px; }
.example { font-family: var(--f-body); border-radius: var(--r-xs); }
kbd { border-radius: 5px; }
a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
.w-foot::after { content: ""; }
.w-foot { font-weight: 600; text-decoration: none; }
.w-foot:hover { text-decoration: underline; }

/* ——— Кнопки и поля ——— */
button, .btn { border-radius: var(--r-m); font-weight: 600; background: var(--surface); border-color: var(--field); }
button:hover, a.btn:hover { border-color: var(--ink); }
button.primary, button.ai, a.btn.primary { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); }
button.primary:hover, button.ai:hover, a.btn.primary:hover { background: var(--accent-fill-ink); border-color: var(--accent-fill-ink); color: var(--on-accent); }
button.link { background: none; border-radius: 0; }
a.btn { border-radius: var(--r-m); }
input[type=search], input[type=text], input[type=number], input[type=url], input[type=email], input[type=password],
input[type=date], input[type=datetime-local], input[type=tel], input[type=month], input[type=time], input:not([type]), select, textarea {
  border-radius: var(--r-m); background: var(--surface); border-color: var(--field); }
input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: var(--faint); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 3px solid color-mix(in srgb, var(--accent) 22%, transparent); outline-offset: 0; }
input[type=checkbox], input[type=radio], input[type=range], progress { accent-color: var(--accent-fill); }
.f-check { border-radius: var(--r-m); background: var(--surface); }
.save-btn { border-radius: var(--r-m); }
.lang-switch { border-radius: 999px; overflow: hidden; background: var(--surface); }
.lang-switch button { font: 600 12.5px var(--f-body); border-radius: 0; }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }

main.wrap { padding-block: 36px 72px; }

/* ——— Блоки: белые поверхности на снежном фоне ——— */
.panel, .w, .card, .advice, .modal, .empty-state, .docs-nav, .found, .notice, .iv-block {
  border-top-width: 1px; }
.w, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 22px 24px; }
/* Тёмная тема: блоки чуть светлее фона и с бликом по верхней кромке (--lift), в светлой — без изменений */
:is(.w, .panel, .card, .kpis, .facts, .tbl-wrap, .list, .ed-sec, .editor-side, .docs-nav, .docs-cta, .w-slims, .error-page) { box-shadow: var(--lift); }
.w h2 { font: 650 14.5px var(--f-body); letter-spacing: 0; text-transform: none; color: var(--ink); }
.widgets { gap: 20px; }
.w-big { font-weight: 800; }
.w-alert { border-radius: var(--r-m); background: var(--gold-soft); color: var(--gold-ink); }
.w-alert a { color: inherit; }
.w-list li.w-kv b { font-family: var(--f-body); font-weight: 700; }
.w .kpis, .w .kpi { border: 0; }
.cards { gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px 22px; transition: border-color var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out); }
.card:hover { border-color: var(--field); box-shadow: var(--shadow); border-top-color: var(--field); }
.card.boosted { border-color: color-mix(in srgb, var(--gold) 60%, var(--line)); box-shadow: inset 0 3px 0 var(--gold); }
.card .foot { border-top: 1px solid var(--line); }
.card h2 { font-size: 21px; line-height: 1.2; }
.card-score { font-weight: 800; }
.card-score.top { color: var(--accent); }
.advice { border-radius: var(--r-l); background: var(--surface-2); }
.empty, .empty-state { border-top: 0; background: var(--surface); border: 1px dashed var(--field); border-radius: var(--r-l); padding: 32px; }
.modal { border-top: 0; border-radius: var(--r-l); background: var(--raised); box-shadow: var(--shadow); }
.overlay { background: var(--scrim); backdrop-filter: blur(3px); }
.toast { border-radius: 999px; box-shadow: var(--shadow); }
.messages li { border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--field); }
.messages li.success { border-left-color: var(--ok); }
.auth-error, .docs-tip { border-radius: var(--r-m); }

/* Сводные цифры и таблицы */
.kpis { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); overflow: hidden; }
.kpi { padding: 18px 20px; }
.kpi:first-child { padding-left: 20px; }
.kpi b { font-weight: 800; }
.facts { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
.facts div:first-child { padding-left: 16px; }
.tbl-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 4px 16px; }
thead tr { border-bottom: 1px solid var(--line); }
th { font-weight: 600; }
td.num, th.num, .bar-row .val, .f-val { font-family: var(--f-body); font-variant-numeric: tabular-nums; }
.match { border-bottom: 1px solid var(--line); }
.score { font-weight: 800; }
.list { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
.list small { font-family: var(--f-body); }
.seg { border-bottom: 0; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 999px; }
.seg button { border: 0; margin: 0; padding: 0 14px; min-height: 36px; border-radius: 999px; }
.seg button[aria-pressed="true"] { background: var(--seg-on); color: var(--ink); box-shadow: var(--seg-shadow); }
/* Выбранная вкладка «Резюме» (resume-area.css): сегмент светлее дорожки и в тёмной теме */
:root :is(.re-tabs a[aria-current="page"], .lk-tabs [aria-selected="true"], .lk-tabs [aria-current="page"]) { background: var(--seg-on); box-shadow: var(--seg-shadow), 0 0 0 1px var(--line); }

/* Индикаторы: синяя полоса, золотая точка «прыгуна» на конце */
.meter { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: visible; position: relative; }
.meter i { border-radius: 999px; position: relative; background: linear-gradient(90deg, var(--accent-fill), color-mix(in srgb, var(--accent-fill) 70%, var(--gold))); }
.meter i::after { content: ""; position: absolute; right: -6px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px var(--surface); }
.track, .f-row .track { border-radius: 999px; overflow: hidden; }
.track .d, .track .h, .f-row .track i { border-radius: 999px; }

/* Первые шаги */
.start-steps { border-top: 0; gap: 10px; }
.start-steps li a, .start-steps li + li a { border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 16px; background: var(--bg); }
.start-steps li a:hover { border-color: var(--accent); }
.start-steps .tick { border-radius: 50%; }
.start-steps .done a { background: var(--surface); }
@media (max-width: 640px) { .start-steps li + li a { border-top: 1px solid var(--line); } }

/* Вход, регистрация, восстановление пароля.
   Слева форма на снегу, справа ночная панель: что даёт Трамплин и траектория прыжка,
   которая «приземляется» на подходящей вакансии. В тёмной теме панель остаётся ночной. */
.page-auth main.wrap { padding-block: 32px 56px; }
.auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px clamp(40px, 6vw, 96px); align-items: stretch; }
.auth-main { align-self: center; gap: 18px; padding-block: 8px; width: 100%; }
.auth-main h1 { letter-spacing: -.04em; }
.auth-main .eyebrow.accent { margin-bottom: -6px; }
.auth-main .stack { gap: 14px; }
.auth-main .stack > div { gap: 6px; }
.auth-main .stack label, .auth-main label { font-size: 13.5px; font-weight: 550; color: var(--ink); }
.auth-main .stack .helptext { font-size: 13px; }
.auth-main input:not([type=checkbox]):not([type=radio]), .auth-main select { min-height: 48px; }
.auth-main .stack div:has(> input[type=checkbox]) { align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px 14px; }
.auth-main .stack div:has(> input[type=checkbox]) input { margin-top: 2px; flex: none; }
.auth-main .stack div:has(> input[type=checkbox]) label { font-size: 13.5px; font-weight: 450; line-height: 1.45; color: var(--muted); }
.label-link { font-weight: 500; }
.pw-eye { border-radius: var(--r-s); font-weight: 550; }
.pw-eye:hover { background: var(--surface-2); }
.wide-btn { min-height: 52px; border-radius: var(--r-m); font-size: 15.5px; }
.auth-alt { border-top: 0; padding-top: 4px; gap: 10px; }
.auth-alt span { margin-right: 4px; flex-basis: 100%; }
.auth-alt .btn { flex: 1 1 0; justify-content: center; min-height: 46px; }
.auth-alt-line { color: var(--muted); }
/* Переключатель «Студент / Компания» — сегменты-пилюли, как в остальном интерфейсе */
.seg.auth-roles { display: inline-flex; align-self: flex-start; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 999px; border: 0; }
.auth-roles a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 18px; margin: 0; border: 0; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px; }
.auth-roles a:hover { color: var(--ink); }
.auth-roles a[aria-current] { background: var(--seg-on); color: var(--ink); box-shadow: var(--seg-shadow), 0 0 0 1px var(--line); }

.auth-aside {
  position: sticky; top: calc(var(--header-h) + 24px); align-self: start; min-height: min(640px, calc(100vh - var(--header-h) - 64px));
  border-radius: var(--r-xl); background: var(--night); color: var(--night-ink); padding: clamp(32px, 3.6vw, 52px) clamp(28px, 3.6vw, 52px) 0; gap: 22px; overflow: hidden; isolation: isolate; }
.auth-aside::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 70% at 100% 100%, rgba(36, 83, 232, .38), transparent 60%), radial-gradient(60% 40% at 0% 0%, rgba(255,255,255,.05), transparent 70%); }
.auth-aside .eyebrow { color: var(--gold); font-weight: 650; }
.auth-quote { color: var(--night-ink); font-size: clamp(26px, 2.5vw, 36px); line-height: 1.12; max-width: 19ch; text-wrap: balance; }
.auth-aside .ticks { opacity: 1; color: var(--night-muted); gap: 10px; font-size: 15px; }
.auth-aside .ticks li::before { border-color: var(--gold); }
.auth-stage { position: relative; margin: auto calc(-1 * clamp(28px, 3.6vw, 52px)) 0; height: 240px; flex: none; }
.auth-traj { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.auth-traj path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.auth-traj .t-inrun { stroke: rgba(244, 247, 250, .5); stroke-width: 3; }
.auth-traj .t-flight { stroke: var(--gold); stroke-width: 3.5; stroke-dasharray: 1.5 9; }
.auth-mini { position: absolute; left: 42%; right: -24px; top: 104px; bottom: -24px; margin: 0; transform: none; border: 0; border-radius: 18px 0 0 0; background: var(--surface); color: var(--ink);
  box-shadow: 0 -1px 0 rgba(255,255,255,.08), 0 30px 60px -18px rgba(0,0,0,.6); overflow: visible; }
.auth-mini::before { content: ""; position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px var(--night), 0 0 0 11px rgba(242, 178, 27, .22); }
.auth-mini div { grid-template-columns: 58px minmax(0, 1fr); padding: 16px 20px 14px; border-bottom: 1px solid var(--line); }
.auth-mini div:last-child { border-bottom: 0; }
.auth-mini b { font-size: 36px; color: var(--accent); }
.auth-mini div + div b { color: var(--ink); opacity: .55; }
.auth-mini span { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auth-mini small { font: 500 12.5px var(--f-body); color: var(--muted); white-space: nowrap; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .auth-aside { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); } }
:root[data-theme="dark"] .auth-aside { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
/* Узкий экран: панель уходит под форму и становится короче — без вакансий, только суть */
@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-main { max-width: 560px; }
  .auth-aside { display: none; }
  .auth-quote { font-size: 24px; }
  .auth-aside .ticks { font-size: 14.5px; }
  .auth-stage { height: 150px; margin-inline: -24px; }
  /* та же кривая, сжатая по ширине: приземляется левее, чтобы карточка поместилась целиком */
  .auth-traj { width: 52.4%; }
  .auth-mini { top: 64px; left: 22%; }
  .auth-mini div + div { display: none; }
}
@media (max-width: 420px) { .auth-mini b { font-size: 30px; } .auth-mini div { grid-template-columns: 46px minmax(0, 1fr); padding: 14px 16px 12px; } }

/* Палитра команд */
.palette-box { border-top: 0; border-radius: var(--r-l); background: var(--raised); overflow: hidden; }
.palette-list .grp { font: 600 12.5px var(--f-body); text-transform: none; letter-spacing: 0; }
.palette-list a { margin: 0 6px; border-radius: var(--r-s); }
.palette-list a small { font-family: var(--f-body); }
.palette-list a[aria-selected="true"] { box-shadow: none; }
.palette-box .palette-input input { background: transparent; }


/* Документация и помощь */
.docs { border-top: 0; }
.docs-nav { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px 18px; }
.docs-nav summary { font: 650 14px var(--f-body); letter-spacing: 0; text-transform: none; }
.docs-tag { font: 600 12px var(--f-body); text-transform: none; letter-spacing: 0; }
.steps > li::before { border-radius: 50%; font-family: var(--f-body); }
.path { border-radius: var(--r-xs); }
.docs-roles div { border-top: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px; }
.docs-cta { border-top: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px 24px; }

/* Медленное появление — только один раз и только на главной (landing.css) */
.js .reveal { opacity: 1; transform: none; transition: none; }

.filters .seg, .kinds.seg { align-self: flex-start; }
.reqs-row .hit, .reqs-row .miss { border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.reqs-row .hit { background: var(--accent-soft); }
.reqs-row .miss { background: var(--warn-soft); }
.reqs .miss::before { content: "+ "; }
.card .foot > a:first-child { font-weight: 600; text-decoration: none; }
.card .foot > a:first-child:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .start-steps li a, .start-steps li + li a { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 12px; padding: 12px 14px; }
  .start-steps .tick { grid-row: span 2; margin: 2px 0 0; }
}

/* ——— Внутренние страницы: списки строк на белой поверхности ———
   В «ведомости» строки списков (мероприятия, собеседования, переписка, план, задания)
   разделялись только линейками и висели прямо на фоне. Теперь подряд идущие строки
   собираются в одну белую поверхность со скруглением, а заголовок раздела стоит над ней.
   Внутри .w и .panel (они уже поверхности) строки остаются простыми линейками. */
main :not(.w, .panel, .card, .modal) > .ev-row, main :not(.w, .panel, .card, .modal) > .iv-row, main :not(.w, .panel, .card, .modal) > .thread-row, main :not(.w, .panel, .card, .modal) > .offer, main :not(.w, .panel, .card, .modal) > .plan-row, main :not(.w, .panel, .card, .modal) > .ws-item, main :not(.w, .panel, .card, .modal) > .ev-sub, main :not(.w, .panel, .card, .modal) > .match {
  background: var(--surface); border: 1px solid var(--line); border-top-width: 0; padding-inline: 20px; }
main :not(.w, .panel, .card, .modal) > :is(.ev-row:first-child, :not(.ev-row) + .ev-row), main :not(.w, .panel, .card, .modal) > :is(.iv-row:first-child, :not(.iv-row) + .iv-row), main :not(.w, .panel, .card, .modal) > :is(.thread-row:first-child, :not(.thread-row) + .thread-row), main :not(.w, .panel, .card, .modal) > :is(.offer:first-child, :not(.offer) + .offer), main :not(.w, .panel, .card, .modal) > :is(.plan-row:first-child, :not(.plan-row) + .plan-row), main :not(.w, .panel, .card, .modal) > :is(.ws-item:first-child, :not(.ws-item) + .ws-item), main :not(.w, .panel, .card, .modal) > :is(.ev-sub:first-child, :not(.ev-sub) + .ev-sub), main :not(.w, .panel, .card, .modal) > :is(.match:first-child, :not(.match) + .match) {
  border-top-width: 1px; border-top-left-radius: var(--r-l); border-top-right-radius: var(--r-l); }
main :not(.w, .panel, .card, .modal) > .ev-row:not(:has(+ .ev-row)), main :not(.w, .panel, .card, .modal) > .iv-row:not(:has(+ .iv-row)), main :not(.w, .panel, .card, .modal) > .thread-row:not(:has(+ .thread-row)), main :not(.w, .panel, .card, .modal) > .offer:not(:has(+ .offer)), main :not(.w, .panel, .card, .modal) > .plan-row:not(:has(+ .plan-row)), main :not(.w, .panel, .card, .modal) > .ws-item:not(:has(+ .ws-item)), main :not(.w, .panel, .card, .modal) > .ev-sub:not(:has(+ .ev-sub)), main :not(.w, .panel, .card, .modal) > .match:not(:has(+ .match)) {
  border-bottom-left-radius: var(--r-l); border-bottom-right-radius: var(--r-l); }
main a:is(.ev-row, .iv-row, .thread-row):hover { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
main a:is(.ev-row, .iv-row, .thread-row):hover b { text-decoration: none; color: var(--accent); }
main .ev-row, main .iv-row { padding-block: 16px; }
main .thread-row { padding-block: 16px; }
main .match { padding-block: 22px; }
main :is(.ev-sec, .iv-block) > h2 { border-bottom: 0; padding-bottom: 0; margin-bottom: 14px; align-items: center; justify-content: flex-start; }
main .iv-block > h2 .code, main .ev-sec > h2 .code { font: 650 13px var(--f-body); color: var(--accent); background: var(--accent-soft); border-radius: 999px; min-width: 24px; padding: 2px 9px; text-align: center; }
.offer-block > h2 { color: var(--ink); }
main .offer-block .offer { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); background: linear-gradient(90deg, var(--gold-soft), var(--surface) 60%); }
.iv-day { font: 650 14px var(--f-body); letter-spacing: 0; text-transform: none; color: var(--ink); margin: 22px 0 10px; }
.iv-day:first-of-type { margin-top: 0; }
.iv-time { font: 750 20px var(--f-body); letter-spacing: -.01em; }
.iv-tag, .ev-tag { font: 550 13px var(--f-body); color: var(--muted); }
.ev-tag.live { color: var(--ok); }
.ev-date { font: 600 13.5px var(--f-body); color: var(--muted); font-variant-numeric: tabular-nums; }
.thread-row.unread b::after { content: ""; display: inline-block; width: 8px; height: 8px; margin: 0 0 1px 8px; border-radius: 50%; background: var(--gold); vertical-align: middle; }
.thread-row.unread { box-shadow: inset 3px 0 0 var(--accent); }
.r-sec > h2 { font: 650 14px var(--f-body); letter-spacing: 0; text-transform: none; color: var(--muted); }
.r-when { font-size: 13.5px; font-variant-numeric: tabular-nums; }

/* Пустые состояния: приглашение к действию, а не серая надпись */
main .empty { color: var(--muted); font-size: 15px; }
main .empty .btn { margin-top: 12px; }
main :is(.w, .panel, .card) .empty, main :is(.w, .panel, .card) .empty-state { border: 0; background: none; padding: 8px 0; }
.empty-state { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.empty-state h2, .empty-state h3 { margin: 0; }

/* Таблица внутри блока — без второй рамки */
:is(.w, .panel, .card, .modal) .tbl-wrap { border: 0; border-radius: 0; background: none; padding: 0; box-shadow: none; }
.tbl-wrap { -webkit-overflow-scrolling: touch; }
th { font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: 0; text-transform: none; }
tbody tr:last-child > td { border-bottom: 0; }
td.num { font-size: 14px; }
th.num { font-size: 12.5px; }

/* Полосы диаграмм: скругления вместо чёрных брусков */
.track { border-radius: 999px; }
.track .d { border-radius: 999px; background: color-mix(in srgb, var(--ink) 82%, var(--surface)); }
.track .h { border-radius: 999px; }
.track:not(:has(.h)) .d { background: var(--accent); }
.bar-row { border-bottom-color: var(--line); }
.bar-row.gap { border-radius: var(--r-s); }
.bar-row .val { font-size: 13px; }
.f-row .track, .an-row .track { background: var(--surface-2); }

/* Вкладки внутри раздела: пилюли, как переключатели в шапке */
main :is(.out-tabs, .bl-aud) { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface-2); border: 0; border-radius: 999px; align-self: flex-start; }
main :is(.out-tabs, .bl-aud) a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; margin: 0; border: 0; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: none; }
main :is(.out-tabs, .bl-aud) a:hover { color: var(--ink); }
main :is(.out-tabs, .bl-aud) a[aria-current] { background: var(--seg-on); color: var(--ink); box-shadow: var(--seg-shadow), 0 0 0 1px var(--line); }

/* Мелочи, которые в «ведомости» были моноширинными подписями */
.found label { font: 600 14px var(--f-body); }
.list small, .free-blocks, .free-grid th[scope=row], .free-grid button.link { font-family: var(--f-body); }
.slot { border-radius: var(--r-m); background: var(--surface); }
.slot span { font: 500 14px var(--f-body); font-variant-numeric: tabular-nums; }
.entry { border-radius: var(--r-m); background: var(--surface); border-left-width: 1px; box-shadow: inset 3px 0 0 var(--accent); }
.entry:has(.del input:checked) { box-shadow: inset 3px 0 0 var(--warn); }
.editor-side { border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); }
.ed-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 22px 24px; }
.ed-save { border-radius: var(--r-l) var(--r-l) 0 0; padding-inline: 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); }
.checklist li.done b::before { content: "✓ "; color: var(--ok); }
.checklist li b::before { content: "○ "; }
.chat li { border-radius: 16px 16px 16px 6px; background: var(--surface); border: 1px solid var(--line); }
.chat li.mine { border-radius: 16px 16px 6px 16px; background: var(--accent-soft); border-color: transparent; }
.quiz-take { border-radius: var(--r-l); border-width: 1px; }
.quiz-choice { border-radius: var(--r-m); background: var(--surface); }
.quiz-timer { font-family: var(--f-body); font-variant-numeric: tabular-nums; border-radius: var(--r-m); }
.quiz-result li { border-radius: 0 var(--r-s) var(--r-s) 0; }
.quiz-result blockquote, .notice, .advice { border-radius: var(--r-m); }
.notice { background: var(--gold-soft); color: var(--gold-ink); }
.call-stage { border-radius: var(--r-l); }
.call-timer { font-family: var(--f-body); font-variant-numeric: tabular-nums; border-radius: 999px; padding: 4px 10px; }
#local { border-radius: var(--r-m); }
.free-grid input { border-radius: var(--r-xs); }
.qb-q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 16px; }
.docs-tag.co { color: var(--gold-ink); }
.docs-tag.vu { color: var(--ok); }
input[type=file] { font: 14px var(--f-body); color: var(--muted); max-width: 100%; }
input[type=file]::file-selector-button { font: 600 14px var(--f-body); color: var(--ink); background: var(--surface); border: 1px solid var(--field); border-radius: var(--r-m); min-height: 40px; padding: 0 14px; margin-right: 12px; cursor: pointer; }
input[type=file]::file-selector-button:hover { border-color: var(--ink); }
details > summary { cursor: pointer; }
.head .actions { gap: 8px; }
.head .code, .head .eyebrow { font-size: 13.5px; font-weight: 550; color: var(--muted); }
.re-tabs { justify-self: start; max-width: 100%; }
.as-cert a, .rv-strip a { overflow-wrap: anywhere; }
@media (max-width: 640px) { .pill { white-space: normal; max-width: 100%; } }
/* Сертификаты: единственное место внутри продукта, где появляется траектория прыжка */
.cert-traj { position: absolute; right: -2px; bottom: -2px; width: min(42%, 300px); height: auto; pointer-events: none; z-index: 0; }
.cert-traj path { fill: none; stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.cert-traj .t-inrun { stroke: var(--field); }
.cert-traj .t-flight { stroke: var(--gold); stroke-dasharray: 1.5 9; }
.cert-traj circle { fill: var(--gold); }
:is(.as-cert, .ws-cert) > :not(.cert-traj) { position: relative; z-index: 1; }
.as-cert-public { position: relative; overflow: hidden; padding: 32px 36px 120px; box-shadow: var(--shadow); max-width: 760px; }
.as-cert-public .pill { align-self: flex-start; }
.as-cert-public h1 { font-size: clamp(34px, 5vw, 52px); }
.ws-cert { padding-bottom: 130px; }
.ws-cert .code { color: var(--muted); }
@media (max-width: 640px) { .as-cert-public { padding: 24px 20px 96px; } .ws-cert { padding-bottom: 100px; } }

/* Широкие таблицы не сжимаются в столбики по букве: от восьми колонок — прокрутка внутри блока,
   на телефоне — уже от пяти. */
.tbl-wrap table:has(thead th:nth-child(8)) { min-width: 960px; }
@media (max-width: 640px) { .tbl-wrap table:has(thead th:nth-child(5)) { min-width: 620px; } .tbl-wrap { margin-inline: 0; } }

/* Пустой список карточек — тот же пунктирный блок, что и у остальных пустых состояний */
.cards > p.muted:only-child { grid-column: 1 / -1; margin: 0; background: var(--surface); border: 1px dashed var(--field); border-radius: var(--r-l); padding: 32px; font-size: 15px; }
.inline-form input[type=search] { flex: 1 1 280px; width: auto; max-width: 480px; min-height: 44px; }
.inline-form:has(input[type=search]) button { min-height: 44px; }
:is(.ev-side, .w, .as-cert, .stack) > :is(.pill, .tag, .bl-pill) { align-self: flex-start; }

/* ——— Общие компоненты оболочки (этап «шапка и сводка») ——— */

/* Счётчик рядом с заголовком раздела */
.count { font: 650 13px var(--f-body); color: var(--accent); background: var(--accent-soft); border-radius: 999px; min-width: 24px; padding: 2px 9px; text-align: center; letter-spacing: 0; display: inline-block; }

/* Плитки цифр: колонки по числу плиток (2 / 3 / 4, пять и больше — по 3), подпись над числом, число не вылезает */
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis:has(> .kpi:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpis:has(> .kpi:nth-child(3):last-child), .kpis:has(> .kpi:nth-child(5)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis:has(> .kpi:only-child) { grid-template-columns: minmax(0, 1fr); }
.kpi { min-width: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.kpi b { font-size: clamp(28px, 3.4vw, 40px); overflow-wrap: anywhere; }
.kpi:first-child { padding-left: 20px; }
@media (max-width: 720px) { .kpis, .kpis:has(> .kpi:nth-child(3):last-child), .kpis:has(> .kpi:nth-child(5)) { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis:has(> .kpi:only-child) { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .kpis, .kpis:has(> .kpi:nth-child(2):last-child), .kpis:has(> .kpi:nth-child(3):last-child), .kpis:has(> .kpi:nth-child(5)) { grid-template-columns: minmax(0, 1fr); } }
.w .kpis, .w .kpis:has(> .kpi:nth-child(5)), .w .kpis:has(> .kpi:nth-child(3):last-child), .w .kpis:has(> .kpi:nth-child(2):last-child) { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* Узкая форма (настройки, свободное время, план): страница не оставляет 60% экрана пустыми */
body.page-narrow main.wrap { max-width: 880px; }

/* Таблицы на телефоне. .tbl-cards — строка становится карточкой, подписи берутся из заголовков (shell.js);
   .tbl-sticky — широкий отчёт прокручивается вбок, первый столбец закреплён. */
@media (max-width: 640px) {
  .tbl-wrap:has(table.tbl-cards) { background: none; border: 0; padding: 0; overflow: visible; box-shadow: none; }
  table.tbl-cards, table.tbl-cards tbody { display: block; min-width: 0 !important; }
  table.tbl-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.tbl-cards tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 14px 16px; margin-bottom: 10px; }
  table.tbl-cards td { display: grid; grid-template-columns: minmax(96px, 38%) minmax(0, 1fr); gap: 10px; padding: 0; border: 0; text-align: left !important; white-space: normal; }
  table.tbl-cards td::before { content: attr(data-label); font-size: 12.5px; font-weight: 600; color: var(--muted); }
  table.tbl-cards td:first-child { display: block; font-size: 15.5px; }
  table.tbl-cards td:first-child::before { content: none; }
  table.tbl-cards td:empty { display: none; }
}
.tbl-wrap:has(table.tbl-sticky) { overflow-x: auto; }
table.tbl-sticky :is(th, td):first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line); }

/* Сводка */
.dash-head h1 { margin-top: 4px; }
.dash-date { margin: 0; display: flex; align-items: center; gap: 6px; }
.dash-gear { width: 32px; height: 32px; min-height: 32px; position: relative; color: var(--muted); }
.dash-gear small { position: absolute; top: -2px; right: -4px; font: 650 10px/14px var(--f-body); min-width: 14px; padding: 0 3px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.w h2 { display: flex; align-items: center; gap: 8px; }
.w-line { margin: 0; }
.w-strong { font-weight: 700; }
.todo-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.todo-list a { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; height: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--r-m); color: var(--ink); text-decoration: none; background: var(--bg); }
.todo-list a:hover { border-color: var(--accent); }
.todo-list i { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--accent); }
.todo-list i:is(.k-interview, .k-test, .k-verify, .k-join, .k-result, .k-dispute, .k-reschedule) { background: var(--warn); }
.todo-list i:is(.k-offer, .k-soon, .k-fair) { background: var(--ok); }
.todo-list b { display: block; font-weight: 600; font-size: 14.5px; }
.todo-list small { color: var(--muted); font-size: 12.5px; }
.w-todo-wide .todo-list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.w-calm { margin: 0; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14.5px; }
.w-calm i { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.w-slims { list-style: none; margin: 0; padding: 12px 18px; display: flex; flex-wrap: wrap; gap: 6px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); font-size: 14px; color: var(--muted); }
.w-slims a { font-weight: 600; text-decoration: none; margin-left: 4px; }
.w-slims a:hover { text-decoration: underline; }
.bell-list a i:is(.k-result, .k-join, .k-dispute, .k-reschedule) { background: var(--warn); }
.bell-list a i.k-fair { background: var(--ok); }

/* Страницы ошибок и проверка сертификата */
.error-page { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; max-width: 760px; margin: clamp(16px, 6vh, 64px) auto 0; padding: clamp(28px, 5vw, 48px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; isolation: isolate; width: 100%; box-sizing: border-box; }
.error-page h1 { font-size: clamp(32px, 5vw, 52px); margin: 0; }
.error-page .lead { margin: 0; color: var(--muted); max-width: 52ch; }
.error-page > :not(.error-traj) { position: relative; z-index: 1; }
.error-traj { position: absolute; right: -4px; bottom: -4px; width: min(46%, 320px); height: auto; z-index: 0; pointer-events: none; }
.error-traj path { fill: none; stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.error-traj .t-inrun { stroke: var(--field); stroke-dasharray: 2 9; }
.error-traj .t-flight { stroke: var(--gold); }
.error-traj circle { fill: var(--gold); }
.cert-lookup { display: flex; flex-direction: column; gap: 6px; width: min(460px, 100%); }
.cert-lookup label { font-size: 13.5px; font-weight: 600; }
.cert-lookup div { display: flex; gap: 8px; }
.cert-lookup input { flex: 1; min-width: 0; font-family: var(--f-code); letter-spacing: .04em; }
@media (max-width: 640px) { .error-traj { display: none; } .error-page .actions { width: 100%; } .error-page .actions .btn { flex: 1 1 100%; justify-content: center; } }

/* Длинные адреса и коды переносятся, а не растягивают страницу на телефоне */
:is(.code, .verify-url, .as-cert, .ws-cert) a, .ws-cert .code { overflow-wrap: anywhere; }

/* Настройки: секции-панели, строки «подпись — действие» */
.settings-sec { display: flex; flex-direction: column; gap: 14px; }
.settings-sec h2 { font-size: 18px; margin: 0; }
.settings-sec .stack { max-width: none; }
.settings-row { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }
.settings-row:first-of-type { border-top: 0; }
.settings-row > span { font-size: 14.5px; }
.more-formats { margin: 6px 0 0; font-size: 14px; }

/* «Ждёт действия» на сводке: пункты строками во всю ширину карточки, без пустой полосы под двумя плитками.
   Две колонки — только когда пунктов много. */
.w-todo .todo-list { grid-template-columns: minmax(0, 1fr); }
.w-todo .todo-list:has(> li:nth-child(5)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.w-todo .todo-list a { padding: 12px 14px; }
@media (max-width: 699px) { .w-todo .todo-list:has(> li:nth-child(5)) { grid-template-columns: minmax(0, 1fr); } }

/* Код ошибки на странице 500 (номер запроса, ops/requestid.py): выделяется одним нажатием, чтобы скопировать */
.error-ref { margin: 0; font-size: 14.5px; line-height: 1.6; }
.error-ref code { user-select: all; overflow-wrap: anywhere; }

/* «Установить приложение» в меню аккаунта (PWA): обычный пункт меню, а не красная ссылка «Выйти»; скрыт, пока браузер не готов */
.account-menu .install-app { color: var(--ink); font-weight: inherit; cursor: pointer; }
.account-menu .install-app[hidden] { display: none; }

/* Уведомления в браузере в настройках (webpush/templates/webpush/_settings.html) */
.push-here { display: flex; flex-direction: column; gap: 10px; }
.push-state { margin: 0; font-size: 14.5px; }
.push-state:empty { display: none; }
.push-devices h3 { font-size: 15px; margin: 0 0 4px; }
.push-devices ul { list-style: none; margin: 0; padding: 0; }
.push-devices li { display: flex; justify-content: space-between; align-items: center; gap: 6px 16px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.push-devices li:first-child { border-top: 0; }
.push-devices form { margin: 0; }

/* ——— Тема во всех мелочах ——— */

/* Видимое кольцо фокуса с клавиатуры: 2px акцентом с отступом 2px. Поля ввода — со своим мягким кольцом выше. */
:is(a, button, summary, [tabindex]:not([tabindex="-1"]), .btn):focus-visible,
input:is([type=checkbox], [type=radio], [type=range], [type=file]):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Тонкие полосы прокрутки в цвет темы; у страницы — обычной ширины */
* { scrollbar-width: thin; scrollbar-color: var(--field) transparent; }
html { scrollbar-width: auto; scrollbar-color: var(--field) var(--bg); }

/* Переключение темы: короткий переход цвета только у body и поверхностей (класс ставит shell.js на 320 мс) */
.theme-fade body, .theme-fade :is(header.bar, .foot-site, .w, .panel, .card, .kpis, .tbl-wrap, .list, .ed-sec, button, .btn, input, select, textarea) {
  transition: background-color var(--t-base) var(--ease-out), color var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out) !important; }

/* Плавный переход между страницами (View Transitions между документами; согласие — @view-transition в base.html):
   шапка и нижняя панель стоят на месте, содержимое main коротко проявляется, а золотая черта текущей вкладки
   (и точка в нижней панели) переезжает от старой вкладки к новой с лёгкой упругостью. Браузер без View Transitions
   просто открывает страницу. Без анимации — при «уменьшить движение». */
@media (prefers-reduced-motion: no-preference) {
  header.bar { view-transition-name: site-header; }
  main#main { view-transition-name: site-main; }
  .tabbar { view-transition-name: site-tabbar; }
  .tab-mark { view-transition-name: nav-mark; }
  .tb-dot { view-transition-name: tabbar-mark; }
  ::view-transition-group(site-tabbar), ::view-transition-old(site-tabbar), ::view-transition-new(site-tabbar) { animation: none; }
  ::view-transition-group(site-tabbar) { z-index: 1; }
  ::view-transition-group(nav-mark), ::view-transition-group(tabbar-mark) { z-index: 2; animation-duration: var(--t-move); animation-timing-function: var(--ease-spring); }
  ::view-transition-old(nav-mark), ::view-transition-new(nav-mark), ::view-transition-old(tabbar-mark), ::view-transition-new(tabbar-mark) { animation-duration: var(--t-move); }
  ::view-transition-group(root), ::view-transition-old(root), ::view-transition-new(root),
  ::view-transition-group(site-header), ::view-transition-old(site-header), ::view-transition-new(site-header),
  ::view-transition-group(site-main) { animation: none; }
  ::view-transition-old(site-main) { animation: vt-out .12s ease-in both; }
  ::view-transition-new(site-main) { animation: vt-in .18s ease-out both; }
  ::view-transition-old(site-main), ::view-transition-new(site-main) { height: auto; }
  ::view-transition-group(site-header) { z-index: 1; }  /* снимок прокрученного main не ложится поверх шапки */
}
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }
