/* ═══════════════════════════════════════════════════════════════════════════
   SOUTHMEDIA UI · 04 — КОМПОНЕНТЫ ПРИЛОЖЕНИЯ
   Всё, что стоит на ядре (03-base.css): вкладки, сегменты, степпер, доска,
   списки файлов, проводник, панель свойств, диалоги, тур, inline-редактирование,
   переключатели, перетаскивание, поповеры, аватары, служебные полосы.

   Имена классов нейтральные (не привязаны к предметной области исходника).
   Таблица соответствия с оригиналом — docs/03-components.md, раздел «Маппинг».
   ═══════════════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════════
   1. ВКЛАДКИ (подчёркивание снизу)
   Для 2–8 равнозначных разделов одной сущности.
   <nav class="tabs">
     <a class="tab active" href="#">Смета <span class="pill small">3</span></a>
     <a class="tab" href="#">КП</a>
   </nav>
   ════════════════════════════════════════════════════════════════ */
.tabs {
  display: flex;
  gap: 4px;
  margin: 4px 0 18px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 560;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;             /* линия вкладки ложится ровно на линию контейнера */
}
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab .pill.small { font-size: 10.5px; padding: 1px 7px; margin-left: 4px; vertical-align: middle; }
/* счётчик вкладки проверок (решение 405): всего — серая пилюля, с ошибками — красная */
.tab .pill.small + .pill.small { margin-left: 2px; }
.pill.crit { background: var(--crit-bg); color: var(--crit); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
/* серая точка у вкладки = «только просмотр для вашей роли» */
.tab-ro { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); margin-left: 6px; vertical-align: middle; opacity: .6; }
.tab-action { margin-left: auto; align-self: center; }

/* ════════════════════════════════════════════════════════════════
   2. СЕГМЕНТЫ-РАЗДЕЛЫ (крупный переключатель со сводкой)
   Когда вкладок мало (2–4), но каждая несёт состояние: «сколько внутри,
   в каком статусе». Одна серая полоса, активный сегмент — белая карточка.
   --n задаёт число колонок: style="--n:3"
   ════════════════════════════════════════════════════════════════ */
.segments {
  display: grid;
  grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr));
  gap: 4px;
  margin: 6px 0 16px;
  padding: 5px;
  background: rgba(var(--ink-rgb), .06);
  border-radius: 18px;
  align-items: stretch;
}
.segment {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 14px;
  color: var(--muted);
  text-decoration: none;
  min-width: 0;
  transition: background-color .15s, color .15s, box-shadow .15s;
}
.segment:hover { background: rgba(var(--ink-rgb), .04); color: var(--ink); text-decoration: none; }
.segment.active {
  background: var(--card-solid);
  color: var(--ink);
  box-shadow: 0 2px 10px -4px rgba(var(--ink-rgb), .22), 0 .5px 0 rgba(var(--ink-rgb), .06);
}
.segment.active:hover { background: var(--card-solid); }
/* в тёмной теме «белый» сегмент должен быть СВЕТЛЕЕ полосы, а не темнее */
[data-theme="dark"] .segment.active,
[data-theme="dark"] .segment.active:hover { background: rgba(var(--ink-rgb), .13); box-shadow: var(--shadow); }
.segment-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: rgba(var(--ink-rgb), .06); color: var(--muted); }
.segment.active .segment-icon { background: var(--accent-soft); color: var(--accent); }
.segment-text { display: grid; gap: 3px; min-width: 0; }
.segment-title { font-weight: 650; font-size: 15px; letter-spacing: -.01em; }
.segment.active .segment-title { color: var(--accent); }
.segment-sum { font-size: 13px; color: var(--muted); line-height: 1.4; }
.segment-action { grid-column: 1 / -1; justify-self: start; padding: 2px 12px 6px; }
@media (max-width: 720px) { .segments { grid-template-columns: minmax(0, 1fr); } }

/* ════════════════════════════════════════════════════════════════
   3. СТЕППЕР (путь объекта по процессу)
   <ol class="stepper">
     <li class="done"><span class="dot">✓</span><span class="lbl">Запрос</span></li>
     <li class="current"><span class="dot">2</span><span class="lbl">Оценка</span></li>
     <li><span class="dot">3</span><span class="lbl">Итог</span></li>
   </ol>
   Модификаторы: .done (пройден), .current (текущий), .current.bad (текущий =
   отказ/провал), .skipped (шаг пропущен — пунктирный, зачёркнутая подпись).
   ════════════════════════════════════════════════════════════════ */
.stepper { list-style: none; margin: 0 0 14px; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.stepper li {
  display: flex; align-items: center; gap: 8px;
  flex: 1; min-width: 110px; position: relative;
  color: var(--faint); font-size: 12.5px; font-weight: 600;
}
.stepper li::after { content: ""; flex: 1; height: 2px; background: var(--border-strong); border-radius: 2px; }
.stepper li:last-child::after { display: none; }
.stepper .dot {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11.5px; flex: none; background: var(--card-solid);
}
.stepper li.done { color: var(--muted); }
.stepper li.done .dot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.stepper li.done::after { background: var(--accent); }
.stepper li.current { color: var(--accent); }
.stepper li.current .dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.stepper li.current.bad { color: var(--crit); }
.stepper li.current.bad .dot { border-color: var(--crit); color: var(--crit); box-shadow: 0 0 0 4px var(--crit-bg); }
.stepper li.skipped .dot { background: transparent; color: var(--faint); border-color: var(--border-strong); }
.stepper li.skipped .lbl { color: var(--faint); text-decoration: line-through; }

/* Панель процесса: степпер + «у кого мяч» + действия, всегда на виду */
.flow-card { padding: 16px 20px 14px; margin-bottom: 16px; }
.flow-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.flow-holder { font-size: 15px; font-weight: 600; }
.flow-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* блокеры: что мешает нажать основную кнопку — сразу под ней, а не тостом после клика */
.issues { margin-top: 12px; padding: 10px 14px; background: var(--warn-bg); color: var(--warn); border-radius: 12px; font-size: 13.5px; }
.issues ul { margin: 6px 0 0; padding-left: 18px; }
.note-box { margin-top: 12px; padding: 10px 14px; background: rgba(var(--ink-rgb), .05); border-radius: 12px; font-size: 13.5px; }

/* ════════════════════════════════════════════════════════════════
   4. КАРТОЧКА «ФОКУС ДНЯ» (градиентный герой на главной)
   Два состояния: с задачами — тёмный градиент, без задач — .calm:
   спокойная светлая карточка, чтобы пустой экран не кричал.
   ════════════════════════════════════════════════════════════════ */
.focus {
  position: relative; overflow: hidden;
  border-radius: 22px; padding: 26px 28px; margin-bottom: 22px;
  color: var(--on-dark);
  background:
    radial-gradient(700px 320px at 8% 0%, var(--focus-glow-1) 0%, transparent 62%),
    radial-gradient(560px 300px at 100% 20%, var(--focus-glow-2) 0%, transparent 60%),
    linear-gradient(135deg, var(--focus-from), var(--focus-to));
  box-shadow: 0 24px 50px -30px rgba(var(--accent-rgb), .8);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: center;
}
.focus.calm {
  grid-template-columns: 1fr; color: var(--ink); padding: 18px 22px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--accent-soft), transparent 60%), var(--card);
  box-shadow: var(--shadow);
}
.focus.calm .focus-greeting { color: var(--faint); opacity: 1; }
.focus.calm h1 { color: var(--ink); font-size: 20px; font-weight: 700; }
.focus.calm .focus-sub { color: var(--muted); opacity: 1; font-size: 14px; }
.focus-greeting { margin: 0 0 6px; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; opacity: .7; font-weight: 600; }
.focus h1 { margin: 0 0 8px; font-family: inherit; font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--on-dark); }
.focus-sub { margin: 0; opacity: .85; font-size: 15px; line-height: 1.5; }
.focus-text { min-width: 0; }                 /* иначе длинное имя задачи растянет колонку */
.focus-tasks { display: grid; gap: 8px; min-width: 0; }
/* Задача = строка-ссылка с явным глаголом справа: «Назначить →», а не «Открыть» */
.task {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 14px;
  background: rgba(var(--on-dark-rgb), .12); border: 1px solid rgba(var(--on-dark-rgb), .2);
  color: var(--on-dark); text-decoration: none; transition: background .15s, transform .15s;
}
.task:hover { background: rgba(var(--on-dark-rgb), .2); text-decoration: none; transform: translateY(-1px); }
.task-body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.task-body b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-body span { font-size: 12.5px; opacity: .8; }
/* белая плашка с акцентным текстом не работала в тёмной теме: акцент там сам
   светлый. Прозрачная плашка со светлым текстом читается в обеих. */
.task-cta { flex: none; background: rgba(var(--on-dark-rgb), .18); border: 1px solid rgba(var(--on-dark-rgb), .35); color: var(--on-dark); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 13px; }
@media (max-width: 1000px) { .focus { grid-template-columns: 1fr; } }
@media (max-width: 575px) { .task-body { order: 3; flex-basis: 100%; } }

/* ════════════════════════════════════════════════════════════════
   5. КАНБАН-ДОСКА (стадии слева направо)
   Пустые колонки сжимаются (.is-empty) — доска не тратит ширину на пустоту.
   Цвет точки у заголовка колонки задаётся модификатором стадии.
   ════════════════════════════════════════════════════════════════ */
.board-head { display: flex; align-items: center; gap: 14px; margin: 0 0 12px; flex-wrap: wrap; }
.board-head h2 { margin: 0; font-size: 22px; }
.board-head .muted { flex: 1; font-size: 13.5px; }
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.board .bcol { flex: 0 0 236px; scroll-snap-align: start; }
.board .bcol.is-empty { flex-basis: 118px; }
.bcol { background: rgba(var(--ink-rgb), .04); border-radius: 18px; padding: 10px; min-height: 160px; display: flex; flex-direction: column; min-width: 0; }
.bcol header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 4px 6px 10px; }
.bcol.is-empty header { flex-direction: column; align-items: flex-start; gap: 2px; padding-bottom: 8px; }
.bcol-title { font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.bcol.is-empty .bcol-title { font-size: 12px; line-height: 1.2; }
.bcol-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.bcol-body { display: grid; gap: 8px; align-content: start; min-width: 0; }
.bcol-empty { text-align: center; color: var(--faint); font-size: 12.5px; padding: 26px 0; border: 1px dashed var(--border-strong); border-radius: 12px; }
.bcol.is-empty .bcol-empty { padding: 18px 0; font-size: 12px; }
/* точка стадии перед заголовком колонки: добавьте свой модификатор */
.bcol[data-dot] .bcol-title::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 7px; vertical-align: 1px; background: var(--unknown-dot);
}
.bcol[data-dot="info"]   .bcol-title::before { background: var(--maintenance-dot); }
.bcol[data-dot="warn"]   .bcol-title::before { background: var(--warn-dot); }
.bcol[data-dot="accent"] .bcol-title::before { background: var(--accent); }
.bcol[data-dot="ok"]     .bcol-title::before { background: var(--ok-dot); }

/* Карточка на доске. .mine — «это про вас»: янтарная рамка и кольцо. */
.bcard {
  display: block; min-width: 0; overflow: hidden; overflow-wrap: anywhere;
  background: var(--card-solid); border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 13px; color: var(--ink); text-decoration: none;
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.bcard:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.bcard.mine { border-color: var(--warn-dot); box-shadow: 0 0 0 3px var(--warn-bg), var(--shadow); }
.bcard-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.bcard-top b { font-size: 13.5px; line-height: 1.3; }
.bcard-top .pill { flex: none; white-space: nowrap; overflow-wrap: normal; }
.bcard-client { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.bcard-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-top: 10px; font-size: 12.5px; flex-wrap: wrap; }
.bcard-foot b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bcard-who { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.bcard-holder { color: var(--muted); min-width: 0; }
.bcard-age { margin-top: 6px; font-size: 11.5px; color: var(--faint); }
.chip-you { background: var(--warn-bg); color: var(--warn); border-radius: 999px; padding: 2px 8px; font-weight: 600; font-size: 11.5px; }

/* ════════════════════════════════════════════════════════════════
   6. СПИСОК ФАЙЛОВ / ЗАПИСЕЙ (строка с иконкой, телом и действиями)
   .file-link — растянутая ссылка поверх всей строки, .file-actions
   поднята над ней z-index'ом: клик по строке открывает, клик по кнопке —
   выполняет действие. Вложенных <a> при этом нет.
   ════════════════════════════════════════════════════════════════ */
.files { display: grid; gap: 8px; }
.file {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; background: var(--card-solid); border: 1px solid var(--border);
  border-radius: 14px; color: var(--ink); text-decoration: none;
  box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s;
}
.file:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.file-icon { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.file.alt .file-icon { background: var(--doc-alt-bg); color: var(--doc-alt-text); }
.file-body { display: grid; gap: 3px; min-width: 0; flex: 1; }
.file-body b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.file-meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.file-meta.faint { color: var(--faint); }
.file-meta .badge { font-size: 11px; padding: 1px 8px 1px 6px; }
.file-actions { display: flex; gap: 6px; flex: none; position: relative; z-index: 1; }
.file-link { position: absolute; inset: 0; border-radius: inherit; }

/* ════════════════════════════════════════════════════════════════
   7. ПРОВОДНИК: дерево, плитки, колонки Миллера, панель свойств
   Раскладка одна на два представления — меняется только средняя колонка.
   ════════════════════════════════════════════════════════════════ */
.explorer { display: grid; gap: 14px; align-items: start; min-height: 420px; grid-template-columns: 220px minmax(0, 1fr) 300px; }
.explorer-pane { min-width: 0; }

/* дерево слева */
.tree { background: rgba(var(--ink-rgb), .04); border-radius: 16px; padding: 8px; position: sticky; top: 16px; max-height: calc(100vh - 40px); overflow: auto; }
.tree .side-label, .col .side-label { margin: 10px 8px 4px; }
.tree-item {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  border: none; background: transparent; padding: 8px 10px; border-radius: 10px;
  color: var(--ink); font: inherit; font-size: 13.5px; cursor: pointer;
}
.tree-item:hover { background: rgba(var(--ink-rgb), .06); }
.tree-item.on { background: var(--card-solid); box-shadow: var(--shadow); font-weight: 600; }
.tree-item.root { color: var(--accent); }
.tree-item.special .t-name { color: var(--accent); }
.t-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-count { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.tree-hint { margin: 2px 10px 6px; }

/* CSS-иконки папки и документа: без спрайтов и картинок, красятся токенами */
.fold { position: relative; display: inline-block; width: 18px; height: 14px; flex: none; }
.fold::before { content: ""; position: absolute; inset: 3px 0 0 0; background: var(--folder); border-radius: 3px; }
.fold::after { content: ""; position: absolute; left: 0; top: 0; width: 8px; height: 5px; background: var(--folder-lid); border-radius: 2px 2px 0 0; }
.fold.special::before { background: var(--folder-alt); } .fold.special::after { background: var(--folder-alt-lid); }
.docic { position: relative; display: inline-block; width: 14px; height: 18px; flex: none; border: 1.5px solid var(--doc-line); border-radius: 3px; background: var(--card-solid); }
.docic::after { content: ""; position: absolute; left: 3px; right: 3px; top: 5px; height: 2px; background: var(--doc-line); box-shadow: 0 4px 0 var(--doc-line); }
.docic.alt { border-color: var(--doc-line-alt); } .docic.alt::after { background: var(--doc-line-alt); box-shadow: 0 4px 0 var(--doc-line-alt); }

/* плитки */
.tiles-head { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 600; margin: 4px 4px 8px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 18px 10px 12px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--card-solid); color: var(--ink); font: inherit; cursor: pointer; text-align: center;
  box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s;
}
.tile:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.tile.sel { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--accent-soft); }
.tile .fold { width: 56px; height: 44px; margin-bottom: 4px; }
.tile .fold::before { inset: 8px 0 0 0; border-radius: 7px; }
.tile .fold::after { width: 26px; height: 12px; border-radius: 5px 5px 0 0; }
.tile .docic { width: 34px; height: 44px; border-radius: 6px; border-width: 2px; margin-bottom: 4px; }
.tile .docic::after { left: 7px; right: 7px; top: 12px; height: 3px; box-shadow: 0 7px 0 var(--doc-line), 0 14px 0 var(--doc-line); }
.tile .docic.alt::after { box-shadow: 0 7px 0 var(--doc-line-alt), 0 14px 0 var(--doc-line-alt); }
.tile b { font-size: 13px; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.tile-meta { font-size: 11.5px; color: var(--muted); }
.tile-badge { position: absolute; top: 8px; right: 8px; border-radius: 999px; padding: 1px 7px; font-size: 10.5px; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.tile-badge.alt { background: var(--doc-alt-bg); color: var(--doc-alt-text); }
.tile.folder.special { background: linear-gradient(180deg, var(--accent-soft), var(--card-solid) 70%); }
.tile.folder.special b { color: var(--accent); }

/* колонки Миллера */
.cols { display: flex; align-items: stretch; overflow-x: auto; background: var(--card-solid); border: 1px solid var(--border); border-radius: 16px; min-height: 420px; max-height: calc(100vh - 170px); scroll-behavior: smooth; }
.col { flex: 0 0 240px; padding: 6px; border-right: 1px solid var(--border); overflow-y: auto; }
.col:last-child { border-right: none; flex: 1 0 240px; }
.col .tree-item { border-radius: 8px; padding: 7px 9px; }
.col-item {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  border: none; background: transparent; padding: 7px 9px; border-radius: 8px;
  color: var(--ink); font: inherit; font-size: 13.5px; cursor: pointer;
}
.col-item:hover { background: rgba(var(--ink-rgb), .06); }
.col-item.on { background: var(--accent); color: var(--on-accent); }
.col-item.on .t-name { color: var(--on-accent); } .col-item.on .chev { opacity: .8; }
.col-item.on .fold::before { background: rgba(var(--on-accent-rgb), .85); } .col-item.on .fold::after { background: var(--on-accent); }
.col-item.on .docic { border-color: var(--on-accent); background: transparent; } .col-item.on .docic::after { background: var(--on-accent); box-shadow: 0 4px 0 var(--on-accent); }
.chev { opacity: .5; }

/* панель свойств справа */
.props { background: var(--card-solid); border: 1px solid var(--border); border-radius: 16px; padding: 16px; position: sticky; top: 16px; box-shadow: var(--shadow); }
.props-empty { padding: 30px 8px; text-align: center; font-size: 13.5px; }
.props-head { display: flex; gap: 12px; align-items: flex-start; }
.props-head h3 { margin: 0 0 6px; font-size: 15px; line-height: 1.3; }
/* CSS-иконки не масштабируются сами: у крупного размера линии документа и
   «язычок» папки надо переразметить, иначе они остаются от иконки 14×18 */
.props-head .docic { width: 30px; height: 38px; border-radius: 5px; border-width: 2px; flex: none; }
.props-head .docic::after { left: 6px; right: 6px; top: 10px; height: 3px; box-shadow: 0 6px 0 var(--doc-line), 0 12px 0 var(--doc-line); }
.props-head .docic.alt::after { box-shadow: 0 6px 0 var(--doc-line-alt), 0 12px 0 var(--doc-line-alt); }
.props-head .fold { width: 44px; height: 34px; flex: none; }
.props-head .fold::before { inset: 6px 0 0 0; border-radius: 6px; }
.props-head .fold::after { width: 20px; height: 9px; }
.props-actions { display: grid; gap: 6px; }
.props-actions .btn { text-align: center; }
.props-row { display: flex; gap: 6px; margin-top: 12px; }
.props-row input { flex: 1; min-width: 0; padding: 6px 10px; }
.props-admin { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); display: grid; gap: 6px; justify-items: start; }
/* пары «ключ — значение» */
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 12px; margin: 14px 0; font-size: 13px; }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* панель навигации проводника */
.explorer-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 10px; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { color: var(--faint); }
.view-switch .chip { padding: 5px 9px; font-size: 12px; display: inline-flex; align-items: center; line-height: 0; }
.up-btn { flex: none; padding: 5px 11px; }
.up-btn:disabled { opacity: .45; cursor: default; box-shadow: none; }
.up-btn.drop-over { background: var(--accent) !important; color: var(--on-accent) !important; outline: none !important; }
.inline-create { display: flex; gap: 6px; align-items: center; margin: -2px 0 10px; padding: 8px 10px; background: var(--card-solid); border: 1px solid var(--border); border-radius: 12px; }
.inline-create input[type=text] { flex: 1; width: auto; min-width: 0; padding: 6px 10px; font-size: 13px; }

@media (max-width: 1100px) { .explorer { grid-template-columns: 200px minmax(0, 1fr); } .props { position: static; grid-column: 1 / -1; } }
@media (max-width: 900px)  { .explorer { grid-template-columns: 1fr; } .tree { position: static; max-height: none; } }

/* ════════════════════════════════════════════════════════════════
   8. ДИАЛОГ (нативный <dialog>)
   Открывается dialog.showModal(), закрывается кликом по подложке.
   Подложка затемняет и слегка размывает страницу — модалка не «висит в пустоте».
   ════════════════════════════════════════════════════════════════ */
.dialog {
  border: none; border-radius: var(--radius); padding: 22px 24px;
  background: var(--card-solid); color: var(--ink);
  box-shadow: var(--shadow-lg); width: min(520px, 92vw);
}
.dialog::backdrop { background: var(--scrim-soft); backdrop-filter: blur(3px); }
.dialog h2 { margin: 0 0 6px; }
.dialog textarea { width: 100%; }
.dialog .actions { margin-top: 14px; }

/* ════════════════════════════════════════════════════════════════
   9. ЭКСКУРСИЯ ПО ЭКРАНУ (прожектор + карточка)
   Затемнение всего экрана делается ОДНОЙ огромной тенью на «дырке»:
   box-shadow: 0 0 0 200vmax — не нужно четыре оверлея вокруг элемента.
   ════════════════════════════════════════════════════════════════ */
.tour-overlay { position: fixed; inset: 0; z-index: var(--z-tour); }
.tour-overlay::before { content: ""; position: fixed; inset: 0; }
.tour-spot { position: fixed; border-radius: 14px; box-shadow: 0 0 0 200vmax var(--scrim);
  /* ui-lint-ignore: E-ANIM прожектор тура физически ездит по экрану: геометрия здесь и есть анимация */
  transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease; pointer-events: none; }
.tour-card {
  position: fixed; z-index: calc(var(--z-tour) + 1); background: var(--card-solid); color: var(--ink);
  border-radius: 16px; padding: 14px 16px 12px; box-shadow: var(--shadow-lg);
  width: 360px; max-width: calc(100vw - 24px); animation: tour-in .2s ease;
}
@keyframes tour-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }
.tour-head { display: flex; justify-content: space-between; align-items: center; color: var(--faint); font-size: 12px; }
.tour-close { border: none; background: transparent; color: var(--faint); cursor: pointer; font-size: 14px; padding: 2px 6px; border-radius: 6px; }
.tour-close:hover { background: rgba(var(--ink-rgb), .06); }
.tour-card h3 { margin: 6px 0 4px; font-size: 16px; }
.tour-card p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.tour-actions { display: flex; gap: 8px; align-items: center; }
.tour-actions .link-btn { margin-left: auto; color: var(--faint); }

/* ════════════════════════════════════════════════════════════════
   10. INLINE-РЕДАКТИРОВАНИЕ: поле, которое не выглядит полем
   Рамок нет, пока не трогаешь. Наведение — лёгкая подложка,
   фокус — рамка акцента и кольцо. Так плотная таблица не превращается
   в «стену инпутов», но всё в ней правится на месте.
   Область применения задайте контейнером: .sheet .cell { … }
   ════════════════════════════════════════════════════════════════ */
.sheet .cell {
  border: 1px solid transparent; background: transparent; border-radius: 7px;
  padding: 5px 7px; font: inherit; font-size: 13.5px; color: var(--ink);
  width: 100%; box-shadow: none; transition: background .12s, border-color .12s;
}
.sheet .cell::placeholder { color: var(--faint); }
/* Значение по умолчанию, подставленное сервисом (дата открута — конец месяца, решение 675):
   серым, как подсказка; выбранное человеком — обычным цветом. */
.sheet .cell.cell-default { color: var(--faint); }
.sheet .cell:hover:not(:disabled) { background: rgba(var(--ink-rgb), .05); }
.sheet .cell:focus { outline: none; background: var(--card-solid); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sheet .cell:disabled { color: var(--ink); opacity: 1; }   /* «только чтение» — не серый мертвец */
/* многострочная ячейка, растущая по содержимому (field-sizing + JS-фолбэк) */
.sheet textarea.cell-wrap {
  display: inline-block; vertical-align: middle; box-sizing: border-box;
  resize: none; overflow: hidden; line-height: 1.3; min-height: 1.3em;
  white-space: pre-wrap; overflow-wrap: anywhere; field-sizing: content;
}
/* Пометка в узкой колонке таблицы переносится на вторую строку, а не раздвигает таблицу. */
.badge.multi { white-space: normal; text-align: left; border-radius: 10px; }
/* Почта и логин: переносится по границе слова, а не посреди адреса — колонка шире на самый длинный адрес. */
.sheet textarea.cell-wrap.cell-word { overflow-wrap: break-word; }
.num-cell { text-align: right; width: 72px; font-variant-numeric: tabular-nums; }
.num-cell.amount { width: 96px; }
/* зелёная вспышка «сохранено» — снимается через 600 мс из JS */
.sheet .saved.cell, input.saved { box-shadow: 0 0 0 3px var(--ok-bg); border-color: var(--ok-dot) !important; transition: box-shadow .2s; }

/* строка быстрого ввода: пунктирная рамка = «здесь можно, но не обязательно» */
.quick { flex: 1; border: 1.5px dashed var(--border-strong); border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 13.5px; background: transparent; color: var(--ink); }
.quick::placeholder { color: var(--faint); }
.quick:focus { outline: none; border-style: solid; border-color: var(--accent); background: var(--card-solid); box-shadow: 0 0 0 3px var(--accent-soft); }
.quick.error { border-color: var(--crit-dot); }
.quick-row { display: flex; gap: 10px; align-items: center; }
.quick-row .btn { flex: none; }

/* ════════════════════════════════════════════════════════════════
   11. МЕЛКИЕ КНОПКИ
   .icon-btn — иконка без рамки, появляется на ховер строки;
   .link-btn — кнопка, выглядящая ссылкой (третичное действие).
   ════════════════════════════════════════════════════════════════ */
.icon-btn { border: none; background: transparent; cursor: pointer; color: var(--muted); font-size: 13px; padding: 4px; border-radius: 7px; line-height: 1; }
.icon-btn:hover { background: rgba(var(--ink-rgb), .07); color: var(--ink); }
.icon-btn.danger:hover { background: var(--crit-bg); color: var(--crit); }
.link-btn { border: none; background: transparent; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 4px; white-space: nowrap; }
.link-btn:hover { text-decoration: underline; }
.btn.icon-only { padding: 5px 8px; display: inline-flex; align-items: center; }
.btn.danger-text { color: var(--crit); }
/* инструменты строки проявляются на ховер и по фокусу с клавиатуры */
.row-tools .icon-btn { opacity: 0; transition: opacity .12s; }
tr:hover .row-tools .icon-btn, .row-tools .icon-btn:focus { opacity: 1; }

/* ════════════════════════════════════════════════════════════════
   12. ЧИП-СЕЛЕКТ (нативный select в виде пилюли)
   Настоящий <select> — клавиатура, мобильный пикер и доступность
   работают сами; выглядит как чип, стрелка нарисована inline-SVG.
   ════════════════════════════════════════════════════════════════ */
.chip-select {
  appearance: none; -webkit-appearance: none; border: none;
  background-color: var(--accent-soft); color: var(--accent);
  border-radius: 999px; padding: 4px 22px 4px 10px;
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  max-width: 160px; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f3f8f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 7px center; background-size: 11px;
}
.chip-select.neutral {
  background-color: rgba(var(--ink-rgb), .06); color: var(--muted);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666a78' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.chip-select:disabled { cursor: default; }
.chip-select:focus { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
/* нередактируемый вариант того же вида */
.chip-select.static { display: inline-block; padding: 4px 10px; border-radius: 9999px; background: rgba(var(--ink-rgb), .05); font-size: 13px; }

/* ════════════════════════════════════════════════════════════════
   13. ПЕРЕКЛЮЧАТЕЛЬ (switch)
   <label class="switch"><input type="checkbox"><span class="track"></span>Показывать</label>
   ════════════════════════════════════════════════════════════════ */
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.switch input { display: none; }
.switch .track { width: 30px; height: 18px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--on-accent); transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(12px); }

/* ════════════════════════════════════════════════════════════════
   14. ПЕРЕТАСКИВАНИЕ
   Ручка появляется на ховер, перетаскиваемый элемент бледнеет,
   цель приёма подсвечивается рамкой акцента.
   ════════════════════════════════════════════════════════════════ */
.drag-handle {
  display: inline-flex; align-items: center; justify-content: center; width: 16px;
  color: var(--faint); cursor: grab; font-size: 13px; letter-spacing: -3px;
  user-select: none; opacity: 0; transition: opacity .12s;
}
.drag-handle:active { cursor: grabbing; }
tr:hover .drag-handle, .draggable-row:hover .drag-handle, .card:hover > .drag-handle { opacity: 1; }
.dragging { opacity: .45; }
.drop-over { outline: 2px solid var(--accent) !important; outline-offset: -2px; background: var(--accent-soft) !important; }
[draggable="true"] { cursor: grab; }
.sortable-rows tr[draggable] { cursor: grab; }
.sortable-rows tr.dragging { opacity: .45; }
.sortable-rows .drag-cell { width: 44px; white-space: nowrap; }
.sortable-rows .drag-cell .drag-handle { opacity: 1; margin-right: 4px; }

/* ════════════════════════════════════════════════════════════════
   15. ПОПОВЕР И МЕНЮ НА <details>
   Ноль JS: открытие/закрытие даёт сам <details>, закрытие по клику мимо —
   один обработчик на документ (js/ui-core.js).

   Выравнивание: по умолчанию тело прижато к ЛЕВОМУ краю триггера — это
   безопасно, когда триггер стоит слева (а он стоит слева чаще). Для кнопок
   у правого края экрана — модификатор .to-right.
   ════════════════════════════════════════════════════════════════ */
.popover { position: relative; display: inline-block; }
.popover > summary { cursor: pointer; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: 10px; font-size: 13px; color: var(--muted); list-style: none; }
.popover > summary::-webkit-details-marker { display: none; }
.popover-body {
  position: absolute; left: 0; z-index: var(--z-popup); margin-top: 6px;
  background: var(--card-solid); border: 1px solid var(--border-strong); border-radius: 14px;
  padding: 12px 14px; box-shadow: var(--shadow-lg);
  min-width: 260px;
  /* без ограничения широкое тело у узкой кнопки вылезает за край окна */
  max-width: min(380px, calc(100vw - 32px));
  display: grid; gap: 8px;
}
.popover-body.to-right { left: auto; right: 0; }
.popover-body.left { left: 0; right: auto; }   /* алиас для совместимости */
.popover-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; }

/* Меню действий (⋯): узкая кнопка в строке таблицы или тулбаре.
   <details class="menu">
     <summary>⋯</summary>
     <div class="menu-body to-right">
       <a href="…">Дублировать</a>
       <button type="button">Перенести</button>
       <hr>
       <button type="button" class="danger">Удалить</button>
     </div>
   </details>
   В строках таблицы почти всегда нужен .to-right: кнопка стоит у правого края. */
.menu-body {
  position: absolute; left: 0; z-index: var(--z-popup); margin-top: 6px;
  min-width: 200px; max-width: min(320px, calc(100vw - 32px));
  padding: 5px; display: grid; gap: 1px;
  background: var(--card-solid); border: 1px solid var(--border-strong);
  border-radius: 12px; box-shadow: var(--shadow-lg);
}
.menu-body.to-right { left: auto; right: 0; }
.menu-body > a,
.menu-body > button {
  display: flex; align-items: center; gap: 9px;
  width: 100%; text-align: left;
  padding: 8px 10px; border: none; border-radius: 8px;
  background: transparent; color: var(--ink);
  font: inherit; font-size: 13.5px; cursor: pointer; text-decoration: none;
  white-space: nowrap;
}
.menu-body > a:hover,
.menu-body > button:hover { background: rgba(var(--ink-rgb), .06); text-decoration: none; }
.menu-body > a:focus-visible,
.menu-body > button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.menu-body > .danger { color: var(--crit); }
.menu-body > .danger:hover { background: var(--crit-bg); }
.menu-body > [disabled] { opacity: .45; cursor: default; }
.menu-body > [disabled]:hover { background: transparent; }
.menu-body hr { margin: 4px 2px; }
.menu-body .menu-label {
  padding: 6px 10px 2px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em; color: var(--faint);
}

/* чип с поповером: свёрнутое состояние сущности, раскрывается в карточку */
.entity-chip { position: relative; }
.entity-chip > summary {
  list-style: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 6px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--card-solid); cursor: pointer; user-select: none;
}
.entity-chip > summary::-webkit-details-marker { display: none; }
.entity-chip > summary:hover, .entity-chip[open] > summary { border-color: var(--accent); }
.entity-chip.ok > summary { border-color: rgba(var(--ok-rgb), .5); }
.entity-chip.warn > summary { border-color: rgba(var(--warn-rgb), .7); }
.entity-chip.empty > summary { border-style: dashed; }
.entity-chip-text { display: grid; line-height: 1.15; }
.entity-chip-text b { font-size: 13px; }
.entity-status { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.entity-status.ok { color: var(--ok); font-weight: 600; }
.entity-status.warn { color: var(--warn); font-weight: 600; }
.entity-status.none { color: var(--faint); }

/* ════════════════════════════════════════════════════════════════
   16. АВАТАРЫ
   Фото или инициал на акценте. Flex-центрирование с line-height:1 —
   grid+place-items в Safari сдвигает глиф вниз-влево.
   ════════════════════════════════════════════════════════════════ */
.avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar.initials, .avatar.none, .avatar.flag {
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1; box-sizing: border-box; text-align: center;
}
.avatar.initials { background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 10px; }
.avatar.none { border: 1.5px dashed var(--border-strong); color: var(--faint); font-weight: 700; font-size: 14px; }
.avatar.flag { background: var(--flag); color: var(--on-accent); font-weight: 800; font-size: 12px; }
.avatar-sm { width: 36px; height: 36px; font-size: 14px; }
.avatar-md { width: 56px; height: 56px; font-size: 20px; }
.avatar-lg { width: 96px; height: 96px; font-size: 32px; display: block; margin-bottom: 8px; }
.avatar-sm, .avatar-md, .avatar-lg { border-radius: 50%; object-fit: cover; }
.avatar-sm.initials, .avatar-md.initials, .avatar-lg.initials { display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
/* кольцо состояния вокруг аватара */
.avatar.ring-ok { box-shadow: 0 0 0 2px var(--ok-dot); }
.avatar.ring-accent { box-shadow: 0 0 0 2px var(--accent); }
.user-cell { display: inline-flex; align-items: center; gap: 8px; }

/* ════════════════════════════════════════════════════════════════
   17. СЛУЖЕБНЫЕ ПОЛОСЫ
   ════════════════════════════════════════════════════════════════ */
/* Режим имперсонации: липкая полоса поверх всего, чтобы забыть было нельзя */
.impersonate-top {
  position: sticky; top: 0; z-index: 60;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 7px 18px; background: var(--warn); color: var(--on-accent); font-size: 13px;
}
.impersonate-top .btn { background: var(--on-accent); color: var(--warn); box-shadow: none; padding: 4px 12px; }
.layout.has-topbar .sidebar { top: 34px; height: calc(100vh - 34px); }

/* Панель массовых действий: появляется, когда что-то отмечено */
.bulk-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; margin: -6px -8px 10px; border-radius: 12px;
  background: var(--crit-bg); color: var(--crit); font-size: 13.5px;
}
.bulk-bar b { font-size: 15px; }
table th.chk, table td.chk { width: 34px; padding-right: 0; }
table td.chk input { width: 16px; height: 16px; cursor: pointer; }

/* Мини-полоса участников/сущностей над таблицей */
.strip { margin: 0 0 18px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: rgba(var(--ink-rgb), .03); }
.strip-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; font-size: 13.5px; }
.strip-tools { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; }
.strip-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ════════════════════════════════════════════════════════════════
   18. КАРТОЧКИ ВЫБОРА (что делать на пустом экране)
   Пунктирная рамка = приглашение, а не готовый объект. На ховер
   становится сплошной и приподнимается.
   ════════════════════════════════════════════════════════════════ */
.start-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 4px 0 18px; }
.start-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  aspect-ratio: 1.25; padding: 22px 18px;
  border: 1.5px dashed var(--border-strong); border-radius: 18px;
  background: var(--card-solid); color: var(--ink); font: inherit; cursor: pointer; text-align: center;
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.start-card:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-lg); border-style: solid; }
.start-card:disabled { opacity: .55; cursor: default; }
.start-card .start-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; }
.start-card b { font-size: 15px; }
.start-card small { color: var(--muted); font-size: 12.5px; line-height: 1.4; max-width: 240px; }
@media (max-width: 900px) { .start-grid { grid-template-columns: 1fr; } .start-card { aspect-ratio: auto; } }

/* ════════════════════════════════════════════════════════════════
   19. СПИСОК ВЫБОРА (карточка-галочка)
   Отмеченный элемент подсвечен рамкой и мягким фоном — без отдельного
   «✓» и без перестроения раскладки.
   ════════════════════════════════════════════════════════════════ */
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 8px; align-items: start; }
.pick-list > p, .pick-list > span { grid-column: 1 / -1; }
.pick-group { grid-column: 1 / -1; font-size: 11.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.pick-group:first-child { margin-top: 0; }
.pick {
  display: grid; grid-template-columns: auto 56px minmax(0, 1fr); gap: 8px; align-items: center;
  padding: 6px 8px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--card-solid); cursor: pointer; font-size: 13px;
}
.pick:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pick.simple { grid-template-columns: auto minmax(0, 1fr) auto; }
.pick-cover { width: 56px; height: 36px; object-fit: cover; border-radius: 6px; }
.pick-logo { object-fit: contain; background: var(--plate); padding: 3px; border: 1px solid var(--border); }
.pick-photo { width: 36px; height: 36px; border-radius: 50%; }
.pick-text { display: grid; min-width: 0; }
.pick-text b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-text small { color: var(--faint); }

/* ════════════════════════════════════════════════════════════════
   20. ВЫБОР ПАЛИТРЫ (превью-макеты в профиле)
   ════════════════════════════════════════════════════════════════ */
.palettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; max-width: 900px; }
.palette {
  position: relative; display: grid; gap: 8px; padding: 10px;
  border: 1.5px solid var(--border); border-radius: 14px;
  background: var(--card-solid); cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.palette:hover { border-color: var(--border-strong); }
.palette:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.palette:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.palette input { position: absolute; opacity: 0; pointer-events: none; }
.palette svg { display: block; width: 100%; height: auto; border-radius: 9px; }
.palette-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 650; font-size: 13.5px; }
.palette-name .check { display: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: var(--on-accent); place-items: center; }
.palette:has(input:checked) .palette-name .check { display: grid; }
.palette-note { color: var(--muted); font-size: 12px; line-height: 1.4; margin: 0; }

/* ════════════════════════════════════════════════════════════════
   21. РАСКЛАДКИ ЭКРАНОВ
   ════════════════════════════════════════════════════════════════ */
/* Контент + липкая панель итогов справа */
.split-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.split-layout.wide-side { grid-template-columns: minmax(0, 1fr) 320px; }
.split-aside { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; scrollbar-width: thin; }
.split-aside h2 { margin-top: 0; }
@media (max-width: 991px) { .split-layout { grid-template-columns: minmax(0, 1fr); } .split-aside { position: static; max-height: none; } }
@media (min-width: 1300px) { .split-layout.wide-side { grid-template-columns: minmax(0, 1fr) 460px; } }

/* Строки итогов в боковой панели */
.totals { font-size: 14px; }
.trow { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 30px; padding: 2px 0; }
.trow > span:first-child, .trow > label { color: var(--muted); }
.trow > :last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); }
.trow.sub { min-height: 22px; font-size: 12.5px; }
.trow.sub > * { color: var(--faint); }
.trow.strong { font-weight: 700; font-size: 15px; }
.trow.strong > span:first-child { color: var(--ink); }
.trow.param > label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13.5px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.trow.param input, .trow.param select { padding: 4px 8px; font-size: 13px; width: 58px; text-align: right; }
.trow.param select { width: auto; text-align: left; }
.tsep { border-top: 1px dashed var(--border-strong); margin: 8px 0; }

/* Лента событий (история) */
.events { list-style: none; margin: 0; padding: 0; }
.events li { padding: 10px 0; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 130px 1fr; gap: 2px 12px; font-size: 13.5px; }
.events li:last-child { border-bottom: none; }
.ev-who { font-weight: 600; }
.ev-what { grid-column: 2; color: var(--muted); }
.ev-comment { grid-column: 2; margin-top: 4px; padding: 8px 12px; background: rgba(var(--ink-rgb), .05); border-radius: 8px; white-space: pre-wrap; }

/* Сетка «описание объекта» на три колонки */
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 22px; margin: 0; font-size: 13.5px; }
.detail-grid dt { color: var(--faint); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
.detail-grid dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.detail-grid > div { min-width: 0; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .detail-grid { grid-template-columns: 1fr; } }

/* ════════════════════════════════════════════════════════════════
   22. ПРОЧЕЕ
   ════════════════════════════════════════════════════════════════ */
.hidden { display: none !important; }
.overdue { color: var(--crit); font-weight: 600; }
.callout { border-left: 4px solid var(--accent); }
.danger-zone { margin-top: 16px; }
.inline-form { display: inline-flex; gap: 8px; align-items: center; }
.inline-form select { padding: 8px 12px; }
.row-actions { white-space: nowrap; }
.row-actions form { margin-right: 4px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; font-size: 13px; }
.copy-row.big { flex-wrap: wrap; }
.copy-row.big input { min-width: 260px; font-size: 14px; padding: 10px 13px; }
/* чип файла/вложения */
.file-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; text-decoration: none; margin: 2px 6px 2px 0; }
.file-chip small { color: var(--faint); }
/* раскрывающийся блок со своим маркером */
.disclosure > summary { cursor: pointer; list-style: none; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::before { content: "▸"; display: inline-block; width: 16px; color: var(--muted); transition: transform .12s; }
.disclosure[open] > summary::before { transform: rotate(90deg); }
/* мини-статус рядом с полем: «Сохранено 14:03» / «Не сохранилось» */
.status-note.pending { color: var(--warn); }
.status-note.ok { color: var(--ok); }
.status-note.error { color: var(--crit); }
.status-note.saving { color: var(--muted); }
/* превью во фрейме со спиннером на время загрузки */
.preview-frame { position: relative; border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden; background: var(--plate); height: 520px; }
.preview-frame iframe { width: 100%; height: 100%; border: 0; }
.preview-frame.print { background: var(--plate-shade); }
.preview-loading {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: var(--scrim); backdrop-filter: blur(2px); color: var(--on-dark); font-size: 13.5px; font-weight: 600; z-index: 2;
}
.preview-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(var(--on-dark-rgb), .35); border-top-color: var(--on-dark); animation: preview-spin .8s linear infinite; }
@keyframes preview-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .preview-spin { animation-duration: 2.4s; } }

/* Ветка «если» под элементом (вложенные условия, подпункты) */
.branch { position: relative; padding: 8px 0 4px 16px; border-left: 2px solid var(--mandarin); display: grid; gap: 8px; }
.branch.stale { border-left-color: var(--crit-dot); }
.branch-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.branch-if { color: var(--mandarin); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.branch.stale .branch-if { color: var(--crit); }

/* ════════════════════════════════════════════════════════════════
   23. ДОБАВКИ, КОТОРЫЕ ЧАСТО НУЖНЫ
   ════════════════════════════════════════════════════════════════ */

/* акцентная метка (в отличие от нейтральной .pill) */
.pill.accent { background: var(--accent-soft); color: var(--accent); }

/* свёрнутый блок «итоги периода» со сводкой прямо в заголовке */
.finals { margin-top: 16px; padding: 12px 16px; }
.finals summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.finals-list { margin-top: 10px; }
.finals-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-top: 1px solid var(--border);
  color: var(--ink); text-decoration: none; font-size: 13.5px;
}
.finals-row:hover { text-decoration: none; color: var(--accent); }

/* сетка логотипов в настройках: подложка всегда белая — логотипы рисуют под белое */
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.logo-tile {
  display: grid; gap: 6px; padding: 14px 16px 12px;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  color: inherit; text-decoration: none;
}
.logo-tile:hover { border-color: var(--accent); text-decoration: none; }
.logo-tile.dragging { opacity: .45; outline: 2px dashed var(--accent); }
.logo-tile-img { position: relative; display: flex; align-items: center; justify-content: center; height: 64px; background: var(--plate); border-radius: 10px; padding: 8px 12px; }
.logo-tile-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-tile-img .drag-handle { position: absolute; top: 4px; left: 6px; opacity: 0; color: var(--plate-faint); }
.logo-tile:hover .logo-tile-img .drag-handle { opacity: 1; }
.logo-tile-name { font-weight: 700; }
.logo-preview { display: inline-flex; padding: 12px 18px; background: var(--plate); border: 1px solid var(--border); border-radius: 10px; }
.logo-preview img { max-height: 56px; max-width: 240px; display: block; }

/* карточка с обложкой (кейс, статья) в настройках */
.cover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.cover-tile { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--card-solid); border: 1px solid var(--border); border-radius: 12px; }
.cover-tile.dragging { opacity: .45; outline: 2px dashed var(--accent); }
/* отбор файлов (элемент 51): галочка поверх превью, выбранная плитка — рамкой акцента */
.cover-pick { position: absolute; top: 10px; left: 10px; width: 18px; height: 18px; z-index: 1; }
.cover-tile:has(.cover-pick:checked) { outline: 2px solid var(--accent); outline-offset: -1px; }
.cover-tile:has(.cover-pick) { cursor: pointer; }
.cover-tile:has(.cover-pick:disabled) { cursor: default; opacity: .7; }
.cover-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; display: block; background: rgba(var(--ink-rgb), .05); }
.cover-body { padding: 10px 12px 6px; display: grid; gap: 3px; flex: 1; align-content: start; }
.cover-actions { display: flex; gap: 6px; justify-content: flex-end; padding: 6px 10px 10px; }

/* ════════════════════════════════════════════════════════════════
   24. ДАННЫЕ И ДАШБОРДЫ
   Показатели, шкалы, распределения, графики, состояния загрузки.
   Правила применения — docs/09-dashboards.md.

   Общий принцип: цвет ряда (--series-N) РАЗЛИЧАЕТ, цвет статуса
   (--ok / --warn / --crit) ОЦЕНИВАЕТ. Смешивать их на одном экране
   нельзя: иначе непонятно, красный — это «плохо» или «третий ряд».
   ════════════════════════════════════════════════════════════════ */

/* ── 24.1 Строка показателей (компактно, над списком) ───────────────
   Живёт в 03-base.css как .summary / .stat: цифра несёт цвет,
   вертикальных разделителей нет — они читались как единица. */

/* ── 24.2 Плитки метрик (крупно, шапка дашборда) ────────────────────
   <div class="kpi-grid">
     <article class="kpi">
       <span class="kpi-label">Выручка за месяц</span>
       <b class="kpi-value num">4 280 000 ₽</b>
       <span class="kpi-foot"><i class="trend up">+12,4 %</i> к прошлому месяцу</span>
     </article>
   </div>
   Порядок внутри плитки — подпись, значение, изменение — не меняйте:
   глаз сначала понимает, ЧТО измеряют, и только потом читает число. */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi {
  display: grid; gap: 4px; align-content: start;
  padding: 14px 16px 15px; min-width: 0;
  background: var(--card-solid); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow);
}
.kpi-label { font-size: 12px; color: var(--muted); line-height: 1.3; }
.kpi-value {
  font-family: var(--head); font-size: 26px; font-weight: 650;
  letter-spacing: -.02em; line-height: 1.1;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.kpi-value small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.kpi-foot { font-size: 12px; color: var(--faint); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kpi-spark { margin-top: 6px; display: block; width: 100%; height: 30px; overflow: visible; }
/* акцентная плитка — ровно одна на дашборд, для главного числа */
.kpi.lead { background: linear-gradient(135deg, var(--accent-soft), var(--card-solid) 70%); border-color: transparent; outline: 1px solid var(--border); outline-offset: -1px; }
.kpi.lead .kpi-value { color: var(--accent); font-size: 30px; }
/* статусная кромка слева: метрика вышла за порог */
.kpi.is-crit { box-shadow: inset 3px 0 0 var(--crit-dot), var(--shadow); }
.kpi.is-warn { box-shadow: inset 3px 0 0 var(--warn-dot), var(--shadow); }
.kpi.is-ok   { box-shadow: inset 3px 0 0 var(--ok-dot), var(--shadow); }

/* ── 24.3 Изменение показателя ──────────────────────────────────────
   <i class="trend up">+12,4 %</i>   рост
   <i class="trend down">−3,1 %</i>  падение
   <i class="trend flat">0 %</i>     без изменений
   По умолчанию рост = хорошо. Там, где рост — это плохо (стоимость
   заявки, время ответа, число ошибок), добавьте .inverted на контейнер:
   <article class="kpi inverted"> — тогда стрелка вверх станет красной. */
.trend {
  display: inline-flex; align-items: center; gap: 3px;
  font-style: normal; font-weight: 650; font-size: 12px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.trend::before { font-size: 10px; line-height: 1; }
.trend.up { color: var(--ok); }
.trend.up::before { content: "▲"; }
.trend.down { color: var(--crit); }
.trend.down::before { content: "▼"; }
.trend.flat { color: var(--faint); }
.trend.flat::before { content: "—"; }
.inverted .trend.up { color: var(--crit); }
.inverted .trend.down { color: var(--ok); }
/* нейтральный вариант: изменение показано, но не оценивается */
.trend.plain, .trend.plain.up, .trend.plain.down { color: var(--muted); }

/* ── 24.4 Шкала с зонами (значение относительно порогов) ────────────
   <div class="meter" style="--v:68">
     <div class="meter-zones"><i class="bad" style="--w:40"></i><i class="mid" style="--w:30"></i><i class="good" style="--w:30"></i></div>
     <span class="meter-mark"></span>
   </div>
   --v — позиция метки в процентах, --w — доля каждой зоны. */
/* overflow прячется на .meter-zones, а не на .meter: метка специально
   выступает за полосу сверху и снизу, иначе её не видно на плотных зонах */
.meter { position: relative; height: 10px; }
.meter-zones { display: flex; height: 100%; border-radius: 999px; overflow: hidden; background: rgba(var(--ink-rgb), .06); }
.meter-zones i { display: block; width: calc(var(--w, 33) * 1%); }
.meter-zones .bad { background: var(--zone-bad); }
.meter-zones .mid { background: var(--zone-mid); }
.meter-zones .good { background: var(--zone-good); }
.meter-mark {
  position: absolute; top: -3px; bottom: -3px; left: calc(var(--v, 0) * 1%);
  width: 3px; border-radius: 2px; background: var(--ink);
  box-shadow: 0 0 0 2px var(--card-solid);
  /* ui-lint-ignore: E-ANIM ширина здесь и есть значение: анимация проигрывается один раз при обновлении данных, не в цикле */
  transform: translateX(-50%); transition: left .3s ease;
}
.meter-wrap { overflow: visible; padding: 3px 0; }
.meter-legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); margin-top: 5px; font-variant-numeric: tabular-nums; }

/* ── 24.5 Полоса выполнения ─────────────────────────────────────────
   <div class="progress"><span style="width:64%"></span></div>
   Модификаторы .ok / .warn / .crit меняют цвет заливки. */
.progress { height: 6px; border-radius: 999px; background: rgba(var(--ink-rgb), .08); overflow: hidden; }
  /* ui-lint-ignore: E-ANIM ширина здесь и есть значение: анимация проигрывается один раз при обновлении данных, не в цикле */
.progress > span { display: block; height: 100%; border-radius: 999px; background: var(--accent); transition: width .3s ease; }
.progress.ok > span { background: var(--ok-dot); }
.progress.warn > span { background: var(--warn-dot); }
.progress.crit > span { background: var(--crit-dot); }
.progress.lg { height: 10px; }
.progress-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; font-size: 13px; }
.progress-row .progress { grid-column: 1 / -1; }
.progress-row b { font-variant-numeric: tabular-nums; }

/* ── 24.6 Распределение (stacked bar) и легенда ─────────────────────
   <div class="dist"><i style="--w:46" data-series="1"></i><i style="--w:28" data-series="2"></i></div>
   Сегменты меньше 2 % не показывайте отдельно — сложите в «прочее». */
.dist { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: rgba(var(--ink-rgb), .06); }
  /* ui-lint-ignore: E-ANIM ширина здесь и есть значение: анимация проигрывается один раз при обновлении данных, не в цикле */
.dist > i { display: block; width: calc(var(--w, 0) * 1%); transition: width .3s ease; }
.dist > i[data-series="1"] { background: var(--series-1); }
.dist > i[data-series="2"] { background: var(--series-2); }
.dist > i[data-series="3"] { background: var(--series-3); }
.dist > i[data-series="4"] { background: var(--series-4); }
.dist > i[data-series="5"] { background: var(--series-5); }
.dist > i[data-series="6"] { background: var(--series-6); }
.dist > i[data-series="rest"] { background: rgba(var(--ink-rgb), .18); }

/* Легенда: один компонент и для распределения, и для графика */
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 12.5px; }
.legend > * { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); min-width: 0; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; background: var(--unknown-dot); font-style: normal; }
.legend [data-series="1"] i { background: var(--series-1); }
.legend [data-series="2"] i { background: var(--series-2); }
.legend [data-series="3"] i { background: var(--series-3); }
.legend [data-series="4"] i { background: var(--series-4); }
.legend [data-series="5"] i { background: var(--series-5); }
.legend [data-series="6"] i { background: var(--series-6); }
.legend b { color: var(--ink); font-variant-numeric: tabular-nums; }
/* кликабельная легенда = фильтр графика; погашенный ряд бледнеет */
.legend button { border: none; background: transparent; font: inherit; cursor: pointer; padding: 2px 0; }
.legend button.off { opacity: .4; }
.legend button.off i { background: var(--unknown-dot); }

/* ── 24.7 Карточка графика ──────────────────────────────────────────
   Шапка: название слева, период и переключатели справа. Под графиком —
   легенда. Внутрь кладите <svg> или <canvas> высотой 160–280 px. */
.chart-card { padding: 16px 18px 14px; }
.chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.chart-head h3 { margin: 0; font-size: 15px; }
.chart-head .muted { font-size: 12.5px; }
.chart-body { position: relative; min-height: 160px; }
.chart-body svg, .chart-body canvas { display: block; width: 100%; height: auto; overflow: visible; }
/* сетка и оси рисуются токенами — работают в обеих темах без правок */
.chart-body .grid line, .chart-body line.grid { stroke: var(--grid-line); stroke-width: 1; }
.chart-body .axis line, .chart-body .axis path { stroke: var(--axis-line); stroke-width: 1; }
.chart-body .axis text, .chart-body text.tick { fill: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-body .series-1 { stroke: var(--series-1); fill: none; stroke-width: 2; }
.chart-body .series-2 { stroke: var(--series-2); fill: none; stroke-width: 2; }
.chart-body .series-3 { stroke: var(--series-3); fill: none; stroke-width: 2; }
.chart-body .area-1 { fill: var(--series-1-soft); stroke: none; }
.chart-body .area-2 { fill: var(--series-2-soft); stroke: none; }
.chart-body .area-3 { fill: var(--series-3-soft); stroke: none; }
.chart-body rect.bar-1 { fill: var(--series-1); }
.chart-body rect.bar-2 { fill: var(--series-2); }
.chart-body rect.bar-3 { fill: var(--series-3); }
/* зоны «плохо / средне / хорошо» фоном под линией истории */
.chart-body .zone-bad { fill: var(--zone-bad-soft); }
.chart-body .zone-mid { fill: var(--zone-mid-soft); }
.chart-body .zone-good { fill: var(--zone-good-soft); }
/* целевой уровень — пунктир, а не ещё одна сплошная линия */
.chart-body .target { stroke: var(--axis-line); stroke-dasharray: 4 4; stroke-width: 1; fill: none; }

/* спарклайн в плитке и в ячейке таблицы: без осей и подписей, только форма */
.spark { display: block; overflow: visible; }
.spark path.line { fill: none; stroke: var(--series-1); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.spark path.area { fill: var(--series-1-soft); stroke: none; }
.spark circle.last { fill: var(--series-1); }
.spark.ok path.line { stroke: var(--ok-dot); }
.spark.ok path.area { fill: var(--ok-bg); }
.spark.ok circle.last { fill: var(--ok-dot); }
.spark.crit path.line { stroke: var(--crit-dot); }
.spark.crit path.area { fill: var(--crit-bg); }
.spark.crit circle.last { fill: var(--crit-dot); }

/* ── 24.8 Данные внутри таблицы ─────────────────────────────────────
   Мини-полоса в ячейке: сравнение строк без отдельного графика.
   <td class="num">1 240 <span class="bar" style="--w:72"></span></td> */
.bar { display: block; height: 4px; margin-top: 4px; border-radius: 999px; background: var(--accent-soft); }
.bar::before { content: ""; display: block; height: 100%; width: calc(var(--w, 0) * 1%); border-radius: 999px; background: var(--accent); }
.bar.ok::before { background: var(--ok-dot); }
.bar.warn::before { background: var(--warn-dot); }
.bar.crit::before { background: var(--crit-dot); }
/* ячейка со сравнением «было → стало» */
.cmp { display: inline-flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.cmp s { color: var(--faint); text-decoration-color: var(--faint); }
.cmp i { font-style: normal; color: var(--faint); }
.cmp b { font-weight: 650; }

/* ── 24.9 Состояния загрузки ────────────────────────────────────────
   Скелет вместо спиннера там, где известна форма будущего контента:
   страница не «прыгает», когда данные приедут. */
.skeleton {
  display: block; height: 1em; border-radius: 7px;
  background: linear-gradient(90deg,
    rgba(var(--ink-rgb), .06) 25%,
    rgba(var(--ink-rgb), .12) 37%,
    rgba(var(--ink-rgb), .06) 63%);
  background-size: 400% 100%;
  animation: skeleton 1.4s ease infinite;
}
.skeleton + .skeleton { margin-top: 8px; }
.skeleton.line-sm { height: .8em; }
.skeleton.block { min-height: 120px; border-radius: 12px; }
@keyframes skeleton { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
/* спиннер — только для действий без известной формы результата */
.spinner {
  display: inline-block; vertical-align: -3px; box-sizing: border-box;
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  border: 2px solid rgba(var(--ink-rgb), .18); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
/* в строке состояния у кнопки (элемент 39, решение 436) — по высоте мелкого текста */
.small > .spinner, [data-run-state] > .spinner { width: 12px; height: 12px; vertical-align: -1px; }
/* данные устарели: показываем старые цифры приглушённо, а не пустоту */
.is-stale { opacity: .55; transition: opacity .2s; }

/* ── 24.10 Раскладка дашборда ───────────────────────────────────────
   Одна колонка на телефоне, две на планшете, 12 колонок на десктопе.
   Ширину блока задаёт класс .col-N (N из 12). */
.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; align-items: start; }
.dash > * { grid-column: span 12; min-width: 0; }
@media (min-width: 720px) {
  .dash > .col-3, .dash > .col-4, .dash > .col-6 { grid-column: span 6; }
}
@media (min-width: 1100px) {
  .dash > .col-3 { grid-column: span 3; }
  .dash > .col-4 { grid-column: span 4; }
  .dash > .col-6 { grid-column: span 6; }
  .dash > .col-8 { grid-column: span 8; }
  .dash > .col-9 { grid-column: span 9; }
}
/* панель периода: чипы и даты, всегда над дашбордом и всегда на одном месте */
.dash-bar { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 14px; }
.dash-bar .spacer { flex: 1; }
.dash-updated { font-size: 12px; color: var(--faint); display: inline-flex; align-items: center; gap: 6px; }

/* ════════════════════════════════════════════════════════════════
   25. STING AI — то, чего в системе нет
   Отдельного файла под экран система не разрешает, и правильно: два
   набора правил расходятся молча. Здесь только то, чему в каталоге
   компонентов не нашлось соответствия, и у каждого блока сказано,
   почему готовое не подошло.
   ════════════════════════════════════════════════════════════════ */

/* ── 25.1 Полоса-сообщение о состоянии сервиса ───────────────────────
   Готового блока с оценкой в системе нет: `.issues` всегда янтарный
   («что мешает выполнить действие»), `.note-box` нейтральный. Здесь
   нужны три тона: «база не отвечает» — это отказ, а не предупреждение,
   и зелёное «сохранено» тоже должно читаться с одного взгляда.
   Цвет = смысл, как в правиле 3 AGENTS.md: красный — сломалось,
   янтарный — ждёт вас, зелёный — готово. */
.notice {
  margin: 0 0 14px;
  padding: 11px 15px;
  border-left: 4px solid currentColor;
  border-radius: 0 12px 12px 0;
  background: rgba(var(--ink-rgb), .05);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.5;
}
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.crit { background: var(--crit-bg); color: var(--crit); }
.notice code { background: rgba(var(--ink-rgb), .08); color: inherit; }

/* ── 25.2 Версия сборки в подвале сайдбара ───────────────────────────
   Место блока профиля: пользователей у сервиса нет (вход закрывает
   basic auth), а версия и среда нужны под рукой — по ним видно, что
   именно сейчас открыто. */
/* Цвет `--muted`, а не `--faint`: последний — самый слабый токен системы,
   он не проходит контраст ни в одной палитре (`contrast-test --fails`), и
   добавлять к этому долгу своё правило незачем. */
.side-build { margin: 10px 4px 0; font-size: 11.5px; color: var(--muted); }

/* ── 25.3 Журнал правок ──────────────────────────────────────────────
   `.versions` из слоя 09 подошёл бы по смыслу, но тянуть весь слой
   ввода данных ради одного списка дороже трёх правил. Запись — шапка
   (когда, кто, почему) плюс строки «что стало». */
.policy-log { list-style: none; padding: 0; margin: 0; }
.policy-log > li {
  padding: 10px 14px;
  margin-bottom: 8px;
  background: rgba(var(--ink-rgb), .03);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.policy-log > li:last-child { margin-bottom: 0; }
.policy-log-meta { margin: 0 0 6px; font-size: 12.5px; color: var(--muted); }
.policy-log-lines { margin: 0; padding-left: 18px; font-size: 13px; }

/* ── 25.4 Соседние визиты с тем же ключом ────────────────────────────
   Список внутри ячейки таблицы: до десяти строк, и без своей прокрутки
   он растягивал бы карточку визита на весь экран. */
.siblings {
  max-height: 260px;
  overflow-y: auto;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
}
.siblings li {
  padding: 3px 10px;
  margin-bottom: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* ── 25.5 Карта визита ───────────────────────────────────────────────
   Точки событий на оси времени. График из слоя дашбордов сюда не
   ложится: значения у события нет вовсе, есть только момент. Точный
   порядок и время читаются в таблице под полосой, поэтому сама полоса
   скрыта от вспомогательных технологий. */
.timeline-bar { position: relative; height: 28px; margin: 4px 0 12px; }
.timeline-track {
  position: absolute; left: 0; right: 0; top: 50%;
  height: 2px; background: var(--border-strong); transform: translateY(-50%);
}
.timeline-mark {
  position: absolute; top: 50%;
  width: 10px; height: 10px; margin-left: -5px;
  background: var(--accent); border: 2px solid var(--card-solid);
  border-radius: 50%; transform: translateY(-50%);
}

/* ── 25.6 Гистограмма двух когорт ────────────────────────────────────
   `.dist` системы — одна полоса на 100 %, здесь нужна другая картинка:
   форма признака у двух когорт рядом, столбик к столбику. Когорты —
   ряды, а не оценка, поэтому цвета из `--series-*` (правило 11).
   Штриховка у второй когорты обязательна: цвет единственным носителем
   смысла быть не может — при цветовой слепоте и на чёрно-белой печати
   столбики иначе сливаются в один. */
.hist {
  display: flex; align-items: flex-end; gap: 12px;
  list-style: none; margin: 12px 0 8px; padding: 0 0 8px;
  overflow-x: auto;
}
.hist-bin { display: flex; flex-direction: column; align-items: center; gap: 4px; }
/* Высота ряда задана здесь и только здесь: проценты из данных считаются
   от неё, и без этой строки столбики схлопнутся в ноль. Линия снизу —
   ось: по ней видно, что пустой столбик именно пуст, а не потерялся. */
.hist-bars {
  display: flex; align-items: flex-end; gap: 4px;
  height: 128px; border-bottom: 1px solid var(--border-strong);
}
.hist-bar { width: 16px; border-radius: 6px 6px 0 0; }
.hist-a { background: var(--series-1); }
.hist-b {
  background-color: var(--series-2-soft);
  background-image: repeating-linear-gradient(
    45deg,
    var(--series-2) 0, var(--series-2) 4px,
    transparent 4px, transparent 8px
  );
  border: 1px solid var(--series-2);
}
.hist-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
/* Легенда системы ждёт цвет от data-series; наши образцы несут ещё и
   штриховку, поэтому красятся своими классами. */
.legend i.hist-a, .legend i.hist-b { width: 12px; height: 12px; }

/* ── 25.7 Строки таблицы распределений ───────────────────────────────
   Строка признака и строка с его гистограммой — одна единица: линия
   между ними разрывала бы пару. Тонкая когорта не прячется, но и не
   притворяется находкой: приглушённая строка говорит «сюда — в
   последнюю очередь», а ссылка на карточку остаётся акцентной —
   приглушить её значит спрятать единственный выход со страницы. */
.cohort-row > td { border-bottom: 0; }
.cohort-thin > td { color: var(--muted); }
/* Пометка о тонкой когорте — единственное место приглушённой строки в
   полную силу цвета: её видно обязательно, иначе строка читается как
   обычная. */
.cohort-note {
  display: inline-block; margin-top: 4px; padding: 0 8px;
  font-size: 12px; color: var(--ink);
  background: var(--plate); border: 1px solid var(--border-strong);
  border-radius: 999px; white-space: nowrap;
}
/* Гистограмма раскрывается в ячейке во всю ширину таблицы, а таблица на
   узком экране шире окна — объяснение под кнопкой обрывалось бы на
   середине фразы. Ширина считается от окна, а не от ячейки; «прилипание»
   к левому краю прокрутки держит столбики на виду, пока таблица едет
   вбок. 68 символов — мера строки. */
.cohort-bins details { position: sticky; left: 0; width: min(68ch, calc(100vw - 64px)); }

/* ── 25.8 Ручка `<details>` как цель нажатия ─────────────────────────
   Строка текста высотой 21 px — это меньше 24×24, минимума WCAG 2.2:
   пальцем в неё на телефоне попадают не с первого раза. Отступ по
   вертикали — единственное, чего ей не хватает; ничего не
   переопределяем. Замерено `runtime-audit.js` на ширине 360 px. */
.disclosure > summary { padding: 4px 0; }

/* ── 25.9 Плотный ряд плиток ─────────────────────────────────────────
   Сводка показывает шесть показателей, и на 1184 px они не влезают в
   строку ровно на шестнадцать пикселей: 6 × 190 + 5 × 12 = 1200. Ряд,
   разорванный одной плиткой, читается как «тут ещё что-то есть» —
   поэтому минимум колонки уменьшен. Модификатор, а не правка
   `.kpi-grid`: на других экранах плиток бывает и десять, и там перенос
   правильный. */
.kpi-grid.tight { grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }

/* ── 25.10 Заголовочный шрифт — системный без засечек ────────────────
   Выбор владельца 18.09.2026 из пяти показанных вариантов, и причина
   не во вкусе, а в цифрах. `--serif` на Windows падает в Georgia, а у
   Georgia цифры «старого стиля»: 3, 4, 5, 7, 9 висят ниже строки, 6 и
   8 лезут выше. Там, где числа сравнивают глазом — ряд плиток на
   сводке, суммы в таблицах, — это читается как прыгающая строка.
   Настройкой это не чинится: прямых цифр у Georgia нет вовсе, а
   `tabular-nums` выравнивает ширину, но не высоту.
   Системный шрифт вдобавок не требует ни одного внешнего запроса и ни
   одного файла — он уже стоит у того, кто открыл страницу.
   Палитрам это не мешает: у `classic` своего `--head` нет, а правило
   другой палитры перебьёт это по специфичности, как и задумано. */
:root { --head: var(--sans); }

/* ── 25.11 Числа на плитках стоят на одной линии ─────────────────────
   Плитка складывает содержимое сверху вниз, поэтому подпись в две
   строки опускает своё число на пятнадцать пикселей, а `.lead` со
   своими 30 px опускает базовую линию ещё на пять. Ряд показателей
   при этом читается как неровный — замерено на сводке 18.09.2026:
   верх числа 117 у пяти плиток и 132 у шестой, низ 145 против 150.
   Сетка не умеет равнять строки соседних плиток (каждая — своя
   сетка), поэтому равняем подпись: место под две строки есть всегда,
   и числа стартуют с одной высоты независимо от длины подписи.
   `.lead` остаётся главным числом цветом и подложкой — размером ему
   выделяться незачем, ценой этого был кривой ряд. */
.kpi .kpi-label { min-height: 2.6em; }       /* две строки 12px/1.3 */
.kpi.lead .kpi-value { font-size: 26px; }    /* как у остальных плиток */

/* ── 25.12 Блок выбора проб: галочка рядом с подписью ────────────────
   `.pick` системы рассчитан на короткую подпись: он центрирует всё по
   вертикали, и при подписи в одну строку это правильно. У нас рядом с
   названием пробы стоит объяснение в четыре-пять строк — человеку надо
   понимать, чего он лишится, — и галочка уезжает на середину абзаца.
   Замерено на черновике 19.09.2026: верх галочки на 42 px ниже верха
   подписи у всех трёх карточек, и ряд читается как сбитый.
   Равняем по верху, а карточки тянем на одну высоту: три карточки
   разной длины в ряду выглядят так же неровно, как числа на плитках
   из 25.11. Правило узкое — только этот блок; `.pick` больше нигде в
   админке не встречается, но трогать системный компонент незачем. */
.pick-list:has(input[name^="probe_"]) { align-items: stretch; }
.pick-list:has(input[name^="probe_"]) .pick { align-items: start; }
.pick-list:has(input[name^="probe_"]) .pick input { margin-top: 2px; }
/* Подпись пробы переносится, а не обрезается многоточием: обрезанное
   «Отпечаток видеока…» не объясняет ничего. */
.pick-list:has(input[name^="probe_"]) .pick-text b { white-space: normal; }

/* ════════════════════════════════════════════════════════════════
   26. НЕАКТИВНОЕ СОСТОЯНИЕ И СОХРАНЕНИЕ У ПОЛЯ
   Пятое состояние из docs/10-interaction.md §1 у кнопок и
   переключателей: приглушено, курсор по умолчанию, без подъёма, тени
   и отклика на наведение. Причина — в title или строкой рядом
   (docs/18-screen-process.md §8). `aria-disabled` — для ссылки в виде
   кнопки, у неё нет атрибута disabled.
   Рамка `.saved` у всех видов поля держится 2 с и идёт вместе со
   строкой «✓ Сохранено в ЧЧ:ММ» под полем (docs/18, §7).
   ════════════════════════════════════════════════════════════════ */
.btn:disabled, .btn[aria-disabled="true"],
.chip:disabled, .chip[aria-disabled="true"],
.link-btn:disabled, .icon-btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn:disabled, .btn[aria-disabled="true"],
.btn:disabled:hover, .btn[aria-disabled="true"]:hover { box-shadow: none; transform: none; }
.btn:disabled:hover, .btn[aria-disabled="true"]:hover { background: var(--accent); color: var(--hover-solid); }
.btn.secondary:disabled:hover, .btn.secondary[aria-disabled="true"]:hover { background: var(--card-solid); color: var(--ink); }
.btn.danger:disabled:hover, .btn.danger[aria-disabled="true"]:hover { background: var(--crit-bg); color: var(--crit); }
.chip:disabled:hover, .chip[aria-disabled="true"]:hover { color: var(--muted); }
.chip.active:disabled:hover, .chip.active[aria-disabled="true"]:hover { color: var(--ink); }
.link-btn:disabled:hover { text-decoration: none; }
.icon-btn:disabled:hover { background: transparent; color: var(--muted); }
/* инструмент строки остаётся скрытым до наведения, даже неактивный */
.row-tools .icon-btn:disabled { opacity: 0; }
tr:hover .row-tools .icon-btn:disabled, .row-tools .icon-btn:disabled:focus { opacity: .45; }
/* подтверждение сохранения: та же рамка, что у input.saved (§ inline-правка) */
textarea.saved, select.saved { box-shadow: 0 0 0 3px var(--ok-bg); border-color: var(--ok-dot) !important; transition: box-shadow .2s; }
.chips.saved { box-shadow: 0 0 0 1px var(--ok-dot), 0 0 0 4px var(--ok-bg); transition: box-shadow .2s; }

/* ════════════════════════════════════════════════════════════════
   27. КНОПКИ «ЧТО ПРОДАЁТСЯ» — ДВЕ СТРОКИ ГРУПП
   Карточка проекта копилота (решения 237, 240, 243): две группы
   кнопок-переключателей одна под другой, как в прототипе
   docs/mockups/offer-form-v2 — отступ 8 px между строками.
   Подпись группы — над кнопками, а не слева, как в прототипе: форма
   карточки шириной 760 px, семь кнопок квартир занимают 725 px, и с
   подписью слева ряд переносился надвое (замер 24.09.2026, 1440×900).
   Правило экрана, не компонент эталона (правило 2 AGENTS.md).
   ════════════════════════════════════════════════════════════════ */
.chip-rows { display: grid; gap: 8px; justify-items: start; }
.chip-row { display: grid; gap: 4px; justify-items: start; }

/* ════════════════════════════════════════════════════════════════
   28. ТАБЛИЦА ОФФЕРОВ ПО ГРУППАМ
   Вкладка «Офферы и дисклеймеры» копилота (решения 237, 240, 243):
   тип объекта, срок и статус дисклеймера держатся одной строкой, как
   в прототипе docs/mockups/offer-form-v2 — «4-комнатные и больше
   + оффер» или «01.09 – 30.09 · ещё 6 дн.», перенесённые надвое,
   читаются как две записи. Правило экрана (правило 2 AGENTS.md).
   ════════════════════════════════════════════════════════════════ */
td.keep-line { white-space: nowrap; }

/* ════════════════════════════════════════════════════════════════
   29. ПОДПИСЬ-LABEL В СЕТКЕ «ПОДПИСЬ СЛЕВА»
   Форма оффера копилота (прототип docs/mockups/offer-form-v2): у поля
   ввода подпись в `dt` — `<label for>` (для скринридера и клика), у
   группы кнопок — просто текст `dt`. Базовый `label` мельче и жирнее
   `dt`, и строки «Уточнение» и «Для кого» выглядели разными (решение
   239: один род элемента — один вид). Label в `dt` берёт вид `dt`.
   ════════════════════════════════════════════════════════════════ */
.meta-grid dt label { display: inline; margin: 0; font: inherit; color: inherit; letter-spacing: inherit; }
/* Поле дисклеймера клиента — на всю ширину карточки, как в прототипе:
   вне `.form-grid` у `textarea` ширины нет, и поле сжималось до 175 px
   (замер 24.09.2026, 1440×900); высоту ведёт скрипт — до 14 строк. */
textarea.wide-text { width: 100%; box-sizing: border-box; }

/* ════════════════════════════════════════════════════════════════
   30. ЦИФРА ВНЕ ГРАНИЦ — СТРОКА ПОД ПОЛЕМ С КНОПКОЙ ИСПРАВЛЕНИЯ
   Форма оффера копилота (решение 251, прототип
   docs/mockups/disclaimer-checklist): «214 000 тыс. ₽ в месяц — это
   214 млн ₽ в месяц. Так не бывает…» и кнопка «Сделать «₽ в месяц»»
   одной строкой под полем цифры — цвет и кегль как у `.status-note.error`,
   но с кнопкой, которой у строки состояния нет. Пока строка есть,
   собственная строка состояния поля пуста и не занимает место.
   Правило экрана, не компонент эталона (правило 2 AGENTS.md).
   ════════════════════════════════════════════════════════════════ */
.figure-guard { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin: 6px 0 0; font-size: 13px; color: var(--crit); }
.status-note:empty { display: none; }

/* ════════════════════════════════════════════════════════════════
   31. РАЗБОР ДИСКЛЕЙМЕРА — ТРИ ПЛАШКИ ПРИ ПРАВКЕ, ОДНА ПОМЕТКА В СПИСКАХ
   Компонент эталона (правило 24 AGENTS.md, docs/04-patterns.md §17,
   docs/03-components.md «Итог проверки»): при правке записи под полем —
   три плашки `.check-box.crit|warn|ok` друг под другом в `.check-boxes`
   (решения 250, 273): «Не указано», «Требует исправления», «Соответствует
   требованиям» — каждая со своим заголовком-счётчиком и списком, основание
   свёрнуто `.check-basis`. В строках и таблицах — одна пометка
   `.badge ok|warn|crit` (решение 260). Нечего проверять — серая
   `.check-box` без модификатора со списком обязательного. Цвет несёт
   заливка, полоса слева и заголовок; текст пунктов — обычный `--ink`.
   ════════════════════════════════════════════════════════════════ */
.check-boxes { display: grid; gap: 10px; margin-top: 14px; }
/* Замечание строкой в ячейке таблицы проверок: текст, под ним бейдж правила и действия. */
.finding-line + .finding-line { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.check-box { padding: 10px 14px 12px; border-radius: 0 12px 12px 0; border-left: 4px solid var(--border-strong); background: rgba(var(--ink-rgb), .05); color: var(--ink); font-size: 13.5px; line-height: 1.45; }
.check-box.crit { background: var(--crit-bg); border-left-color: var(--crit-dot); }
.check-box.warn { background: var(--warn-bg); border-left-color: var(--warn-dot); }
.check-box.ok { background: var(--ok-bg); border-left-color: var(--ok-dot); }
.check-box > h3 { margin: 0 0 6px; font-size: 13.5px; font-weight: 700; }
.check-box.crit > h3 { color: var(--crit); }
.check-box.warn > h3 { color: var(--warn); }
.check-box.ok > h3 { color: var(--ok); }
.check-box ul { margin: 0; padding-left: 18px; }
.check-box li + li { margin-top: 4px; }
.check-box p { margin: 4px 0 0; }
.check-box .check-group { font-weight: 600; }
.check-box .check-found { color: var(--muted); }
.check-box .check-basis { font-size: 12.5px; color: var(--muted); }
.check-box .check-basis p { margin: 2px 0 4px 16px; }

/* Строка замечания (решение 405): площадка → вид ошибки → строка «цитата · оффер или что
   не так · планировка · где · флажок». Строка раскрывается — кампании, группы, номера. */
.issue-head { display: flex; align-items: center; gap: 8px; margin: 18px 0 2px; font-size: 14.5px; }
.issue-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn-dot); flex: none; }
.issue-head.crit .dot { background: var(--crit-dot); }
.issue-head.ok .dot { background: var(--ok-dot); }
.issue-row { display: grid; grid-template-columns: minmax(130px, 190px) minmax(0, 1.5fr) minmax(140px, 190px) minmax(0, 1fr) 36px; gap: 14px; align-items: center; padding: 7px 4px; border-top: 1px solid var(--border); font-size: 13.5px; cursor: pointer; }
.issue-row:hover { background: rgba(var(--ink-rgb), .025); }
.issue-row .chev { display: inline-block; transition: transform .15s; }
.issue-row[aria-expanded="true"] .chev { transform: rotate(90deg); }
.issue-row .row-tools { justify-self: end; }
.issue-quote { font-weight: 600; justify-self: start; padding: 0 3px; border-radius: 3px; background: var(--warn-bg); color: var(--warn); border-bottom: 2px solid var(--warn-dot); }
.issue-quote.crit { background: var(--crit-bg); color: var(--crit); border-bottom-color: var(--crit-dot); }
/* Длинная цитата (ссылка объявления) переносится по символам и не наезжает на соседнюю колонку (решение 641). */
.issue-row > span { min-width: 0; overflow-wrap: anywhere; }
.issue-detail { padding: 4px 0 12px 20px; }
.issue-detail .inline-form { margin-top: 8px; }

/* ════════════════════════════════════════════════════════════════
   32. ИСТОРИЯ ИЗМЕНЕНИЙ ВНИЗУ СТРАНИЦЫ
   Правило 21 AGENTS.md, docs/04-patterns.md §16: кто, когда и что
   менял — свёрнутым блоком `section.card.history > details.disclosure`
   внизу страницы, а не бейджем «изменено сегодня» у поля. Раскрытый —
   таблица «Когда · Кто · Что изменено · Было · Стало». «Было» приглушено:
   глаз читает строку слева направо и останавливается на «стало».
   Разметка — макрос `change_history` (templates/_macros.html).
   ════════════════════════════════════════════════════════════════ */
.history td.was { color: var(--muted); }
.history td.when, .history td.who { white-space: nowrap; }
.history .long-text { margin: 4px 0 0; white-space: pre-wrap; }
.history .more { margin-top: 10px; }

/* ════════════════════════════════════════════════════════════════
   33. ФИРМЕННЫЙ ЗНАК И ВЫБОР ПРОЕКТА В ПАНЕЛИ РАЗДЕЛОВ
   Копилот (решение 256, прототип docs/mockups/navigation): полосы над
   каркасом нет — она сдвигала панель высотой в экран на 91 px, и профиль
   с темой уходили за край. Вверху панели — знак southmedia (base.html по
   умолчанию, макрос wordmark() из templates/_brand.html, цвет —
   currentColor, живёт в обеих темах) и подпись приложения под ним; выбор
   проекта — наверху панели над разделами (блок side_nav_top в base.html,
   решение 376), тело открывается вниз. Знак — часть эталона; выбор
   проекта — правило экрана копилота (правило 2 AGENTS.md).
   ════════════════════════════════════════════════════════════════ */
.brand.wordmark { flex-direction: column; align-items: flex-start; gap: 6px; padding: 6px 8px 18px; }
.brand.wordmark .brand-mark { display: block; color: var(--ink); }
.brand.wordmark .brand-mark svg { display: block; height: 20px; width: auto; }
.brand.wordmark .brand-name { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
/* Логотип приложения вместо знака southmedia (Copilot, «Сверка», 18.11.2026): знак и надпись —
   одним SVG, выровнены по линиям внутри него; в свёрнутой панели — только знак. */
.brand.app-logo { padding: 6px 8px 18px; color: var(--ink); }
.brand.app-logo svg { display: block; overflow: visible; }
.brand.app-logo .app-logo-full { height: 44px; width: auto; }
.brand.app-logo .app-logo-mark { display: none; height: 30px; width: auto; }
@media (min-width: 992px) {
  .layout.side-collapsed .sidebar:not(.peek) .brand.app-logo { justify-content: center; padding: 6px 0 18px; }
  .layout.side-collapsed .sidebar:not(.peek) .brand.app-logo .app-logo-full { display: none; }
  .layout.side-collapsed .sidebar:not(.peek) .brand.app-logo .app-logo-mark { display: block; }
}
@media (max-width: 991.98px) {
  .brand.app-logo { padding: 0 8px 0 0; }
  .brand.app-logo .app-logo-full { height: 30px; }
}

.area-picker { display: block; margin: 0 0 8px; }
.area-picker > summary { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: var(--ink); font-size: 13.5px; line-height: 1.3; }
.area-picker > summary:hover { border-color: var(--accent); }
.area-picker > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* служебный значок символом (правило 12): тело открывается вверх */
.area-picker > summary::after { content: "▴"; margin-left: auto; color: var(--faint); font-size: 11px; }
.area-picker .area-text { display: grid; flex: 1; min-width: 0; }
.area-picker .area-name,
.area-picker .area-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.area-picker .area-name { font-weight: 600; }
.area-picker .area-sub { font-size: 12px; color: var(--muted); }
.area-picker > .popover-body {
  bottom: 100%; margin: 0 0 6px; width: 300px; padding: 10px; gap: 2px;
  /* двадцать с лишним проектов выше окна — список листается внутри */
  max-height: calc(100vh - 140px); overflow-y: auto;
}
/* поиск — обычный .search эталона (03-base.css), только на всю ширину тела */
.area-picker .search { display: block; min-width: 0; max-width: none; margin-bottom: 4px; }
.area-picker .area-block { display: grid; gap: 2px; }
.area-picker .popover-body a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--ink); font-size: 13.5px; }
.area-picker .popover-body a:hover,
.area-picker .popover-body a:focus-visible { background: rgba(var(--ink-rgb), .06); text-decoration: none; }
.area-picker .popover-body a.current { color: var(--accent); font-weight: 600; }
.area-picker .popover-body > hr { margin: 4px 2px; }
.area-picker .area-group { padding: 8px 10px 2px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); }
/* Выбор наверху панели, над разделами (решение 376): тело открывается вниз */
.area-picker.at-top { margin: 0 0 12px; }
.area-picker.at-top > summary::after { content: "▾"; }
.area-picker.at-top > .popover-body { top: 100%; bottom: auto; margin: 6px 0 0; max-height: calc(100vh - 160px); }
.area-picker .area-group.area-mine { color: var(--accent); }
/* Верх панели: выбор проекта и поиск иконкой справа от него (копилот, 05.10.2026) */
/* лупа — во всю высоту поля выбора: тело выбора абсолютное и высоту строки не меняет */
.side-top { display: flex; align-items: stretch; gap: 6px; margin: 0 0 12px; }
.side-top > .area-picker.at-top { flex: 1; min-width: 0; margin: 0; }
.side-top > .side-search { margin-left: auto; padding: 0 11px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; }
.side-top > .side-search.active { color: var(--accent); }
/* Пометка фильтра над данными раздела и выбранный проект в таблице «Клиентов» */
.area-note { margin: 0 0 12px; font-size: 13.5px; color: var(--muted); }
tr[aria-current="true"] > td { background: rgba(var(--accent-rgb), .06); }

/* ════════════════════════════════════════════════════════════════
   34. СТРАНИЦА КЛИЕНТА: БЛОК ССЫЛКИ ВО ВКЛАДКЕ, БРИФ «БЫЛО → СТАНЕТ»
   Копилот (решения 259, 264, прототип docs/mockups/brief): вверху
   вкладки «Офферы и дисклеймеры» — блок «Страница клиента»: строка
   состояния, ссылка только для чтения, «Скопировать ссылку», меню
   «⋯» с «Заменить ссылку…». Поле ссылки тянется, но не шире 560 px:
   длинный токен в узком окне не выталкивает кнопки.

   Экран модерации «Изменения от клиента» (кусок К8б, решение 262,
   прототип `docs/mockups/brief/Review.dc.html`): присланные изменения
   таблицей `table.dense.diff` с галочкой у строки. «Было» приглушено,
   как в «Истории изменений» (§32) — глаз читает строку слева направо
   и останавливается на «станет». Снятая галочка гасит строку (`tr.off`)
   — видно, что она не попадёт в карточку.
   Правило экрана, не компонент эталона (правило 2 AGENTS.md).
   ════════════════════════════════════════════════════════════════ */
.brief-card > .toolbar { margin-bottom: 6px; }
.brief-card > .toolbar h2 { margin: 0; }
.brief-link { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; min-width: 0; }
.brief-link input[readonly] { flex: 1 1 360px; min-width: 0; max-width: 560px; color: var(--muted); }
.brief-state { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 13.5px; }

.diff td.was { color: var(--muted); }
.diff td.kind, .diff td.what { white-space: nowrap; }
.diff .long-text { margin: 4px 0 0; white-space: pre-wrap; }
.diff tr.off > td:not(.chk) { opacity: .45; }
.diff .sub-row { margin: 2px 0 0; font-size: 13px; }
.diff .check-line { margin: 6px 0 0; font-size: 13px; }

/* ════════════════════════════════════════════════════════════════
   35. РЯД КНОПОК-ПЕРЕКЛЮЧАТЕЛЕЙ ВО ВСЮ ШИРИНУ И ПОДПИСЬ НАД НИМ
   Правило 30 AGENTS.md: раздел внутри карточки — подпись muted small
   над содержимым, ряд кнопок во всю ширину карточки, как note-box
   рядом (банки проекта и главный банк во вкладке офферов, решение 274).
   ════════════════════════════════════════════════════════════════ */
.chips.wide { display: flex; width: 100%; box-sizing: border-box; }
.over-label { margin: 14px 0 6px; }

/* ════════════════════════════════════════════════════════════════
   36. ВЫПАДАЮЩИЙ СПИСОК (`.dropdown`, решение 326, вариант 2б)
   Надстройка над настоящим <select data-dropdown> (js/dropdown.js):
   кнопка — того же вида, что сам select (поле формы или `.cell` в
   `.sheet`), раскрытый список — свой, его можно оформить. Значение,
   `change` и автосохранение остаются у select — он спрятан, но жив.
   Группы — из <optgroup label>, текущее значение — акцентом и
   галочкой слева. Список открывается вниз, у края окна — вверх.
   ════════════════════════════════════════════════════════════════ */
.dropdown { position: relative; display: inline-block; max-width: 100%; vertical-align: middle; }
.form-grid .dropdown, .dropdown.full { display: block; }
/* select под кнопкой: невидим, но жив (значение, required, change); специфичность выше `.sheet .cell:disabled` */
.dropdown > select[data-dropdown][data-dropdown-ready] {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none;
}
.dropdown-btn {
  display: inline-flex; align-items: center; gap: 8px; width: 100%; min-width: 0;
  padding: 10px 13px; border: 1px solid var(--border-strong); border-radius: 12px;
  background: var(--card-solid); color: var(--ink); font: inherit; font-size: 14px;
  text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .12s;
}
.dropdown-btn .dropdown-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown-btn::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-left: 2px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg) scale(.7);
}
.dropdown-btn:hover:not(:disabled) { border-color: var(--accent); }
.dropdown-btn:focus-visible, .dropdown.open .dropdown-btn {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3.5px rgba(var(--accent-rgb), .14);
}
.dropdown-btn:disabled { cursor: default; color: var(--ink); opacity: 1; }
.dropdown-btn:disabled::after { display: none; }
/* в таблице-листе — вид `.cell`: рамки нет, пока не трогаешь */
.sheet .dropdown { display: block; }
.sheet .dropdown-btn {
  padding: 5px 7px; border-color: transparent; background: transparent; border-radius: 7px;
  font-size: 13.5px; box-shadow: none;
}
.sheet .dropdown-btn:hover:not(:disabled) { background: rgba(var(--ink-rgb), .05); border-color: transparent; }
.sheet .dropdown-btn:focus-visible, .sheet .dropdown.open .dropdown-btn {
  background: var(--card-solid); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.dropdown-list {
  position: absolute; left: 0; top: calc(100% + 4px); z-index: 60; min-width: 100%; max-width: min(420px, calc(100vw - 32px));
  max-height: 320px; overflow-y: auto; box-sizing: border-box;
  background: var(--card-solid); border: 1px solid var(--border-strong); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px; display: grid; gap: 1px;
}
.dropdown-list[hidden] { display: none; }
.dropdown.up .dropdown-list { top: auto; bottom: calc(100% + 4px); }
.dropdown-group {
  padding: 8px 10px 3px; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--faint);
}
.dropdown-option {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px;
  font-size: 13.5px; color: var(--ink); cursor: pointer; white-space: nowrap;
}
.dropdown-option .dropdown-check { flex: none; width: 14px; height: 14px; display: inline-flex; color: var(--accent); }
.dropdown-option[aria-selected="true"] { color: var(--accent); font-weight: 600; }
.dropdown-option.active { background: rgba(var(--ink-rgb), .06); }
.dropdown-option[aria-disabled="true"] { color: var(--faint); cursor: default; }
/* подъём карточки с открытым списком — общее правило попапов в 03-base.css (правка Е1) */
.table-wrap:has(.dropdown.open) { overflow: visible; }

/* ════════════════════════════════════════════════════════════════
   37. ПОМОЩНИК ЭКРАНА, ТОСТ, ТУМБЛЕР, ЗАГРУЗКА ФАЙЛА (каталог /dev/ui, кусок Э0)
   «?» внизу справа, как помощник страницы клиента, но в ветке оформления
   сервиса: круглая кнопка акцента, по нажатию — панель «для кого · что
   сделать · что получите» и «Показать по шагам» (js/tour.js, решение 352).
   Тост — светлая плашка с ✓ внизу по центру (согласован 02.10.2026).
   ════════════════════════════════════════════════════════════════ */
.help-q {
  position: fixed; right: 24px; bottom: 24px; z-index: var(--z-help);
  width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: var(--accent); color: var(--on-accent);
  font-size: 22px; font-weight: 700; line-height: 1; box-shadow: var(--shadow-lg); cursor: pointer;
  transition: transform .12s;
}
.help-q:hover { transform: translateY(-1px); }
.help-q:active { transform: none; }
.help-q:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.help-q[aria-expanded="true"] { box-shadow: var(--shadow-lg), 0 0 0 4px var(--accent-soft); }
.help-panel {
  position: fixed; right: 24px; bottom: 84px; z-index: var(--z-help);
  width: 380px; max-width: calc(100vw - 48px); max-height: calc(100vh - 120px); overflow-y: auto;
  box-sizing: border-box; padding: 18px 20px 16px;
  background: var(--card-solid); border: 1px solid var(--border-strong); border-radius: 18px;
  box-shadow: var(--shadow-lg); animation: card-in .2s ease;
}
.help-panel[hidden] { display: none; }
.help-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.help-head h4 { margin: 0; font-size: 16px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--ink); }
.help-lead { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }
.help-list { margin: 14px 0 0; font-size: 14px; }
.help-list dt { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); margin: 12px 0 2px; padding: 0; }
.help-list dt:first-child { margin-top: 0; }
/* Раздел «Справка» (функция 9): руководства списком, оглавление экранов строкой */
.help-guides { margin: 0; padding-left: 18px; }
.help-guides li + li { margin-top: 6px; }
.help-toc { margin: 0; line-height: 1.9; }
.help-list dd { margin: 0; padding: 0; }
.help-more { margin: 12px 0 0; font-size: 13.5px; }

/* Руководство (раздел «Справка», руководитель отдела 19.11.2026): содержание слева,
   страница справа; строка текста не шире 760 px, таблицы и скриншоты — по содержимому. */
.manual { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 28px; align-items: start; }
.manual-toc {
  position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 14px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  font-size: 13.5px;
}
.manual-toc ul { list-style: none; margin: 0 0 6px; padding: 0; }
.manual-toc a { display: block; padding: 5px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.manual-toc a:hover { background: var(--accent-soft); }
.manual-toc a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.manual-toc a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.manual-toc-home { font-weight: 600; margin-bottom: 4px; }
.manual-toc-chapter {
  margin: 12px 10px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--faint);
}
.manual-body { min-width: 0; max-width: 1040px; }
.manual-body h1 { margin: 2px 0 10px; }
.manual-chapter { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); }
.manual-lead { max-width: 760px; margin: 0 0 18px; font-size: 15.5px; color: var(--muted); }
.manual-part { margin-bottom: 16px; }
.manual-part > h2 { margin-top: 0; }
.manual-part > p, .manual-part > ul, .manual-part > ol, .manual-part > h3 { max-width: 760px; }
.manual-steps { padding-left: 22px; }
.manual-steps li + li, .manual-part ul li + li { margin-top: 6px; }
.manual-shot { margin: 14px 0 6px; }
.manual-shot img {
  display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow);
}
.manual-shot figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); }
.manual-note { max-width: 760px; margin-top: 12px; }
.manual-note p { margin: 0; }
.manual-links { list-style: none; margin: 0; padding: 0; }
.manual-links li { display: flex; flex-direction: column; gap: 1px; }
.manual-links li + li { margin-top: 10px; }
.manual-links .muted { font-size: 13px; }
.manual-chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 16px; }
.manual-chapters .manual-part { margin-bottom: 0; }
.manual-catalog td:first-child { min-width: 260px; }
.manual-catalog tr.muted td { color: var(--faint); }
.manual-owner { max-width: 760px; margin: 20px 0 0; font-size: 13px; }
.manual-pager { display: flex; justify-content: space-between; gap: 16px; margin: 24px 0 8px; }
.manual-pager a {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; min-width: 200px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-decoration: none; color: var(--ink);
}
.manual-pager a:hover { border-color: var(--accent); }
.manual-pager a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.manual-pager a.next { text-align: right; margin-left: auto; }
.manual-pager .muted { font-size: 12px; }
@media (max-width: 1100px) {
  .manual { grid-template-columns: minmax(0, 1fr); }
  .manual-toc { position: static; max-height: none; }
}
.help-foot { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.help-foot .link-btn { margin-right: auto; }

/* Тост (согласован 02.10.2026): светлая плашка с ✓ внизу по центру рабочей
   области, а не окна — панель разделов 218 px слева (03-base.css). */
.toasts { top: auto; right: auto; bottom: 28px; left: calc(50% + 109px); transform: translateX(-50%); align-items: center; }
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--card-solid); color: var(--ink); border: 1px solid var(--border-strong);
  backdrop-filter: none; font-weight: 500; padding: 11px 18px 11px 14px;
  animation: toast-up .24s ease;
}
.toast::before {
  content: "✓"; flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ok-bg); color: var(--ok); font-weight: 700; font-size: 13px;
}
.toast.hide { opacity: 0; transform: translateY(8px); }
@keyframes toast-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Тумблер в строке таблицы — развилка Б элемента «Включено / выключено»
   (прототип, ждёт решения): настоящий checkbox role="switch", дорожка — токен --switch-track. */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 36px; height: 20px; border-radius: 999px; background: var(--switch-track); transition: background .15s; flex: none; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--card-solid); box-shadow: var(--shadow); transition: transform .15s; }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch input:disabled + .switch-track { opacity: .45; }

/* Загрузка файла у сотрудника — прототип элемента (мастер отчётов). */
.upload-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px; border: 1.5px dashed var(--border-strong); border-radius: 14px; cursor: pointer; text-align: center; color: var(--accent); }
.upload-drop:hover, .upload-drop:focus-within { background: var(--accent-soft); }
.upload-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upload-list { margin: 10px 0 0; padding-left: 18px; font-size: 14px; }

/* ════════════════════════════════════════════════════════════════
   38. ТАБЛИЦЫ ПО ШИРИНЕ И ВЫСОТЕ — ПРОТОТИП (каталог /dev/ui, вкладка «Таблицы»)
   Руководитель 02.10.2026: колонки, растянутые на всю рабочую область,
   не дают проследить строку глазом; нет вида для таблицы шире области;
   закрепление шапок не продумано. Вид выбирается по числу колонок и строк:
   • мало колонок — `table.fit`: ширина по содержимому, не растягивается;
   • любые строки — подсветка всей строки под курсором (`.track`);
   • шире области — `.table-frame`: прокрутка вбок и вниз внутри блока,
     шапка и первая колонка закреплены, тени у краёв (`.at-start`/`.at-end`
     ставит dev-ui.js), подпись «ещё N колонок →»;
   • много строк — шапка прилипает к окну (`.table-wrap.sticky-head` эталона),
     строка группы `tr.group-row` — под шапкой, итог `tfoot` — к низу окна.
   ════════════════════════════════════════════════════════════════ */
table.fit { width: auto; max-width: 100%; }
table.fit td, table.fit th { padding-right: 28px; }
table.fit td:last-child, table.fit th:last-child { padding-right: 10px; }
table.track tbody tr:hover > td, table.track tbody tr:hover > th { background: rgba(var(--accent-rgb), .055); }
table.track tbody tr:focus-within > td { background: rgba(var(--accent-rgb), .055); }
/* Правило 55: `table.name-fill` — колонки по ширине содержимого, свободное место забирает
   первая колонка с названием записи; таблица во всю ширину блока, без пустых промежутков.
   Длинный заголовок над числом переносится явно (`<br>`), число — в одну строку.
   Ячейки на всю строку (раскрытие строки, строка группы) переносятся как обычно. */
table.name-fill th, table.name-fill td { width: 1%; white-space: nowrap; }
table.name-fill th:first-child, table.name-fill td:first-child { width: auto; }
table.name-fill th[colspan], table.name-fill td[colspan] { width: auto; white-space: normal; }

.table-frame {
  position: relative; overflow: auto; max-height: min(70vh, 640px);
  border: 1px solid var(--border); border-radius: 12px; background: var(--card-solid);
}
/* Рамка — всегда на всю ширину блока, её край и полоса прокрутки не уезжают.
   Колонки — по содержимому и прижаты к первой: свободное место справа забирает
   служебная пустая колонка .col-filler (table-tools.js). */
.table-frame table { width: max-content; min-width: 100%; }
.table-frame .col-filler { width: 100%; min-width: 0; padding: 0; }
.table-frame thead th { position: sticky; top: 0; z-index: 2; background: var(--card-solid); box-shadow: inset 0 -1px 0 var(--border-strong); }
.table-frame .pin { position: sticky; left: 0; z-index: 1; background: var(--card-solid); min-width: 260px; max-width: 320px; white-space: normal; }
.table-frame thead th.pin { z-index: 3; }
.table-frame tbody tr:hover > .pin,
.table-frame tbody tr:focus-within > .pin { background: var(--card-solid); box-shadow: inset 0 0 0 999px rgba(var(--accent-rgb), .055); }
.table-frame:not(.at-start) .pin { box-shadow: 6px 0 8px -6px rgba(var(--ink-rgb), .25); }
.table-frame:not(.at-start) tbody tr:hover > .pin,
.table-frame:not(.at-start) tbody tr:focus-within > .pin { box-shadow: 6px 0 8px -6px rgba(var(--ink-rgb), .25), inset 0 0 0 999px rgba(var(--accent-rgb), .055); }
.table-frame td, .table-frame th { white-space: nowrap; }
.frame-hint { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.frame-hint [data-frame-more][hidden] { display: none; }

.sticky-head tr.group-row > th {
  position: sticky; top: var(--head-h, 34px); z-index: 1;
  background: var(--card-solid); text-align: left; font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--ink);
  box-shadow: inset 0 -1px 0 var(--border);
}
.sticky-foot tfoot td { position: sticky; bottom: 0; z-index: 2; background: var(--card-solid); font-weight: 700; box-shadow: inset 0 1px 0 var(--border-strong); }
.table-more { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: 13px; color: var(--muted); }


/* ── 38.1 Сортировка по любой колонке и ширина колонок (js table-tools.js) ──
   Заголовок — кнопка: стрелка ↕ бледная, у отсортированной колонки ↑/↓ акцентом.
   Ручка ширины — полоса у правого края заголовка, видна на наведении и фокусе. */
.th-sort {
  display: inline-flex; align-items: center; gap: 5px; padding: 0; margin: 0; border: 0; background: none;
  font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; text-align: inherit; cursor: pointer;
}
.th-sort:hover { color: var(--ink); }
.th-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.th-sort .sort-mark { opacity: .35; font-size: 11px; }
/* Подпись заголовка — свой блок: переносы <br> многострочного заголовка живут внутри кнопки. */
.th-sort .th-label { display: inline-block; }
/* Строка дерева, не прошедшая быстрый фильтр (table[data-tree]); hidden у строк держит раскрытие. */
tr.filter-miss { display: none; }
/* ── 38.1а Меню колонки в заголовке (table[data-head-menu], js table-tools.js) ──
   Эталон с 19.11.2026 («Расход и остатки», руководитель отдела). Подпись колонки — сама кнопка:
   без значков рядом, при наведении — подложка и ▾ в конце последней строки. По нажатию — меню колонки
   (вид раскрытого списка `.dropdown-list`): название, пояснение вместо «?», сортировка, фильтр.
   Отсортированная колонка — подпись акцентом со стрелкой ↑/↓; отфильтрованная — акцентом с точкой. */
table[data-head-menu] > thead > tr > th { padding: 10px 8px 9px; vertical-align: bottom; line-height: 1.3; }
.th-head {
  position: relative;
  display: inline-block; margin: -4px -6px; padding: 4px 6px; border: 0; border-radius: 7px;
  background: none; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit;
  line-height: inherit; text-align: inherit; white-space: nowrap; cursor: pointer;
  transition: background .12s, color .12s;
}
.th-head:hover { background: rgba(var(--ink-rgb), .06); color: var(--ink); }
.th-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.th-head[aria-expanded="true"] { background: rgba(var(--accent-rgb), .1); color: var(--accent); }
/* Значок — вне потока текста: строки подписи выровнены ровно по краю колонки (у чисел — по правому),
   ▾ и стрелка сортировки стоят в отступе между колонками у последней строки: у текста — справа,
   у чисел — слева. */
.th-head-mark {
  position: absolute; bottom: 5px; right: -7px; width: 10px; text-align: center;
  font-size: 9px; line-height: 1; color: currentColor; opacity: 0; transition: opacity .12s;
}
th.num .th-head-mark { right: auto; left: -7px; }
.th-head:hover .th-head-mark, .th-head:focus-visible .th-head-mark, .th-head[aria-expanded="true"] .th-head-mark { opacity: .6; }
th.th-sorted .th-head, th.th-filtered .th-head { color: var(--accent); }
th.th-sorted .th-head-mark { opacity: 1; font-size: 11px; font-weight: 700; }
th.th-filtered .th-head-label { text-decoration: underline dotted; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.th-menu { position: fixed; z-index: 80; width: 264px; min-width: 0; max-width: calc(100vw - 16px); max-height: min(460px, calc(100vh - 16px)); padding: 6px; }
.th-menu-head { padding: 8px 10px 6px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.th-menu-title { font-size: 13px; font-weight: 700; color: var(--ink); }
.th-menu-help { margin: 5px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.th-menu .dropdown-group { padding-top: 8px; }
.th-menu .dropdown-option {
  width: 100%; border: 0; background: none; font: inherit; font-size: 13px; text-align: left;
  text-transform: none; letter-spacing: normal;
}
.th-menu .dropdown-option:hover, .th-menu .dropdown-option:focus-visible { background: rgba(var(--ink-rgb), .06); outline: none; }
.th-menu .dropdown-option[aria-checked="true"] { color: var(--accent); font-weight: 600; }
.th-menu-check { flex: none; width: 14px; text-align: center; color: var(--muted); }
.th-menu .dropdown-option[aria-checked="true"] .th-menu-check { color: var(--accent); }
.th-menu-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.th-menu-dot.ok { background: var(--ok-dot); }
.th-menu-dot.warn { background: var(--warn-dot); }
.th-menu-dot.crit { background: var(--crit-dot); }
/* Число, которое копируется нажатием (дневной лимит на «Расходе и остатках»): выглядит как число,
   при наведении — подложка акцентом, после нажатия — подпись «Скопировано» над ним, вёрстка не сдвигается. */
.copy-num {
  position: relative; display: inline-block; margin: -2px -5px; padding: 2px 5px; border: 0; border-radius: 6px;
  background: none; color: inherit; font: inherit; font-variant-numeric: tabular-nums; cursor: copy;
  transition: background .12s, color .12s;
}
.copy-num:hover { background: rgba(var(--accent-rgb), .1); color: var(--accent); }
.copy-num:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.copy-num.copied { background: rgba(var(--accent-rgb), .14); color: var(--accent); }
/* Фильтр с выбором нескольких (`details.pick`): кнопка высотой с поле поиска, «Клиенты: все ▾»;
   раскрытый — список эталона с галочками и «Сбросить · Показать» внизу. Выбрано — кнопка акцентом. */
details.pick, details.pick.active {
  position: relative; display: inline-block; flex: none; margin: 0; padding: 0; border: 0; border-radius: 0;
  background: none; box-shadow: none;
}
/* Кнопка — как поле поиска: «Клиенты  все ▾», значение — отдельным словом, при выборе — акцентом. */
details.pick > summary {
  position: relative; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 30px 0 13px;
  border: 1px solid var(--border-strong); border-radius: 10px; background: var(--card-solid);
  color: var(--muted); font-size: 13.5px; white-space: nowrap; list-style: none; cursor: pointer; user-select: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
details.pick > summary::-webkit-details-marker { display: none; }
details.pick > summary::after {
  content: ""; position: absolute; right: 13px; top: 50%; width: 6px; height: 6px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: translateY(-65%) rotate(45deg); transition: transform .15s;
}
details.pick[open] > summary::after { transform: translateY(-25%) rotate(225deg); }
.pick-value { max-width: 200px; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-weight: 600; }
details.pick > summary:hover { border-color: var(--accent); }
details.pick[open] > summary { border-color: var(--accent); box-shadow: 0 0 0 3.5px rgba(var(--accent-rgb), .12); }
details.pick.active > summary { border-color: var(--accent); background: rgba(var(--accent-rgb), .07); }
details.pick.active .pick-value { color: var(--accent); }
/* Список: заголовок с «Выбрать все», поиск при длинном списке, клиенты со своими галочками и числом
   проектов справа, внизу «Сбросить · Показать». Без прокрутки, пока помещается. */
.pick-list {
  top: calc(100% + 6px); left: 0; width: 320px; min-width: 0; max-height: min(620px, calc(100vh - 140px));
  padding: 0; display: flex; flex-direction: column; align-items: stretch; gap: 0; overflow: hidden;
}
.pick-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 6px; }
.pick-title { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.pick-head .link-btn { font-size: 12.5px; }
.pick-search { padding: 2px 10px 6px; }
.pick-search input {
  width: 100%; height: 32px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 8px;
  background: var(--card-solid); color: var(--ink); font: inherit; font-size: 13px;
}
.pick-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .12); }
.pick-options { flex: 1 1 auto; overflow-y: auto; padding: 2px 6px 8px; display: grid; gap: 1px; }
.pick-option {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px;
  color: var(--ink); font-size: 13.5px; font-weight: 400; cursor: pointer; transition: background .12s;
}
.pick-option[hidden] { display: none; }
.pick-option:hover { background: rgba(var(--ink-rgb), .05); }
.pick-option:has(input:checked) { background: rgba(var(--accent-rgb), .07); }
.pick-option input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.pick-box {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px;
  border: 1.5px solid var(--border-strong); border-radius: 5px; background: var(--card-solid);
  transition: background .12s, border-color .12s;
}
.pick-option:hover .pick-box { border-color: var(--accent); }
.pick-option input:checked + .pick-box { background: var(--accent); border-color: var(--accent); }
.pick-option input:checked + .pick-box::after {
  content: ""; width: 8px; height: 4px; border-left: 2px solid var(--paper); border-bottom: 2px solid var(--paper);
  transform: translateY(-1px) rotate(-45deg);
}
.pick-option input:focus-visible + .pick-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-count {
  flex: none; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: rgba(var(--ink-rgb), .06);
  color: var(--muted); font-size: 11.5px; text-align: center; font-variant-numeric: tabular-nums;
}
.pick-empty { margin: 6px 8px; }
.pick-actions {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border-top: 1px solid var(--border); background: var(--card-solid);
}
.pick-actions .btn { padding: 7px 18px; }
.pick-form { display: contents; }
.pick-chips { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.pick-chips-label { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
/* Строка над таблицей: подпись, под ней — поиск и плашки фильтров одной ровной строкой. */
.table-note { margin: 2px 0 14px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.filters-bar[data-filter-in-head] { flex-wrap: nowrap; gap: 10px; align-items: center; margin: 0 0 14px; }
.filters-bar[data-filter-in-head] .search { flex: none; width: 300px; min-width: 0; }
.filters-bar[data-filter-in-head] .search input { height: 36px; padding: 0 12px 0 36px; font-size: 13.5px; border-radius: 10px; }
.filters-bar[data-filter-in-head] .filter-plates { flex: 1 1 auto; flex-basis: auto; }
th[aria-sort="ascending"] .th-sort, th[aria-sort="descending"] .th-sort { color: var(--accent); }
th[aria-sort="ascending"] .sort-mark, th[aria-sort="descending"] .sort-mark { opacity: 1; }
th.num .th-sort { flex-direction: row-reverse; }
.col-resize { position: absolute; top: 0; right: -4px; width: 9px; height: 100%; z-index: 4; cursor: col-resize; touch-action: none; }
/* У последней колонки ручка — внутри края: иначе она на 4 px шире таблицы и даёт лишнюю прокрутку вбок. */
th:last-child > .col-resize, th.last-visible > .col-resize { right: 0; }
.col-resize::after { content: ""; position: absolute; top: 20%; bottom: 20%; left: 4px; width: 2px; border-radius: 2px; background: transparent; transition: background .12s; }
th:hover > .col-resize::after { background: var(--border-strong); }
.col-resize:hover::after, .col-resize:focus-visible::after, body.col-resizing .col-resize::after { background: var(--accent); }
.col-resize:focus-visible { outline: none; }
body.col-resizing { cursor: col-resize; user-select: none; }

/* ── 38.2 Настройка колонок большой таблицы (js table-tools.js) ──────────
   «Колонки · N из M» над таблицей, в панели — наборы кнопками, список колонок
   с галочкой показа, перетаскивание и ↑/↓, «Вернуть как было». */
.cols-menu > summary { list-style: none; }
.cols-menu > summary::-webkit-details-marker { display: none; }
.cols-menu > .popover-body { width: 340px; max-height: min(70vh, 560px); overflow-y: auto; padding: 12px 14px; }
.cols-menu .chips { margin: 4px 0 10px; flex-wrap: wrap; }
.cols-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cols-list li { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; font-size: 13.5px; }
.cols-list li:hover { background: rgba(var(--ink-rgb), .05); }
.cols-list li[draggable="true"] { cursor: grab; }
.cols-list li.dragging { opacity: .45; }
.cols-list li.fixed { color: var(--muted); }
.cols-list label { flex: 1; display: flex; align-items: center; gap: 8px; margin: 0; font: inherit; color: inherit; text-transform: none; letter-spacing: 0; cursor: pointer; }
.cols-list .drag-grip { width: 12px; color: var(--faint); font-size: 11px; letter-spacing: -2px; }
.cols-move { display: inline-flex; gap: 2px; }
.cols-move .icon-btn { padding: 2px 6px; }
.cols-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.table-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }

/* ── 38.3 «Отменить / Повторить» значками в шапке страницы (edit-history.js) ── */
.history-btn {
  width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong); border-radius: 10px; font-size: 18px; color: var(--ink);
}
.history-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── 38.4 Страницы таблицы, плашки фильтров, свои наборы, тост с «Отменить» ── */
.table-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 12px; font-size: 13px; }
.table-pager[hidden] { display: none; }
.table-pager .pages { display: inline-flex; align-items: center; gap: 4px; }
.table-pager .pages .chip { min-width: 34px; justify-content: center; }
.table-pager .chips { margin-left: auto; }
.filter-plates { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.filter-plates[hidden] { display: none; }
.filter-plate {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 11px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 600;
}
.filter-plate .icon-btn { color: inherit; padding: 2px 6px; font-size: 11px; border-radius: 999px; }
.cols-menu .set-drop { padding: 2px 5px; font-size: 10px; margin-left: -4px; }
.cols-menu .set-save { display: flex; gap: 6px; margin-top: 10px; }
.cols-menu .set-save input { flex: 1; min-width: 0; padding: 6px 10px; }
.toast.with-action { gap: 14px; }
.toast.with-action .link-btn { color: var(--accent); font-weight: 700; }

/* ── 38.5 Строка добавления в конце таблицы (небольшие списки) ──────────────
   Последняя строка <tfoot> tr.add-row — поля .quick в одну строку под своими
   колонками и «Добавить»; новая строка на 2 с подсвечивается зелёным. */
tfoot .add-row td { padding-top: 10px; border-bottom: 0; vertical-align: top; line-height: 32px; }
/* Поля и список одной высоты (32px) с кнопкой .btn.small; рамка вынесена влево
   на свой отступ, поэтому текст в поле стоит ровно под текстом колонки. */
tfoot .add-row .quick { display: block; width: 100%; min-width: 140px; max-width: 240px; box-sizing: border-box;
  height: 32px; padding: 0 10px; margin-left: -11px; line-height: 30px; }
tfoot .add-row .dropdown { margin-left: -11px; }
tfoot .add-row .dropdown-btn { width: auto; height: 32px; padding: 0 10px; gap: 6px; border-radius: 10px; font-size: 13.5px; }
tfoot .add-row .btn.small { height: 32px; padding: 0 13px; vertical-align: top; }
tfoot .add-row .field-error { display: block; margin: 4px 0 0 -1px; line-height: 1.4; }
tr.saved-row > td { background: var(--ok-bg); transition: background .6s; }

/* ── 38.6 Кнопка «Наверх» (js/ui-core.js §9а, правило 43) ─────────────────
   Внизу справа над «?» справки, по центру той же вертикали; без справки —
   на её месте. Пока открыта панель справки, кнопка спрятана. */
.to-top {
  position: fixed; right: 28px; bottom: 84px; z-index: calc(var(--z-help) - 1);
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border-strong); background: var(--card-solid); color: var(--ink);
  display: grid; place-items: center; padding: 0; box-shadow: var(--shadow-lg); cursor: pointer;
  transition: transform .12s, border-color .12s;
}
/* Знак — уголок без хвоста, нарисован рамкой (как стрелка выпадающего списка). */
.to-top::before {
  content: ""; width: 9px; height: 9px; margin-top: 4px;
  border-left: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg);
}
.to-top[hidden] { display: none; }
.to-top:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.to-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
body:not(:has(.help-q)) .to-top { bottom: 24px; }
body:has(.help-q[aria-expanded="true"]) .to-top { display: none; }

/* ── 38.7 Подсказка поля «?» у подписи (элемент 52, руководитель отдела 03.10.2026) ──
   Как заполнять и зачем поле — во всплывающей подсказке у подписи, под полем —
   только состояние сейчас («Заполнено автоматически…», ошибка, «Только просмотр»).
   Подсказка открывается наведением, фокусом с клавиатуры и нажатием (правило 8);
   без скрипта. Разметка — макрос field_tip в project/_card_field.html. */
.label-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; min-width: 0; }
.label-row > label { margin-bottom: 0; }
.field-tip { position: relative; display: inline-flex; }
.field-tip-btn {
  width: 16px; height: 16px; padding: 0; border-radius: 50%;
  border: 1px solid var(--border-strong); background: var(--card-solid); color: var(--muted);
  font-size: 10.5px; font-weight: 700; line-height: 14px; text-align: center; cursor: help;
  transition: color .12s, border-color .12s;
}
.field-tip-btn:hover, .field-tip-btn:focus-visible { color: var(--accent); border-color: var(--accent); }
.field-tip-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Закрытая подсказка — display:none (правка Е2, R-81): иначе невидимое тело
   занимает область прокрутки окна и .table-wrap. Анимируется только opacity. */
.field-tip-body {
  position: absolute; left: -8px; top: calc(100% + 6px); z-index: var(--z-popup);
  width: max-content; max-width: min(340px, calc(100vw - 32px)); padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--card-solid); color: var(--ink);
  box-shadow: var(--shadow-lg); font-size: 12.5px; font-weight: 450; line-height: 1.45;
  display: none; pointer-events: none;
}
.field-tip-body > span { display: block; }
.field-tip-body > span + span { margin-top: 6px; }
.field-tip:hover .field-tip-body, .field-tip:focus-within .field-tip-body {
  display: block; animation: field-tip-in .12s ease-out;
}
@keyframes field-tip-in { from { opacity: 0; } to { opacity: 1; } }
/* Разворот (правка Е2, R-82): снизу не помещается — вверх; справа не помещается или
   подсказка в окне — к правому краю. Модификаторы ставит ui-core.js тем же расчётом,
   что у .dropdown.up. */
.field-tip.up .field-tip-body { top: auto; bottom: calc(100% + 6px); }
.field-tip.to-left .field-tip-body, .dialog .field-tip-body { left: auto; right: -8px; }

/* ════════════════════════════════════════════════════════════════
   39. ЛИЧНАЯ СТРАНИЦА «ПРОФИЛЬ»: ФОТО И КНОПКИ К НЕМУ
   Фото 72 px слева, кнопки «Загрузить / Удалить фото» и подпись справа.
   Без фото — буквы имени на акцентном круге, как .side-avatar.initials
   в панели (03-base.css). Фото уже квадратное — его обрезает сервер.
   ════════════════════════════════════════════════════════════════ */
.profile-photo { display: flex; align-items: center; gap: 16px; margin: 4px 0 16px; }
.profile-photo-actions { display: grid; gap: 4px; min-width: 0; }
.profile-photo-actions form { display: inline; }
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.profile-avatar.initials {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 26px;
}

/* ════════════════════════════════════════════════════════════════
   40. ПРЕВЬЮ КРЕАТИВА И ПРОСМОТР С МАСШТАБОМ (элементы 51 и 53, решения 425, 426)
   Руководитель отдела 06.10.2026: превью не растягивать — картинка вписана в плитку
   целиком; креатив с ошибкой — в рамке цвета худшего замечания; клик по превью —
   окно с масштабом, рядом текст креатива и замечания. Скрипт — js/image-viewer.js,
   разметка окна — макрос image_viewer() в templates/_macros.html.
   ════════════════════════════════════════════════════════════════ */
/* Плитка с итогом проверки: рамка цвета замечания (красное сильнее жёлтого). Вторая линия
   рамки — слой ::after поверх содержимого: картинка превью её никогда не закрывает. */
.cover-tile.crit { border-color: var(--crit); }
.cover-tile.warn { border-color: var(--warn); }
.cover-tile.crit::after, .cover-tile.warn::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  box-shadow: inset 0 0 0 1px var(--crit);
}
.cover-tile.warn::after { box-shadow: inset 0 0 0 1px var(--warn); }
/* Превью целиком: высота поля ограничена, пропорции сохранены, поля — подложкой. */
.cover-img.fit { aspect-ratio: auto; height: 200px; object-fit: contain; object-position: center; background: rgba(var(--ink-rgb), .05); }
/* Превью — кнопка просмотра; без скрипта это ссылка на картинку. Область превью — подложка
   с отступом от рамки, скругление сверху как у плитки, лишнее обрезается; картинка внутри
   вписана целиком (contain) и не касается краёв плитки ни при какой пропорции. */
.cover-open {
  display: block; box-sizing: border-box; width: 100%; padding: 8px; border: 0; cursor: zoom-in;
  background: rgba(var(--ink-rgb), .05); border-radius: 11px 11px 0 0; overflow: hidden;
}
.cover-open .cover-img.fit { width: 100%; height: 184px; background: none; border-radius: 6px; }
.cover-open:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* Просмотр открывает вся плитка, а не только превью (руководитель отдела 08.10.2026): слой ссылки
   превью растянут на плитку — нажатие на размер и пометки идёт в ту же ссылку, Enter — с неё же;
   рамка фокуса — у всей плитки. */
.cover-tile:has(> .cover-open) { cursor: pointer; }
.cover-tile > .cover-open, .cover-tile > .cover-open::before { cursor: pointer; }
.cover-tile > .cover-open::before { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.cover-tile > .cover-open:focus-visible { outline: none; }
.cover-tile:has(> .cover-open:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.cover-tile:has(> .cover-open):hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.cover-tile:has(> .cover-open):active { transform: none; box-shadow: var(--shadow); }
/* Группа плиток с подписью (шаблон в разных размерах) — h3 над сеткой, как у соседних блоков. */
.cover-group + .cover-group { margin-top: 18px; }
.cover-group > h3, .cover-group > summary > h3 { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14px; }
/* Шаблон сворачивается (решение 435): заголовок — summary раскрытия, итог справа от имени. */
.cover-group > summary { display: flex; align-items: baseline; }
.cover-group > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.pill.warn { background: var(--warn-bg); color: var(--warn); }

/* Окно просмотра: картинка слева во всю высоту, сведения справа колонкой. */
.dialog.image-viewer {
  width: min(1440px, 96vw); height: min(900px, 92vh); max-width: none; max-height: none; padding: 0;
  display: none; overflow: hidden;
}
.dialog.image-viewer[open] { display: grid; grid-template-columns: minmax(0, 1fr) 340px; }
.iv-stage {
  position: relative; overflow: hidden; background: rgba(var(--ink-rgb), .06); cursor: grab;
  touch-action: none; user-select: none;
}
.iv-stage.dragging { cursor: grabbing; }
.iv-stage:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.iv-img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; image-rendering: auto; }
.iv-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px 18px; border-left: 1px solid var(--border); overflow: auto; }
.iv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.iv-close { font-size: 20px; padding: 2px 8px; }
.iv-tools, .iv-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.iv-scale { min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; }
.iv-info { display: grid; gap: 8px; font-size: 13px; }
.iv-info .iv-text { margin: 0; padding: 8px 10px; border-radius: 10px; background: rgba(var(--ink-rgb), .04); white-space: pre-wrap; }
.iv-keys { margin-top: auto; }
/* Вид «видео» элемента 53 (решение 796, прототип ?proto=part2, «да» 27.10.2026): видео с сервера
   площадки по центру, без масштаба и сдвига; плитка видео — знак «▶» поверх кадра (слой ссылки
   плитки не перекрывается). */
.image-viewer.video .iv-stage { display: flex; align-items: center; justify-content: center; cursor: default; touch-action: auto; user-select: auto; }
.iv-video { max-width: 100%; max-height: 100%; }
.iv-video-error { margin: auto; }
.cover-play {
  position: absolute; left: 50%; top: 100px; transform: translate(-50%, -50%); z-index: 2; pointer-events: none;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-size: 17px;
  background: rgba(var(--ink-rgb), .62); color: var(--card-solid);
}
@media (max-width: 900px) {
  .dialog.image-viewer[open] { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .iv-side { border-left: 0; border-top: 1px solid var(--border); max-height: 40vh; }
}

/* ════════════════════════════════════════════════════════════════
   41. ПОКАЗАТЬ ПАРОЛЬ (элемент 54, правило 48, руководитель отдела 06.10.2026)
   У каждого поля пароля справа внутри поля — кнопка-глаз: показывает набранное
   и прячет обратно. Обёртку и кнопку ставит js/ui-core.js §9б сам на каждое
   input[type=password]; поле без кнопки — data-no-reveal. Значки — eye / eye-off
   из набора, цвет — currentColor.
   ════════════════════════════════════════════════════════════════ */
.pw-field { position: relative; display: block; min-width: 0; }
.pw-field.inline { display: inline-block; }
.pw-field > input { width: 100%; padding-right: 42px; box-sizing: border-box; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer; transition: background .12s, color .12s;
}
.pw-toggle:hover { background: rgba(var(--ink-rgb), .07); color: var(--ink); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; color: var(--ink); }
.pw-toggle:active { background: rgba(var(--ink-rgb), .12); }
.pw-toggle[aria-pressed="true"] { color: var(--accent); }
.pw-toggle:disabled { opacity: .45; cursor: not-allowed; background: transparent; }
.pw-toggle svg { width: 18px; height: 18px; }

/* ════════════════════════════════════════════════════════════════
   42. ВХОД С КОДОМ ИЗ ПРИЛОЖЕНИЯ (второй фактор, руководитель отдела 06.10.2026)
   Экраны после пароля — та же карточка .login-box; подключение шире (.wide),
   в нём шаги .totp-steps, QR-код .qr-box (чёрный на белом в любой теме — его
   читает камера), ключ для ручного ввода .totp-key.
   ════════════════════════════════════════════════════════════════ */
.login-box.wide { max-width: 560px; }
/* Поля входа — во всю ширину карточки: почта и пароль с глазом одной длины. */
.login-box form p > input { width: 100%; box-sizing: border-box; }
.totp-steps .inline-form .btn, #totp .inline-form .btn { white-space: nowrap; }
.login-alt { margin-top: 12px; }
.totp-steps { display: grid; gap: 16px; margin: 18px 0 8px; padding-left: 22px; }
.totp-steps > li { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.totp-steps .inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.totp-steps .inline-form input { width: 9.5em; letter-spacing: .2em; font-variant-numeric: tabular-nums; }
.qr-box { display: inline-block; line-height: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.qr-box svg { display: block; width: 180px; height: 180px; }
.totp-key {
  display: inline-block; padding: 6px 10px; border-radius: 10px; background: rgba(var(--ink-rgb), .05);
  font-size: 14px; letter-spacing: .06em; word-break: break-all; user-select: all;
}

/* ════════════════════════════════════════════════════════════════
   43. ПОЛНЫЙ ТЕКСТ ОБЪЯВЛЕНИЯ С ПОДСВЕТКОЙ (элемент 55, руководитель отдела 06.10.2026)
   В раскрытии замечания — сначала все места текста объявления (подпись слева, текст
   справа), фрагмент ошибки — mark.hl цветом уровня, как .issue-quote; ниже — оффер
   библиотеки и «Где находится». Разметка — project/check.html.
   ════════════════════════════════════════════════════════════════ */
/* Фон — сплошная карточка, не полупрозрачные чернила: на тонированном фоне --muted подписей
   (dt, h4 «Текст на креативе») давал 4,42 : 1 (runtime-audit, критик 29.10). */
.ad-text { margin: 4px 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--card-solid); border: 1px solid var(--border); min-width: 0; }
.ad-text h4, .issue-detail > h4 { margin: 0 0 6px; font-weight: 600; }
.issue-detail > h4 { margin-top: 10px; }
.ad-text dl { display: grid; grid-template-columns: minmax(110px, 160px) minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: 13.5px; }
.ad-text dt { color: var(--muted); }
.ad-text dd { margin: 0; overflow-wrap: anywhere; }
mark.hl { padding: 0 2px; border-radius: 3px; font-weight: 600; background: var(--warn-bg); color: var(--warn); border-bottom: 2px solid var(--warn-dot); }
mark.hl.crit { background: var(--crit-bg); color: var(--crit); border-bottom-color: var(--crit-dot); }
.ad-offer { margin: 0 0 6px; font-size: 13.5px; }

/* ════════════════════════════════════════════════════════════════
   44. ТЕКСТ ДИСКЛЕЙМЕРА С ОТМЕТКАМИ (элемент 56, решение 480)
   Над плашками разбора — текст клиента: найденное — тихая отметка mark.hl.found
   (пунктир цвета «готово», без заливки), место ошибки — mark.hl цветом уровня строки
   (как у элемента 55), у «Не указано» — метка .hl-anchor «дописать сюда», скрыта,
   пока не нажата строка. Нажатая строка .hl-row.is-active и её места .is-active —
   рамкой акцента. Разметка — project/_offer_analysis.html, поведение —
   app/js/disclaimer-marks.js.
   ════════════════════════════════════════════════════════════════ */
.hl-text { padding: 10px 14px 12px; border-radius: 12px; border: 1px solid var(--border); background: rgba(var(--ink-rgb), .03); min-width: 0; }
.hl-text > p { margin: 0 0 6px; }
.hl-text-body { margin: 0; font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
mark.hl.found { padding: 0; font-weight: inherit; background: transparent; color: inherit; border-bottom: 1px dashed var(--ok-dot); }
mark.hl[data-mark-keys], .hl-anchor { transition: box-shadow .15s ease; scroll-margin: 80px 0; }
mark.hl.is-active { box-shadow: 0 0 0 2px var(--accent); }
.hl-anchor { display: none; margin: 0 2px; padding: 0 6px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--warn-bg); color: var(--warn); }
.hl-anchor.crit { background: var(--crit-bg); color: var(--crit); }
.hl-anchor.is-active { display: inline-block; box-shadow: 0 0 0 2px var(--accent); }
.hl-row { cursor: pointer; }
.hl-row.is-active > b { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }

/* ════════════════════════════════════════════════════════════════
   45. ССЫЛКА С МЕТКАМИ ЦЕЛИКОМ (решения 640, 641)
   Готовая ссылка кампании по стандарту разметки — вся, без обрезки: моноширинный текст
   в поле только для чтения, перенос по символам, высота по содержимому; справа
   «Скопировать» (элемент «copied»). Раскрытие кампании на «Проверки → Объявления»
   (project/_check_campaigns.html). Ссылка с метками цветом по типу — раздел 46.
   ════════════════════════════════════════════════════════════════ */
.utm-link { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0; min-width: 0; }
.utm-link textarea {
  flex: 1 1 auto; min-width: 0; min-height: 0; resize: none; field-sizing: content;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.5;
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-all;
}
.utm-link .btn { flex: none; }

/* ════════════════════════════════════════════════════════════════
   «Проверки → Креативы» по шаблонам (сессия 23, прототип proto/landings-markup,
   руководитель отдела 07.10.2026; паспорт docs/screens/check-creatives.md).
   Карточка — шаблон: «Где используется» пометками, источник ошибки плашкой, размеры —
   действующими плитками .cover-tile; в плитке нет текста замечаний (правило 50).
   Окно просмотра (элемент 53) — модификатором .split (правило 54): половина — картинка,
   половина — разбор в виде «Объявлений»; масштаб и стрелки одной строкой.
   ════════════════════════════════════════════════════════════════ */
/* Выбор источника (.chips.accent, правило 52): невыбранная кнопка голубая, выбранная синяя —
   ряд не сливается с серым фоном страницы. Счётчик ошибок остаётся цветом уровня. */
.chips.accent { background: transparent; padding: 0; gap: 8px; box-shadow: none; }
.chips.accent .chip { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.chips.accent .chip:hover { color: var(--accent-dark); }
.chips.accent .chip.active, .chips.accent .chip.active[data-health] { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.chips.accent .chip .n { background: transparent; }
.chips.accent .chip.active .n { color: var(--on-accent); }
.chips.accent .chip.active::before { background: var(--on-accent); }
.tpl-platforms { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 12px; }
.tpl-source { margin: 0 0 12px; }
.tpl-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.tile-marks { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 2px 0 6px; }
.tile-marks.row { flex-direction: row; flex-wrap: wrap; margin: 0; }
.issue-head.unknown .dot { background: var(--unknown-dot); }
/* Разбор помещается без прокрутки: не помещается — сжимается разбор (кегль и отступы),
   а не половина картинки (руководитель отдела 07.10.2026). */
.dialog.image-viewer.split { height: min(900px, 96vh); }
.dialog.image-viewer.split[open] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.image-viewer.split .iv-side { flex-flow: row wrap; align-content: flex-start; align-items: center; gap: 4px 14px; padding: 10px 18px; }
.image-viewer.split .iv-side > * { flex: 1 0 100%; }
.image-viewer.split .iv-side > .iv-tools, .image-viewer.split .iv-side > .iv-nav { flex: 0 0 auto; }
.image-viewer.split .iv-info { gap: 4px; font-size: 12.5px; line-height: 1.38; }
.image-viewer.split .iv-info .ad-text { margin: 0; padding: 6px 10px; }
.image-viewer.split .iv-info .ad-text h4 { margin: 0 0 2px; }
.image-viewer.split .iv-side > .iv-keys { margin: 0; }
.image-viewer.split .iv-info .ad-text dl { grid-template-columns: 82px minmax(0, 1fr); gap: 1px 10px; font-size: 12.5px; }
.issue-brief { display: grid; gap: 2px; font-size: 12.5px; }
.issue-brief p { margin: 0; }
.issue-brief .issue-head { margin: 4px 0 0; font-size: 13.5px; }
.issue-brief .issue-head .icon-btn { margin-left: auto; }
/* Экран ниже 900 px (1536×864, 1366×768, 1280×720): разбор плотнее — кегль 12 px, меньше отступов. */
@media (max-height: 900px) {
  .image-viewer.split .iv-side { padding: 8px 16px; gap: 3px 12px; }
  .image-viewer.split .iv-info, .image-viewer.split .iv-info .ad-text dl, .issue-brief { font-size: 12px; line-height: 1.3; }
  .issue-brief .issue-head { margin-top: 2px; font-size: 13px; }
  .image-viewer.split .iv-info .ad-text dl { grid-template-columns: 74px minmax(0, 1fr); }
}

/* ════════════════════════════════════════════════════════════════
   46. ССЫЛКА С МЕТКАМИ ЦВЕТОМ ПО ТИПУ МЕТКИ (сессия 21, прототип proto/landings-markup)
   Полная ссылка видна целиком: адрес посадки, метки площадки, метки каждой системы
   сквозной аналитики, подмена и окончание from — цветом текста по типу (токены --tag-*),
   без заливки (руководитель отдела 07–08.10.2026). Неполная или неверная часть —
   чёрный пунктир 1 px (.gap / .bad). Легенда — .utm-legend, ряд со «Скопировать» —
   .utm-row. Подмена посадки — коды .utm-seg.subst в .subst-list. Разметка —
   project/landings.html, скрипт — markup-link.js; те же части — на «Проверки → Объявления».
   ════════════════════════════════════════════════════════════════ */
.utm-full { flex: 1 1 auto; min-width: 0; margin: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; font-family: var(--mono); font-size: 13px; line-height: 1.9; overflow-wrap: anywhere; word-break: break-all; }
.utm-seg { font-weight: 600; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.utm-seg.url { color: var(--ink); }
.utm-seg.other { color: var(--ink); font-weight: 500; }
.utm-seg.gap, .utm-seg.bad { outline: 1px dashed var(--ink); outline-offset: 1px; border-radius: 2px; }
.utm-sep { color: var(--faint); padding: 0 1px; }
.utm-seg.yandex, .utm-legend .yandex { color: var(--tag-yandex); }
.utm-seg.vk, .utm-legend .vk { color: var(--tag-vk); }
.utm-seg.avito, .utm-legend .avito { color: var(--tag-avito); }
.utm-seg.sber, .utm-legend .sber { color: var(--tag-sber); }
.utm-seg.calltouch, .utm-legend .calltouch { color: var(--tag-calltouch); }
.utm-seg.roistat, .utm-legend .roistat { color: var(--tag-roistat); }
.utm-seg.comagic, .utm-legend .comagic { color: var(--tag-comagic); }
.utm-seg.callibri, .utm-legend .callibri { color: var(--tag-callibri); }
.utm-seg.smartis, .utm-legend .smartis { color: var(--tag-smartis); }
.utm-seg.subst, .utm-legend .subst { color: var(--tag-subst); }
.utm-seg.from, .utm-legend .from { color: var(--tag-from); }
.utm-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin: 10px 0 6px; font-size: 12.5px; font-weight: 600; }
.utm-legend > .url { color: var(--ink); }
.utm-row { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.utm-row > .btn { flex: none; }
.utm-row + .notice { margin-top: 10px; }
.utm-pick { margin: 12px 0 4px; }
.utm-pick:first-of-type { margin-top: 4px; }
.brand-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: currentColor; }
.brand-dot.calltouch { color: var(--tag-calltouch); }
.brand-dot.roistat { color: var(--tag-roistat); }
.brand-dot.comagic { color: var(--tag-comagic); }
.brand-dot.callibri { color: var(--tag-callibri); }
.brand-dot.smartis { color: var(--tag-smartis); }
.subst-list { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.subst-list code { white-space: nowrap; }
.subst-list code.utm-seg { background: none; padding: 0 2px; }
.subst-list code .icon-btn { width: 20px; height: 20px; opacity: 1; }
.subst-list [data-subst-add] { display: inline-flex; gap: 6px; }
.subst-list [data-subst-add] .quick { width: 130px; }
.url-cell { display: inline-flex; align-items: center; gap: 4px; }
.url-cell .cell-text { padding: 0 10px; font-weight: 500; white-space: normal; min-width: 220px; max-width: 360px; }
.icon-btn.keep { opacity: 1; display: inline-flex; color: var(--accent); }
.used-line { white-space: nowrap; }
td > .field-error, dd > .field-error { flex-basis: 100%; margin-top: 4px; white-space: normal; }

/* 47. Этапы исправления и сетка шаблонов прежних «Объявлений» и «Креативов» (решения 777, 778) сняты
   решением 802: экран ошибок версии 5 — раздел 48. */

/* ════════════════════════════════════════════════════════════════
   48. ОШИБКИ ПЕРВЫМ ЭКРАНОМ (прототип proto/checks-errors-first, принят 29.10.2026 — решение 802;
   элементы каталога «Список ошибок», «Заголовок набора», «Вид набора», «Ложное срабатывание»)
   Уровень не только цветом: форма точки (круг — нарушение закона, ромб — риск по закону, кольцо —
   рекомендация Copilot) и слово скрытым текстом. Строка списка открывает окно набора.
   ════════════════════════════════════════════════════════════════ */
/* Точка уровня формой (Н6). */
.lv { display: inline-block; flex: none; width: 10px; height: 10px; vertical-align: middle; box-sizing: border-box; }
.lv.crit { border-radius: 50%; background: var(--crit-dot); }
.lv.warn { width: 9px; height: 9px; border-radius: 1px; background: var(--warn-dot); transform: rotate(45deg); }
.lv.advice { border-radius: 50%; border: 2px solid var(--accent); background: transparent; }
.lv.unknown { border-radius: 50%; border: 2px dashed var(--unknown-dot); background: transparent; }

/* Сводка «уровень × площадка» над списком (Н6): таблица по содержимому, ячейка — ссылка-фильтр,
   выбранная ячейка — рамкой акцента; числа — в одну строку и вправо. */
.level-sum { margin: 0 0 10px; }
.level-sum th, .level-sum td { padding: 3px 12px; font-size: 13.5px; }
.level-sum thead th { font-size: 12px; }
.level-sum td { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.level-sum tbody th { text-align: left; font-weight: 600; white-space: nowrap; text-transform: none; letter-spacing: 0; font-size: 13.5px; color: var(--ink); }
.level-sum tbody th .lv { margin-right: 6px; }
.level-sum a { display: block; margin: -3px -8px; padding: 3px 8px; border-radius: 8px; color: inherit; font-weight: 600; }
.level-sum a:hover { background: rgba(var(--accent-rgb), .07); text-decoration: none; }
.level-sum a:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.level-sum a[aria-current="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.level-sum .zero { color: var(--faint); font-weight: 400; }
.level-sum .sub { display: block; font-size: 11.5px; font-weight: 400; color: var(--muted); }

/* Верх списка: сводка слева, строки «не проверено» справа — одной полосой. */
.errors-top { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 16px; margin: 0 0 2px; }
/* Сводка уже на узких экранах — колонке справа больше места, строка состояния не переносится. */
@media (max-width: 1440px) {
  .errors-top .level-sum th, .errors-top .level-sum td { padding-left: 6px; padding-right: 6px; }
}
.errors-gaps .gap-line { margin: 2px 0; }
.errors-top > .table-wrap { flex: none; margin: 0; padding: 0; }
.errors-top .level-sum { margin: 0; }
.errors-gaps { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; }
/* Строка состояния — первой в колонке, одной строкой с кнопкой обхода (критик 29.10: при 1280×720
   три строки ошибок на первом экране); заголовок раздела таблицы — тоньше. */
.errors-gaps .status-line { order: -1; font-size: 12px; gap: 4px 6px; }
.errors-gaps .status-line .btn { margin: 0; padding-left: 9px; padding-right: 9px; }
/* Фильтр «Где» — в заголовке колонки (меню, элемент 31). */
.err-where { display: inline-block; }
details.menu.err-where > summary {
  display: inline; width: auto; height: auto; padding: 0; border: 0; background: none; box-shadow: none;
  font: inherit; color: var(--accent);
}
details.menu.err-where > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.err-where { position: relative; }
.err-where .menu-body { text-transform: none; letter-spacing: 0; font-weight: 500; }
.err-where .menu-body a[aria-current="true"] { color: var(--accent); font-weight: 700; }
/* Готовые причины «ложного» — кнопки форм в меню, вид пунктов меню. */
.claim-menu { position: relative; display: inline-block; }
details.menu.claim-menu > summary { width: auto; height: auto; gap: 6px; padding: 6px 13px; font-size: 13px; font-weight: 570; color: var(--ink); border-radius: 9px; }
details.menu.claim-menu > summary svg { width: 14px; height: 14px; }
.claim-menu .menu-body { right: 0; left: auto; }
.claim-menu .menu-body form { margin: 0; }
.claim-menu .menu-body form > button {
  display: flex; width: 100%; padding: 8px 10px; border: none; border-radius: 8px; background: transparent;
  color: var(--ink); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer;
}
.claim-menu .menu-body form > button:hover { background: rgba(var(--ink-rgb), .06); }
.claim-menu .menu-body form > button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.claim-menu .menu-body p { margin: 4px 10px; }

/* Таблица ошибок в две линии (Н6): уровень · ошибка (что не так и цитата) · площадка · сколько.
   Вся строка — одна ссылка (слой ссылки растянут на строку); просмотренная — приглушена. */
table.errors td { vertical-align: top; padding-top: 5px; padding-bottom: 5px; }
table.errors td.err-lv { width: 18px; padding-right: 0; padding-top: 9px; }
table.errors td.err-n, table.errors td.err-pf { width: 1%; white-space: nowrap; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
table.errors td.err-n { text-align: right; }
/* Кнопка «?» (fixed, справа внизу, 48 + 24 px) не закрывает колонку «Проверка» на узких
   экранах (1280–1440): у последней колонки — запас под неё (критик 29.10). */
@media (max-width: 1440px) {
  table.errors tr > :last-child { padding-right: 64px; }
}
table.errors tbody tr { position: relative; }
table.errors a.err-link { color: var(--ink); text-decoration: none; display: block; }
table.errors a.err-link::after { content: ""; position: absolute; inset: 0; }
table.errors a.err-link:focus-visible { outline: none; }
table.errors tbody tr:has(a.err-link:focus-visible) > td { box-shadow: inset 0 2px 0 var(--accent), inset 0 -2px 0 var(--accent); }
.err-what { display: block; font-weight: 600; font-size: 14px; line-height: 1.35; }
.err-what .badge { margin-left: 6px; vertical-align: 1px; }
/* Строка списка A — не больше двух линий (критик 29.10, Н3): «что не так» одной линией. */
table.track.errors .err-what { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80ch; }
.err-quote { display: block; margin-top: 2px; font-size: 13px; line-height: 1.35; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 72ch; }
.err-quote q { color: var(--ink); quotes: "«" "»"; }
table.errors tr.seen .err-what, table.errors tr.seen .err-quote q { color: var(--muted); font-weight: 500; }
table.errors tr.sub-row > td { padding: 3px 12px 1px; font-size: 12.5px; color: var(--muted); font-weight: 600; border-bottom: 0; }
table.errors tr.group-row > th { padding-top: 2px; padding-bottom: 2px; font-size: 12.5px; }
table.errors thead th { padding-top: 5px; padding-bottom: 5px; }
table.errors tr.group-row > th .lv { margin-right: 6px; }
/* Раскрытие на месте у ссылок и орфографии (`details` во второй линии): над слоем ссылки строки. */
table.errors .err-inline { position: relative; z-index: 1; margin-top: 4px; }
table.errors .err-inline > summary { font-size: 12.5px; color: var(--accent); }
/* Строка «не проверено» и строка мастера над списком (Н4, доработка `gap`): одна строка, без заливки;
   «не проверено» — серым, мастер — цветом ошибки, тише первой строки нарушения закона. */
.gap-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 4px 0; font-size: 13.5px; color: var(--muted); }
.gap-line.crit, .gap-line .crit-text { color: var(--crit); }
.gap-line .btn { align-self: center; }
.gap-line .lv { align-self: center; }
/* Причины «Не проверено» группами (Н4): строка — причина и число, раскрытие — объекты. */
.gap-rows { margin: 8px 0 0; border-top: 1px solid var(--border); }
.gap-row { border-bottom: 1px solid var(--border); padding: 8px 0; }
.gap-row > summary { display: flex; align-items: baseline; gap: 10px; }
.gap-row > summary .gap-why { flex: 1 1 auto; min-width: 0; }
.gap-row > summary .gap-n { flex: none; color: var(--muted); font-size: 13px; white-space: nowrap; }
.gap-row > .gap-body { padding: 8px 0 4px 16px; }
.gap-row.crit > summary .gap-why { color: var(--crit); }

/* Плитка с отметкой места (Н1, доработка `cover-tile`): только креативы этой ошибки; уровень — рамкой
   плитки; место — рамкой на картинке (двойная обводка и номер), где координаты есть, иначе — бейдж
   «Эта ошибка: …». Рамка считается от области картинки: сцена с пропорцией картинки (`--ar`). */
.cover-open:has(> .cover-stage) { text-align: center; line-height: 0; }
.cover-stage { position: relative; display: inline-block; height: 184px; max-width: 100%; aspect-ratio: var(--ar, 4 / 3); vertical-align: top; }
.cover-stage > .cover-img.fit, .cover-open .cover-stage > .cover-img.fit { width: 100%; height: 100%; border-radius: 4px; }
/* Рамка места ошибки (Д10, прототип ?proto=errors): двойная обводка — цвет уровня и светлое кольцо,
   видна на любом фоне картинки. Доли [x0, y0, x1, y1] — переменными; контейнер — .cover-stage с
   aspect-ratio картинки, поэтому доли ложатся на картинку без учёта полей. В окне просмотра —
   .iv-box (image-viewer.js ставит её по масштабу и сдвигу картинки). */
/* Только обводка с отступом (критик 29.10, С6): рамка на 3 px снаружи места, внутри ни заливки,
   ни затемнения — текст под ней читается; светлое кольцо снаружи — видна на тёмной картинке. */
/* Отступ 2 px — рамка не наезжает на соседние строки текста (критик 29.10, Н2). */
.place-box, .iv-box {
  position: absolute; pointer-events: none; box-sizing: content-box; padding: 1px; margin: -3px;
  border: 2px solid var(--crit); border-radius: 4px; background: none;
  box-shadow: 0 0 0 1.5px var(--paper);
}
.place-box {
  left: calc(var(--x0) * 100%); top: calc(var(--y0) * 100%);
  width: calc((var(--x1) - var(--x0)) * 100%); height: calc((var(--y1) - var(--y0)) * 100%);
}
.place-box.warn, .iv-box.warn { border-color: var(--warn); }
/* Подпись рамки на D: номер ошибки в строках и значение места («2 · 2,1:1»). */
.place-box[data-label]::after {
  content: attr(data-label); position: absolute; left: -2px; bottom: 100%; margin-bottom: 2px;
  padding: 0 5px; border-radius: 4px; white-space: nowrap; font-size: 11px; line-height: 16px;
  font-weight: 700; background: var(--crit); color: var(--paper);
}
.place-box.warn[data-label]::after { background: var(--warn); color: var(--ink); }
.place-box.zone[data-label]::after { background: var(--ink); color: var(--paper); bottom: auto; top: 2px; left: 2px; }
/* Зона, которую перекрывает площадка (правило `platform_zone`): пунктир по краю картинки. */
.place-box.zone, .iv-box.zone { border: 2px dashed var(--ink); margin: 0; padding: 0; box-sizing: border-box; }
/* В окне просмотра одно место — остальное приглушено (на плитке — нет). .iv-stage обрезает тень. */
.iv-box.dim { box-shadow: 0 0 0 1.5px var(--paper), 0 0 0 100vmax var(--scrim-soft); }
/* Плитка без превью (картинка не скачана): место картинки с подписью. */
.cover-empty { display: flex; align-items: center; justify-content: center; min-height: 120px; padding: 12px; text-align: center; background: rgba(var(--ink-rgb), .04); border-radius: 4px; }
/* «Макеты Figma»: макеты без шаблона — каждый своей карточкой, по три в ряд. */
.layout-singles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
/* Шаблоны — по два в ряд: у шаблона 1–3 ячейки размеров, во всю ширину — пустое поле. */
.layout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(520px, 1fr)); gap: 12px; margin-bottom: 12px; }
.layout-singles > .layout-group, .layout-grid > .layout-group { margin: 0; }
.place-box.advice, .iv-box.advice { border-color: var(--accent); }
.cover-mark {
  position: absolute; left: calc(var(--x) * 100%); top: calc(var(--y) * 100%);
  width: calc(var(--w) * 100%); height: calc(var(--h) * 100%); z-index: 2; pointer-events: none;
  border: 2px solid var(--ink); box-shadow: 0 0 0 2px var(--card-solid), inset 0 0 0 2px var(--card-solid); border-radius: 3px;
}
.cover-mark::before {
  content: attr(data-n); position: absolute; left: -2px; top: -20px; display: grid; place-items: center;
  min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; box-sizing: border-box;
  background: var(--ink); color: var(--card-solid); font-size: 11px; font-weight: 700;
}
.cover-tile .cover-place { align-self: flex-start; white-space: normal; text-align: left; max-width: 100%; }
.cover-body .cover-sub { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; }

/* Плитка «не проверено» (Н2): серая пунктирная рамка, превью приглушено, одна пометка без прозы. */
.cover-tile.unknown { border: 1px dashed var(--border-strong); }
.cover-tile.unknown .cover-img { opacity: .6; filter: grayscale(.8); }

/* Шапка страницы ошибки и правая колонка «Сверяли с» (Н7): не больше четырёх линий — уровень и что
   не так, цитата, основание и как исправить, когда исчезнет. */
.error-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 6px; }
.error-pager { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.error-pager .btn { min-width: 34px; justify-content: center; }
.error-head { display: grid; gap: 4px; margin: 0 0 14px; }
.error-head .eh-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.error-head .eh-level { font-size: 13px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.error-head .eh-level.crit { color: var(--crit); }
.error-head .eh-level.warn { color: var(--warn); }
.error-head .eh-title { margin: 0; font-size: 21px; line-height: 1.3; }
/* Фокус на заголовке после перехода — для чтения с экрана и клавиш; рамка по тексту и только
   при переходе клавишами ← → (`error-keys.js` ставит data-focus-ring), не во всю строку. */
[data-error-title] { width: fit-content; max-width: 100%; }
[data-error-title]:focus:not([data-focus-ring]) { outline: none; }
[data-error-title][data-focus-ring]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: calc(var(--radius) / 2); }
.error-head .eh-line .row-tools { margin-left: auto; }
.error-head .eh-quote { margin: 0; font-size: 16px; line-height: 1.4; }
.error-head .eh-fix, .error-head .eh-when { margin: 0; font-size: 13.5px; }
.error-head .eh-when { color: var(--muted); font-size: 12.5px; }
.error-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.error-layout > * { min-width: 0; }
.error-side { position: sticky; top: 16px; display: grid; gap: 8px; font-size: 13.5px; }
.error-side h2 { margin: 0; font-size: 15px; }
.error-side h3 { margin: 6px 0 0; font-size: 13px; color: var(--muted); font-weight: 600; }
.error-side p { margin: 0; }
.error-side .hl-text-body { font-size: 13px; }
/* Один креатив — крупно, рядом прочитанный текст с выделенной цитатой. */
.error-one { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 14px; align-items: start; }
.error-one .cover-open .cover-stage { height: 220px; }
.error-head .eh-line .row-tools { display: inline-flex; align-items: center; gap: 12px; }
.error-layout h2.small { margin: 0 0 6px; font-size: 13px; }
/* Подпись плитки B — не выше двух строк (критик 29.10, Н5: при 1280 плитка целиком на первом
   экране); полный текст — в подсказке и в окне просмотра. */
.error-layout .tpl-grid .cover-body > b, .error-layout .tpl-grid .cover-body > .cover-sub {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.error-one > .wide { grid-column: 1 / -1; }
/* Набор (страница D): креатив и его текст слева, все ошибки набора справа — на первом экране. */
.set-layout { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 18px; align-items: start; }
.set-layout > * { min-width: 0; }
.set-creative { display: grid; gap: 8px; }
/* Текст креатива на D — подпись над строкой, строка во всю ширину колонки (не по слову в строке). */
.set-creative .ad-text dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
.set-creative .ad-text dt { margin-top: 6px; font-size: 12.5px; }
.set-creative .ad-text dt:first-child { margin-top: 0; }
/* Креатив на D — крупно, во всю колонку (≥ 360 px по ширине, секундомер 29.10); высокий — не выше
   560 px, рамки ставит error-keys.js по object-fit картинки. */
.set-creative .cover-open .cover-stage { height: auto; width: 100%; max-height: 560px; }
.set-errors h2.small { margin: 0 0 6px; font-size: 13px; }
.set-errors table.errors td.err-n { white-space: nowrap; }
/* Строка ошибки набора (критик 29.10, С2): цитата переносом, «Сверяли с» и «Как исправить» — под
   строкой; кнопки «Настоящая» / «Ложное» — узкой колонкой столбиком, без прокрутки вбок. */
.set-errors-table .err-quote { white-space: normal; max-width: none; }
/* Длинное поле текста (дисклеймер) на B и D: место с цитатой, весь текст — по «Весь текст ›». */
.ad-text .field-full { margin-top: 2px; }
.ad-text .field-full > p { margin: 4px 0 0; }
.set-errors-table .err-sub { display: block; margin-top: 2px; line-height: 1.35; }
.set-errors-table td.err-act { width: 1%; }
.set-errors-table td.err-act .row-actions { display: grid; gap: 4px; justify-items: stretch; }
.set-errors-table td.err-act .btn { justify-content: center; }
.error-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
@media (max-width: 1180px) {
  .error-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .error-one { grid-template-columns: minmax(0, 240px) minmax(0, 1fr); }
}

/* Подгруппа макета на «Макетах Figma» (Н8): макет одной колонкой во всю ширину, шапка — одной
   строкой, ячейки размеров одной высоты, у ячейки одна пометка уровня. */
.layout-group { margin: 0 0 14px; }
.layout-group > .layout-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 10px; }
.layout-group > .layout-head h2 { margin: 0; font-size: 16px; }
/* Шапка макета прототипа E — одной строкой (критик 29.10, Н5): имя сокращается многоточием,
   полное — в подсказке; размеры и ошибки не переносятся. */
.layout-group > .layout-head.one-line { flex-wrap: nowrap; }
.layout-head.one-line h2 { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layout-head.one-line > :not(h2) { flex: none; white-space: nowrap; }
.layout-group > .layout-head .muted { font-size: 13px; }
.layout-cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.layout-cells > .cover-tile .cover-body { min-height: 0; }

/* Версия 5 прототипа (план 3.8): фильтр площадки рядом чипов (элемент фильтра каталога) с числами
   нарушений и рисков, список по наборам с заголовком набора и зонами, вид набора — страница и окно. */
/* Ряд площадок — своей строкой над строками состояния: строкам «не проверено» — вся ширина,
   каждая в одну линию (на 1280×720 — не меньше трёх строк ошибок на первом экране). */
.errors-top:has(> .err-platforms) { flex-direction: column; align-items: stretch; gap: 4px; margin-bottom: 4px; }
.errors-top > .err-platforms { flex: none; align-self: flex-start; padding: 3px; }
.err-platforms .chip { padding: 5px 12px; }
.errors-top:has(> .err-platforms) .errors-gaps { flex: none; }
.errors-top:has(> .err-platforms) .errors-gaps .status-line { order: 0; }
.err-platforms .chip { display: inline-flex; align-items: center; gap: 2px; text-decoration: none; }
/* Неактивная площадка: --muted на дорожке .chips (6 % --ink) в «Небе» — 4,17 из 4,5
   (runtime-audit 30.10; «Мята» 4,04); цвет текста от --ink, а не --muted, — от 4,98 («Мята»,
   светлая) до 6,84 во всех палитрах и темах. Активная площадка — белая плашка с тенью, как была. */
.err-platforms .chip:not(.active) { color: rgba(var(--ink-rgb), .68); }
.err-platforms .chip:not(.active):hover { color: var(--ink); }
.err-platforms .chip .n { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; }
.err-platforms .chip .n .lv { width: 8px; height: 8px; }
.err-platforms .chip .n .lv.warn { width: 7px; height: 7px; }
.err-platforms .crit-n { color: var(--crit); }
.err-platforms .warn-n { color: var(--warn); }
/* Заголовок набора: миниатюра и имя — открыть окно набора, зоны с числами, кнопка «Перепроверить». */
table.errors tr.set-row > td { padding: 8px 12px 4px; border-bottom: 0; color: var(--ink); font-weight: 500; }
.set-head { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; font-size: 13px; }
.set-head .set-open {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding: 0; border: 0; background: none;
  color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; text-align: left;
}
.set-head .set-open:hover b { color: var(--accent); }
.set-head .set-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.set-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; background: rgba(var(--ink-rgb), .06); flex: none; }
.set-head .set-zones { color: var(--muted); }
.set-head .btn { margin-left: auto; }
table.errors td.err-zone { width: 1%; white-space: nowrap; color: var(--muted); font-size: 12px; padding-top: 7px; }

/* Вид набора: шапка строкой, креатив слева (картинка и текст со своей прокруткой), ошибки справа
   по зонам; у ошибки текста — объявление во всю ширину полями в две колонки, ошибки ниже. */
.set-view { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.sv-head { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
.sv-head .sv-title { margin: 0; font-size: 19px; line-height: 1.3; }
.in-window > .sv-head { flex-wrap: nowrap; }
.in-window > .sv-head .sv-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.in-window > .sv-head > :not(.sv-title) { flex: none; white-space: nowrap; }
.sv-detail { font-size: 13px; line-height: 1.4; }
.sv-head .eh-level { font-size: 13px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.sv-head .eh-level.crit { color: var(--crit); }
.sv-head .eh-level.warn { color: var(--warn); }
.sv-head .sv-zones { color: var(--muted); font-size: 13px; }
.sv-head .sv-tools { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.sv-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 16px; align-items: start; min-height: 0; }
.set-view.is-ad .sv-body { grid-template-columns: minmax(0, 1fr); }
.sv-creative { display: grid; gap: 8px; min-width: 0; }
/* Блок текста — постоянной ширины; картинка занимает остальное и вписывается масштабом:
   разные пропорции креативов не сдвигают и не сжимают текст (руководитель 20.11.2026). */
.sv-size { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) clamp(320px, 24vw, 420px); gap: 12px; align-items: start; }
.sv-size[hidden] { display: none; }
.sv-stage-wrap { display: grid; gap: 4px; justify-items: stretch; min-width: 0; }
/* Картинка размера — рабочая область окна просмотра (`.iv-stage`, `.iv-img`, `.iv-tools`):
   пропорция картинки, масштаб и сдвиг — `window.imageZoom`; рамки места — по масштабу. */
.sv-stage-wrap .sv-zoom { height: min(50vh, 480px); width: 100%; border-radius: 6px; }
.sv-stage-wrap .sv-zoom-tools, .sv-stage-wrap figcaption { justify-self: center; text-align: center; }
.sv-zoom .place-box { z-index: 1; }
.sv-zoom-tools { justify-content: center; gap: 4px; }
.sv-zoom-tools .btn { padding: 3px 9px; }
.sv-text { margin: 0; max-height: min(54vh, 520px); overflow: auto; }
.sv-text dl, .sv-ad-fields { margin: 0; }
.sv-text dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
.sv-text dt { margin-top: 6px; font-size: 12.5px; }
.sv-text mark.current, .sv-ad mark.current { outline: 2px solid currentColor; outline-offset: 1px; }
.sv-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.sv-thumb {
  display: grid; justify-items: center; gap: 2px; padding: 4px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card-solid); color: var(--muted); font: inherit; font-size: 11.5px; cursor: pointer;
}
.sv-thumb img { width: 56px; height: 56px; object-fit: contain; }
.sv-thumb[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: var(--ink); }
.sv-thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sv-ad { margin: 0; }
.sv-ad .sv-ad-fields {
  display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr); gap: 3px 14px;
  font-size: 13px; line-height: 1.35;
}
.ad-text.sv-ad { padding: 8px 12px; }
.sv-ad > h4 { margin: 0 0 4px; }
.sv-ad-fields dt { color: var(--muted); font-size: 12.5px; padding-top: 1px; }
.sv-ad-fields dd { margin: 0; }
.sv-errors { display: grid; gap: 2px; align-content: start; min-width: 0; }
.sv-zone { margin: 8px 0 2px; font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.sv-zone:first-child { margin-top: 0; }
.sv-item { border: 1px solid transparent; border-radius: 10px; }
.sv-item.selected { border-color: var(--border-strong); background: var(--card-solid); box-shadow: var(--shadow); }
.sv-line {
  display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 2px 8px; width: 100%; padding: 6px 8px;
  border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; border-radius: 10px;
}
.sv-line:hover { background: rgba(var(--ink-rgb), .04); }
.sv-line:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sv-line .err-lv { padding-top: 4px; }
.sv-line .err-what { font-size: 13.5px; }
.sv-line .err-quote { white-space: normal; max-width: none; }
.sv-line-meta { grid-column: 2; }
.sv-line-text { min-width: 0; }
.sv-detail { display: grid; gap: 6px; padding: 0 10px 10px 30px; }
.sv-detail p { margin: 0; }
.sv-quote q { quotes: "«" "»"; }
/* Вырезка места крупно по рамке (`details.box`): фон — картинка креатива, масштаб и сдвиг — из
   долей рамки (`--cw`, `--px`, `--py`), пропорции — `--car`; не выше 150 px. */
.sv-crop {
  width: min(100%, calc(150px * var(--car))); aspect-ratio: var(--car); border-radius: 8px;
  background-image: var(--crop-src); background-repeat: no-repeat; background-size: calc(100% / var(--cw)) auto;
  background-position: var(--px) var(--py); border: 2px solid var(--crit); box-shadow: 0 0 0 1.5px var(--paper);
}
.sv-crop.warn { border-color: var(--warn); }
.sv-crop.advice { border-color: var(--accent); }
.sv-crop[hidden] { display: none; }
.sv-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sv-actions .claim-menu .menu-body { position: static; margin-top: 6px; box-shadow: none; border: 1px solid var(--border); }
.sv-ads > summary { font-size: 13px; color: var(--accent); }

/* Окно набора поверх списка: шапка строкой, тело — колонки со своей прокруткой. */
.dialog.error-window {
  width: min(1840px, calc(100vw - 32px)); height: min(1000px, calc(100vh - 32px)); max-width: none; max-height: none; padding: 12px 18px 10px;
  display: none; overflow: hidden;
}
.dialog.error-window[open] { display: flex; flex-direction: column; }
.dialog.error-window .ew-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.set-view.in-window { flex: 1 1 auto; min-height: 0; }
.set-view.in-window .sv-body { flex: 1 1 auto; min-height: 0; align-items: stretch; }
.set-view.in-window .sv-errors, .set-view.in-window.is-ad .sv-body { overflow: auto; min-height: 0; }
.set-view.in-window .sv-creative { overflow: auto; min-height: 0; align-content: start; }
.set-view.in-window .sv-stage-wrap .sv-zoom { height: min(calc(94vh - 270px), 560px); }
.set-view.in-window .sv-text { max-height: min(calc(94vh - 170px), 640px); }
.set-view.in-window .sv-thumb img { width: 40px; height: 40px; }
.set-view.in-window .sv-ads { flex: none; }
/* Лид-форма VK набора — под креативом, строками «место — текст», своей прокруткой. */
.sv-form { margin-top: 8px; max-height: 180px; overflow: auto; }
.sv-form .sv-ad-fields { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; }
.set-view.in-window .sv-form { flex: none; }
/* С лид-формой креатив ниже на высоту формы: кнопки масштаба и размеры видны без прокрутки,
   форма не перекрывает креатив (руководитель 23.11.2026). */
.set-view.in-window:has(.sv-form) .sv-stage-wrap .sv-zoom { height: min(calc(94vh - 480px), 560px); min-height: 220px; }
.set-view.in-window:has(.sv-form) .sv-text { max-height: max(275px, min(calc(94vh - 425px), 640px)); }
.set-view.in-window.is-ad .sv-body { align-content: start; }
@media (max-width: 1440px) {
  .sv-body { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); }
  .sv-size { grid-template-columns: minmax(0, 1fr) 300px; }
}

/* ── Ключи API в «Профиле» (прототип ?proto=api-keys): поле с показанным один раз ключом ── */
.api-key-secret { flex: 1 1 320px; min-width: 0; font-family: var(--mono); font-size: 13px; }

/* ════════════════════════════════════════════════════════════════
   42. НАШИ ОБЪЯВЛЕНИЯ («Сводки и отчёты → Наши объявления», согласовано 09.11.2026)
   Три элемента каталога: карточка объявления (`.ad-card`), кнопка со счётчиком ошибок и знаком
   уровня (`.err-btn`), «Где используется» (`.where-used`). Миниатюра креатива — модификатор
   плитки `.cover-tile.mini` (элемент дорабатывается, не пишется заново). `.versions`,
   `.version-row`, `.version-diff` — копия трёх правил слоя 09: слоя в приложении нет, тянуть
   весь слой ввода данных ради одного списка дороже трёх правил (как у §25.3).
   ════════════════════════════════════════════════════════════════ */
.ad-list { display: grid; gap: 8px; margin: 8px 0; }
.ad-card { border: 1px solid var(--border); border-radius: 14px; background: var(--card-solid); min-width: 0; }
.ad-card[open] { border-color: var(--border-strong); box-shadow: var(--shadow); }
.ad-row {
  display: grid; grid-template-columns: 14px 252px minmax(0, 1fr) minmax(130px, 210px); align-items: start; gap: 12px;
  max-height: 128px; overflow: hidden; padding: 10px 14px; cursor: pointer; list-style: none;
}
.ad-row::-webkit-details-marker { display: none; }
.ad-row::before { content: "▸"; color: var(--muted); padding-top: 2px; transition: transform .12s; }
.ad-card[open] > .ad-row::before { transform: rotate(90deg); }
.ad-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 14px; }
.ad-thumbs { display: flex; align-items: center; gap: 6px; min-height: 60px; }
.cover-tile.mini { flex: none; width: 60px; height: 60px; border-radius: 8px; }
.cover-tile.mini > .cover-open { height: 100%; padding: 2px; border-radius: 7px; }
.cover-tile.mini .cover-open .cover-img.fit { height: 54px; border-radius: 5px; }
.cover-tile.mini .cover-play { top: 50%; width: 22px; height: 22px; font-size: 9px; }
.cover-tile.mini .cover-empty { min-height: 0; height: 100%; padding: 2px; font-size: 10px; line-height: 1.1; }
.ad-thumbs .ad-more-n { flex: none; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.ad-main { display: grid; gap: 2px; min-width: 0; align-content: start; }
.ad-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; color: var(--muted); }
.ad-title, .ad-title2, .ad-snippet, .ad-link { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-title2 { color: var(--ink); }
.ad-snippet { color: var(--muted); font-size: 13.5px; }
.ad-link { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.ad-link .utm-seg { font-weight: 500; }
.ad-more-pill { color: var(--muted); font-weight: 400; }
.ad-err { display: grid; gap: 4px; justify-items: end; text-align: right; min-width: 0; font-size: 12.5px; }
.err-btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.err-btn[aria-disabled="true"] { cursor: default; }
.ad-body { display: grid; gap: 4px; padding: 0 14px 14px 40px; min-width: 0; }
.ad-body > h3 { margin: 10px 0 2px; font-weight: 600; }
.ad-body .ad-text { margin: 0; }
.ad-body .cover-grid { margin-top: 2px; }
.where-used { margin: 0; }
/* Площадка «Посадки» (решение 865): строка карточки посадки или лид-формы — без колонки миниатюр
   креатива; у формы обложка слева, таблица офферов справа, обе колонки внутри раскрытия. */
.ad-row.landing-row { grid-template-columns: 14px minmax(0, 1fr) minmax(130px, 210px); }
.form-split { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 16px; align-items: start; min-width: 0; }
.form-split > div { min-width: 0; }
.form-split .cover-grid.tpl-grid { grid-template-columns: minmax(0, 1fr); }
.landing-offers { margin: 0; }
.ad-versions { margin: 0; }
.ad-more { margin: 4px 0 0; }
.versions { list-style: none; margin: 0; padding: 0; }
.versions li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.versions li:last-child { border-bottom: none; }
.version-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.version-diff { margin: 4px 0 8px; padding: 6px 10px; border-left: 2px solid var(--border-strong); color: var(--ink); line-height: 1.5; }
.ad-search { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.ad-search .search { min-width: 260px; }

/* ════════════════════════════════════════════════════════════════
   49. ВОРОНКИ И КОНВЕРСИИ (функция 26; согласовано руководителем 17.11.2026)
   Новые элементы каталога: мультивыбор с исключением и поиском (`.fn-pick`), облако меток по группам
   (`.fn-cloud`), три уровня строк (`.fn-lv-project`, `.fn-lv-landing`, `.fn-lv-source`), итог первой строкой
   (`.fn-total`), спарклайн (`.fn-spark`), маркер «!» (`.fn-flag`), подсказка значения (`.fn-tip`,
   `data-fn-tip`), легенда таблицы (`.fn-legend`). Цвета — токены эталона, тёмная тема из токенов.
   ════════════════════════════════════════════════════════════════ */
/* Плотный вид на всю ширину рабочей области: страница воронки без узкого контейнера, одна строка заголовка,
   панель фильтров сеткой с подписью 11 px над каждым полем, чипы одной строкой. */
main:has(.fn-root) { max-width: none; margin: 10px 0 24px; padding: 0 16px; }
main:has(.fn-root) > .tabs { margin-bottom: 8px; }
.fn-root { min-width: 0; }
.fn-tabs { margin-bottom: 8px; }
.fn-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0 0 8px; }
.fn-head h1 { margin: 0; font-size: 18px; line-height: 1.2; }
.fn-meta { margin: 0; flex: 1 1 320px; min-width: 0; font-size: 12px; color: var(--muted); }
.fn-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-left: auto; }
.fn-head-actions .btn { padding: 4px 10px; font-size: 12px; min-height: 28px; }
.fn-head-actions .link-btn { font-size: 12px; }
.fn-pair { display: inline-flex; gap: 6px; }
.fn-banner { margin: 0 0 8px; }
.fn-banner:empty { display: none; }
.fn-warn { margin: 0 0 2px; padding: 0 0 0 8px; border-left: 3px solid var(--warn-vivid); font-size: 12.5px; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fn-warn b { color: var(--warn); }
.fn-controls { min-width: 0; margin-bottom: 8px; padding: 6px 12px 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--card-solid); }
.fn-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 12px; margin-bottom: 4px; min-width: 0; }
.fn-field { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.fn-lab { margin: 0; font-size: 11px; line-height: 1.2; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
h3.fn-lab { margin: 0 0 6px; font-weight: 400; }
.fn-field-grow { flex: 1 1 220px; }
.fn-field-grow .search { width: 100%; min-width: 0; }
.fn-field .search input { box-sizing: border-box; min-height: 30px; padding-top: 4px; padding-bottom: 4px; font-size: 13px; }
.fn-field .dropdown { min-width: 0; }
.fn-field .dropdown-btn { min-height: 30px; padding: 4px 10px; font-size: 13px; }
.fn-field input[type=date], .fn-field input[type=number] { min-height: 30px; padding: 4px 8px; font-size: 13px; }
.fn-field .chips.accent .chip { padding: 4px 10px; font-size: 12.5px; min-height: 30px; }
.fn-field .search { display: block; }
.fn-field .chips.accent { gap: 5px; }
.fn-field .icon-btn { min-height: 30px; }
.fn-inline { display: inline-flex; align-items: center; gap: 4px; }
.fn-num { width: 84px; }
.fn-row-chips { display: grid; gap: 6px; margin-bottom: 2px; }

/* Мультивыбор с исключением и поиском: кнопка с подписью отбора, панель с поиском, значения в три состояния. */
.fn-pick { position: relative; display: inline-block; }
.fn-pick-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 4px 10px; max-width: 220px;
  border: 1px solid var(--border-strong); border-radius: 12px; background: var(--card); color: var(--ink);
  font: inherit; font-size: 13px; cursor: pointer;
}
.fn-pick-btn:hover { border-color: var(--accent); }
.fn-pick-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fn-pick-btn.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.fn-pick-btn.has-exc { box-shadow: inset 0 -2px 0 var(--crit-dot); }
.fn-pick-lab { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.fn-pick-btn.active .fn-pick-lab { color: inherit; }
.fn-pick-val { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; font-weight: 600; }
.fn-pick-caret { color: var(--muted); font-size: 11px; }
.fn-pick-panel {
  position: absolute; z-index: var(--z-raise); top: calc(100% + 4px); left: 0; width: 340px; max-width: calc(100vw - 32px);
  display: flex; flex-direction: column; gap: 6px; padding: 8px; overflow: hidden;
  background: var(--card-solid); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow-lg);
}
.fn-pick-panel.flip { left: auto; right: 0; }
.fn-pick-panel[hidden] { display: none; }
.fn-pick-panel input[type=search] { width: 100%; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 10px; font-size: 13px; }
.fn-pick-list { display: grid; align-content: start; gap: 1px; min-height: 0; overflow: auto; }
.fn-pick-row {
  display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; padding: 6px 8px;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer;
}
.fn-pick-row:hover, .fn-pick-row:focus-visible { background: var(--hover-solid); outline: none; }
.fn-pick-row:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.fn-pick-row[data-state="in"] { color: var(--accent); font-weight: 600; }
.fn-pick-row[data-state="ex"] { color: var(--crit); }
.fn-pick-row[data-state="ex"] .fn-pick-name { text-decoration: line-through; }
.fn-pick-mark { font-weight: 800; text-align: center; }
.fn-pick-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fn-pick-n { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.fn-pick-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 6px; border-top: 1px solid var(--border); }
.fn-pick-empty { padding: 8px; }

/* Значения-чипы в три состояния: оставить (синий), исключить (красный, зачёркнут, значок ⊘), снять. */
.chip[data-state="ex"], .chips.accent .chip[data-state="ex"] { background: var(--crit-bg); color: var(--crit); text-decoration: line-through; }
.chip[data-state="in"] { font-weight: 700; }

/* Облако меток по группам: блок на каждую группу, метки по убыванию визитов, прокрутка внутри блока. */
.fn-cloud-box { min-width: 0; margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--card-solid); }
.fn-cloud-box[hidden] { display: none; }
.fn-cloud-box > h3 { margin: 0 0 8px; }
.fn-cloud { display: grid; gap: 10px; min-width: 0; }
.fn-cloud-group { min-width: 0; }
.fn-cloud-head { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.fn-cloud-body { display: flex; flex-wrap: wrap; gap: 6px; max-height: 132px; overflow: auto; padding: 0; background: transparent; }
.fn-cloud .chip { font-size: 12.5px; padding: 5px 10px; background: var(--accent-soft); color: var(--accent); }
.fn-cloud .chip[data-state="in"] { background: var(--accent); color: var(--on-accent); }
.fn-cloud .chip[data-state="ex"] { background: var(--crit-bg); color: var(--crit); }
.fn-cloud .chip .n { margin-left: 6px; opacity: .75; font-weight: 600; }

/* Таблица воронки: рамка эталона, три уровня строк, итог первой строкой под шапкой. */
.fn-card { padding: 0; overflow: hidden; }
.fn-frame { border: 0; border-radius: var(--radius); max-height: max(420px, calc(100vh - 110px)); }
.fn-table { table-layout: auto; }
.fn-table.fixed { table-layout: fixed; }
.table-frame .fn-table .pin { min-width: 0; max-width: none; }
.fn-table th, .fn-table td { overflow: hidden; text-overflow: ellipsis; }
.fn-table thead th { position: sticky; background: var(--card-solid); z-index: 2; vertical-align: middle; }
.fn-table thead tr.fn-h1 th { top: 0; }
.fn-table thead tr.fn-h2 th { top: var(--fn-h1, 0px); }
.fn-table thead tr.fn-h3 th { top: calc(var(--fn-h1, 0px) + var(--fn-h2, 0px)); box-shadow: inset 0 -1px 0 var(--border-strong); }
.fn-table thead th.pin { z-index: 4; }
.fn-table thead th.step { text-align: center; }
.fn-table .fn-grp { cursor: pointer; text-align: left; color: var(--accent); }
.fn-table .fn-grp:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.fn-table .fn-grp-note { text-align: center; font-weight: 400; }
.fn-table .th-sort { white-space: nowrap; }
.fn-table .th-plain { white-space: nowrap; }
.fn-table .sort-mark.sub { opacity: .55; margin-left: 2px; }
.fn-table td.num { font-variant-numeric: tabular-nums; }
.fn-table tbody td { padding: 4px 8px; font-size: 13px; }
.fn-table thead th { padding: 4px 8px; font-size: 11px; }
.fn-name-cell { min-width: 0; }
.fn-mark { white-space: nowrap; }
.fn-table thead .fn-grp-empty { border-bottom: 0; }
.fn-table thead .fn-step-head { font-weight: 600; }
.fn-field-wide { flex: 1 1 100%; width: 100%; }
.fn-field-wide .chips { flex-wrap: wrap; }
.fn-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.fn-name-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.fn-sub { flex: none; white-space: nowrap; font-size: 12px; }
.fn-twist { flex: none; width: 12px; color: var(--muted); font-size: 11px; }
.fn-go { flex: none; display: inline-flex; align-items: center; color: var(--muted); }
.fn-go:hover { color: var(--accent); }
.fn-go.spread { color: var(--warn-vivid); }
.fn-go svg { width: 13px; height: 13px; }
.fn-lv-project > td { cursor: pointer; background: var(--card-solid); border-top: 1px solid var(--border); }
.fn-lv-project:focus-visible, .fn-lv-landing:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.fn-lv-landing > td { cursor: pointer; background: var(--card-solid); }
.fn-lv-landing .fn-name { padding-left: 16px; }
.fn-lv-landing .fn-name-text { font-weight: 500; }
.fn-lv-source > td { font-size: 12.5px; color: var(--muted); background: var(--card-solid); }
.fn-lv-source .fn-name { padding-left: 44px; }
.fn-lv-source .fn-name-text { font-weight: 400; }
.fn-total > td {
  position: sticky; top: calc(var(--fn-h1, 0px) + var(--fn-h2, 0px) + var(--fn-h3, 0px)); z-index: 1; font-weight: 700;
  background: var(--card-solid); box-shadow: inset 0 -1px 0 var(--border-strong);
}
.fn-total > td.pin { z-index: 3; }
.fn-total .fn-sub { margin-left: 8px; font-weight: 400; }
.fn-empty { padding: 24px; text-align: center; white-space: normal; }
.fn-delta { margin-left: 6px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.fn-delta.up, .fn-delta-n.up { color: var(--ok); }
.fn-delta.down, .fn-delta-n.down { color: var(--crit); }
.fn-delta.flat, .fn-delta-n.flat { color: var(--faint); }
.fn-delta-n { font-weight: 700; }
.fn-drop { margin-left: 6px; font-size: 11px; font-weight: 700; color: var(--crit); white-space: nowrap; }
.fn-table td.cr.good { background: var(--ok-bg); color: var(--ok); font-weight: 650; }
.fn-table td.cr.warn { background: var(--warn-bg); color: var(--warn); font-weight: 650; }
.fn-table td.cr.bad { background: var(--crit-bg); color: var(--crit); font-weight: 650; }
.fn-gap { font-size: 11.5px; font-style: italic; color: var(--warn); }
.fn-dash { cursor: default; }
.fn-table td.neck { font-size: 12.5px; }
/* Модификатор `.fn-plan` — «Расход и остатки» (функция 19, решения 929, 933; согласован 19.11.2026): таблица
   с подсказками «?» в шапке. `overflow: hidden` заголовков `.fn-table` обрезал тело подсказки — здесь оно видно;
   шапка прижата к нижнему краю, у чисел — вправо; текст подсказки не наследует регистр и выравнивание шапки. */
.fn-table.fn-plan thead th { overflow: visible; vertical-align: bottom; white-space: nowrap; }
.fn-table.fn-plan thead th.num { text-align: right; }
/* Таблица на всю высоту, без прокрутки вниз внутри рамки (руководитель 24.11.2026); шапку при прокрутке
   страницы держит у верха окна `money-tree.js` (сдвиг `transform`), прокрутка вбок остаётся у рамки. */
.table-frame:has(> table.fn-plan) { max-height: none; }
/* Раскрытый проект — цифры его строки полупрозрачные, чтобы не смешивались с цифрами кабинетов
   (руководитель 25.11.2026); название, рекомендация и кнопка задачи — как были. */
.fn-table.fn-plan tr[data-group-head][aria-expanded="true"] > td.num { opacity: .45; }
/* «Перейти в кабинет» — значок площадки в её цвете (руководитель 24.11.2026: «кнопку сделай логотипом
   рекламного канала»); `.off` — ссылка на кабинет площадки ещё не настроена. */
.cab-go { display: inline-flex; margin-right: 4px; border-radius: 6px; vertical-align: middle; line-height: 0; }
.cab-go svg, .cab-go img { display: block; border-radius: 5px; }
a.cab-go:hover { box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .35); }
.cab-go.off { opacity: .4; filter: grayscale(.6); cursor: default; }
.fn-table.fn-plan .field-tip-body { text-transform: none; letter-spacing: normal; text-align: left; white-space: normal; }
/* Дерево «проект → кабинеты и каналы» (руководитель 20.11.2026: «каналы открываются ровно под проектом
   и смешиваются с ними»): строки проекта отступают вправо на ступень от названия проекта, слева — линия
   под стрелкой проекта, она идёт через кабинеты, их подробности и каналы без выгрузки. */
.fn-table.fn-plan .fn-lv-landing .fn-name,
.fn-table.fn-plan .fn-lv-source .fn-name { padding-left: 36px; }
.fn-table.fn-plan tr[data-parent] > td:first-child {
  background-image: linear-gradient(var(--border-strong), var(--border-strong));
  background-repeat: no-repeat; background-size: 1px 100%; background-position: 13px 0;
}
.fn-table.fn-plan tr[data-issue-detail] .issue-detail { margin-left: 36px; }
.filters-bar .tree-all { flex: none; margin-left: auto; display: inline-flex; gap: 4px; }

/* Спарклайн визитов по дням и маркер «!» с причинами. */
.fn-spark { flex: none; margin-left: auto; overflow: visible; }
.fn-spark path { fill: none; stroke: var(--series-1); stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; }
.fn-flag {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%;
  background: var(--warn-bg); color: var(--warn); font-size: 11px; font-weight: 800; line-height: 1; cursor: default;
}
.fn-flag.bad { background: var(--crit-bg); color: var(--crit); }
.fn-flag:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Подсказка значения: одна на страницу, текст из `data-fn-tip`, строки — через перевод строки. */
.fn-tip {
  position: fixed; z-index: var(--z-toast); max-width: 340px; padding: 7px 11px; border-radius: 10px;
  background: var(--toast-bg); color: var(--toast-text); font-size: 12.5px; line-height: 1.45; white-space: pre-line;
  box-shadow: var(--shadow-lg); pointer-events: none;
}
.fn-tip[hidden] { display: none; }
.fn-tip.static { position: static; display: inline-block; }

/* Легенда таблицы и блоки под таблицей. */
.fn-legend { padding: 14px 18px; }
.fn-legend > h3 { margin: 0 0 6px; }
.fn-legend .legend { margin-top: 0; }
.fn-legend .legend b.fn-flag { display: inline-flex; margin-right: 4px; }
.fn-issues { display: grid; gap: 4px; min-width: 0; }
.fn-issue > h3 { margin: 10px 0 4px; }
.fn-issue-list { margin: 0 0 6px; padding-left: 18px; font-size: 13.5px; }
.fn-issue-list li { margin: 2px 0; }
.fn-dead, .fn-foot { margin: 8px 0; }
/* ── Воронка посадки (веха воронки посадок, 17.11.2026; элемент «funnel-steps»): ступени посадки — роль → цель счётчика ── */
.funnel-lib { margin: 0; }
.funnel-lib > details > summary { padding: 0; }
.funnel-lib > details[open] { margin-bottom: 8px; }
.funnel-lib > details > summary .field-tip { vertical-align: middle; }
.funnel-landing { margin-bottom: 12px; }
.funnel-kind { align-items: center; }
.funnel-kind input[type="number"] { width: 5em; }
.funnel-goals { display: grid; gap: 4px; min-width: 0; }
.funnel-goals [hidden], .funnel-goals .dropdown[hidden] { display: none; }
.funnel-steps td { vertical-align: top; }
.funnel-steps .sub { margin-top: 2px; }
.funnel-actions { margin-top: 8px; align-items: center; }
