/* KLAR — общий слой страницы: заголовок, соседние разделы, действия, фильтры, дата и карточки.
 *
 * Один файл на оба шаблона (`main.html` и `klar.html`): правила принятого макета «Портфеля»
 * (`.task/mock/portfolio.html`) живут здесь, а не в разметке экрана. Цвета — токены общей темы
 * (`klar-theme.css`), поэтому слой читается в тёмной и светлой теме; заливка главной кнопки —
 * спокойный графит макета, а не акцент (developer decision 2026-10-18).
 *
 * В `/app` лист подключён ПОСЛЕ собственного блока стилей — общий слой побеждает старые правила.
 * В `/klar` — ДО своего блока: у новой оболочки своя раскладка, и её `.btn`/`.link`/`.page-title`
 * остаются в силе (правило «не смешивать раскладки двух оболочек», 2026-10-08).
 */

/* Высота строки пути: от неё отсчитывается верх панели справа (`.kside`). В `/klar` значение задаёт
   собственный блок шаблона; здесь — умолчание для `/app`, у которого строка пути той же высоты. */
/* Высота шапки карточки по умолчанию — запасное значение для липкой шапки таблицы (#5476, 23.10).
   Замер на стенде: шапка карточки 137 px (название в две строки), берём 140 с запасом; шаблон
   `/klar` поднимает это значение под свою строку вкладки меню. Пока JS не измерил `.card-head`,
   `top` липкой шапки таблицы складывает крошки и эту высоту. */
:root { --crumbs-h: 48px; --chead-h: 140px; }

/* ---------- Заголовок страницы и соседние разделы ---------- */

/* Строка заголовка: один h1, рядом тихие разделы, справа действия. */
.page-head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px 16px;
  padding: 4px 0 20px;
}
/* Только h1 внутри строки заголовка: старые экраны несут `.page-title` на обёртке и не меняются. */
.page-head .page-title {
  display: block; margin: 0; padding: 0;
  font-size: 26px; font-weight: 600; line-height: 1.2;
  letter-spacing: -0.02em; color: var(--text);
}
/* Строка разделов — тихий текст без рамок и заливки; текущий раздел (aria-current) — линией. */
.tab-nav { display: flex; align-items: baseline; gap: 14px; }
.tab-nav a {
  font-size: 14px; color: var(--text2); text-decoration: none; white-space: nowrap;
  border: 0; background: none; padding: 0; cursor: pointer; font-family: inherit;
}
.tab-nav a:hover, .tab-nav a:focus-visible { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.tab-nav a:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 3px; border-radius: 4px; }
/* Вкладка самой страницы (не соседний раздел): текущая — акцентной линией под названием, без
   заливки, плашки и рамки вокруг таба. Линия — `text-decoration`: она не двигает строку и не
   спорит с `border`/`padding` соседних табов, поэтому ряд остаётся одной тихой строкой.
   Текст на ступень контрастнее неактивного; жирность — одна, та же, что была. */
.tab-nav a[aria-current="page"] {
  color: var(--text-hi); font-weight: 600;
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: 5px;
}
/* Светлая тема: тот же акцент и та же толщина — токены темы меняют только оттенок текста,
   линия остаётся индиго бренда и видна на светлом фоне. */
:root[data-theme="light"] .tab-nav a[aria-current="page"],
html[data-theme="light"] .tab-nav a[aria-current="page"] {
  color: var(--text-hi);
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: 5px;
}
/* Ряд типов страницы под шапкой (решение 19.10): отделён от строки фильтров, а не слит с ней. */
.page-head + .tab-nav { margin-bottom: 14px; }

.head-tools { margin-left: auto; flex: none; display: flex; align-items: center; gap: 10px; }

/* Длинный ряд разделов не влезает рядом с заголовком: действия остаются в его строке справа,
   разделы уходят следующей строкой — тот же порядок, что у макета «Портфеля». */
.page-head.sections-under .tab-nav { order: 3; flex: 1 0 100%; }
.page-head.sections-under .head-tools { order: 2; }

/* ---------- Действия: одна главная и текстовые ссылки ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border);
  background: transparent; color: var(--text); white-space: nowrap; text-decoration: none;
  font-weight: 500; font-size: 13px; line-height: 1.2; font-family: inherit; cursor: pointer;
}
.btn:hover { background: var(--hover); }
.btn:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }
/* Выбранный вариант переключателя формы: заливки «пилюли» нет, только тихая рамка. */
.btn[aria-pressed="true"] { background: var(--hover); border-color: var(--text2); }
.btn.danger { color: var(--err); border-color: var(--err); }
.btn.danger:hover { background: var(--hover); }
.btn.primary { background: #22303F; border-color: #22303F; color: #FFFFFF; }
.btn.primary:hover { background: #2C3D50; border-color: #2C3D50; }

.link {
  display: inline-flex; align-items: center;
  border: 0; background: none; padding: 0 0 1px;
  font-weight: 400; font-size: 13px; line-height: 1.4; font-family: inherit; color: var(--text2); cursor: pointer;
  border-bottom: 1px dashed var(--line); white-space: nowrap;
}
.link:hover, .link:focus-visible { color: var(--text); border-bottom-color: var(--text2); }
.link:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 3px; border-radius: 2px; }

/* «··· Ещё» — единственное место для прочих действий: ссылки рядом с главной кнопкой не стоят
   ни на широком, ни на узком экране, иначе строка действий сливается в одну (решение 18.10). */
.head-tools > .link { display: none; }
.more-wrap { position: relative; display: block; }
.more {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text2);
  font-weight: 500; font-size: 13px; line-height: 1; font-family: inherit; cursor: pointer;
}
.more:hover, .more:focus-visible { background: var(--hover); color: var(--text); }
.more:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }
.more .dots { letter-spacing: 1px; margin-right: 6px; font-weight: 700; }
.more-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
  display: flex; flex-direction: column; gap: 2px; min-width: 200px; padding: 6px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 32px var(--shadow);
}
.more-menu[hidden] { display: none; }
/* Ссылка, которой сейчас нечего делать («Удалить N» без отметок), прячется атрибутом:
   `display` у `.link` иначе перебил бы `[hidden]`. Само «··· Ещё» остаётся на месте. */
.more-menu > [hidden] { display: none; }
.more-menu .link { text-align: left; padding: 7px 10px; border-bottom: 0; border-radius: 6px; }
.more-menu .link:hover, .more-menu .link:focus-visible { background: var(--hover); }
/* «··· Ещё» — `details`: раскрывашку ведёт браузер, вид остаётся общим с кнопкой «Портфеля».
   Маркер списка скрыт, закрытая раскрывашка не показывает меню даже там, где `display` меню
   перебил бы правило браузера. */
details.more-wrap > summary.more { list-style: none; }
details.more-wrap > summary.more::-webkit-details-marker { display: none; }
details.more-wrap:not([open]) > .more-menu { display: none; }

/* ---------- Фильтры вместо многоэтажных вкладок ---------- */

.filter-row {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 2px 0 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line);
}
.filter-wrap { position: relative; display: inline-flex; }
/* Скрытый фильтр (например, сортировка у «Коллекций») не занимает места: `display` фильтра
   иначе перебивает атрибут `hidden`. */
.filter-wrap[hidden] { display: none; }
/* Счёт рядом с фильтрами: отвечает «сколько тут», но значением фильтра не притворяется. */
.filter-note { font-size: 13px; color: var(--text2); margin-left: auto; }
/* Значение фильтра — «Вид: Обязательства ▾»: без активного вида, без заливки. */
.filter {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 0; font-weight: 400; font-size: 13px; line-height: 1.4; font-family: inherit;
  color: var(--text); cursor: pointer;
}
.filter .k { color: var(--text2); }
.filter:after {
  content: ''; width: 5px; height: 5px; margin-top: -2px;
  border-left: 1.4px solid var(--text2); border-bottom: 1.4px solid var(--text2);
  transform: rotate(-45deg);
}
.filter:hover, .filter:focus-visible { color: var(--accent-text); }
.filter:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 3px; border-radius: 4px; }
.filter-pop {
  position: absolute; top: 24px; left: -8px; z-index: 30;
  display: flex; flex-direction: column; gap: 1px; min-width: 190px; padding: 6px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 32px var(--shadow);
}
.filter-pop[hidden] { display: none; }
.filter-option {
  display: block; width: 100%; text-align: left; white-space: nowrap;
  background: none; border: 0; border-radius: 6px;
  padding: 7px 10px; font-weight: 400; font-size: 13px; line-height: 1.4; font-family: inherit; color: var(--text); cursor: pointer;
}
.filter-option:hover, .filter-option:focus-visible { background: var(--hover); }
.filter-option:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: -2px; }
/* Значение фильтра — тоже `details`: та же строка, что у «Портфеля», без своей кнопки-обвязки.
   Правило закрытой раскрывашки метит только `details` — попапы «Портфеля» остаются как были. */
details.filter-wrap > summary.filter { list-style: none; }
details.filter-wrap > summary.filter::-webkit-details-marker { display: none; }
details.filter-wrap:not([open]) > .filter-pop { display: none; }

/* ---------- Дата: текст с календарём вместо системного поля ---------- */

.date-field-wrap { position: relative; display: inline-flex; }
.date-field {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 0; padding: 2px 0;
  border-bottom: 1px dashed #B9C2CC;
  font-weight: 600; font-size: 15px; line-height: 1.3; font-family: inherit; color: var(--text); cursor: pointer;
}
.date-field:hover, .date-field:focus-visible { border-bottom-color: var(--text2); }
.date-field:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 3px; border-radius: 2px; }
.date-field svg {
  width: 15px; height: 15px; fill: none; stroke: var(--text2);
  stroke-width: 1.6; stroke-linecap: round; flex: none;
}
.date-pop {
  position: absolute; top: 26px; left: -8px; z-index: 30;
  width: 246px; padding: 12px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 32px var(--shadow);
}
.date-pop[hidden] { display: none; }
.date-pop-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--text2); margin-bottom: 8px;
}
.date-pop-head b { color: var(--text); font-weight: 600; }
.date-nav {
  width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px;
  background: none; color: var(--text2); font-weight: 400; font-size: 16px; line-height: 1; font-family: inherit; cursor: pointer;
}
.date-nav:hover, .date-nav:focus-visible { background: var(--hover); color: var(--text); }
.date-nav:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 0; }
/* Неделя с понедельника; ячейки — кнопки, а сегодня и выбранный день различимы словом класса. */
.date-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; font-size: 12px; }
.date-dow, .date-blank { height: 26px; display: flex; align-items: center; justify-content: center; color: var(--text2); }
.date-day {
  height: 26px; padding: 0; border: 0; border-radius: 6px; background: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--text); font-weight: 400; font-size: 12px; line-height: 1; font-family: inherit; cursor: pointer;
}
.date-day:hover, .date-day:focus-visible { background: var(--hover); }
.date-day:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: -2px; }
.date-day.today { font-weight: 600; }
.date-day.on { background: #22303F; color: #FFFFFF; font-weight: 600; }
.date-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; }
.date-quick button {
  background: none; border: 0; padding: 0 0 1px; cursor: pointer;
  color: var(--text2); font-weight: 400; font-size: 12px; line-height: 1.4; font-family: inherit; border-bottom: 1px dashed var(--line);
}
.date-quick button:hover, .date-quick button:focus-visible { color: var(--text); }
.date-quick button:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 3px; border-radius: 2px; }

/* ---------- Карточки ---------- */

/* «Остаток и вердикты на <дата>»: белая в светлой теме, плашка — в тёмной. */
.reg-card {
  display: block;
  padding: 16px 20px; margin-bottom: 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
}
.reg-card .cap { font-size: 13px; color: var(--text2); margin-bottom: 8px; }
.reg-card .cap b { color: var(--text); font-weight: 600; }
.reg-card .reg-sum { margin-top: 10px; font-size: 14px; line-height: 1.7; color: var(--text2); }
.reg-card .reg-sum b { color: var(--text); font-weight: 600; }

/* Одна строка карточки с действием справа — карточка отчётности макета. */
.info-card {
  padding: 14px 20px; margin-bottom: 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
}
.info-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.info-card-title {
  padding: 0; border: 0; background: none; text-align: left;
  font-weight: 400; font-size: 14px; line-height: 1.5; font-family: inherit; color: var(--text); cursor: pointer;
}
.info-card-title:hover { color: var(--text2); }
.info-card-title:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 3px; border-radius: 2px; }

/* Счёт под списком — «3 договора из 5»: тихая строка, как в макете. */
.count-line { font-size: 13px; color: var(--text2); margin: 0 0 12px; line-height: 1.6; }

/* ---------- Формы и строки в карточках («Настройки» старой оболочки) ---------- */

/* Заголовок карточки и её подсказка: карточка несёт форму, а не второй заголовок страницы. */
.card-title { margin: 0 0 6px; font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--text); }
.card-hint { margin: 0 0 14px; font-size: 13px; line-height: 1.55; color: var(--text2); }
.card-section { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }

/* Сетка полей: одна колонка на узком экране, несколько — на широком. */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; }
.form-grid.narrow { grid-template-columns: 1fr; max-width: 560px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field-label { font-size: 12px; line-height: 1.4; color: var(--text2); }
.field-hint { margin: 0; font-size: 12px; line-height: 1.55; color: var(--text2); }
.field-input, .field-select {
  width: 100%; box-sizing: border-box; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 13px;
}
.field-input:focus-visible, .field-select:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 1px; }
.field-select { cursor: pointer; }
.field-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.5; color: var(--text); cursor: pointer; }
.field-check input { margin: 3px 0 0; flex: none; }
.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.form-note { font-size: 13px; line-height: 1.5; color: var(--text2); }

/* Списки внутри карточки: строки, а не второй ряд таблиц с собственными отступами. */
.list-stack { display: flex; flex-direction: column; gap: 8px; }
.list-line { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.list-line:last-child { border-bottom: 0; }
.list-line .grow { flex: 1; min-width: 0; }
.list-line .muted { font-size: 12px; color: var(--text2); }
.check-list {
  display: flex; flex-direction: column; gap: 4px; max-height: 280px; overflow-y: auto;
  padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
}
.check-row { display: flex; align-items: center; gap: 8px; padding: 3px 4px; font-size: 13px; cursor: pointer; }
.uedit-expert-sel {
  padding: 2px 6px; border: 1px solid var(--border); border-radius: 4px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 11px;
}

/* Ячейки таблиц настроек: те же классы вместо строк стилей в разметке. */
.cell-actions { padding: 6px; white-space: nowrap; }
.cell-muted { font-size: 12px; color: var(--text2); }
.icon-btn {
  padding: 6px; border: 0; background: none; cursor: pointer;
  font-size: 15px; line-height: 1; color: var(--text2); opacity: .65;
}
.icon-btn:hover, .icon-btn:focus-visible { opacity: 1; color: var(--accent-text); }
.icon-btn.danger { color: var(--err); }
.icon-btn:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 1px; border-radius: 4px; }

/* Фильтр-поле строки: поиск рядом со значением фильтра, одной строкой с ним. */
.filter-input {
  padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 13px;
  min-width: 160px; max-width: 260px;
}
.filter-input:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 1px; }
.filter-select {
  padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer;
}
.filter-select:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 1px; }

/* Журнал и лог: моноширинный блок, уровень — словом и цветом класса, без строк стилей. */
.log-box {
  max-height: 420px; overflow-y: auto; padding: 12px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; line-height: 1.8;
}
.log-line { white-space: pre-wrap; word-break: break-word; }
.log-time { color: var(--text2); }
.log-level { font-weight: 600; }
.log-level.error { color: var(--err); }
.log-level.warning { color: var(--warn); }
.log-level.info { color: #3b82f6; }
.log-level.debug { color: var(--text2); }
.log-source { color: var(--accent-text); }
.log-files { margin-top: 6px; font-size: 11px; color: var(--text2); }

/* ---------- Лицензия: состояние, состав и полосы расхода ---------- */
.lic-status { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.lic-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--text2); }
.lic-dot.ok { background: var(--ok); }
.lic-dot.warn { background: var(--warn); }
.lic-dot.err { background: var(--err); }
.lic-row { margin-top: 6px; font-size: 13px; line-height: 1.55; color: var(--text); }
.lic-note { margin-top: 6px; font-size: 13px; line-height: 1.55; color: var(--text2); }
.meter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-top: 8px; }
.meter-row { font-size: 12px; }
.meter-cap { margin-bottom: 4px; color: var(--text2); }
.meter { display: block; width: 100%; height: 6px; border: 0; border-radius: 4px; overflow: hidden; background: var(--bg); }
.meter::-webkit-progress-bar { background: var(--bg); border-radius: 4px; }
.meter::-webkit-progress-value { background: var(--accent2); border-radius: 4px; }
.meter::-moz-progress-bar { background: var(--accent2); border-radius: 4px; }
.meter.warn::-webkit-progress-value { background: var(--warn); }
.meter.warn::-moz-progress-bar { background: var(--warn); }
.meter.err::-webkit-progress-value { background: var(--err); }
.meter.err::-moz-progress-bar { background: var(--err); }
.meter-value { margin-top: 2px; color: var(--text); }

/* ---------- API: адрес, код и инструкция ---------- */
.spark-canvas { display: block; width: 100%; height: 48px; }
.doc-section { margin-top: 24px; }.doc-box {
  margin-bottom: 16px; padding: 16px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg);
  font-size: 13px; line-height: 1.7;
}
.doc-box p { margin: 0 0 8px; color: var(--text2); }
.doc-box p:last-child { margin-bottom: 0; }
.doc-box b { color: var(--text); }
.doc-list { margin: 4px 0 0; padding-left: 20px; color: var(--text2); }
.code-block {
  margin: 8px 0 0; padding: 12px; overflow-x: auto;
  border-radius: 8px; background: #1e1e2e; color: #cdd6f4;
  font-size: 12px; line-height: 1.6;
}
.endpoint-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg); font-size: 13px;
}
.endpoint-bar code { flex: 1; min-width: 0; font-size: 12px; word-break: break-all; }
.key-cell { white-space: nowrap; }
.key-cell code { font-size: 11px; }
.link.danger:hover, .link.danger:focus-visible { color: var(--err); border-bottom-color: var(--err); }

/* ---------- Плашка полосы: меню раздела и меню профиля ---------- */

/* Выпадающая плашка справа от полосы, верхним краем вровень со своим пунктом (`--rail-panel-top`
   ставит `_klarRailPanelPlace`). `position: fixed` и свой `z-index` — чтобы её не обрезала ни полоса,
   ни область страницы. Ширина 324px: подменю шире и не обрезается.
   `z-index: 45` — выше полосы разделов карточки `.cstrip` (22) и её липкой шапки `.card-head` (20): плашка
   заходит на их место и обязана получать курсор первой. Модалки (200) и подменю профиля (46) остаются выше. */
.rail-panel {
  display: none; position: fixed;
  left: calc(var(--rail-w) + 12px); top: var(--rail-panel-top, 76px); z-index: 45;
  width: 324px; max-width: calc(100vw - var(--rail-w) - 28px); max-height: calc(100vh - 16px);
  overflow-y: auto; padding: 14px 14px 16px; border-radius: 10px;
  /* Непрозрачная поверхность: тёмная — `--panel-2` полосы (#2A3746); граница и мягкая тень
     отделяют плашку от страницы. */
  background: #2A3746; color: #FFFFFF;
  border: 1px solid #3A4A5A;
  box-shadow: 0 12px 32px var(--shadow, #000000);
}
/* Светлая тема: тот же непрозрачный `--panel-2` светлой полосы (#E9ECF0, `klar-rail.css`), тёмный текст. */
:root[data-theme="light"] .rail-panel, html[data-theme="light"] .rail-panel {
  background: #E9ECF0; color: #1C2530; border-color: #D2D7DE;
}
.rail-panel.open { display: block; }
/* Раскладка одна — выпадающее меню: плашка ловит курсор, а подменю профиля не обрезается её прокруткой. */
.rail-panel.profile { overflow: visible; pointer-events: auto; }
/* Начинка плашки: тело — меню раздела, `#profileMenu` — меню профиля; ровно одно из двух. */
.rail-panel.profile .rail-panel-body { display: none; }
.rail-panel.profile.is-menu .rail-panel-body { display: block; }
.rail-panel .profile-menu { display: none; }
.rail-panel.profile.is-profile .profile-menu { display: block; }
.rail-panel.profile.is-menu .rail-panel-title { padding: 6px 26px 10px; }
.rail-panel-title {
  padding: 0 10px 10px; font-size: 16px; font-weight: 600; line-height: 1.3;
  color: var(--text, #FFFFFF);
}
.rail-panel-list { display: flex; flex-direction: column; gap: 2px; }
.rail-panel-row {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px;
  color: var(--text, #FFFFFF); text-decoration: none; font-size: 14px; line-height: 1.3;
}
button.rail-panel-row { width: 100%; text-align: left; border: none; background: none; font-family: inherit; cursor: pointer; }
.rail-panel-row:hover, .rail-panel-row:focus-visible { background: var(--hover-strong, rgba(255,255,255,.08)); }
.rail-panel-row:focus-visible { outline: 2px solid var(--accent-fill, #4C6FFF); outline-offset: 2px; }
.rail-panel-row .ic { width: 20px; height: 20px; background-color: var(--text2, rgba(255,255,255,.62)); }
.rail-panel-row-label { min-width: 0; }
/* Запланированный подраздел — не кнопка: обычный курсор, без подсветки наведения; «в работе» стоит
   рядом с названием, пояснение карты — тихой строкой под ним (как в прежней витрине раздела). */
.rail-panel-row-static { align-items: flex-start; padding: 8px 10px; cursor: default; }
.rail-panel-row-static:hover { background: none; }
/* Строка «в работе» выше сорока пикселей: подпись рядом с пометкой переносится, а не обрезается. */
.rail-panel.profile .rail-panel-row-static { height: auto; min-height: 40px; padding: 8px 26px; }
.rail-panel.profile .rail-panel-row-static .rail-panel-row-label {
  overflow: visible; text-overflow: clip; white-space: normal;
}
.rail-panel-row-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.rail-panel-row-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.rail-panel-row-state { flex: none; margin-left: auto; padding: 1px 7px; border-radius: 999px;
  border: 1px solid var(--line, rgba(255,255,255,.12)); color: var(--text2, rgba(255,255,255,.62));
  font-size: 11px; line-height: 1.5; white-space: nowrap; }
.rail-panel-row-hint { color: var(--text2, rgba(255,255,255,.62)); font-size: 12px; line-height: 1.35; }
.rail-panel .ic-collections { --ic: url('/static/img/icons/ui/collections.svg'); }
.rail-panel .ic-contractors { --ic: url('/static/img/icons/ui/contractors.svg'); }
.rail-panel .ic-employees { --ic: url('/static/img/icons/ui/employees.svg'); }
.rail-panel .ic-media { --ic: url('/static/img/icons/ui/media.svg'); }
.rail-panel .ic-templates { --ic: url('/static/img/icons/ui/templates.svg'); }
.rail-panel .ic-obligations { --ic: url('/static/img/icons/ui/obligations.svg'); }
.rail-panel .ic-home { --ic: url('/static/img/icons/ui/home.svg'); }
.rail-panel .ic-logout { --ic: url('/static/img/icons/ui/logout.svg'); }

/* ---------- Панель справа (`klarSideOpen`) ---------- */

/* Раздел документа или карточка поверх списка: список остаётся на месте. Вид общий — и для карточек
   документов, и для профиля; профиль уточняет шапку и тело ниже. */
.kside { position: fixed; top: var(--crumbs-h); right: 0; bottom: 0; z-index: 30; width: min(560px, 100vw); display: flex;
  flex-direction: column; background: var(--panel); border-left: 1px solid var(--line); box-shadow: -12px 0 32px var(--shadow); }
.kside-head { display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; background: var(--panel-2); }
.kside-head b { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.kside-head b .muted { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; }
.kside-close { background: none; border: none; color: var(--text2); font-size: 22px; line-height: 1; cursor: pointer; padding: 0 2px; }
.kside-close:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.kside-body { flex: 1; overflow-y: auto; padding: 14px 18px; }
.kside-miss { margin-bottom: 10px; font-size: 13px; }
.kside-foot { padding: 12px 18px; border-top: 1px solid var(--line); }
.kside-foot.cc-foot { display: flex; gap: 8px; }

/* ---------- Профиль: панель и карточки форм (макет 20.10) ---------- */

/* Шапка 45px, заголовок 14px, поля 20px от края: значения макета. */
.kside-profile .kside-head { height: 45px; padding: 0 20px; align-items: center; gap: 8px; }
.kside-profile .kside-head b { font-size: 14px; line-height: 20px; }
.kside-profile .kside-close { font-size: 20px; }
.kside-profile .kside-body { padding: 16px 20px; }
/* Подвал панели профиля не нужен: в макете его нет, а пустой `.kside-foot` рисовал линию над низом. */
.kside-profile .kside-foot:empty { display: none; }
/* Список «ключ → значение»: колонка подписи 173px (значение начинается на 193px от края панели), дальше
   значение и место шеврона у правого края; строки 28px, две группы с зазором 4px. */
.pf-list { display: flex; flex-direction: column; }
.pf-group + .pf-group { margin-top: 4px; }
/* `.pf-list .pf-row`, а не `.pf-row`: в `klar.html` есть свои формы с тем же именем (`.pf-row`, 9em/1fr),
   и его блок стилей грузится после общего — без второй степени селектор панели проигрывал бы ему.
   Строка — флекс, а не сетка: шеврон стоит в той же строке и прижат вправо (`margin-left: auto`),
   даже когда подпись или значение длинные (Роман 20.10: стрелка съезжала под подпись). */
.pf-list .pf-row { display: flex; align-items: center; min-height: 28px; }
.pf-list .pf-key { flex: none; width: 173px; }
.pf-list .pf-val { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-key, .pf-val { font-size: 14px; line-height: 28px; }
.pf-key { color: var(--text2); }
.pf-val { color: var(--text); }
.pf-row-open { padding: 0; width: 100%; border: 0; background: none; text-align: left; font-family: inherit; cursor: pointer; }
.pf-row-open:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; border-radius: 4px; }
.pf-arrow { flex: none; margin-left: auto; color: var(--text2); font-size: 16px; line-height: 1; }
/* Строка-выбор держит свой список рядом с собой, а не в потоке: список — отдельный слой `position: fixed`
   поверх содержимого панели, поэтому её высота и места строк не меняются (Роман 20.10). */
.pf-open { position: relative; }
.pf-choice { position: fixed; left: var(--pf-pop-x, 8px); top: var(--pf-pop-y, 8px); z-index: 40;
  display: flex; flex-direction: column; min-width: 200px; max-width: min(280px, calc(100vw - 16px));
  max-height: calc(100vh - 16px); overflow-y: auto; overscroll-behavior: contain; padding: 4px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); box-shadow: 0 12px 32px var(--shadow); }
.pf-choice[hidden] { display: none; }
.pf-pick { display: flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--text);
  font: inherit; font-size: 13px; line-height: 20px; text-align: left; padding: 6px 10px; border-radius: 6px;
  cursor: pointer; white-space: nowrap; }
.pf-pick:hover, .pf-pick:focus-visible { background: var(--hover); }
.pf-pick:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 1px; }
.pf-pick.on { color: var(--accent-text); }
.pf-pick.on::after { content: '✓'; margin-left: auto; }
/* Две кнопки под списком: 33px, тихая заливка 7% из макета, по левому краю колонки значений. */
.pf-actions { display: flex; gap: 10px; margin: 22px 0 0 173px; }
.pf-action { height: 33px; padding: 0 22px; border: 0; border-radius: 8px; background: var(--on); color: var(--text);
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.pf-action:hover { background: var(--active); }
.pf-action:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }
/* Карточка формы 440px: радиус 12, поля 36px, кнопка 200×36. Заливка кнопки — `--accent-fill`, а не
   `#4C6FFF` макета: белая подпись на нём даёт 4,18:1, ниже нормы AA 4,5:1. */
.pf-card { width: 440px; max-width: calc(100vw - 32px); max-height: 85vh; overflow-y: auto; padding: 16px;
  border-radius: 12px; background: var(--panel-2); color: var(--text); box-shadow: 0 24px 80px var(--shadow); outline: none; }
.pf-card-title { margin: 0 0 4px; font-size: 16px; line-height: 20px; font-weight: 600; color: var(--text); }
.pf-form { display: flex; flex-direction: column; }
.pf-field { display: flex; flex-direction: column; gap: 8px; margin-top: 9px;
  font-size: 13px; line-height: 18px; color: var(--text2); }
.pf-field:first-of-type { margin-top: 0; }
/* Поле карточки — тоже с областью: `.pf-in` есть и у форм `/klar` (`klar.html` перекрыл бы общий вид). */
.pf-card .pf-in { height: 36px; padding: 0 12px; border: 1px solid var(--input-border); border-radius: 8px;
  background: var(--field); color: var(--text); font: inherit; font-size: 14px; }
.pf-card .pf-in:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 1px; }
.pf-submit { width: 200px; height: 36px; margin-top: 10px; border: 0; border-radius: 8px; background: var(--accent-fill);
  color: #FFFFFF; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.pf-submit:hover { background: var(--accent2-hover); }
.pf-submit:disabled { opacity: .6; cursor: default; }
.pf-submit:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }

/* Телефон: плашка — меню над нижней полосой; и меню раздела, и меню профиля открываются касанием. */
@media (max-width: 700px) {
  .rail-panel.profile {
    left: auto; right: 4px; top: auto; bottom: 62px;
    width: min(320px, calc(100vw - 8px)); max-width: calc(100vw - 8px);
    max-height: calc(100vh - 70px); overflow-y: auto;
  }
}
@media print { .rail-panel { display: none !important; } }

/* ---------- Узкие экраны: навигация и фильтры остаются одной строкой ---------- */

@media (max-width: 900px) {
  .page-head { flex-wrap: wrap; row-gap: 10px; align-items: center; }
  .page-head .page-title { flex: 1 0 100%; }
  .tab-nav {
    flex: 1 0 100%; display: flex; gap: 16px;
    overflow-x: auto; white-space: nowrap; scrollbar-width: none;
  }
  .tab-nav::-webkit-scrollbar { display: none; }
  .head-tools { margin-left: auto; gap: 10px; }
  /* Значения фильтров — одна строка с горизонтальной прокруткой, а не гармошка в три этажа. */
  .filter-row {
    flex-wrap: nowrap; gap: 22px;
    overflow-x: auto; white-space: nowrap; scrollbar-width: none;
  }
  .filter-row::-webkit-scrollbar { display: none; }
  .filter-wrap { flex: none; }
}

/* ---------- Отчёт проверки договора: карта разделов и расхождения ----------
   Тело экрана «Проверки → Договоры → документ» живёт на классах общего слоя, а не на
   строках стилей в `checks.js`: карточки — `.reg-card`, метки — `.clause-tag`, блок
   расхождения — `.finding-card`. Тон находки приходит классом `t-<род>` и меняет одну
   переменную, поэтому разметка не знает цветов (решение 29.09, #2397). */

.report-body { padding-top: 4px; }
.report-empty { text-align: center; padding: 24px; color: var(--text2); }
.report-cp { margin: 4px 0 12px; font-size: 12px; color: var(--text2); line-height: 1.5; }

/* Тихая заметка страницы: без рамки и заливки, это пояснение, а не плашка. */
.page-note { margin: 0 0 12px; padding: 0 3px; font-size: 12px; color: var(--text2); line-height: 1.5; }

/* Карта: группы разделов и карточка раздела. */
.clause-map { margin-bottom: 18px; }
.clause-group {
  margin: 14px 0 6px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text2);
}
.clause-card { padding: 10px 14px; margin-bottom: 6px; border-left: 3px solid var(--border); }
.clause-card.has-findings { border-left-color: var(--err); }
.clause-card.is-missing { border-left-color: var(--warn); }
.clause-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; cursor: pointer; }
.clause-num {
  min-width: 18px; font-size: 12px; color: var(--text2); font-variant-numeric: tabular-nums;
}
.clause-name { flex: 1; min-width: 180px; font-size: 14px; font-weight: 500; }
.clause-conds { font-size: 11px; color: var(--text2); white-space: nowrap; }
.clause-place { font-size: 12px; color: var(--text2); }
.clause-chev { width: 12px; font-size: 11px; color: var(--text2); }
/* Метка состояния, а не кнопка: без заливки и рамки, чтобы её не читали действием. */
.clause-tag { font-size: 11px; font-weight: 600; white-space: nowrap; }
.clause-tag.is-err { color: var(--err); }
.clause-tag.is-warn { color: var(--warn); }
.clause-box { margin: 0 0 5px 14px; }
.clause-box[hidden] { display: none; }
.clause-none { padding: 7px 11px; font-size: 13px; color: var(--text2); }
.clause-where {
  margin: 8px 0 4px; padding: 6px 11px; border-radius: 6px;
  font-size: 12px; color: var(--text2); background: var(--hover);
}
.clause-note {
  margin: 8px 0 2px; padding: 8px 11px; border-radius: 7px;
  font-size: 12.5px; line-height: 1.45; color: var(--warn);
  background: color-mix(in srgb, var(--warn) 10%, transparent);
}

/* Условия раздела: колонки сторон и строка условия. */
.cond-cols { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.cond-col {
  flex: 1 1 280px; min-width: 0; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--card);
}
.cond-col-head {
  margin-bottom: 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase;
}
.cond-col-head.tone-0 { color: #4f8fd0; }
.cond-col-head.tone-1 { color: #8b6fc9; }
.cond-rest { flex: 1 1 100%; min-width: 0; }
.cond-line {
  margin-bottom: 4px; padding: 6px 0 6px 9px; border-left: 2px solid var(--border);
  font-size: 13px; color: var(--text);
}
.cond-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.cond-subject, .cond-ref { font-size: 11px; color: var(--text2); white-space: nowrap; }
.cond-ref { font-variant-numeric: tabular-nums; }
.cond-what { flex: 1; min-width: 180px; line-height: 1.45; }
.cond-what.is-told { font-style: italic; }
.cond-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--text);
}
.cond-told { margin-top: 3px; font-size: 12px; line-height: 1.4; color: var(--text2); }
.cond-why { margin-top: 3px; font-size: 11px; line-height: 1.4; color: var(--warn); }

/* Основание находки: откуда норма и что в ней сказано. */
.basis { margin-top: 8px; padding-left: 10px; border-left: 2px solid var(--border); }
.basis-head, .basis-src { font-size: 12px; line-height: 1.4; color: var(--text2); }
.basis-quote { font-size: 12px; line-height: 1.4; color: var(--text2); font-style: italic; }

/* Стороны договора: роль, реквизиты, подписант. */
.parties { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 4px; }
.party-card {
  flex: 1 1 280px; min-width: 0; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--card);
}
.party-head {
  margin-bottom: 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase;
}
.party-head.tone-0 { color: #4f8fd0; }
.party-head.tone-1 { color: #8b6fc9; }
.party-head.is-unknown { color: var(--warn); }
.party-why { margin-bottom: 6px; font-size: 12px; line-height: 1.4; color: var(--text2); }
.party-row { margin-top: 2px; font-size: 12.5px; line-height: 1.4; color: var(--text2); }
.party-row.is-name { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--text); }
.party-row.is-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.party-blank { margin-top: 4px; font-size: 12.5px; line-height: 1.4; color: var(--text2); }

/* Разделы вне карты: раскрывающийся справочный блок, а не находка. */
.outside-map { margin-top: 14px; }
.outside-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 2px;
  font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer;
}
.outside-chev { font-size: 11px; color: var(--text2); transition: transform .15s; }
.outside-map.is-open .outside-chev { transform: rotate(90deg); }
.outside-note { max-width: 70ch; margin-bottom: 8px; font-size: 12px; color: var(--text2); }
.outside-body[hidden] { display: none; }
.outside-place {
  margin: 10px 0 4px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text2);
}
.reference-loose { margin: 10px 0 4px; }
.reference-title { margin-bottom: 4px; font-size: 12px; color: var(--text2); }
.loose-head { margin: 16px 0 6px; font-size: 13px; color: var(--text2); }
.loose-list { margin-bottom: 16px; }

/* «Финансовый комплаенс» — свой раздел, а не клауза. */
.deal-section { margin: 8px 0 16px; }
.deal-head { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--text); }

/* Карточка расхождения: род, адрес, величины, цитата, основание.
   Тон — одна переменная на род; класс `t-<род>` приходит из `_TYPE_CFG`. */
.finding-card {
  margin-bottom: 8px; padding: 12px 14px; border-radius: 8px;
  background: color-mix(in srgb, var(--finding-tone, var(--border)) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--finding-tone, var(--border)) 35%, transparent);
}
.finding-card.t-violation { --finding-tone: #a16207; }
.finding-card.t-reg_violation { --finding-tone: #9333ea; }
.finding-card.t-contradiction { --finding-tone: #dc2626; }
.finding-card.t-missing { --finding-tone: #6366f1; }
.finding-card.t-risk { --finding-tone: #ea580c; }
.finding-card.t-deal_effect { --finding-tone: #6b7280; }
.finding-content { min-width: 0; }
.finding-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.finding-kind {
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  color: var(--finding-tone, var(--text2));
}
.finding-where { font-size: 12px; color: var(--text2); }
.finding-pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; line-height: 1.6; color: var(--text);
}
.finding-stated, .finding-plain { font-size: 13px; line-height: 1.5; color: var(--text); }
.finding-quote {
  margin-top: 6px; font-size: 12.5px; line-height: 1.45; color: var(--text2); font-style: italic;
}
.finding-norm { margin-top: 8px; font-size: 12.5px; line-height: 1.45; color: var(--text2); }

/* ---------- Списки компаний и ИП: каталог и открытый список ---------- */

/* Каталог и открытый список живут на плашке страницы: карточка формы, карточка таблицы, шапка списка.
   Кегли те же, что у соседних новых страниц: имя 16, строки и поля 14, пояснения 13. */
.lists-new { margin-bottom: 12px; }
.lists-form { max-width: 760px; }
.lists-form .form-grid { margin-top: 4px; }
.lists-form .field-check { align-self: end; padding-bottom: 9px; }
.lists-error { min-height: 18px; margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--err); }
.lists-error:empty { display: none; }

/* Шапка открытого списка: один h1, метаданные строкой, действия владельца справа. */
.lists-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin: 0 0 14px; }
.lists-head-main { min-width: 0; }
.lists-head .page-title { padding-bottom: 4px; overflow-wrap: anywhere; }
.lists-meta { font-size: 13px; line-height: 1.5; color: var(--text2); }
.lists-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Таблица списков: имя читается как ссылка, служебные слова — тринадцатым кеглем. */
.lists-tbl th, .lists-tbl td { vertical-align: middle; }
.lists-name { font-size: 16px; font-weight: 500; }
.lists-sub { font-size: 13px; color: var(--text2); }
.lists-badge {
  display: inline-block; padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; line-height: 1.4; color: var(--text2); white-space: nowrap;
}
.lists-badge.shared { color: var(--accent-text); border-color: var(--accent-fill); }
.lists-risk { font-size: 13px; color: var(--text2); white-space: nowrap; }
.lists-risk.high { color: var(--risk); }
.lists-risk.medium { color: var(--warn); }
.lists-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.lists-status { font-size: 13px; line-height: 1.5; }

/* Форма добавления стоит между шапкой и записями: это шаг работы со списком, а не второй заголовок страницы. */
.lists-add { margin: 0 0 12px; }

/* Excel: плашка загрузки в каталоге и предпросмотр перед платными проверками. */
.lists-import { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.lists-import-note { font-size: 13px; line-height: 1.5; color: var(--text2); }
.lists-import-summary { margin: 0 0 14px; }
.lists-import-words { font-size: 14px; line-height: 1.6; }

/* Каталог «Мои списки» (#5476, решение 25.10.2026): лента списков и модальное окно настройки.
   Панели справа нет: настройка — окно поверх экрана, на телефоне во весь экран. */
.lists-head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin: 0 0 6px; }
.lists-head-row .page-title { margin: 0; }
.lists-import-note { margin: 0 0 18px; font-size: 13px; line-height: 1.5; color: var(--text2); }
.lists-feed { min-width: 0; }
.lists-feed-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px;
  align-items: start; padding: 13px 6px; border-bottom: 1px solid var(--line); border-radius: 10px; }
.lists-pick { margin: 4px 0 0; accent-color: var(--accent-fill); }
/* Место выключенного чекбокса у списка раздела: сетка строки не съезжает. */
.lists-pick-gap { width: 13px; height: 13px; margin-top: 4px; }
.lists-feed-main { min-width: 0; }
.lists-feed-name { display: inline-block; font-size: 16px; font-weight: 500; line-height: 1.35;
  color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.lists-feed-name:hover { color: var(--accent-text); text-decoration: underline; }
.lists-feed-comment { display: block; margin-top: 2px; font-size: 13px; line-height: 1.5;
  color: var(--text2); }
.lists-feed-meta { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 5px;
  margin-top: 4px; font-size: 13px; line-height: 1.5; color: var(--text2); }
.lists-mark { white-space: nowrap; }
.lists-sep { flex: none; color: var(--text2); }
.lists-mark.shared { color: var(--accent-text); }
.lists-mark.type-medium { color: var(--ok); }
.lists-mark.type-high { color: var(--err); }
.lists-mark.mon { color: var(--text2); }
.lists-share-ic { width: 30px; height: 30px; display: inline-flex; align-items: center;
  justify-content: center; padding: 0; border: 1px solid var(--line); border-radius: 9px;
  background: none; color: var(--text2); cursor: pointer; }
.lists-share-ic:hover, .lists-share-ic:focus-visible { color: var(--accent-text);
  border-color: var(--accent); }
.lists-edit-ic { flex: none; }
.lists-empty { padding: 28px 0; }

/* Окно «Настройка списка»: своя поверхность вместо встроенной — поля, тумблеры, участники. */
.lists-modal { width: 560px; max-width: 92vw; max-height: 88vh; overflow-y: auto; padding: 28px;
  background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 24px 80px var(--shadow); outline: none; }
.lists-modal > div > h3 { margin: 0 0 18px; font-size: 26px; font-weight: 600;
  letter-spacing: -.01em; }
.lists-modal .lists-setup-sub { margin: 18px 0 10px; }
.lists-modal-fields { display: flex; flex-direction: column; gap: 14px; }
.lists-modal .field-hint { margin-top: 12px; }
.lists-modal-toggles { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.lists-toggles { display: flex; flex-wrap: wrap; gap: 12px; }
.lists-toggle { flex: 1 1 0; min-width: 96px; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: transparent; color: var(--text); font: inherit; font-size: 14px;
  line-height: 1.2; cursor: pointer; }
.lists-toggle:hover { background: var(--hover); }
.lists-toggle:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }
/* Выбранный вариант — серая заливка и рамка, как в макетах 2549:334/387; цвет несёт только иконка
   значения: «Важный» — синим, «Рисковый» — красным. */
.lists-toggle[aria-pressed="true"], .lists-kind-toggle[aria-pressed="true"] {
  background: var(--hover-strong); border-color: var(--text2); color: var(--text); }
.lists-toggle[data-value="medium"] svg { color: var(--accent-text); }
.lists-toggle[data-value="high"] svg { color: var(--err); }
.lists-toggle:disabled { opacity: .55; cursor: default; }

/* Правый лист во всю высоту — «Настройка списка» и «Включение в списки» (макеты 546×899):
   заголовок 20 px, поля по 40 px, «Отмена» и «Сохранить» пополам у нижнего края. */
.lists-modal.lists-sheet { width: 546px; max-width: 100vw; height: 100vh; max-height: none;
  box-sizing: border-box; display: flex; flex-direction: column; padding: 12px 24px 24px;
  border-width: 0 0 0 1px; border-radius: 0; box-shadow: -24px 0 80px var(--shadow); }
.lists-sheet > div:first-child { flex: none; }
.lists-sheet > div:first-child > h3 { margin: 0; font-size: 20px; line-height: 32px; font-weight: 600;
  letter-spacing: 0; }
.lists-sheet .lists-modal-form, .lists-sheet .conn-body { flex: 1 1 auto; display: flex;
  flex-direction: column; min-height: 0; }
.lists-sheet .lists-modal-fields { gap: 12px; }
.lists-sheet .field-input { min-height: 40px; padding: 9px 12px; background: var(--plate); font-size: 14px; }
.lists-sheet .lists-toggle, .lists-sheet .lists-kind-toggle { min-height: 40px; }
.lists-sheet .lists-modal-foot, .lists-sheet .conn-foot { flex: none; margin-top: auto;
  padding-top: 24px; border-top: 0; gap: 12px; }
.lists-sheet .lists-modal-foot .btn, .lists-sheet .conn-foot .btn { flex: 1 1 0; min-height: 40px;
  font-size: 14px; font-weight: 600; }
.lists-sheet .lists-modal-foot .field-hint { flex: 1 0 100%; margin: 0; }
.lists-sheet .lists-share { margin-top: 12px; }
.lists-sheet .lists-setup-sub { margin: 0 0 4px; font-size: 12px; font-weight: 400; color: var(--text2); }
.lists-sheet .lists-share-search { min-height: 40px; padding: 0 8px 0 12px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--plate); }
.lists-modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  flex-wrap: wrap; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.lists-merge-foot { justify-content: flex-start; }
.lists-merge-foot .btn { margin-right: 2px; }
.btn.accent { background: var(--accent-fill); border-color: var(--accent-fill); color: #FFFFFF; }
.btn.accent:hover { background: var(--accent2-hover); border-color: var(--accent2-hover); }

/* Поповер прав внутри окна открывается ВВЕРХ: низ окна — его же прокручиваемая кромка. */
.lists-modal .lists-pop { top: auto; bottom: calc(100% + 4px); }

/* Совместный доступ: поиск, найденные, участники и поповер прав. */
.lists-share { margin-top: 22px; }
.lists-setup-sub { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--text); }
.lists-share-search { display: flex; align-items: center; gap: 8px; padding-bottom: 6px;
  border-bottom: 1px solid var(--line); }
.lists-share-input { flex: 1 1 auto; min-width: 0; padding: 6px 0; border: 0; background: none;
  color: var(--text); font: inherit; font-size: 14px; }
.lists-share-input:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 3px;
  border-radius: 4px; }
.lists-share-go { flex: none; width: 28px; height: 28px; display: inline-flex; align-items: center;
  justify-content: center; padding: 0; border: 0; border-radius: 8px; background: none;
  color: var(--text2); font-size: 13px; cursor: pointer; }
.lists-share-go:hover, .lists-share-go:focus-visible { background: var(--hover); color: var(--text); }
.lists-candidates { display: flex; flex-direction: column; margin-top: 4px; }
.lists-candidate { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 0; font-size: 14px; }
.lists-candidate-name { min-width: 0; overflow-wrap: anywhere; }
.lists-share-rows { display: flex; flex-direction: column; margin-top: 4px; }
.lists-share-row { position: relative; display: flex; align-items: flex-start;
  justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.lists-share-row:last-child { border-bottom: 0; }
.lists-share-who { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lists-share-name { font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.lists-rights-btn { white-space: nowrap; font-size: 12px; }
.lists-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; width: 250px;
  max-width: 80vw; padding: 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel-2); box-shadow: 0 12px 32px var(--shadow); }
.lists-pop-title { margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--text); }
.lists-check { display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  font-size: 13px; line-height: 1.4; color: var(--text); cursor: pointer; }
.lists-check input { margin: 0; accent-color: var(--accent-fill); }
.lists-pop .btn { width: 100%; margin-top: 4px; }
.lists-pop .link.danger { display: block; margin: 10px auto 0; }

/* Объединение: цель, предупреждения о смешении типов и три названные кнопки потери риска. */
.lists-merge-targets { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.lists-merge-target { display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 14px; cursor: pointer; }
.lists-merge-target.is-on { border-color: var(--accent); background: var(--hover); }
.lists-merge-target input { margin: 0; accent-color: var(--accent-fill); }
.lists-merge-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.lists-merge-type { flex: none; font-size: 12px; color: var(--text2); }
.lists-warn { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--warn);
  border-radius: 12px; background: var(--hover); font-size: 13px; line-height: 1.5; color: var(--text); }
.lists-warn.danger { border-color: var(--err); }
.lists-warn b { display: block; margin-bottom: 4px; }
.lists-warn p { margin: 0; color: var(--text2); }

/* Тост отмены и полоса на экране: 15 секунд тоста, 15 минут полосы — срок сервера. */
.lists-undo { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 320;
  display: flex; align-items: center; gap: 16px; padding: 10px 16px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--card); color: var(--text); font-size: 14px;
  box-shadow: 0 12px 32px var(--shadow); }
.lists-undo-btn { flex: none; padding: 0; border: 0; background: none; color: var(--accent-text);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.lists-undo-btn:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 3px;
  border-radius: 4px; }
.lists-undo-strip { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 10px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--hover); font-size: 13px; line-height: 1.5; color: var(--text2); }

@media (max-width: 480px) {
  .lists-feed-item { padding: 12px 2px; }
  /* Окно настройки на телефоне — во весь экран, как требует макет. */
  .lists-modal { width: 100%; max-width: 100vw; min-height: 100vh; max-height: none;
    border-radius: 0; border: 0; padding: 20px 16px; }
  .lists-modal > h3 { font-size: 20px; }
  /* Лист на телефоне — во всю ширину, с полями телефона. */
  .lists-modal.lists-sheet { padding: 12px 16px 16px; border-left: 0; }
  .lists-sheet .lists-toggle, .lists-sheet .lists-kind-toggle { min-width: 0; padding: 9px 4px; gap: 4px; font-size: 12px; }
  .lists-undo { left: 12px; right: 12px; bottom: 12px; transform: none; }
  /* Поповер прав у нижней кромки телефона открывается вверх, а не уходит под экран. */
  .lists-pop { top: auto; bottom: calc(100% + 4px); }
}

/* ---------- Открытый список: лента компаний и панель признаков риска (#5476, макет 25.10.2026) ----------

   Две колонки: лента слева, признаки риска справа. Счётчики значений — по текущему срезу,
   поэтому панель перерисовывается вместе с лентой, а не живёт отдельным запросом. В панели
   только признаки самих компаний — факторы риска и рисковые реестры; регионы, отрасли и группы
   компаний ушли в отчёт (решение Романа 25.10.2026). На телефоне панель уходит ПОД ленту
   (порядок DOM), как и настройка в каталоге. */
.lists-detail-head { margin-bottom: 10px; }
.lists-detail-head .lists-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lists-meta-line { min-width: 0; overflow-wrap: anywhere; }
.lists-detail-head .lists-share-ic { width: 24px; height: 24px; margin: 0; }
.lists-detail-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px;
  align-items: start; max-width: 1180px; }
.lists-detail-feed { min-width: 0; }
/* Выбор карточек живёт тихой ссылкой рядом с «Удалить», а не полосой над лентой. */
.lists-trunc-note { margin: 10px 0 0; font-size: 13px; line-height: 1.45; color: var(--text2); }
.lists-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 16px 4px 15px; border-bottom: 1px solid var(--line); }
.lists-row-body { min-width: 0; }
.lists-row-name-line { min-width: 0; }
.lists-row-name { font-size: 16px; font-weight: 600; line-height: 1.35; color: var(--text);
  text-decoration: none; overflow-wrap: anywhere; }
a.lists-row-name:hover, a.lists-row-name:focus-visible { color: var(--accent-text); text-decoration: underline; }
.lists-row-line { margin-top: 3px; font-size: 14px; line-height: 1.45; color: var(--text);
  overflow-wrap: anywhere; }
.lists-row-line.muted { color: var(--text2); }
.lists-row-director a { color: var(--accent-text); text-decoration: none; }
.lists-row-director a:hover, .lists-row-director a:focus-visible { text-decoration: underline; }
.lists-row-muted { color: var(--text2); }
.lists-row-figures { margin-top: 7px; font-size: 14px; line-height: 1.45; color: var(--text2); }
.lists-row-ids { margin-top: 2px; font-size: 13px; line-height: 1.45; color: var(--text2);
  font-variant-numeric: tabular-nums; }
.lists-row-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px;
  font-size: 12px; line-height: 1.4; color: var(--text2); }
/* Пометка «не проверена» — пилюлей у строки, которую загрузили по одному номеру: реквизиты есть,
   проверки ещё нет (решение 25.10.2026). */
.lists-row-unchecked { display: inline-block; padding: 1px 8px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 12px; color: var(--text2); }
/* Красная строка-предупреждение ПОД карточкой: один признак и «ещё N» — остальные в подсказке. */
.lists-row-risk { display: flex; align-items: baseline; gap: 8px; margin-top: 7px; font-size: 14px;
  line-height: 1.45; color: var(--err); }
.lists-row-risk-alarm { flex: none; font-weight: 700; letter-spacing: .5px; }
.lists-row-risk-text { min-width: 0; overflow-wrap: anywhere; }
.lists-row-risk-more { flex: none; color: var(--err); opacity: .85; cursor: help;
  border-bottom: 1px dashed currentColor; }
.lists-row-actions { margin-top: 4px; font-size: 13px; }
.lists-row-pick { margin: 3px 0 0; accent-color: var(--accent-fill); }
.lists-blank { max-width: 640px; padding: 18px 0; }
.lists-blank .btn { margin-top: 12px; }
.lists-no-match { padding: 24px 0; }
.lists-no-match .btn { margin-top: 12px; }

/* Панель фильтров: липкая, с прокруткой — значений бывает много, а низ окна не бесконечен. */
.lists-facets { position: sticky; top: 12px; min-width: 0; padding: 16px 18px 18px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--panel);
  max-height: calc(100vh - 24px); overflow-y: auto; }
.lists-facets-head { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.lists-facets-title { display: inline-flex; align-items: center; gap: 8px; padding: 2px 0;
  border: 0; background: none; font: inherit; font-size: 16px; font-weight: 600; color: var(--text);
  cursor: pointer; text-align: left; }
.lists-facets-title:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 3px;
  border-radius: 4px; }
.lists-facets-n { font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap;
  font-variant-numeric: tabular-nums; }
/* Заголовок панели — ссылка-фильтр «С признаками риска»: группы у панели всегда видны. */
.lists-facets-head .lists-facets-title:hover { color: var(--accent-text); }
.lists-facets-head .lists-facets-title.on { color: var(--accent-text);
  text-decoration: underline; text-underline-offset: 3px; }
.lists-facet-title { margin: 16px 0 2px; font-size: 15px; font-weight: 600; line-height: 1.35;
  color: var(--text); }
.lists-facet-group:first-of-type .lists-facet-title { margin-top: 14px; }
.lists-facets-empty { margin: 12px 0 0; font-size: 13px; line-height: 1.45; color: var(--text2); }
.lists-facet-chev { font-size: 15px; line-height: 1; color: var(--text2); transition: transform .15s ease; }
[aria-expanded="true"] > .lists-facet-chev { transform: rotate(180deg); }
.lists-facet-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; margin-top: 2px; padding: 13px 0; border: 0; border-bottom: 1px solid var(--line);
  background: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--text);
  text-align: left; cursor: pointer; }
.lists-facet-toggle:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }
.lists-facet-values { padding: 6px 0 8px; }
.lists-facet-value { position: relative; display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; width: 100%; padding: 7px 6px 7px 12px; border: 0; border-radius: 7px; background: none;
  font: inherit; font-size: 14px; line-height: 1.4; color: var(--accent-text); text-align: left;
  cursor: pointer; }
.lists-facet-value::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 2px; background: var(--facet-tone, transparent); }
.lists-facet-value:hover, .lists-facet-value:focus-visible { background: var(--hover); }
.lists-facet-value:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: -2px; }
.lists-facet-value.on { background: var(--on); color: var(--text); font-weight: 600; }
.lists-facet-value.on::before { background: var(--accent-fill); }
.lists-facet-value.zero { color: var(--text2); cursor: default; }
.lists-facet-value.zero::before { opacity: .35; }
.lists-facet-label { min-width: 0; overflow-wrap: anywhere; }
.lists-facet-count { flex: none; font-size: 13px; color: var(--text2);
  font-variant-numeric: tabular-nums; }
.lists-facet-value.on .lists-facet-count { color: var(--text); }
.lists-facet-value.tone-err::before { background: var(--err); }
.lists-facet-value.tone-warn::before { background: var(--warn); }
.lists-facet-value.tone-info::before { background: var(--accent); }
.lists-facets-reset { width: 100%; margin-top: 12px; }

@media (max-width: 1080px) {
  /* Панель фильтров на телефоне — ПОД лентой: тот же порядок DOM, без модалки и без второго экрана. */
  .lists-detail-cols { grid-template-columns: 1fr; gap: 18px; max-width: none; }
  .lists-facets { position: static; max-height: none; overflow: visible; }
}
/* «Отчет» шапки — меню из двух выгрузок: раскрывашку ведёт браузер, вид — общий с «··· Ещё». */
.lists-head-actions .more { height: auto; padding: 8px 16px; font-size: 13px; }
/* Меню отчёта — своя коробка, а не общий «··· Ещё» журнала: в шаблоне страницы у `.more-menu`
   своя раскрытость по классу `.open`, и чужое меню в ней осталось бы невидимым. */
.lists-report-menu { display: none; position: absolute; right: 0; top: calc(100% + 6px);
  z-index: 30; flex-direction: column; gap: 2px; min-width: 330px; max-width: 420px; padding: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 32px var(--shadow); }
.lists-report[open] > .lists-report-menu { display: flex; }
.lists-report-item { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px;
  border: 0; border-radius: 8px; background: none; font: inherit; text-align: left; cursor: pointer; }
.lists-report-item:hover, .lists-report-item:focus-visible { background: var(--hover); }
.lists-report-item:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: -2px; }
.lists-report-item-name { font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--text); }
.lists-report-item-hint { font-size: 12px; line-height: 1.45; color: var(--text2); }

/* Окно «Загрузить»: файл, столбец кодов и предпросмотр — в одном окне, без второго шага. */
.lists-load { width: 760px; max-width: 94vw; }
.lists-load-form { display: flex; flex-direction: column; gap: 14px; }
.lists-load-block { display: flex; flex-direction: column; gap: 6px; }
.lists-load-area { width: 100%; min-height: 118px; resize: vertical; font: inherit; font-size: 14px;
  line-height: 1.5; }
.lists-load-preview { padding-top: 4px; }
.lists-load-preview .scroll-x { margin-top: 12px; }
.lists-load-preview .tbl { font-size: 13px; }
.lists-load-preview:empty { display: none; }
.lists-load-words { font-size: 14px; line-height: 1.6; }
.lists-load-line { margin: 0; font-size: 14px; line-height: 1.7; color: var(--text); }
/* Подтверждение действия рисует общая `confirmModal` старыми кнопками `.tb-btn`, которых в KLAR
   нет: без этого правила окно показывает системные кнопки без вида. */
.modal-overlay .tb-btn { display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border); background: transparent;
  color: var(--text); font: inherit; font-size: 13px; font-weight: 500; line-height: 1.2;
  cursor: pointer; }
.modal-overlay .tb-btn:hover { background: var(--hover); }
.modal-overlay .tb-btn:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }
.modal-overlay .tb-btn.danger { color: var(--err); border-color: var(--err); }
.lists-load-foot { margin-top: 6px; }

@media (max-width: 480px) {
  .lists-row { padding: 14px 2px; }
  .lists-row-risk { font-size: 13px; }
  .lists-facets { padding: 14px; }
  /* Шапка списка на телефоне: действия — во всю ширину под именем. */
  .lists-detail-head .lists-head-actions { width: 100%; }
  .lists-detail-head .lists-head-actions > .btn { flex: 1 1 0; }
  /* Три кнопки макета — одной строкой, тихий выбор — второй строкой под «Удалить». */
  .lists-detail-head .lists-head-actions .lists-report { flex: 1 1 0; }
  .lists-detail-head .lists-head-actions .lists-report > .more { width: 100%; justify-content: center; }
  .lists-detail-head .lists-head-actions   .lists-report-menu { right: 0; min-width: 0; width: calc(100vw - 32px); }
  .lists-load { width: 100%; max-width: 100vw; }
}

/* «Финансовый анализ»: прирост к прошлому году — вторая строка под значением показателя.
   Мелкий и тихий, чтобы число оставалось главным; знак и единицу даёт расчёт, а не разметка. */
.tbl.fin-tbl .fin-value { display: block; }
.tbl.fin-tbl .fin-growth {
  display: block; margin-top: 2px; font-size: 12px; line-height: 1.3;
  color: var(--text2); font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* «Соответствие нормативам»: одна таблица «Что проверяем · У компании · Норматив · Итог» (#5476, 29.10).
   Требование закона или порог пространства — подписью под правилом; ориентир — общей легендой.
   Итог — словом и цветом, неоценённое — причиной словами, а не прочерком без объяснения. */
/* Общий вид таблицы карточки: шапка 11/600 UPPER и значения 14 приходят от `.tbl`; своя
   раскладка (фиксированные ширины, кегль 15) снята — таблица читается как остальные (#5476, 05.11). */
.fin-norm-sum { margin: 0 0 14px; font-size: 14px; line-height: 1.45; color: var(--text2); }
.tbl.fin-norm { min-width: 720px; }
.tbl.fin-norm .fin-rule-name { display: block; line-height: 1.45; color: var(--text); }
.tbl.fin-norm .fin-rule-src { display: block; margin-top: 3px; font-size: 13px; line-height: 1.45; color: var(--text3); }
.tbl.fin-norm .fin-norm-fact { line-height: 1.45; color: var(--text); }
.tbl.fin-norm .fin-norm-year { margin-left: 6px; font-size: 13px; line-height: 1.45; color: var(--text3); }
.tbl.fin-norm .fin-norm-miss { line-height: 1.45; color: var(--text3); }
.tbl.fin-norm tr.fin-norm-bad .fin-rule-name { color: var(--err); }
.tbl.fin-norm tr.fin-norm-bad .fin-norm-fact { color: var(--err); }
.tbl.fin-norm .fin-norm-verdict { font-size: 14px; font-weight: 500; line-height: 1.45; }
.tbl.fin-norm .fin-norm-verdict.bad { color: var(--err); }
.tbl.fin-norm .fin-norm-verdict.ok { color: var(--ok); }
.tbl.fin-norm .fin-norm-verdict.unknown { color: var(--text3); }
.fin-norm-foot { margin: 14px 0 0; font-size: 14px; line-height: 1.5; color: var(--text3); }
.fin-norm-norm { color: var(--text2); }

/* «Финансовый риск-индекс» (#5476): число, полоса-шкала и шесть компонентов с вкладами.
   Цвет полосы — те же токены темы, что у групп риска, поэтому блок читается в обеих темах. */
.fin-risk-sub { margin: -6px 0 12px; font-size: 13px; line-height: 1.4; color: var(--text3); }
.fin-risk-top { display: flex; align-items: center; gap: 18px; margin: 12px 0 10px; flex-wrap: wrap; }
.fin-risk-num { display: flex; align-items: baseline; gap: 2px; font-variant-numeric: tabular-nums; }
.fin-risk-num b { font-size: 46px; line-height: 1; font-weight: 600; color: var(--text); }
.risk-value { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
/* Статус индекса — круг 16×16 с обводкой 2 px из макета (red.svg / yelow.svg / green.svg). */
.risk-icon { width: 16px; height: 16px; border: 2px solid #FEBC2F; border-radius: 50%; box-sizing: border-box; flex: none; }
.risk-icon.low { border-color: #27C840; }
.risk-icon.medium { border-color: #FEBC2F; }
.risk-icon.high { border-color: #FF2D55; }
.risk-icon.caution { border-color: #FEBC2F; }
/* ЭКГ: по одной доле на балл; заполненные — цветом текста, пустые — линией. */
.ekg-value { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; }
.ekg-n { flex: none; min-width: 3ch; }
.ekg-bar { display: grid; grid-template-columns: repeat(100, 1fr); gap: 1px; width: min(100%, 430px); height: 12px; flex: 1; min-width: 0; }
.ekg-seg { background: var(--line); border-radius: 1px; min-width: 0; }
.ekg-seg.on { background: var(--text2); }
.fin-risk-num small { font-size: 16px; color: var(--text3); }
.fin-risk-label { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fin-risk-label b { font-size: 16px; font-weight: 600; color: var(--text2); }
.fin-risk-label.low b { color: var(--ok); }
.fin-risk-label.medium b { color: var(--warn); }
.fin-risk-label.high b { color: var(--err); }
.fin-risk-contrib, .fin-risk-cov { font-size: 13px; line-height: 1.4; color: var(--text3); }
.fin-risk-reason { flex-basis: 100%; font-size: 14px; line-height: 1.45; color: var(--text2); }
.fin-risk-scale { position: relative; display: flex; gap: 2px; margin: 6px 0 18px; }
.fin-risk-band { display: flex; flex-direction: column; gap: 4px; }
.fin-risk-band i { display: block; height: 10px; border-radius: 4px; }
.fin-risk-low { flex: 30; }
.fin-risk-medium { flex: 40; }
.fin-risk-high { flex: 31; }
.fin-risk-low i { background: var(--ok); }
.fin-risk-medium i { background: var(--warn); }
.fin-risk-high i { background: var(--err); }
.fin-risk-band small { font-size: 12px; line-height: 1.3; color: var(--text3); white-space: nowrap; }
.fin-risk-medium { text-align: center; }
.fin-risk-high { text-align: right; }
.fin-risk-cursor { position: absolute; top: -4px; bottom: 20px; width: 2px; border-radius: 1px;
  background: var(--text); transform: translateX(-1px); }
.fin-risk-cursor::before { content: ''; position: absolute; top: -4px; left: -4px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--text); }
.fin-risk-rows { display: flex; flex-direction: column; margin: 4px 0 12px; }
.fin-risk-row { display: grid; grid-template-columns: minmax(220px, 1.1fr) minmax(120px, 1fr) 92px;
  gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.fin-risk-row:last-child { border-bottom: 0; }
.fin-risk-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.fin-risk-name b { font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--text); }
.fin-risk-name small { font-size: 13px; line-height: 1.4; color: var(--text3);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin-risk-bar { height: 8px; border-radius: 4px; background: var(--panel-2); overflow: hidden; }
.fin-risk-bar i { display: block; height: 100%; border-radius: 4px; background: var(--warn); }
/* Цвет маркера ФРС в «Индексах KLAR» — цвет зоны шкалы (#5476): 0–29 зелёный, 30–69 оранжевый, 70–100 красный. */
.fin-risk-bar.low i { background: var(--ok); }
.fin-risk-bar.medium i { background: var(--warn); }
.fin-risk-bar.high i { background: var(--err); }
.fin-risk-row.fin-risk-partial { opacity: .72; }
.fin-risk-points { text-align: right; font-size: 13px; line-height: 1.4; color: var(--text2);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin-risk-penalty { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin: 2px 0 6px; padding: 8px 10px; border-radius: 8px;
  background: var(--panel-2); font-size: 13px; line-height: 1.4; color: var(--text2); }
.fin-risk-penalty b { font-weight: 600; color: var(--err); }
.fin-risk-note { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--text3); }
/* Возраст отчётности финанализа (#5476): плашка о том, что основа устарела или просрочена.
   Цвет — из токенов темы: `--warn` у stale, `--err` у expired, поэтому обе темы читаются. */
.fin-fresh-note { display: flex; flex-direction: column; gap: 3px; margin: 0 0 12px;
  padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 1.45;
  color: var(--text2); border: 1px solid color-mix(in srgb, var(--warn) 38%, var(--border));
  background: color-mix(in srgb, var(--warn) 9%, var(--card)); }
.fin-fresh-note b { font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--warn); }
.fin-fresh-note.expired { border-color: color-mix(in srgb, var(--err) 42%, var(--border));
  background: color-mix(in srgb, var(--err) 8%, var(--card)); }
.fin-fresh-note.expired b { color: var(--err); }
/* Ограничение ответственности у индексов (#5476): отсылка — кнопка, текст раскрывается на месте. */
.fin-index-note { margin-top: 8px; }
.fin-index-toggle { display: inline-block; max-width: 100%; margin: 0; padding: 0;
  border: 0; background: none; font: inherit; font-size: 12.5px; line-height: 1.45;
  color: var(--text3); text-align: left; text-decoration: underline dotted;
  text-underline-offset: 3px; overflow-wrap: anywhere; cursor: pointer; }
.fin-index-toggle:hover { color: var(--text2); }
.fin-index-toggle:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px;
  border-radius: 3px; }
.fin-index-text { max-width: 72ch; margin-top: 6px; padding: 10px 12px; border-radius: 8px;
  background: var(--panel-2); font-size: 12.5px; line-height: 1.5; color: var(--text2);
  overflow-wrap: anywhere; }
/* Печать: текст раскрыт целиком, отсылка без подчёркивания — на бумаге нажимать нечего. */
@media print {
  .fin-index-toggle { text-decoration: none; cursor: default; }
  .fin-index-text[hidden] { display: block; }
  .fin-index-text { break-inside: avoid; }
}

/* «Кредитный лимит KLAR»: число, расшифровка и справка СПАРКа рядом, но отдельно. */
.fin-credit-sub { margin: -6px 0 10px; font-size: 13px; line-height: 1.4; color: var(--text3); }
.fin-credit-num { margin: 4px 0 8px; font-size: 34px; font-weight: 600; line-height: 1.1;
  color: var(--text); font-variant-numeric: tabular-nums; }
.fin-credit-reason { margin: 8px 0; font-size: 14px; line-height: 1.45; color: var(--text2); }
.fin-credit-note { margin: -4px 0 10px; font-size: 13px; line-height: 1.45; color: var(--text2); }
.fin-credit-calc { margin: 2px 0 10px; font-size: 13px; line-height: 1.5; color: var(--text3);
  font-variant-numeric: tabular-nums; }
.fin-credit-caps { margin-top: 2px; }
.fin-credit-multiplier { margin-top: 4px; }
@media (max-width: 768px) {
  .fin-risk-row { grid-template-columns: 1fr auto; gap: 6px 10px; }
  .fin-risk-bar { grid-column: 1; grid-row: 2; }
  .fin-risk-points { grid-column: 2; grid-row: 1; }
  .fin-risk-num b { font-size: 38px; }
  .fin-risk-band small { font-size: 11px; }
  .fin-credit-num { font-size: 28px; }
}

/* «Шаблоны проверок»: скелет карточек на холодном старте и плашка отказа. Пока дверь карточек
   отвечает (первый ответ после перезапуска — секунды), экран показывает структуру, а не пустоту;
   цвета — токены темы, поэтому скелет читается и в тёмной, и в светлой теме. */
.tpl-skel-status { margin: 0 0 12px; }
.tpl-skel { display: flex; flex-direction: column; gap: 12px; }
.tpl-skel-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 18px;
  background: var(--panel); border-radius: 12px; animation: tpl-skel-pulse 1.6s ease-in-out infinite; }
.tpl-skel-bar { width: 42%; height: 16px; border-radius: 6px; background: var(--panel-2); }
.tpl-skel-line { height: 10px; border-radius: 5px; background: var(--panel-2); }
.tpl-skel-line.short { width: 64%; }
@keyframes tpl-skel-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .tpl-skel-card { animation: none; } }
.tpl-error { margin: 0 0 12px; }
.tpl-error p { margin: 0 0 10px; }

/* ---------- Таблицы карточки: липкая шапка и первый столбец (#5476) ----------

   Липкость — только у широких и длинных таблиц раздела «Финансовый анализ» (показатели,
   Дюпон и оценка влияния, «Динамика», «Соответствие нормативам») и у «Финансов по годам»: её
   включает `.fin-scroll`, и ни одна короткая таблица (суды, госзакупки, реквизиты, «Прочие
   сведения») этого класса не получает. Шапка и первый столбец липнут от прокрутки СТРАНИЦЫ: у таблицы
   нет своего scrollport по вертикали, колесо над ней крутит страницу. Вбок таблица
   прокручивается на узком экране: `overflow-x: auto` оставляет горизонтальный scrollport, а
   `overflow-y: clip` не делает коробку scrollport'ом по Y (в отличие от `visible`, который при
   `auto` по X вычисляется в `auto`). Это «одноосевой scroll container»: Chromium 154+
   объявляет его как `named-feature(single-axis-scroll-container)`, а WebKit 27.2 ещё нет и в
   такой паре вычисляет `clip` в `hidden`, поэтому ниже — откат. Фон липких ячеек непрозрачный —
   токен плашки. */
.scroll-x.fin-scroll {
  overflow-x: auto;
  overflow-y: clip;
}
/* Смахивание вбок внутри широкой таблицы остаётся в её коробке (#5476, 30.10): у края прокрутки
   жест не уходит в историю браузера «назад/вперёд». Свойство — на самой коробке, поэтому
   вертикаль страницы не затронута; `contain` (не `none`) оставляет жест её прокрутке. */
.scroll-x {
  overscroll-behavior-x: contain;
  overscroll-behavior-x: contain;
}
.fin-scroll .tbl.fin-tbl thead th,
.fin-scroll .tbl.fin-norm thead th {
  /* Низ липкой шапки страницы = крошки + шапка карточки. JS пишет фактическую высоту `.card-head`
     в `--fin-sticky-top-extra`; запасное `--chead-h` держит шапку видимой, даже если JS ещё
     не успел: без него `top` падал до высоты крошек, и шапка пряталась под шапкой карточки. */
  position: sticky;
  top: calc(var(--crumbs-h, 0px) + var(--fin-sticky-top-extra, var(--chead-h, 140px)));
  /* Ниже `.card-head` (z-index 20): шапка таблицы уходит ПОД шапку карточки, а не поверх неё;
     при равном z-index выиграл бы порядок в DOM и таблица накрыла бы заголовок. */
  z-index: 2;
  /* Шапка таблицы — в тон панели: строки не сливаются с заголовком, а при липкости мягкая
     тень отделяет шапку от подлезающих под неё строк. */
  background: var(--plate);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 10px -8px var(--shadow);
}
/* Фокус и переход по якорю не уезжают под липкую шапку: страница прокручивается сама (у таблицы
   своего scrollport по Y нет), поэтому отступ задаёт корень — низ шапки страницы плюс строка
   таблицы. `:has` оставляет правило карточкам с липкой таблицей, чтобы не сдвигать якоря
   остальных экранов. Отдельного `scroll-margin-top` у строк нет намеренно: он сложился бы с
   этим отступом и увёл бы фокус вдвое ниже (229 + 229 = 458 px, замер 23.10). */
html:has(.fin-scroll) {
  scroll-padding-top: calc(var(--fin-sticky-top, calc(var(--crumbs-h, 0px) + var(--chead-h, 140px))) + 44px);
}
/* Без одноосевых scroll container'ов (WebKit 27 и старше, Chromium < 154) `clip` в паре
   с `auto` по X вычисляется в `hidden`: коробка снова scrollport, и шапка липнет к ней,
   а не к странице. Оставляем горизонтальную прокрутку и липкий столбец, а шапку — обычной:
   ложная липкость внутри коробки хуже, чем честно нелипкая шапка. */
@supports not named-feature(single-axis-scroll-container) {
  .scroll-x.fin-scroll { overflow-y: hidden; }
  .fin-scroll .tbl.fin-tbl thead th,
  .fin-scroll .tbl.fin-norm thead th { position: static; }
}
.tbl.fin-tbl thead th.num { text-align: right; }
/* Угол пересечения шапки и столбца — выше обоих: иначе соседние ячейки перекрывают его. */
.fin-scroll .tbl.fin-analysis thead th.fin-name,
.fin-scroll .tbl.fin-years thead th.fin-code,
.fin-scroll .tbl.fin-years thead th.fin-name,
.fin-scroll .tbl.fin-dupont thead th:first-child,
.fin-scroll .tbl.fin-trends thead th:first-child,
.fin-scroll .tbl.fin-norm thead th:first-child {
  left: 0; z-index: 3;
  box-shadow: 1px 0 0 var(--line), inset 0 -1px 0 var(--line), 0 6px 10px -8px var(--shadow);
}
.fin-scroll .tbl.fin-analysis tbody td.fin-name,
.fin-scroll .tbl.fin-years tbody td.fin-code,
.fin-scroll .tbl.fin-years tbody td.fin-name,
.fin-scroll .tbl.fin-dupont tbody td:first-child,
.fin-scroll .tbl.fin-trends tbody td:first-child,
.fin-scroll .tbl.fin-norm tbody td:first-child {
  position: sticky; left: 0; z-index: 1;
  /* Тело липкого столбца — того же тона, что панель таблицы, а не плашка страницы. */
  background: var(--plate);
  box-shadow: 1px 0 0 var(--line);
}
/* «Финансы по годам»: «Код» — узкий, «Строка» — следом; оба держатся слева. */
.tbl.fin-years { --fin-code-w: 48px; }
.tbl.fin-years thead th.fin-code,
.tbl.fin-years tbody td.fin-code {
  width: var(--fin-code-w); min-width: var(--fin-code-w); max-width: var(--fin-code-w);
}
.fin-scroll .tbl.fin-years thead th.fin-name,
.fin-scroll .tbl.fin-years tbody td.fin-name { left: var(--fin-code-w); }
/* Ширина названия: минимум для чтения, максимум — чтобы длинный показатель не растягивал таблицу.
   Потолок держат внутренние блоки: в автоматической раскладке таблицы `max-width` на ячейке не режет. */
.tbl.fin-analysis th.fin-name, .tbl.fin-analysis tbody td.fin-name,
.tbl.fin-years th.fin-name, .tbl.fin-years tbody td.fin-name {
  width: clamp(168px, 18vw, 260px);
  min-width: 168px; max-width: 260px;
  white-space: normal; overflow-wrap: break-word;
}
.tbl.fin-analysis .fin-fold { max-width: 260px; }
/* Треугольник строки убран (решение Романа 26.10): раскрытие — по клику на название,
   о нём говорят курсор и подсветка, а не нативный маркер `details`. */
.fin-fold > summary { list-style: none; cursor: pointer; }
.fin-fold > summary::-webkit-details-marker { display: none; }
.fin-fold > summary::marker { content: ''; }
.tbl.fin-analysis .fin-fold > summary:hover .fin-name-text,
.tbl.fin-analysis .fin-fold > summary:focus-visible .fin-name-text { color: var(--accent-text); }
.tbl.fin-analysis .fin-fold > summary:focus-visible {
  outline: 2px solid var(--accent-fill); outline-offset: 2px; border-radius: 3px;
}
.tbl.fin-years .fin-name-text {
  display: inline-block; max-width: 260px; vertical-align: top;
  white-space: normal; overflow-wrap: break-word;
}
/* Расшифровка строки — дочерними строками той же сетки: название позиции с отступом
   26 px, значения в тех же колонках годов. Пустой отступ у строки без расшифровки не
   рисуется вовсе: под ней просто нет дочерней строки. */
.tbl.fin-years tbody tr.fin-child td.fin-name,
.tbl.fin-years tbody tr.fin-child td.num { color: var(--text2); }
/* Дочерняя строка: «Код» и «Строка» — одна ячейка (`colspan`), поэтому название идёт в ширину
   двух колонок, а значения остаются в колонках годов. Липнет она от левого края, а не от 48 px:
   ячейка сама занимает обе колонки, и прежнее `left` сдвигало бы её вправо при прокрутке. */
.fin-scroll .tbl.fin-years tbody tr.fin-child td.fin-child-name {
  left: 0;
  width: auto; min-width: calc(var(--fin-code-w) + 132px); max-width: none;
  white-space: normal;
}
.tbl.fin-years tbody tr.fin-child td.fin-name .fin-name-text {
  padding-left: 26px; box-sizing: border-box;
}
/* Группа-разделитель — строкой на всю ширину, не липкая: она и так во всю таблицу. */
.tbl.fin-analysis tbody td.fin-group { position: static; }
/* «Налоги и ФОТ»: показатель — строка, годы — столбцы; длинную таблицу ведёт прокрутка,
   а первый столбец остаётся на месте. Ширина названия — как у финансовых таблиц. */
.fin-scroll .tbl.fin-matrix thead th.fin-name {
  left: 0; z-index: 3;
  box-shadow: 1px 0 0 var(--line), inset 0 -1px 0 var(--line), 0 6px 10px -8px var(--shadow);
}
.fin-scroll .tbl.fin-matrix tbody td.fin-name {
  position: sticky; left: 0; z-index: 1;
  background: var(--panel);
  box-shadow: 1px 0 0 var(--line);
}
.tbl.fin-matrix th.fin-name, .tbl.fin-matrix tbody td.fin-name {
  width: clamp(168px, 18vw, 260px);
  min-width: 168px; max-width: 260px;
  white-space: normal; overflow-wrap: break-word;
}
.tbl.fin-matrix .fin-name-text {
  display: inline-block; max-width: 260px; vertical-align: top;
  white-space: normal; overflow-wrap: break-word;
}
/* Фокус строки держит `scroll-padding-top` корня (выше): своя `scroll-margin-top` у строки
   сложилась бы с ним и увела бы строку под шапку с двойным отступом. */
@media (max-width: 768px) {
  .tbl.fin-analysis th.fin-name, .tbl.fin-analysis tbody td.fin-name,
  .tbl.fin-years th.fin-name, .tbl.fin-years tbody td.fin-name,
  .tbl.fin-matrix th.fin-name, .tbl.fin-matrix tbody td.fin-name {
    width: clamp(132px, 34vw, 200px);
    min-width: 132px; max-width: 200px;
  }
  .tbl.fin-analysis .fin-fold, .tbl.fin-years .fin-name-text,
  .tbl.fin-matrix .fin-name-text { max-width: 200px; }
  .tbl.fin-years { --fin-code-w: 56px; }
}
/* ---------- Прочие широкие таблицы: липкость по замеру (#5476, 26.10) ----------

   `fin-wide` ставит скрипт только таблице, которая правда шире своей коробки; узкая остаётся
   как была. Шапка и первый столбец липнут тем же слоем, что у финансовых таблиц. */
.scroll-x.fin-wide { overflow-x: auto; overflow-y: clip; }
.fin-wide > table > thead th {
  position: sticky;
  top: calc(var(--crumbs-h, 0px) + var(--fin-sticky-top-extra, var(--chead-h, 140px)));
  z-index: 2;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 -1px 0 var(--line), 0 6px 10px -8px var(--shadow);
}
.fin-wide > table > thead > tr > th:first-child {
  left: 0; z-index: 3;
  box-shadow: 1px 0 0 var(--line), inset 0 -1px 0 var(--line), 0 6px 10px -8px var(--shadow);
}
.fin-wide > table > tbody > tr > td:first-child {
  position: sticky; left: 0; z-index: 1;
  background: var(--panel);
  box-shadow: 1px 0 0 var(--line);
}
.fin-wide > table > thead > tr > th:first-child,
.fin-wide > table > tbody > tr > td:first-child {
  max-width: clamp(168px, 18vw, 260px); overflow-wrap: break-word;
}
/* Ссылка в липком столбце — обычным текстом: `.link` не переносится и вылезала бы из колонки. */
.fin-wide > table > tbody > tr > td:first-child .link { display: inline; white-space: normal; }
/* Длинному названию — ширина `.fin-matrix`; коду и дате она не нужна, им хватает своей. */
.fin-wide.fin-wide-long > table > thead > tr > th:first-child,
.fin-wide.fin-wide-long > table > tbody > tr > td:first-child {
  width: clamp(168px, 18vw, 260px); min-width: 168px; max-width: 260px;
  white-space: normal;
}
@media (max-width: 768px) {
  .fin-wide.fin-wide-long > table > thead > tr > th:first-child,
  .fin-wide.fin-wide-long > table > tbody > tr > td:first-child {
    width: clamp(132px, 34vw, 200px); min-width: 132px; max-width: 200px;
  }
}
@supports not named-feature(single-axis-scroll-container) {
  .scroll-x.fin-wide { overflow-y: hidden; }
  .fin-wide > table > thead th { position: static; }
}

/* ---------- Признак прокрутки таблицы (#5476, 26.10) ----------
   У `.scroll-x` шире коробки — подсказка у края, за которым ещё есть столбцы; состояние дают
   атрибуты `data-scroll-left`/`data-scroll-right` от `_klarScrollHint`. Справа маска гаснет у
   края контейнера. Слева тень рисует последняя липкая ячейка: её правый край — граница группы,
   тень уходит вправо на первую нелипкую колонку и саму группу не накрывает. Ячейка липкая и
   вбок, и вниз, поэтому тень одна на шапку и тело и не пропадает при прокрутке страницы. */
.scroll-x[data-scroll-right="1"] {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent 100%);
}
.scroll-x[data-scroll-left="1"] .tbl.fin-analysis thead th.fin-name::after,
.scroll-x[data-scroll-left="1"] .tbl.fin-analysis tbody td.fin-name::after,
.scroll-x[data-scroll-left="1"] .tbl.fin-years thead th.fin-name::after,
.scroll-x[data-scroll-left="1"] .tbl.fin-years tbody td.fin-name::after,
.scroll-x[data-scroll-left="1"] .tbl.fin-dupont thead th:first-child::after,
.scroll-x[data-scroll-left="1"] .tbl.fin-dupont tbody td:first-child::after,
.scroll-x[data-scroll-left="1"] .tbl.fin-trends thead th:first-child::after,
.scroll-x[data-scroll-left="1"] .tbl.fin-trends tbody td:first-child::after,
.scroll-x[data-scroll-left="1"] .tbl.fin-norm thead th:first-child::after,
.scroll-x[data-scroll-left="1"] .tbl.fin-norm tbody td:first-child::after,
.scroll-x[data-scroll-left="1"] .tbl.fin-matrix thead th.fin-name::after,
.scroll-x[data-scroll-left="1"] .tbl.fin-matrix tbody td.fin-name::after,
.scroll-x.fin-wide[data-scroll-left="1"] > table > thead > tr > th:first-child::after,
.scroll-x.fin-wide[data-scroll-left="1"] > table > tbody > tr > td:first-child::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 100%;
  width: 22px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to right, var(--shadow), transparent);
}

/* ---------- «Лицензии»: ширины подписей и значений (#5476, 26.10) ----------

   «Кем» — имя органа; без потолка оно отбирало 500 px у дат, и следующая подпись уезжала на
   пол-экрана. `max-width` на ячейке в авто-раскладке не режет, поэтому потолок держит внутренний
   блок, а не колонка; на телефоне потолок ниже, чтобы таблица прокручивалась, а не рвалась. */
/* Картинка товарного знака (канон 11.8): миниатюра в строке, пропорции знака сохраняются. */
.tbl td img.tm-pic { display: block; max-height: 64px; max-width: 200px; object-fit: contain; }
/* Знак — кнопка: щелчок открывает его крупно; рамки кнопки нет, у фокуса — кольцо. */
.tbl td button.tm-zoom { display: block; padding: 0; border: none; background: none; cursor: zoom-in; border-radius: 4px; }
.tbl td button.tm-zoom:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
img.tm-big { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.tbl.tbl-licenses .lic-text {
  display: inline-block; vertical-align: top;
  white-space: normal; overflow-wrap: break-word;
}
.tbl.tbl-licenses td:nth-child(4) .lic-text { max-width: clamp(180px, 24vw, 320px); }
.tbl.tbl-licenses td:nth-child(5) .lic-text { max-width: clamp(220px, 34vw, 480px); }
/* Проценты сводки «Финансы» — тем же кеглем, что и значения под ними. */
.fin th.ch { font-size: 13px; padding-left: 6px; }
/* ---------- «Регистрация в фондах»: узкие фонд/номер/дата, отделение — основной шириной (#5476, 01.11) ----------
   Фиксированная раскладка не даёт длинному отделению растянуть таблицу: оно переносится,
   а номер и дата стоят справа узкими колонками с одинаковыми интервалами. На телефоне
   каждая запись — две строки карточкой, без горизонтальной прокрутки. */
.tbl.tbl-funds { table-layout: fixed; width: 100%; }
.tbl.tbl-funds th, .tbl.tbl-funds td { padding: 7px 12px; vertical-align: top; }
.tbl.tbl-funds th:first-child, .tbl.tbl-funds td:first-child { padding-left: 0; }
.tbl.tbl-funds th:last-child, .tbl.tbl-funds td:last-child { padding-right: 0; }
.tbl.tbl-funds th:nth-child(1) { width: 72px; }
.tbl.tbl-funds th:nth-child(3) { width: 120px; }
.tbl.tbl-funds th:nth-child(4) { width: 104px; }
.tbl.tbl-funds td:nth-child(2) { white-space: normal; overflow-wrap: anywhere; }
.tbl.tbl-funds th.num, .tbl.tbl-funds td.num { text-align: right; white-space: nowrap; }

/* ---------- «Вхождение в реестры»: список строкой, поля по наличию (#5476, 01.11) ---------- */
.reg-list { margin-top: 2px; }
.reg-entry {
  display: grid; grid-template-columns: 133px minmax(0, 1fr); column-gap: 24px;
  padding: 7px 0; border-top: 1px solid var(--line);
  font-size: 14px; line-height: 1.45; overflow-wrap: anywhere;
}
.reg-entry:first-child { padding-top: 0; border-top: 0; }
.reg-entry b { color: var(--text2); font-weight: 600; }
.reg-entry-fields { color: var(--text); }
@media (max-width: 700px) { .reg-entry { grid-template-columns: minmax(0, 1fr); row-gap: 2px; } }

/* ---------- «Рисковые» (макет «Реестры и списки», 17.11): «Обнаружено» и «Проверено» ---------- */
.reg-sum { display: grid; grid-template-columns: 133px minmax(0, 1fr); column-gap: 24px; font-size: 14px; line-height: 1.45; }
.reg-sum > * { padding: 8px 0; border-bottom: 1px solid var(--line); }
.reg-sum > :nth-last-child(-n+2) { border-bottom: 0; }
/* --risk (#E5484D) обычным 14 px даёт 3,6:1 на панели обеих тем — «Обнаружено» берёт красный текста
   дорожки, проходящий 4,5:1: в тёмной #F87171 (5,1:1), в светлой #B42318 (6,4:1). */
.reg-sum-word.yes { color: var(--road-bad-fg); }
.reg-sum-word.ok { color: var(--ok); }
/* Светлая тема: --ok (#16A34A) на белом даёт 3,3:1 — подпись берёт тёмный зелёный, 5:1 (WCAG 1.4.3). */
:root[data-theme="light"] .reg-sum-word.ok, html[data-theme="light"] .reg-sum-word.ok { color: #15803D; }
.reg-sum-items { min-width: 0; color: var(--text); overflow-wrap: anywhere; }
.reg-sum-item { display: block; }
.reg-sum-item + .reg-sum-item { margin-top: 4px; }
.reg-sum-items .reg-note { margin-top: 4px; }
@media (max-width: 700px) {
  .reg-sum { grid-template-columns: minmax(0, 1fr); }
  .reg-sum > .reg-sum-word { padding-bottom: 0; border-bottom: 0; }
}

@media (max-width: 700px) {
  .tbl.tbl-funds thead { display: none; }
  .tbl.tbl-funds, .tbl.tbl-funds tbody { display: block; width: 100%; }
  .tbl.tbl-funds tbody tr {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "fund number date" "branch branch branch";
    gap: 2px 10px; padding: 8px 0; border-top: 1px solid var(--line);
  }
  .tbl.tbl-funds tbody td {
    display: block; border: 0; padding: 0; white-space: normal;
  }
  .tbl.tbl-funds tbody td:nth-child(1) { grid-area: fund; font-weight: 500; }
  .tbl.tbl-funds tbody td:nth-child(2) { grid-area: branch; font-size: 13px; color: var(--text2); }
  .tbl.tbl-funds tbody td:nth-child(3) { grid-area: number; text-align: right; }
  .tbl.tbl-funds tbody td:nth-child(4) { grid-area: date; text-align: right; color: var(--text2); }
}

/* Печать: таблица целиком на листе, без прокрутки и без липких ячеек. */
@media print {
  .scroll-x.fin-scroll { overflow: visible; }
  .fin-scroll .tbl.fin-tbl thead th,
  .fin-scroll .tbl.fin-norm thead th { position: static; }
  .scroll-x.fin-wide { overflow: visible; }
  .fin-wide > table > thead th,
  .fin-wide > table > tbody > tr > td:first-child { position: static; }
}

/* ---------- «Финансовый анализ»: прочерк вместо служебной фразы (#5476, 23.10) ----------

   Нерасчётный показатель — «—»: тихим токеном, без красной заливки и без знака минуса.
   Причина прочерка живёт в подсказке и доступном имени ячейки, смысл — легендой под таблицей. */
.tbl.fin-tbl .fin-dash,
.fin-analysis-notes .fin-note {
  color: var(--text2);
}
.fin-analysis-notes {
  display: flex; flex-direction: column; gap: 2px;
  margin-top: 8px;
}
.fin-analysis-notes .fin-note { font-size: 13px; line-height: 1.5; }

/* ---------- «Финансовый анализ»: пояснения «для чайников» (решение 23.10) ----------

   «Как читать раздел» и «Термины» — свёрнутые: разворачивает читатель, а не раздел. Свёрнутая
   строка тихая, чтобы не спорить с графиками; раскрытый текст — обычный абзац в 72 знака,
   который читается без терминов. Пояснение «Что это значит» живёт в раскрытии строки таблицы
   и наследует её узкую колонку: переносы слов уже разрешены правилом `.fin-name`. */
.fin-howto, .fin-terms-fold { margin: 0; }
.fin-howto > summary, .fin-terms-fold > summary {
  cursor: pointer; padding: 2px 0;
  font-size: 13px; line-height: 1.5; color: var(--text2);
}
.fin-howto[open] > summary, .fin-terms-fold[open] > summary { color: var(--text); }
.fin-howto-text {
  max-width: 72ch; margin: 8px 0 0;
  font-size: 14px; line-height: 1.55; color: var(--text2);
}
.fin-terms {
  display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px;
  max-width: 72ch; margin: 10px 0 0;
}
.fin-terms dt { font-weight: 500; color: var(--text); }
.fin-terms dd { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text2); }
.tbl.fin-analysis .fin-why {
  margin: 6px 0 0;
  font-size: 13px; line-height: 1.5; color: var(--text2);
}
.tbl.fin-analysis .fin-why-label { font-weight: 500; color: var(--text); }
/* Раскрытие — тот же текст, что в подсказке: формула, входы, пояснение, пометки; каждой
   строке своё место и свой тон, а не простыня одного абзаца. */
.tbl.fin-analysis .fin-desc { font-size: 13px; line-height: 1.5; color: var(--text2); }
.tbl.fin-analysis .fin-desc-formula { color: var(--text); font-weight: 500; }
.tbl.fin-analysis .fin-desc-input { margin-top: 2px; }
.tbl.fin-analysis .fin-desc-mark { color: var(--text3); }
/* Раскрытие идёт строкой во всю ширину таблицы: в узкой колонке названия формула и входы
   ломались на три строки каждый и делали простыню (решение 26.10). */
.tbl.fin-analysis tr.fin-metric-detail > td.fin-desc-cell { padding: 0 0 12px; }
.tbl.fin-analysis .fin-desc-block {
  max-width: min(72ch, calc(100vw - 120px)); padding: 12px 14px;
  border-radius: 8px; background: var(--panel-2);
}
@media (max-width: 480px) {
  .fin-terms { grid-template-columns: 1fr; gap: 2px; }
  .fin-terms dd { margin-bottom: 8px; }
}

/* ---------- «Финансовый анализ»: воздух и ритм блоков (решение 23.10) ----------

   Блоки раздела читаются как самостоятельные: 30 px между блоками, 12 px между заголовком
   `h2.cap` и его содержимым (это поле заголовка в шаблоне карточки), легенда прочерков — вплотную
   к своей таблице (10 px). Ритм задан только этому разделу
   через `:has(> .fin-head)`: остальные разделы карточки живут своими отступами (`.csec > .box + .box`). */
.csec:has(> .fin-head) > .fin-head ~ * { margin-top: 30px; }
.csec:has(> .fin-head) > h2.cap + * { margin-top: 0; }
.csec:has(> .fin-head) > .fin-analysis-table + .fin-analysis-notes { margin-top: 10px; }
/* Таблица раздела — той же карточкой, что и график: общий фон, скругление и поле от края.
   Рамки нет: карточка держится фоном, как `.box` остальных блоков. */
.csec:has(> .fin-head) .fin-chart { padding: 14px 18px 12px; }
/* Шапка таблицы — в тон её панели: таблица раздела стоит на той же плашке, что и остальные (05.11). */
.csec:has(> .fin-head) .tbl thead th {
  background: var(--plate);
}
/* Кант шапки — один, а не её граница плюс `border-top` первой строки тела: иначе линия жирнеет. */
.csec:has(> .fin-head) thead + tbody tr:first-child > td { border-top: 0; }

/* ---------- «Финансовый анализ»: спарклайны и блок «Графики» (решение 23.10) ----------

   Спарклайн живёт в узкой колонке сразу за названием: SVG тянется по ширине ячейки,
   высота задана CSS, осей и подписей нет — только линия и последняя точка. Графики —
   сетка карточек над таблицей; на узком экране она складывается в один столбец. Ни у
   одного блока нет `position: fixed`/`sticky` и `touch-action`: прокрутку страницы они
   не перехватывают, `pointer-events` нет у линий, у точек — только у самих точек. */
.tbl.fin-analysis th.fin-spark,
.tbl.fin-analysis tbody td.fin-spark {
  width: 68px; min-width: 68px; max-width: 68px;
  padding-right: 10px;
}
.tbl.fin-analysis tbody td.fin-spark { vertical-align: middle; }
.fin-spark-svg {
  display: block; width: 100%; height: 20px; overflow: visible;
  color: var(--text2); pointer-events: none;
}
.fin-spark-line {
  fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linejoin: round; stroke-linecap: round;
}
.fin-spark-dot { fill: currentColor; pointer-events: auto; }

.fin-charts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px; margin: 0;
}
.fin-chart {
  min-width: 0; padding: 12px 14px 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.fin-chart-title { font-size: 14px; font-weight: 500; line-height: 1.35; color: var(--text); }
.fin-chart-legend {
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  margin-top: 6px; font-size: 12px; line-height: 1.4; color: var(--text2);
}
.fin-chart-legend-item { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.fin-chart-key { flex: none; width: 14px; height: 2px; border-radius: 1px; background: var(--text2); }
.fin-chart-key.s0 { background: var(--accent); }
.fin-chart-key.s1 { background: var(--risk); }
.fin-chart-key.s2 { background: var(--text2); }
.fin-chart-svg {
  display: block; width: 100%; height: 96px; margin-top: 8px;
  overflow: visible; pointer-events: none;
}
.fin-chart-line { fill: none; stroke: var(--text2); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.fin-chart-line.s0 { stroke: var(--accent); }
.fin-chart-line.s1 { stroke: var(--risk); }
.fin-chart-line.s2 { stroke: var(--text2); }
.fin-chart-dot { fill: var(--text2); }
.fin-chart-dot.s0 { fill: var(--accent); }
.fin-chart-dot.s1 { fill: var(--risk); }
.fin-chart-dot.s2 { fill: var(--text2); }
.fin-chart-zero { stroke: var(--line); stroke-width: 1; }
.fin-chart-years {
  display: flex; justify-content: space-between; gap: 6px;
  margin-top: 4px; font-size: 12px; line-height: 1.4;
  color: var(--text2); font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
  .fin-charts { grid-template-columns: 1fr; }
  .tbl.fin-analysis th.fin-spark,
  .tbl.fin-analysis tbody td.fin-spark { width: 60px; min-width: 60px; max-width: 60px; }
}
@media print {
  .fin-charts { grid-template-columns: 1fr 1fr; }
  .fin-chart-svg { height: 80px; }
}

/* ---------- «Финансовый анализ»: «Модель Дюпона» одной таблицей (решение 23.10, 29.10) ----------

   Одна таблица получает тот же механизм, что и таблица показателей: `.fin-scroll` и липкие
   шапку с «Фактором» (`opts.sticky` в `_klarTable`). Сетка общая карточная (`.tbl.fin-tbl`):
   числа справа, разряды и `tabular-nums` — её правила. Ширина названия повторяет широкие
   таблицы, чтобы длинное «Рентабельность капитала (ROE)» не растягивало сетку на узком экране.
   Цвета не вводятся: прочерк рисует `.fin-dash` выше. Отступ сверху блок получает общим ритмом
   раздела (30 px), а не своим полем. */
.tbl.fin-dupont th:first-child,
.tbl.fin-dupont tbody td:first-child,
.tbl.fin-trends th:first-child,
.tbl.fin-trends tbody td:first-child {
  width: clamp(168px, 18vw, 260px);
  min-width: 168px; max-width: 260px;
  white-space: normal; overflow-wrap: break-word;
}
@media (max-width: 768px) {
  .tbl.fin-dupont th:first-child,
  .tbl.fin-dupont tbody td:first-child,
  .tbl.fin-trends th:first-child,
  .tbl.fin-trends tbody td:first-child {
    width: clamp(132px, 34vw, 200px);
    min-width: 132px; max-width: 200px;
  }
}

/* Группа-разделитель — строкой на всю ширину; на узком экране таблица сама уезжает к последним
   годам, и подпись группы липнет слева, иначе от неё остаётся хвост «…за год, п. п.». */
.tbl.fin-dupont tbody td.fin-group {
  position: static; width: auto; min-width: 0; max-width: none;
}
.tbl.fin-dupont tbody td.fin-group .fin-group-label {
  position: sticky; left: 0; display: inline-block;
}
/* Один блок и одна таблица: уровни на конец года и влияние факторов под ними. Подпись о базе —
   над таблицей, вывод для СБ — сразу под ней, приём — последним. Вывод читается обычным текстом,
   а не тихой подписью: это смысл цифр, а не сноска. */
.fin-dupont-block .fin-note {
  margin: 0 0 10px;
  font-size: 13px; line-height: 1.5; color: var(--text2);
}
.fin-dupont-block .scroll-x + .fin-note { margin: 8px 0 0; }
.fin-dupont-block .fin-note.fin-dupont-comment {
  margin: 10px 0 0;
  color: var(--text);
}
.fin-dupont-block .fin-dupont-comment + .fin-note { margin-top: 8px; }

/* ---------- «Финансовый анализ»: «Что ухудшается» (23.10) ----------

   Ранние признаки стоят до графиков: до пяти фактов, каждый — показатель, длина серии, пара
   значений и «почему это важно» тихим текстом. Карточка та же, что у графиков; цвет есть только
   у метки серии — предупреждающий токен, не оценка. На узком экране строка складывается,
   значения и годы не переносятся по одному символу. */
.fin-worse {
  padding: 4px 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.fin-worse-row { padding: 12px 0; }
.fin-worse-row + .fin-worse-row { border-top: 1px solid var(--line); }
.fin-worse-head { display: flex; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; }
.fin-worse-name { font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--text); }
.fin-worse-period { font-size: 12px; line-height: 1.5; color: var(--text); white-space: nowrap; }
.fin-worse-period::before {
  content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px;
  border-radius: 50%; background: var(--warn); vertical-align: 1px;
}
.fin-worse-values {
  display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap;
  margin-top: 3px; font-size: 14px; line-height: 1.45; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.fin-worse-pair { white-space: nowrap; }
.fin-worse-years { font-size: 12px; line-height: 1.5; color: var(--text2); white-space: nowrap; }
.fin-worse-why { margin-top: 2px; font-size: 13px; line-height: 1.5; color: var(--text2); }
.fin-worse-quiet { padding: 12px 0; font-size: 13px; line-height: 1.5; color: var(--text2); }
@media (max-width: 480px) {
  .fin-worse { padding: 2px 14px; }
  .fin-worse-period { white-space: normal; }
}

/* ---------- «Финансовый анализ»: итог, две колонки и рынок (27.10) ----------

   «Итог» — первый экран: фраза-вывод, три числа с приростом, мини-график и три ориентира.
   Заголовок и дата — как у соседних блоков, без своей карточки (Роман, 01.11).
   Ниже одна карточка с двумя колонками движения; «Компания на рынке» — полоски долей и
   сетка медиан. Цвета только из темы: светлая и тёмная берут одни токены, новых палитр
   нет. На 390 всё складывается в одну колонку, полоски и сетка живут в своей ширине. */
.fin-sum { min-width: 0; }
.fin-sum-note {
  margin: -6px 0 10px; font-size: 13px; line-height: 1.4; color: var(--text3);
}
.fin-sum-lead {
  max-width: 76ch; margin: 9px 0 0;
  font-size: 21px; line-height: 1.35; font-weight: 400; color: var(--text);
}
.fin-sum-body {
  display: grid; grid-template-columns: 1.08fr .92fr;
  margin-top: 16px; border-top: 1px solid var(--line);
}
.fin-sum-body-single { grid-template-columns: 1fr; }
.fin-sum-nums { min-width: 0; padding: 4px 26px 8px 0; }
.fin-sum-num {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2px 16px;
  padding: 11px 0 10px; border-top: 1px solid var(--line);
}
.fin-sum-num:first-child { border-top: 0; }
.fin-sum-label {
  grid-column: 1; font-size: 11px; line-height: 15px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text2);
}
.fin-sum-value {
  grid-column: 1; display: flex; align-items: baseline; gap: 4px; margin-top: 2px;
  font-size: 29px; line-height: 1.1; font-weight: 600; letter-spacing: -.02em;
  color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.fin-sum-unit { font-size: 14px; line-height: 1.2; font-weight: 500; letter-spacing: 0; color: var(--text2); }
.fin-sum-foot {
  grid-column: 2; grid-row: 1 / span 2; align-self: end;
  display: flex; align-items: center; gap: 7px; padding-bottom: 3px;
}
.fin-sum-delta {
  display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 6px;
  font-size: 12px; line-height: 18px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.fin-sum-delta.up { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.fin-sum-delta.down { color: var(--err); background: color-mix(in srgb, var(--err) 12%, transparent); }
.fin-sum-delta.flat { color: var(--text2); background: var(--hover); }
.fin-sum-per { font-size: 11.5px; line-height: 18px; color: var(--text3); }
.fin-sum-chart { min-width: 0; padding: 14px 0 8px 24px; border-left: 1px solid var(--line); }
.fin-sum-chart-title {
  font-size: 11px; line-height: 16px; letter-spacing: .06em; text-transform: uppercase; color: var(--text2);
}
.fin-sum-legend {
  display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 7px;
  font-size: 11.5px; line-height: 16px; color: var(--text2);
}
.fin-sum-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.fin-sum-key { flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--text2); }
.fin-sum-key-rev { background: var(--accent-fill); opacity: .65; }
.fin-sum-key-profit { background: var(--ok); }
.fin-sum-key-loss { background: var(--err); }
.fin-sum-svg { display: block; width: 100%; height: auto; margin-top: 4px; overflow: visible; }
.fin-sum-zero { stroke: var(--line); stroke-width: 1; }
.fin-sum-bar-rev { fill: var(--accent-fill); opacity: .55; }
.fin-sum-bar-profit { fill: var(--ok); }
.fin-sum-bar-loss { fill: var(--err); }
.fin-sum-years {
  display: flex; justify-content: space-between; gap: 4px; margin-top: 2px;
  font-size: 11.5px; line-height: 16px; color: var(--text3); font-variant-numeric: tabular-nums;
}
.fin-sum-orients {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px; border-top: 1px solid var(--line);
}
.fin-sum-orients:empty { display: none; }
.fin-sum-orient { min-width: 0; padding: 12px 18px 14px 0; }
.fin-sum-orient + .fin-sum-orient { padding-left: 20px; border-left: 1px solid var(--line); }
.fin-sum-orient-label {
  font-size: 10.5px; line-height: 14px; letter-spacing: .07em; text-transform: uppercase; color: var(--text2);
}
.fin-sum-orient-value {
  margin-top: 3px; font-size: 15px; line-height: 21px; font-weight: 600;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.fin-sum-orient-sub { margin-top: 1px; font-size: 11.5px; line-height: 16px; color: var(--text3); }

.fin-split {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.fin-split-col { min-width: 0; padding: 14px 18px 6px; }
.fin-split-col + .fin-split-col { border-left: 1px solid var(--line); }
.fin-split-head {
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.fin-split-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--text3); }
.fin-split-dot-warn { background: var(--warn); }
.fin-split-dot-good { background: var(--ok); }
.fin-split-title {
  font-size: 12px; line-height: 18px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text2);
}
.fin-split-count { margin-left: auto; font-size: 11px; line-height: 18px; color: var(--text3); font-variant-numeric: tabular-nums; }
.fin-split .fin-worse, .fin-split .fin-improve { padding: 0; background: none; border: 0; border-radius: 0; }
.fin-split .fin-worse-row, .fin-split .fin-improve-row { padding: 10px 0 9px; }
.fin-split .fin-worse-name, .fin-split .fin-improve-name { font-size: 13.5px; line-height: 19px; }
.fin-split .fin-worse-pair, .fin-split .fin-improve-pair { font-size: 13.5px; line-height: 19px; }
.fin-split .fin-worse-why, .fin-split .fin-improve-why { margin-top: 1px; font-size: 12.5px; line-height: 18px; }
.fin-split .fin-worse-quiet, .fin-split .fin-improve-quiet { padding: 10px 0; font-size: 12.5px; line-height: 18px; }
.fin-improve-row + .fin-improve-row { border-top: 1px solid var(--line); }
.fin-improve-head { display: flex; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; }
.fin-improve-name { font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--text); }
.fin-improve-period { font-size: 12px; line-height: 1.5; color: var(--text); white-space: nowrap; }
.fin-improve-period::before {
  content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px;
  border-radius: 50%; background: var(--ok); vertical-align: 1px;
}
.fin-improve-values {
  display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap;
  margin-top: 3px; font-size: 14px; line-height: 1.45; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.fin-improve-pair { white-space: nowrap; }
.fin-improve-years { font-size: 12px; line-height: 1.5; color: var(--text2); white-space: nowrap; }
.fin-improve-why { margin-top: 2px; font-size: 13px; line-height: 1.5; color: var(--text2); }
.fin-improve-quiet { padding: 12px 0; font-size: 13px; line-height: 1.5; color: var(--text2); }

/* Блок — та же плашка карточки, поле держат её края; воздух блока — внутри плашки. */
.fin-mkt { padding: 0; }
.fin-mkt > .box-in { padding: 14px 16px 12px; }
.fin-mkt-head { display: flex; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; }
.fin-mkt-title {
  margin: 0; font-size: 14px; line-height: 20px; font-weight: 500;
  letter-spacing: 0; text-transform: none; color: var(--text);
}
.fin-mkt-kicker {
  font-size: 11px; line-height: 16px; letter-spacing: .075em;
  text-transform: uppercase; color: var(--text2);
}
.fin-mkt-sep { font-size: 11px; line-height: 16px; color: var(--text3); }
.fin-mkt-what { font-size: 14px; line-height: 20px; color: var(--text); }
.fin-mkt-code { font-size: 12px; line-height: 18px; color: var(--text3); }
.fin-mkt-count { font-size: 12px; line-height: 18px; color: var(--text2); }
.fin-mkt-lead { max-width: 76ch; margin: 10px 0 0; font-size: 21px; line-height: 1.35; color: var(--text); }
.fin-mkt-fallback { max-width: 76ch; margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: var(--text2); }
.fin-mkt-medians { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.fin-mkt-med-title { font-size: 11px; line-height: 16px; letter-spacing: .07em; text-transform: uppercase; color: var(--text2); }
/* Медианы группы — одна таблица, а не две колонки-группы с повтором шапки (Роман, 01.11).
   Ширины берутся у списка карточки: `tbl-list` держит первой текстовой колонке 240 px,
   тексту — потолок 68ch, числам — `num` справа и 1 %. Ширина 100 % — как у таблицы сумм:
   числа медиан стоят на правом крае блока, под числами сумм, а не «уезжают» влево. */
.fin-mkt-med-scroll { margin-top: 6px; }
.tbl.tbl-list.fin-mkt-med-table { width: 100%; }
.fin-mkt-med-table thead th { padding: 0 8px 6px; vertical-align: bottom; }
.fin-mkt-med-table thead th:first-child { padding-left: 0; text-align: left; }
.fin-mkt-med-table tbody td { padding: 5px 8px; vertical-align: top; border-top: 1px solid var(--line); }
.fin-mkt-med-table tbody td:first-child { padding-left: 0; }
.fin-mkt-med-name { font-size: 14px; line-height: 20px; font-weight: 400; color: var(--text); }
.fin-mkt-med-company, .fin-mkt-med-median, .fin-mkt-med-dev {
  font-size: 14px; line-height: 20px; text-align: right;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.fin-mkt-med-company { color: var(--text); }
.fin-mkt-med-median { color: var(--text3); }
.fin-mkt-med-num { font-variant-numeric: tabular-nums; }
/* Непересчитанная медиана: фраза в своей ячейке, переносится по словам (не по буквам)
   и целиком помещается в две строки даже в узкой карточке. */
.fin-mkt-med-note-cell { white-space: normal; }
.fin-mkt-med-note {
  display: inline-block; max-width: 17ch; white-space: normal; overflow-wrap: break-word;
  text-align: right; color: var(--text2);
}
.fin-mkt-sums { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.fin-mkt-sums-title { font-size: 11px; line-height: 16px; letter-spacing: .07em; text-transform: uppercase; color: var(--text2); }
.fin-mkt-sums-scroll { margin-top: 6px; overflow-x: auto; overflow-y: clip; }
.fin-mkt-sums-table { width: 100%; min-width: 560px; border-collapse: collapse; }
.fin-mkt-sums-table thead th { padding: 0 8px 6px; vertical-align: bottom; }
.fin-mkt-sums-table thead th:first-child { padding-left: 0; text-align: left; }
.fin-mkt-sums-table tbody th, .fin-mkt-sums-table tbody td {
  padding: 5px 8px; vertical-align: top; border-top: 1px solid var(--line);
}
.fin-mkt-sums-table tbody th:first-child { padding-left: 0; }
.fin-mkt-sums-name {
  font-size: 14px; line-height: 20px; font-weight: 400; text-align: left;
  color: var(--text); overflow-wrap: anywhere;
}
.fin-mkt-sums-cell { text-align: right; font-variant-numeric: tabular-nums; }
.fin-mkt-sums-sum { display: block; font-size: 14px; line-height: 20px; color: var(--text); white-space: nowrap; }
.fin-mkt-sums-share { display: block; font-size: 12px; line-height: 16px; color: var(--text3); white-space: nowrap; }
.fin-mkt-sums-head { display: block; }
.fin-mkt-sums-sub { display: block; margin-top: 1px; font-size: 10px; line-height: 13px; color: var(--text3); }
.fin-mkt-sums-more { margin-top: 8px; }
.fin-mkt-good { color: var(--ok); }
.fin-mkt-bad { color: var(--warn); }
.fin-mkt-note { margin-top: 12px; font-size: 11.5px; line-height: 16px; color: var(--text3); }
.fin-mkt-catalog, .fin-mkt-coverage {
  max-width: 76ch; margin: 8px 0 0; font-size: 12px; line-height: 17px; color: var(--text2);
}

@media (max-width: 720px) {
  .fin-sum-lead { font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; }
  .fin-sum-body { grid-template-columns: 1fr; }
  .fin-sum-nums { padding-right: 0; }
  .fin-sum-chart { margin-top: 4px; padding: 12px 0 8px; border-left: 0; border-top: 1px solid var(--line); }
  .fin-sum-orients { grid-template-columns: 1fr; }
  .fin-sum-orient { padding: 10px 0; }
  .fin-sum-orient + .fin-sum-orient { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .fin-split { grid-template-columns: 1fr; }
  .fin-split-col { padding: 12px 14px 4px; }
  .fin-split-col + .fin-split-col { border-left: 0; border-top: 1px solid var(--line); }
  .fin-mkt { padding: 14px 14px 12px; }
  .fin-mkt-what { font-size: 13.5px; line-height: 19px; }
  .fin-mkt-lead { font-size: 18px; overflow-wrap: anywhere; }
  /* Суммы на телефоне — карточками: значения подписаны, таблица не уезжает вбок. */
  .fin-mkt-sums-scroll { overflow: visible; }
  .fin-mkt-sums-table { min-width: 0; width: 100%; }
  .fin-mkt-sums-table thead { display: none; }
  .fin-mkt-sums-table, .fin-mkt-sums-table tbody { display: block; width: 100%; }
  .fin-mkt-sums-table tbody tr {
    display: block; padding: 9px 0; border-top: 1px solid var(--line);
  }
  .fin-mkt-sums-table tbody tr[hidden] { display: none; }
  .fin-mkt-sums-table tbody th, .fin-mkt-sums-table tbody td {
    display: block; padding: 1px 0; border: 0; text-align: left;
  }
  .fin-mkt-sums-table tbody th:first-child { padding-left: 0; }
  .fin-mkt-sums-name { margin-bottom: 3px; font-weight: 500; }
  .fin-mkt-sums-cell::before {
    content: attr(data-label) ': '; color: var(--text3); font-size: 12px;
  }
  .fin-mkt-sums-sum, .fin-mkt-sums-share { display: inline; white-space: normal; }
  .fin-mkt-sums-share::before { content: ' · '; color: var(--text3); }
  /* Медианы на телефоне — карточками: показатель во всю ширину, три значения с подписями
     в один ряд. Ни прокрутки вбок, ни букв в столбик: строки переносятся по словам. */
  .fin-mkt-med-scroll { overflow: visible; }
  .fin-mkt-med-table, .fin-mkt-med-table tbody { display: block; width: 100%; }
  .fin-mkt-med-table thead { display: none; }
  .fin-mkt-med-table tbody tr {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px 10px; padding: 9px 0 8px; border-top: 1px solid var(--line);
  }
  .fin-mkt-med-table tbody td { display: block; padding: 0; border: 0; white-space: normal; }
  .fin-mkt-med-name { grid-column: 1 / -1; margin-bottom: 3px; font-size: 13px; line-height: 18px; }
  .fin-mkt-med-company, .fin-mkt-med-median, .fin-mkt-med-dev {
    text-align: left; white-space: normal; font-size: 13px; line-height: 18px;
  }
  .fin-mkt-med-company::before, .fin-mkt-med-median::before, .fin-mkt-med-dev::before {
    content: attr(data-label); display: block; font-size: 10px; line-height: 13px;
    letter-spacing: .04em; text-transform: uppercase; color: var(--text3); font-weight: 400;
  }
  .fin-mkt-med-outdated .fin-mkt-med-median { grid-column: 2 / -1; }
  .fin-mkt-med-note { max-width: none; text-align: left; }
}

/* ---------- «Проверки → Контрагенты»: реестр кейсов (#5753) ----------

   Список и создание кейса. Таблица — десктопу (`.cc-tbl`), карточки — телефону (`.cc-cards`);
   цвета — токены темы, статус и риск читаются словом, а не только тоном. Отступы и ширину держат
   общие `.box`/`.nbar`/`.nlist` оболочки: своих полей и липких шапок экран не вводит. */

/* Окно создания: две колонки на десктопе, одна на телефоне; ошибка и кнопки — во всю ширину. */
.cc-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.cc-field { display: flex; flex-direction: column; gap: 4px; min-width: 0;
  color: var(--text2); font-size: 13px; }
.cc-field.cc-wide { grid-column: 1 / -1; }
.cc-required .cc-field-label::after { content: ' *'; color: var(--err); }
.cc-input { width: 100%; box-sizing: border-box; min-height: 38px; padding: 7px 10px;
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  font: inherit; font-size: 14px; line-height: 1.4; }
.cc-input:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
textarea.cc-input { min-height: 88px; resize: vertical; }
.cc-form-err { grid-column: 1 / -1; }
.cc-form-err:empty { display: none; }
.cc-form-act { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end;
  gap: 8px; }


.cc-list { padding-top: 6px; padding-bottom: 6px; }
.tbl.cc-tbl th { font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.tbl.cc-tbl td { vertical-align: top; }
.cc-tcell b { display: block; font-weight: 500; }
.cc-tcell .muted { display: block; font-size: 12px; line-height: 1.4; }

/* Бейдж статуса: слово — обычным текстом, тон — только подложкой (контраст AA в обеих темах). */
.cc-badge { display: inline-block; padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--hover); color: var(--text); font-size: 12px; line-height: 1.5; white-space: nowrap; }
.cc-badge.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); }
.cc-badge.bad { background: color-mix(in srgb, var(--err) 14%, transparent); }
.cc-badge.work, .cc-badge.return { background: color-mix(in srgb, var(--warn) 14%, transparent); }
.cc-badge.approval { background: color-mix(in srgb, var(--accent) 14%, transparent); }

/* Риск-индекс: число, прочерк из 100 и группа словом; цвет группы — у числа, в светлой теме
   тона затемнены до AA на белой плашке (--ok/--warn светлой темы для мелкого текста слабы). */
.cc-risk { display: inline-flex; align-items: baseline; gap: 2px; color: var(--text2);
  white-space: nowrap; }
.cc-risk b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cc-risk-of { font-size: 11px; }
.cc-risk-word { margin-left: 5px; font-size: 12px; }
.cc-risk.low b { color: var(--ok); }
.cc-risk.medium b { color: var(--warn); }
.cc-risk.high b { color: var(--err); }
.cc-risk.low .cc-risk-word { color: var(--ok); }
.cc-risk.medium .cc-risk-word { color: var(--warn); }
.cc-risk.high .cc-risk-word { color: var(--err); }
html[data-theme="light"] .cc-risk.low b, html[data-theme="light"] .cc-risk.low .cc-risk-word { color: #15803D; }
html[data-theme="light"] .cc-risk.medium b, html[data-theme="light"] .cc-risk.medium .cc-risk-word { color: #B45309; }
html[data-theme="light"] .cc-risk.high b, html[data-theme="light"] .cc-risk.high .cc-risk-word { color: #B91C1C; }

/* Причина отказа под бейджем: одна строка с многоточием, целиком — в подсказке. */
.cc-reason { display: block; max-width: 260px; margin-top: 4px; overflow: hidden;
  font-size: 12px; line-height: 1.4; color: var(--text2); text-overflow: ellipsis;
  white-space: nowrap; }
.cc-card-reason { margin-top: 6px; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }

/* Хвост списка: сколько показано и дозагрузка. */
.cc-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 10px 0 0; }
.cc-foot .btn { margin-left: auto; }

/* Телефонные карточки — вместо таблицы: те же поля столбиком, без прокрутки страницы вбок. */
.cc-cards { display: none; }
.cc-card { padding: 16px 2px; border-top: 1px solid var(--line); }
.cc-card:first-child { border-top: none; }
.cc-card-name { margin-top: 0; font-size: 17px; font-weight: 600; line-height: 1.3;
  overflow-wrap: anywhere; }
.cc-card-inn { margin-top: 2px; }
.cc-card .cc-tcell { margin-top: 8px; }
.cc-card .cc-tcell b { font-size: 14px; }
.cc-card .cc-tcell .muted { font-size: 13px; }
.cc-parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.cc-part { min-width: 0; }
.cc-part-label { display: block; font-size: 11px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text2); }
.cc-part b { display: block; margin-top: 2px; font-size: 14px; font-weight: 500;
  overflow-wrap: anywhere; }
.cc-part .muted { display: block; margin-top: 1px; font-size: 12px; line-height: 1.4; }

/* Карточка кейса в панели справа: номера, статус и риск, участники, основание, документ, история. */
.cc-case { display: flex; flex-direction: column; gap: 16px; }
.cc-case-ids { font-size: 13px; color: var(--text2); overflow-wrap: anywhere; }
.cc-case-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; }
.cc-case-top .cc-risk b { font-size: 26px; }
.cc-case-risk { text-align: right; }
.cc-parts-card { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0;
  padding-top: 0; border-top: none; }
.cc-case-about { padding-top: 14px; border-top: 1px solid var(--line); }
.cc-case-about .cap { margin-bottom: 10px; }
.cc-case-foot { display: flex; gap: 8px; }

/* Документ проверки: какой проверкой кейс подтверждён, её дата и хеш записи (ТЗ FR-05). */
.cc-case-report { display: flex; flex-direction: column; gap: 10px; padding-top: 14px;
  border-top: 1px solid var(--line); }
.cc-case-report .cap { margin-bottom: 0; }
.cc-case-report .kv { margin: 0; }
.cc-case-report .btn { align-self: flex-start; }
.cc-hash { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; overflow-wrap: anywhere; }
.cc-report-err:empty { display: none; }
/* Подсказка формы создания о готовом отчёте: строка во всю ширину сетки полей. */
.cc-report-hint { grid-column: 1 / -1; min-height: 18px; font-size: 13px; line-height: 1.45;
  overflow-wrap: anywhere; }
.cc-report-hint b { font-weight: 600; }
.cc-report-hint .muted { font-size: 13px; }

/* Решение в карточке кейса: текущий шаг маршрута, комментарий и действия (ТЗ §6.3). */
.cc-decide { display: flex; flex-direction: column; gap: 10px; padding-top: 14px;
  border-top: 1px solid var(--line); }
.cc-decide .cap { margin-bottom: 0; }
.cc-decide-step { margin: 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.cc-decide .muted { margin: 0; font-size: 13px; line-height: 1.5; }
.cc-comment { width: 100%; box-sizing: border-box; min-height: 88px; padding: 10px 12px;
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  font: inherit; font-size: 14px; line-height: 1.5; resize: vertical; }
.cc-comment:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.cc-decide-act { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-decide-act .btn { min-height: 36px; }

/* Документы кейса (#5753): обязательные виды, файлы с проверкой и загрузка. */
.cc-case-docs { display: flex; flex-direction: column; gap: 10px; padding-top: 14px;
  border-top: 1px solid var(--line); }
.cc-case-docs .cap { margin-bottom: 0; }
.cc-doc-req { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-doc-req-item { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px;
  border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--text2); }
.cc-doc-req-item.ok { color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.cc-doc-list { display: flex; flex-direction: column; gap: 8px; }
.cc-doc { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; }
.cc-doc-top { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.cc-doc-kind { font-size: 14px; }
.cc-doc-name { font-size: 13px; color: var(--text2); overflow-wrap: anywhere; }
.cc-doc-top .cc-badge { margin-left: auto; }
.cc-doc-meta { font-size: 12px; line-height: 1.45; }
.cc-doc-comment { font-size: 13px; line-height: 1.45; color: var(--err);
  overflow-wrap: anywhere; }
.cc-doc-note { width: 100%; box-sizing: border-box; min-height: 56px; padding: 8px 10px;
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  font: inherit; font-size: 13px; resize: vertical; }
.cc-doc-note:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.cc-doc-act { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-doc-act .btn { min-height: 36px; }
.cc-doc-err { font-size: 13px; line-height: 1.45; color: var(--err); overflow-wrap: anywhere; }
.cc-doc-err:empty { display: none; }
.cc-doc-warn { color: var(--err); }
.cc-doc-upload { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.cc-doc-upload > b { grid-column: 1 / -1; font-size: 13px; }
.cc-doc-upload .cc-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cc-doc-upload .cc-field-label { font-size: 12px; color: var(--text2); }
.cc-doc-upload .cc-input, .cc-doc-upload .cc-doc-file { width: 100%; box-sizing: border-box;
  min-height: 38px; padding: 8px 10px; background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; }
.cc-doc-upload .cc-doc-file { padding: 6px 8px; }
.cc-doc-upload .cc-doc-err, .cc-doc-upload .cc-doc-act { grid-column: 1 / -1; }

/* Выбор проверяющего (ТЗ FR-04): окно с поиском по имени, списком сотрудников пространства,
   отметками «текущий» и «это вы» и причиной переназначения. Строка списка — цель нажатия не
   меньше 44px: на телефоне это единственный размер, на десктопе — удобная высота. */
.cc-pick-note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text2); }
.cc-pick-search { margin-top: 12px; }
.cc-pick-list { display: flex; flex-direction: column; max-height: 280px; margin-top: 10px;
  border: 1px solid var(--line); border-radius: 10px; overflow-y: auto; }
.cc-pick-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; width: 100%;
  min-height: 44px; padding: 8px 12px; background: none; border: none;
  border-top: 1px solid var(--line); color: var(--text); font: inherit; text-align: left;
  cursor: pointer; }
.cc-pick-row:first-child { border-top: none; }
.cc-pick-row:hover { background: var(--hover); }
.cc-pick-row:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.cc-pick-row[aria-pressed="true"] { background: var(--on); }
.cc-pick-name { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.cc-pick-tag { padding: 1px 7px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 11px; color: var(--text2); }
.cc-pick-role { margin-left: auto; font-size: 12px; color: var(--text2); white-space: nowrap; }
.cc-pick-empty { padding: 14px 12px; font-size: 13px; line-height: 1.5; color: var(--text2); }
.cc-pick-empty .btn { margin-top: 10px; }
.cc-pick-hint { margin: 0; font-size: 12px; line-height: 1.45; color: var(--text2); }
.cc-pick-hint:empty { display: none; }
.cc-pick-reason { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.cc-pick-reason[hidden] { display: none; }
.cc-pick-reason-cap { font-size: 12px; font-weight: 500; color: var(--text2); }
.cc-pick-err:empty { display: none; }
.cc-pick-act { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end;
  margin-top: 14px; }

/* История кейса: вертикальный таймлайн — точка, слово, кто и когда (append-only). */
.cc-tl { display: flex; flex-direction: column; }
.cc-ev { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 8px; padding: 8px 0;
  position: relative; }
.cc-ev:not(:last-child)::before {
  content: ''; position: absolute; left: 3px; top: 22px; bottom: -2px; width: 1px;
  background: var(--line);
}
.cc-ev-dot { width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; background: var(--frag); }
.cc-ev-main { min-width: 0; overflow-wrap: anywhere; }
.cc-ev-head { font-size: 13px; line-height: 1.45; }
.cc-ev-move { margin-top: 2px; font-size: 13px; color: var(--text2); }
.cc-ev-comment { margin-top: 4px; font-size: 13px; line-height: 1.45; color: var(--text); }

/* Маршруты согласования (#5753): кнопка администратора установки в полосе, панель со списком версий
   и конструктор шагов. Строка версии — карточкой: имя и статус, версия/область/шаги, условия, кто и когда.
   Конструктор — сетка 2×N, на телефоне в одну колонку: шапка, условия выбора, шаги, окно публикации. */
.cc-routes { display: flex; flex-direction: column; gap: 14px; }
.cc-routes-intro { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text2); }
.cc-routes-err:empty { display: none; }
.cc-routes-list { display: flex; flex-direction: column; }
.cc-route { display: flex; flex-direction: column; gap: 5px; padding: 14px 0;
  border-top: 1px solid var(--line); }
.cc-route:first-child { padding-top: 0; border-top: none; }
.cc-route-top { display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 8px 12px; }
.cc-route-name { min-width: 0; font-size: 15px; font-weight: 600; line-height: 1.4;
  overflow-wrap: anywhere; }
.cc-route-meta { font-size: 13px; line-height: 1.5; color: var(--text2); overflow-wrap: anywhere; }
.cc-route-act { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 6px; }
.cc-route-own { font-size: 12px; line-height: 1.4; color: var(--text2); }
.cc-routes-foot { display: flex; gap: 8px; }
.cc-routes-foot .btn { flex: 1 1 auto; }

.cc-conditions { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; }
.cc-conditions-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.cc-conditions-head b { font-size: 14px; }
.cc-conditions-head .muted { font-size: 12px; }
.cc-conditions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.cc-route-lead { grid-column: 1 / -1; margin: 0; font-size: 13px; line-height: 1.5; color: var(--text2); }

.cc-steps { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; }
.cc-steps-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.cc-steps-head b { font-size: 14px; }
.cc-steps-head .muted { font-size: 12px; }
.cc-steps-list { display: flex; flex-direction: column; gap: 10px; }
.cc-step { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.cc-step-head { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 8px; }
.cc-step-head b { font-size: 13px; }
.cc-step-del { min-height: 32px; }
.cc-step-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.cc-check-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.cc-check { display: flex; align-items: center; gap: 8px; min-height: 32px; color: var(--text2);
  font-size: 13px; }
.cc-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent-fill); }
.cc-step-add { align-self: flex-start; }
.cc-route-form .cc-field[hidden] { display: none; }

@media (max-width: 700px) {
  .tbl.cc-tbl { display: none; }
  .cc-cards { display: block; }
  .cc-foot .btn { min-height: 44px; }
  .cc-case-foot .btn { min-height: 44px; flex: 1 1 auto; justify-content: center; }
  .cc-case-report .btn { min-height: 44px; align-self: stretch; justify-content: center; }
  .cc-doc-act .btn { min-height: 44px; flex: 1 1 auto; }
  .cc-doc-upload { grid-template-columns: minmax(0, 1fr); }
  .cc-doc-upload .cc-input, .cc-doc-upload .cc-doc-file { min-height: 44px; }
  .cc-doc-note { min-height: 72px; }
  .cc-comment { min-height: 96px; }
  .cc-decide-act .btn { min-height: 44px; flex: 1 1 auto; }
  /* Выбор проверяющего: список не выше половины экрана, кнопки окна — в одну строку по 44px. */
  .cc-pick-list { max-height: 50vh; }
  .cc-pick-act .btn { min-height: 44px; flex: 1 1 auto; }
  /* Создание: форма в одну колонку, поля и кнопки 44px, шаги — тоже в одну колонку. */
  .cc-form { grid-template-columns: minmax(0, 1fr); }
  .cc-input { min-height: 44px; font-size: 16px; }
  textarea.cc-input { min-height: 96px; }
  .cc-form-act .btn { min-height: 44px; flex: 1 1 auto; }
  .cc-step-grid { grid-template-columns: minmax(0, 1fr); }
  .cc-conditions-grid { grid-template-columns: minmax(0, 1fr); }
  .cc-step-del, .cc-step-add { min-height: 44px; }
  .cc-check { min-height: 44px; }
  .cc-route-act .btn { min-height: 44px; flex: 1 1 auto; }
  .cc-routes-foot .btn { min-height: 44px; }
}

/* Мониторинг контрагентов (#5769): лента событий и раздел «События» карточки */
.watch-feed { display: flex; flex-direction: column; gap: 10px; }
.watch-row { background: var(--plate); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.watch-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.watch-title, .watch-company { font-weight: 600; }
.watch-head + .watch-title { margin-top: 4px; }
.watch-level { font-size: 12px; padding: 1px 8px; border-radius: 10px; border: 1px solid currentColor; }
.watch-level.high { color: var(--risk); }
.watch-level.medium { color: var(--warn); }
.watch-level.info { color: var(--accent); }
.watch-change { margin-top: 4px; }
.watch-meta { margin-top: 4px; font-size: 13px; }
.watch-chip { margin: 6px 0; font-size: 13px; }

.cc-case-link { margin-left: 8px; }

.cc-case-changes { margin-top: 16px; }
.cc-change { padding: 8px 0; border-bottom: 1px solid var(--line); }
.cc-change:last-child { border-bottom: 0; padding-bottom: 0; }
.cc-change-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cc-change-diff { margin-top: 3px; color: var(--text-2); font-size: 13px; word-break: break-word; }
.cc-change-meta { margin-top: 3px; font-size: 12px; }
@media (max-width: 720px) {
  .cc-change-head { align-items: flex-start; }
  .cc-change-diff { overflow-wrap: anywhere; }
}
/* Банкротства карточки (#5476): дело своей карточкой, сообщения с результатом — таблицей под ним. */
.bk-case-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 0 0 8px; }
.bk-case-no { font-size: 15px; }
.bk-case-status { font-size: 12px; padding: 1px 8px; border-radius: 10px;
  border: 1px solid var(--line); color: var(--text2); }
.bk-case { border: 1px solid var(--line); }
.bk-case .kv { margin: 0; }
.bk-cases-told { margin: 0 0 10px; }
.bk-msgs-cap { margin: 12px 0 6px; font-size: 13px; color: var(--text2); }
.bk-msgs-empty { margin: 10px 0 0; }
/* У человека раздел «Банкротство» остаётся прежним: сообщения ЕФРСБ с номером дела. */
.tbl.bk-msgs th:nth-child(1), .tbl.bk-msgs td:nth-child(1) { width: 7.5em; white-space: nowrap; }
.tbl.bk-msgs th:nth-child(2), .tbl.bk-msgs td:nth-child(2) { overflow-wrap: anywhere; }
.tbl.bk-msgs th:nth-child(3), .tbl.bk-msgs td:nth-child(3) { width: 1%; white-space: nowrap; }
.tbl.bk-case-msgs th:nth-child(1), .tbl.bk-case-msgs td:nth-child(1) { width: 7.5em; white-space: nowrap; }
.tbl.bk-case-msgs th:nth-child(2), .tbl.bk-case-msgs td:nth-child(2),
.tbl.bk-case-msgs th:nth-child(3), .tbl.bk-case-msgs td:nth-child(3) { overflow-wrap: anywhere; }
@media (max-width: 700px) {
  /* Человеку номер дела в каждой строке не нужен: дело названо в «Текущем состоянии». */
  .tbl.bk-msgs th:nth-child(3), .tbl.bk-msgs td:nth-child(3) { display: none; }
  .tbl.bk-msgs th:nth-child(1), .tbl.bk-msgs td:nth-child(1) { width: 6.5em; }
  .tbl.bk-msgs th:nth-child(2), .tbl.bk-msgs td:nth-child(2) { padding-right: 0; }
  .tbl.bk-case-msgs { font-size: 13px; }
  .tbl.bk-case-msgs th, .tbl.bk-case-msgs td { padding-right: 8px; }
  .tbl.bk-case-msgs th:nth-child(1), .tbl.bk-case-msgs td:nth-child(1) { width: 6.5em; }
}

/* «Настройки → Карточка» (#5476): редактор раскладки и предпросмотр настоящей карточки.
   Только этот экран: ширина, шрифты и таблицы самой карточки остаются в `klar.html`. */
.ce-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 8px; }
.ce-bar .seg { margin: 0; }
.ce-record { flex: 0 1 220px; width: 220px; font-variant-numeric: tabular-nums; }
.ce-status { margin: 0 0 14px; font-size: 13px; color: var(--text2); }
.ce-update { margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; font-size: 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent); }
.ce-new { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 8px;
  font-size: 11px; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); }
.ce-problems { margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; font-size: 13px;
  border: 1px solid color-mix(in srgb, var(--risk) 55%, transparent);
  background: color-mix(in srgb, var(--risk) 8%, transparent); }
.ce-problems b { display: block; margin-bottom: 4px; }
.ce-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 560px); gap: 20px;
  align-items: start; }
.ce-main, .ce-side { min-width: 0; }
.ce-side { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.ce-sec { margin: 0 0 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.ce-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 10px; }
.ce-head .st-in { flex: 1 1 160px; width: auto; min-width: 120px; }
.ce-head .st-sel { flex: 0 1 210px; min-width: 150px; }
.ce-handle { cursor: grab; color: var(--text3); font-size: 15px; line-height: 1; user-select: none;
  -webkit-user-drag: element; }
.ce-handle:active, .ce-drag .ce-handle { cursor: grabbing; }
/* Пока тащат, поля и кнопки редактора не ловят мышь: drop достаётся строке, а не полю ввода. */
.ce-dragging .ce-root input, .ce-dragging .ce-root select,
.ce-dragging .ce-root button, .ce-dragging .ce-root label { pointer-events: none; }
.ce-sec, .ce-block { position: relative; }
.ce-sec.ce-drag, .ce-block.ce-drag { opacity: .55; }
/* Место вставки при перетаскивании — линия у верхней или нижней границы строки. */
.ce-sec.ce-drop-before::before, .ce-sec.ce-drop-after::after,
.ce-block.ce-drop-before::before, .ce-block.ce-drop-after::after {
  content: ''; position: absolute; left: 4px; right: 4px; height: 2px; border-radius: 2px;
  background: var(--accent); pointer-events: none; z-index: 1; }
.ce-sec.ce-drop-before::before, .ce-block.ce-drop-before::before { top: -2px; }
.ce-sec.ce-drop-after::after, .ce-block.ce-drop-after::after { bottom: -2px; }
.ce-meta { padding: 0 10px 8px 34px; font-size: 11.5px; color: var(--text3); overflow-wrap: anywhere; }
.ce-lock { padding: 2px 8px; border-radius: 8px; border: 1px solid var(--line);
  color: var(--text3); font-size: 11px; white-space: nowrap; }
/* Группа раздела настроек: подпись и поле — в строке редактора, как заголовок и условие карточки. */
.ce-group { display: inline-flex; align-items: center; gap: 6px; color: var(--text2); font-size: 12px; }
.ce-group .st-in { flex: 1 1 130px; width: auto; min-width: 110px; }
.ce-group-word { white-space: nowrap; color: var(--text3); }
.ce-renderer { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; color: var(--text2); }
.ce-blocks { margin: 0 8px 8px 24px; border-left: 1px solid var(--line); }
.ce-block { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  padding: 7px 8px; border-top: 1px solid var(--line); }
.ce-block .st-in { flex: 1 1 150px; width: auto; min-width: 110px; }
.ce-block .st-sel { flex: 0 1 190px; min-width: 140px; }
.ce-block .ce-meta { padding: 0; flex-basis: 100%; }
.ce-hrow { border-top: 1px solid var(--line); padding: 7px 0; }
.ce-arrows { display: inline-flex; gap: 2px; flex: none; }
.ce-arrow { padding: 3px 7px; font-size: 12px; line-height: 1.2; }
.ce-errors:empty { display: none; }
.ce-errors { flex-basis: 100%; }
.ce-err { margin: 2px 0; color: var(--risk); font-size: 12px; overflow-wrap: anywhere; }
.st-in.bad { border-color: var(--risk); }
.ce-note { width: min(520px, 100%); }
.ce-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 20px; }
.ce-ver { padding: 8px 0; border-top: 1px solid var(--line); }
.ce-ver:first-of-type { border-top: none; }
.ce-ver-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; }
.ce-ver-head .st-foot { margin-left: auto; }
.ce-ver-note { margin-top: 3px; font-size: 12.5px; color: var(--text2); overflow-wrap: anywhere; }
.ce-tag { padding: 1px 7px; border-radius: 9px; border: 1px solid var(--line); font-size: 11px; color: var(--text2); }
.ce-tag-published { color: var(--st-ok); border-color: color-mix(in srgb, var(--st-ok) 55%, transparent); }
.ce-tag-draft { color: var(--st-warn); border-color: color-mix(in srgb, var(--st-warn) 55%, transparent); }
.ce-compare-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ce-compare-head h4 { margin: 0; }
.ce-diff { max-height: 420px; overflow: auto; margin: 6px 0 0; padding: 8px 10px; border-radius: 8px;
  background: var(--bg); font: 12px/1.55 ui-monospace, Menlo, monospace; white-space: pre-wrap;
  overflow-wrap: anywhere; }
.ce-diff-line { padding: 0 4px; border-radius: 3px; }
.ce-diff-add { background: color-mix(in srgb, var(--st-ok) 14%, transparent); }
.ce-diff-del { background: color-mix(in srgb, var(--risk) 14%, transparent); }
.ce-diff-same { color: var(--text2); }
.ce-prev { border: 1px solid var(--line); border-radius: 12px; background: var(--plate); overflow: hidden; }
.ce-prev-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px; padding: 10px 12px 0; }
.ce-prev-head > .st-hint, .ce-prev > .st-hint { padding: 0 12px; }
.ce-prev-body { max-height: 68vh; overflow: auto; padding: 0 12px 12px; }
.ce-prev .card-prev { display: block; }
.ce-prev .card-prev .card-main { padding: 0; }
.ce-prev .card-prev .chead { position: static; padding-top: 4px; }
.cprev-nav { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 6px 0 12px; }
.cprev-grp { flex-basis: 100%; margin-top: 4px; font-size: 11px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--text3); }
.cprev-sec { padding: 3px 9px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--text2); font: inherit; font-size: 12.5px; cursor: pointer; }
.cprev-sec.on { color: var(--text); border-color: var(--accent); }
.cprev-sec .n { margin-left: 6px; color: var(--text3); font-size: 11.5px; }
.cprev-sec:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
@media (max-width: 1100px) {
  .ce-wrap { grid-template-columns: minmax(0, 1fr); }
  .ce-side { position: static; max-height: none; overflow: visible; }
  .ce-prev-body { max-height: none; }
}
@media (max-width: 700px) {
  .ce-head .st-sel, .ce-block .st-sel { flex-basis: 100%; }
  .ce-blocks { margin-left: 8px; }
  .ce-arrow { min-width: 40px; min-height: 34px; }
}

/* Раздел «Вакансии» (#6063): строка «всего N» площадки. */
.vac-total { margin-bottom: 4px; }

/* ---------- Полноэкранная проверка и новая заявка (#5476, задача 14) ----------
   Проверка — рабочее место СЭБ: две зоны на всю ширину, слева ход проверки и документы,
   справа заявка, маршрут, участники, решение и история. Экран живёт в рамке оболочки,
   поэтому ширина берётся у `.content`, а `case-page` снимает её потолок 1320 px. */
body.case-page .content { max-width: none; }
body.case-page .content.has-page-frame { background: transparent; }
.cs-head { display: flex; align-items: flex-start; gap: 12px 18px; flex-wrap: wrap;
  padding: 4px 0 16px; }
.cs-back { flex: none; margin-top: 6px; font-size: 13px; color: var(--text2);
  text-decoration: none; white-space: nowrap; }
.cs-back:hover, .cs-back:focus-visible { color: var(--text); text-decoration: underline;
  text-underline-offset: 3px; }
.cs-back:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; border-radius: 4px; }
.cs-head-main { flex: 1 1 360px; min-width: 0; }
.cs-h1 { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em;
  overflow-wrap: anywhere; }
.cs-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 7px;
  font-size: 13px; line-height: 1.5; color: var(--text2); }
.cs-meta-item { white-space: nowrap; }
.cs-overdue { color: var(--err); }
.cs-source-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px;
  border: 1px solid var(--line); font-size: 12px; color: var(--text2); }
.cs-head-act { flex: none; margin-top: 2px; min-height: 40px; padding: 8px 18px; font-size: 14px; }
.cs-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(330px, 1fr);
  gap: 16px; align-items: start; }
.cs-main, .cs-side { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cs-side { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto;
  padding-right: 4px; scrollbar-gutter: stable; }
.cs-block { min-width: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--plate); }
.cs-block-title { margin: 0 0 12px; font-size: 16px; line-height: 1.3; font-weight: 700; }
.cs-block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 12px; }
.cs-block-head .cs-block-title { margin: 0; }
.cs-sub-title { margin: 16px 0 8px; font-size: 13px; line-height: 1.4; font-weight: 600;
  color: var(--text2); }
.cs-block > .cs-sub-title:first-child { margin-top: 0; }
.cs-note { margin: 8px 0; font-size: 12.5px; line-height: 1.5; color: var(--text2); }
.cs-err { font-size: 13px; line-height: 1.45; color: var(--err); overflow-wrap: anywhere; }
.cs-err:empty { display: none; }
.cs-miss { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px; }
.cs-miss .cs-back { margin-top: 0; }
.cs-act-row, .cs-act-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.cs-act-line .cs-err { flex-basis: 100%; }

/* Шаги проверки: пройденные — цветом, текущий — кольцом, впереди — тихие. */
.cs-steps { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; margin: 0 0 16px;
  padding: 0; list-style: none; }
.cs-step { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text3); }
.cs-step-dot { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--panel-2); flex: none; }
.cs-step.done .cs-step-dot { background: var(--ok); border-color: var(--ok); }
.cs-step.now .cs-step-dot { background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--on); }
.cs-step.done, .cs-step.now { color: var(--text); }
.cs-step.now { font-weight: 600; }
.cs-step-line { width: 26px; height: 1px; margin: 0 8px; background: var(--line); }
.cs-risk { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 10px 12px;
  margin-bottom: 10px; border-radius: 10px; background: var(--panel); }
.cs-risk-cap { font-size: 13px; color: var(--text2); }
.cs-risk .cc-risk b { font-size: 26px; }
.cs-risk-note { font-size: 12px; color: var(--text3); }
.cs-results { padding-top: 12px; border-top: 1px solid var(--line); }
.cs-results .kv { margin: 0; }
.cs-report .btn { margin-top: 10px; }
.cs-parts .kv, .cs-block .kv { margin: 0; }

/* Маршрут: шаг, кто согласует и что с ним сейчас. */
.cs-route { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.cs-route-step { display: flex; flex-direction: column; gap: 1px; padding-left: 12px;
  border-left: 2px solid var(--line); }
.cs-route-step.done { border-left-color: var(--ok); }
.cs-route-step.now { border-left-color: var(--accent); }
.cs-route-name { font-size: 13px; line-height: 1.4; }
.cs-route-meta { font-size: 12px; line-height: 1.45; color: var(--text2); overflow-wrap: anywhere; }

/* Участники: подпись, имя и время одной тихой строкой. */
.cs-person { display: flex; flex-direction: column; gap: 1px; padding: 7px 0;
  border-top: 1px solid var(--line); }
.cs-person:first-of-type { border-top: 0; padding-top: 0; }
.cs-person-cap { font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--text3); }
.cs-person b { font-size: 13.5px; line-height: 1.4; }
.cs-person-sub { font-size: 12px; color: var(--text2); }
.cs-action .cs-comment { width: 100%; }
.cs-history .cc-tl { max-height: 420px; overflow-y: auto; padding-right: 4px; }

/* Документы: заметная кнопка над списком, строки без приёмки и большая область просмотра. */
.cs-add-doc { min-height: 36px; }
.cs-doc-list { display: flex; flex-direction: column; }
.cs-doc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 0; border-top: 1px solid var(--line); }
.cs-doc-row:first-child { border-top: 0; padding-top: 0; }
.cs-doc-row.is-open { background: var(--on); }
.cs-doc-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cs-doc-kind { font-size: 13px; line-height: 1.4; }
.cs-doc-name { font-size: 13px; color: var(--text2); overflow-wrap: anywhere; }
.cs-doc-meta { font-size: 12px; line-height: 1.45; color: var(--text3); }
.cs-doc-open { flex: none; min-height: 34px; }
.cs-viewer { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); overflow: hidden; }
.cs-viewer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.cs-viewer-about { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cs-viewer-about b { font-size: 13.5px; overflow-wrap: anywhere; }
.cs-viewer-meta { font-size: 12px; line-height: 1.45; color: var(--text3); }
.cs-viewer-act { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.cs-viewer-act .btn { min-height: 32px; padding: 6px 12px; }
.cs-viewer-close { border: 0; background: none; color: var(--text2); font-size: 20px;
  line-height: 1; padding: 4px 6px; cursor: pointer; }
.cs-viewer-close:hover, .cs-viewer-close:focus-visible { color: var(--text); }
.cs-viewer-close:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }
.cs-viewer-body { min-height: 260px; display: flex; flex-direction: column; }
.cs-viewer-body .cwait, .cs-viewer-body .empty { margin: 16px; }
.cs-viewer-empty { display: flex; align-items: center; justify-content: center; min-height: 150px;
  padding: 20px; font-size: 13px; line-height: 1.5; color: var(--text3); text-align: center;
  border: 1px dashed var(--line); border-radius: 8px; margin: 14px; }
.cs-viewer-pdf, .cs-viewer-html { width: 100%; height: 62vh; min-height: 420px; border: 0;
  background: var(--plate); }
.cs-viewer-img { display: block; max-width: 100%; max-height: 62vh; margin: 0 auto; padding: 12px; }
.cs-viewer-text { margin: 0; padding: 14px 16px; max-height: 62vh; overflow: auto;
  font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap;
  overflow-wrap: anywhere; color: var(--text); }
.cs-ai-note { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); font-size: 13px; line-height: 1.5; }
.cs-viewer-note { padding: 9px 14px; border-top: 1px solid var(--line); font-size: 12.5px;
  line-height: 1.5; color: var(--text2); }
.cs-viewer-note:empty { display: none; }
.cs-viewer-note .muted { color: var(--text2); }

/* Новая заявка: слева поиск и выбранный объект, справа шесть полей. */
.cs-new-head .cs-new-sub { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--text2); }
.cs-search-form { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.cs-search-input { flex: 1 1 220px; min-width: 0; }
.cs-picks { display: flex; flex-direction: column; gap: 10px; }
.cs-pick-list { display: flex; flex-direction: column; gap: 6px; }
.cs-pick { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--plate); color: var(--text);
  font: inherit; text-align: left; cursor: pointer; }
.cs-pick:hover, .cs-pick:focus-visible { border-color: var(--accent); background: var(--hover); }
.cs-pick:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.cs-pick-name { font-size: 14px; font-weight: 600; line-height: 1.35; }
.cs-pick-ids, .cs-pick-extra { font-size: 12.5px; line-height: 1.45; color: var(--text2); }
.cs-picked-card { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; margin-bottom: 14px; border: 1px solid var(--accent);
  border-radius: 10px; background: var(--on); }
.cs-picked-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cs-picked-name { font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.cs-picked-ids, .cs-picked-note { font-size: 12.5px; color: var(--text2); }
.cs-new-form .cs-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
/* Окно «Добавить документ»: поле источника есть только у вида, который приносит ФНС (#5476). */
.cs-form .cc-field[hidden] { display: none; }
.cs-new-form .cc-field { display: flex; flex-direction: column; gap: 5px; }
.cs-new-form .cc-field-label { font-size: 12px; color: var(--text2); }
.cs-new-form .cc-input { width: 100%; }
.cs-readonly { padding: 8px 10px; border: 1px dashed var(--line); border-radius: 8px;
  font-size: 13px; color: var(--text2); }
.cs-new-act { justify-content: flex-start; }
.cs-new-grid .cs-main { gap: 14px; }

@media (max-width: 1100px) {
  .cs-grid { grid-template-columns: minmax(0, 1fr); }
  .cs-side { position: static; max-height: none; overflow: visible; padding-right: 0; }
  .cs-viewer-pdf, .cs-viewer-html { height: 55vh; min-height: 320px; }
}
@media (max-width: 700px) {
  .cs-head { gap: 8px 12px; padding-bottom: 12px; }
  .cs-h1 { font-size: 20px; }
  .cs-head-act { flex: 1 1 100%; width: 100%; }
  .cs-block { padding: 14px; }
  .cs-step-line { width: 14px; margin: 0 4px; }
  .cs-step { font-size: 11.5px; }
  .cs-doc-row { align-items: flex-start; flex-direction: column; gap: 8px; }
  .cs-doc-open { width: 100%; min-height: 44px; }
  .cs-viewer-act { width: 100%; }
  .cs-viewer-act .btn { flex: 1 1 auto; min-height: 40px; }
  .cs-viewer-pdf, .cs-viewer-html { height: 50vh; min-height: 260px; }
  .cs-picked-card { flex-direction: column; align-items: flex-start; }
  .cs-search-form .btn { flex: 1 1 100%; min-height: 44px; }
  .cs-search-input { min-height: 44px; }
  .cs-new-act .btn { min-height: 44px; }
}
.cs-new-hint { margin-top: 2px; }
.cs-new-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 7px;
  font-size: 13px; line-height: 1.55; color: var(--text2); }
.cs-new-steps li::marker { color: var(--accent); font-weight: 600; }
@media (min-width: 1101px) {
  .cs-new-grid { min-height: calc(100vh - 200px); }
}

/* ---------- «Отчеты» проверок (#5476): панель справа — сводка за период ---------- */
/* Панель — общая `kside`: тело только раскладывает секции, сводку и два разреза. */
.cr { display: flex; flex-direction: column; gap: 14px; }
.cr-lead { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--text2); }
.cr-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; }
.cr-field { display: flex; flex-direction: column; gap: 4px; }
.cr-field-cap { font-size: 11px; line-height: 14px; color: var(--text2); }
.cr-select, .cr-date input { box-sizing: border-box; height: 32px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--plate);
  color: var(--text); font: inherit; font-size: 13px; }
.cr-date input { width: 132px; }
.cr-show { height: 32px; }
/* Авторский display у полей и кнопки перебил бы UA-правило `[hidden]`: своё правило здесь. */
.cr-field[hidden], .cr-show[hidden] { display: none; }
.cr-err:empty, .cr-summary:empty, .cr-section:empty, .cr-note:empty { display: none; }
.cr-err { padding: 8px 10px; border: 1px solid var(--err); border-radius: 8px;
  font-size: 12.5px; line-height: 1.45; color: var(--err);
  background: color-mix(in srgb, var(--err) 8%, var(--plate)); }
.cr-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cr-card { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--plate); }
.cr-card b { font-size: 20px; line-height: 24px; font-weight: 600; color: var(--text); }
.cr-card span { font-size: 11.5px; line-height: 15px; color: var(--text2); }
.cr-block { display: flex; flex-direction: column; gap: 2px; }
.cr-block-title { margin: 0 0 6px; font-size: 14px; font-weight: 600; line-height: 20px;
  color: var(--text); }
.cr-tbl { width: 100%; border-collapse: collapse; table-layout: fixed;
  font-size: 12.5px; line-height: 18px; }
.cr-tbl th { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left;
  font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--tbl-head); }
.cr-tbl td { padding: 6px 4px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.cr-tbl th:first-child, .cr-tbl td:first-child { width: 42%; }
.cr-tbl th:not(:first-child), .cr-tbl td:not(:first-child) { text-align: right;
  white-space: nowrap; }
.cr-tbl .cr-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.cr-empty, .cr-hint { margin: 2px 0 0; font-size: 12px; line-height: 1.45; color: var(--text2); }
.cr-note { font-size: 12px; line-height: 1.45; color: var(--text2); }
.cr-foot { display: flex; gap: 8px; }
@media (max-width: 700px) {
  .cr-cards { grid-template-columns: minmax(0, 1fr); }
  .cr-controls > * { flex: 1 1 100%; }
  .cr-date input { width: 100%; }
  .cr-foot .btn { flex: 1 1 auto; min-height: 40px; }
}

/* «Методы»: источник — жирный подзаголовок один раз, его методы под ним со смещением на символ. */
.tbl.chk-methods .fin-group-label { font-weight: 600; }
.tbl.chk-methods tbody tr:not(.group) td:first-child { text-indent: 1ch; }
.tbl.chk-rows td.chk-when { white-space: nowrap; }

/* ---------- Карточка: «В моих списках» (#5476) ----------
   Блок сводки называет списки, где компания уже есть; «+ добавить» открывает выбор.
   Метка мониторинга — одна на карточку и на каталог списков: колокольчик и частота. */
.card-lists-body { display: flex; flex-direction: column; gap: 0; padding: 2px 0; }
.card-list-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.card-list-row:last-of-type { border-bottom: 0; }
.card-list-row:hover .card-list-name { color: var(--accent-text); text-decoration: underline; }
.card-list-name { font-size: 13px; font-weight: 600; line-height: 1.35; }
.card-list-meta { color: var(--text2); font-size: 11.5px; line-height: 1.35; text-align: right; }
.card-lists-empty { margin: 0 0 4px; color: var(--text2); font-size: 12.5px; line-height: 1.45; }
.card-lists-add { align-self: flex-start; margin-top: 8px; padding: 3px 0; border: 0; background: none;
  color: var(--accent-text); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.card-lists-add:hover { text-decoration: underline; }
.card-lists-picker { display: flex; flex-direction: column; gap: 2px; }
.card-lists-pick-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 8px;
  width: 100%; padding: 9px 8px; border: 0; border-radius: 8px; background: none; color: var(--text);
  font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.card-lists-pick-row:hover { background: var(--hover-strong); }
.card-lists-pick-row.is-on .card-lists-pick-name { font-weight: 600; }
.card-lists-pick-row:disabled { cursor: default; opacity: .55; }
.card-lists-pick-check { color: var(--accent-text); font-weight: 700; text-align: center; }
.card-lists-pick-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-lists-pick-bell { font-size: 12px; line-height: 1; }
/* Метка «на мониторинге»: колокольчик и частота, заметно, но не крикливо. */
.lists-mon-badge { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px;
  padding: 2px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2);
  color: var(--text2); font-size: 11px; font-weight: 600; white-space: nowrap; vertical-align: 1px; }
.lists-mon-badge .bell { font-size: 10px; line-height: 1; }
.lists-mon-badge.on { border-color: var(--accent-text); color: var(--accent-text); background: var(--hover-strong); }
@media (max-width: 720px) {
  .card-list-row { align-items: flex-start; flex-direction: column; gap: 2px; }
  .card-list-meta { text-align: left; }
  .lists-mon-badge { margin-left: 5px; }
}

/* «В моих списках» справа от данных регистрации — как во фрейме 2534:11; колонка фиксированной
   ширины 312 px, на телефоне сетка `.cgrid` сама складывает её вниз (04.11). */
.cgrid.card-reg-grid { grid-template-columns: minmax(0, 1fr) 312px; }
.card-lists-col { min-width: 0; }
@media (max-width: 900px) { .cgrid.card-reg-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Проекты/объекты в списках (#5476) ---------- */
.lists-mark.project { color: var(--accent-text); font-weight: 600; }
.lists-modal-kind { display: flex; flex-direction: column; gap: 6px; }
/* Подпись к своей группе — 6 px, группа от группы — 12 px, как в макетах 2549:334/387. */
.lists-modal-roles { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
/* Роли проекта: строки 42 px в рамке, крестик удаления — только под курсором и в фокусе (макет 2549:387). */
.lists-role-list { display: flex; flex-direction: column; gap: 6px; }
.lists-role-box { padding: 4px 0; border: 1px solid var(--border); border-radius: 8px; background: var(--plate); }
.lists-role-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; padding: 0 6px 0 12px; }
.lists-role-name { font-size: 14px; }
.lists-role-del { border: 0; background: transparent; color: var(--text2); font-size: 18px; line-height: 1; padding: 2px 6px; cursor: pointer; opacity: 0; }
.lists-role-row:hover .lists-role-del, .lists-role-del:focus-visible { opacity: 1; }
.lists-role-del:hover { color: var(--err); }
.lists-role-del:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 1px; border-radius: 4px; }
@media (hover: none) { .lists-role-del { opacity: 1; } }
.lists-role-add { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 40px; border: 1px solid var(--border); border-radius: 8px; background: var(--plate); color: var(--accent-text); font: inherit; font-size: 13px; font-weight: 500; padding: 8px 10px; cursor: pointer; }
.lists-role-add:hover { border-color: var(--accent-text); }
.lists-role-add:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }
.lists-role-new { display: flex; gap: 6px; align-items: center; padding: 6px 0 2px; }
.lists-role-input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--text); padding: 7px 9px; font: inherit; font-size: 13px; }

/* Чип связей в шапке карточки (#5476): компактный, не ломает строку с названием. */
.conn-chip { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 12.5px; line-height: 1.2; cursor: pointer; }
.conn-chip.is-empty { color: var(--text2); border-style: dashed; }
.conn-chip.is-on { font-weight: 600; }
.conn-chip.is-monitored { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent-text) 45%, var(--line)); }
.conn-chip:hover { border-color: var(--accent-text); }
/* Окно «Включение в списки» (макеты «Выбор списка 1–4»): поиск с лупой, перечень в рамке,
   строки 42 px — кнопки целиком; галочка выбора справа, отбор по поиску — выпадающим блоком. */
.conn-body { display: flex; flex-direction: column; gap: 8px; }
.conn-search-wrap { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--plate); color: var(--text2); }
.conn-search-wrap:focus-within { outline: 2px solid var(--accent-fill); outline-offset: 1px; }
.conn-search-wrap svg { flex: none; width: 18px; height: 18px; }
.conn-search { flex: 1 1 auto; min-width: 0; padding: 6px 0; border: 0; background: none; color: var(--text);
  font: inherit; font-size: 14px; outline: none; }
.conn-view { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.conn-view:empty { display: none; }
.conn-list { display: flex; flex-direction: column; padding: 4px 0; border: 1px solid var(--border);
  border-radius: 8px; background: var(--plate); max-height: calc(100vh - 260px); overflow-y: auto; }
.conn-drop { margin-top: -4px; box-shadow: 0 8px 24px var(--shadow); }
.conn-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  min-height: 42px; padding: 4px 10px 4px 12px; border: 0; background: none; color: var(--text);
  font: inherit; text-align: left; cursor: pointer; }
.conn-row:hover { background: var(--hover); }
.conn-row:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: -2px; }
.conn-row:disabled { opacity: .55; cursor: default; }
.conn-role-row.is-on { background: var(--hover-strong); }
.conn-name-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 14px; }
.conn-name-title { font-size: 14px; font-weight: 600; }
.conn-name-comment { font-size: 12px; color: var(--text2); }
.conn-side { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; color: var(--text2); font-size: 12px; }
.conn-kind { color: var(--text2); font-size: 12px; }
.conn-type, .conn-bell, .conn-check-mark { display: inline-flex; }
.conn-type.medium, .conn-bell { color: var(--accent-text); }
.conn-type.high { color: var(--err); }
.conn-type svg, .conn-check-mark svg { width: 16px; height: 16px; display: block; }
.conn-check-mark { color: var(--accent-text); visibility: hidden; }
.conn-row.is-on .conn-check-mark { visibility: visible; }
.conn-none { margin: 0; font-size: 12px; color: var(--text2); }
/* Смысл иконки строки для скринридера: в имени кнопки, на экране не виден. */
.conn-said { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.conn-create { display: flex; flex-direction: column; gap: 12px; }
.conn-roles { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.conn-foot { display: flex; justify-content: flex-end; gap: 8px; }
.card-lists-more { border: 0; background: transparent; color: var(--accent-text); font: inherit; font-size: 12px; font-weight: 600; padding: 4px 0; cursor: pointer; text-align: left; }
.lists-kind-toggle { flex: 1; border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 14px; cursor: pointer; }
.lists-kind-toggle:hover { background: var(--hover); }
.lists-kind-toggle:focus-visible { outline: 2px solid var(--accent-fill); outline-offset: 2px; }
.lists-kind-toggles { display: flex; gap: 12px; }
.conn-chip { display: inline-flex; align-items: center; gap: 6px; }
.conn-chip svg { width: 16px; height: 16px; flex: 0 0 16px; }
.conn-chip-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Макеты «Реестры и списки» / «Мои списки» (17.11) ---------- */
.card-tools .conn-wrap { margin-left: auto; }
.conn-wrap { position: relative; display: inline-flex; align-items: center; }
.conn-pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; width: 340px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .18); padding: 4px 0; }
.conn-pop[hidden] { display: none; }
.conn-pop-row { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.conn-pop-row:last-of-type { border-bottom: 0; }
.conn-pop-row:hover { background: var(--bg); }
.conn-pop-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.conn-pop-name { font-size: 13px; font-weight: 600; }
.conn-pop-comment { font-size: 12px; color: var(--text2); }
.conn-pop-side { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; color: var(--text2); font-size: 12px; }
.conn-pop-check, .conn-pop-bell { display: inline-flex; color: var(--accent-text); }
.conn-pop-check svg { width: 16px; height: 16px; display: block; }
.conn-pop-all { display: block; width: 100%; border: 0; background: transparent; color: var(--accent-text); font: inherit; font-size: 12.5px; font-weight: 600; text-align: left; padding: 10px 16px 8px; cursor: pointer; }
.conn-pop-empty { padding: 12px 16px; color: var(--text2); font-size: 12.5px; }
.card-reg-lists { margin-top: 22px; }
.card-reg-lists-title { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text2); }
.card-reg-lists-rows { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.card-reg-list-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.card-reg-list-row:last-child { border-bottom: 0; }
.card-reg-list-row:hover { background: var(--bg); }
.card-reg-list-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card-reg-list-name { font-size: 13px; font-weight: 600; }
.card-reg-list-comment { font-size: 12px; color: var(--text2); }
.card-reg-list-side { display: flex; align-items: center; gap: 8px; color: var(--text2); font-size: 12px; }
.card-reg-list-role { color: var(--text2); }
.lists-table { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; max-width: 610px; }
.lists-table-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.lists-table-row:last-child { border-bottom: 0; }
.lists-table-row:hover { background: var(--bg); }
.lists-table-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lists-table-name { font-size: 13.5px; font-weight: 600; color: var(--text); text-decoration: none; }
.lists-table-comment { font-size: 12px; color: var(--text2); }
.lists-table-icons { display: flex; align-items: center; gap: 7px; color: var(--text2); flex: 0 0 auto; }
.lists-table-ic.shared, .lists-table-ic.mon { color: var(--text2); }
.lists-table-ic.high { color: var(--err); }
.lists-table-ic.medium { color: var(--accent-text); }
.lists-table-kind { font-size: 12px; color: var(--text2); margin-left: 6px; }
.lists-table-edit { background: transparent; border: 0; color: var(--text2); padding: 2px; cursor: pointer; display: inline-flex; }
.lists-table-edit:hover { color: var(--accent-text); }
.lists-modal-roles[hidden], .lists-modal-toggles[hidden], .lists-kind-toggles[hidden] { display: none; }
.lists-kind-toggle, .lists-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.lists-kind-toggle svg, .lists-toggle svg { width: 16px; height: 16px; flex: 0 0 16px; }
.lists-table-ic svg, .lists-table-edit svg, .conn-bell svg, .conn-pop-bell svg { width: 16px; height: 16px; display: block; }
