/* Раскладки экранов – фирменный стиль СКОЛКОВО (skolkovo.ru и тема отчета skolkovo).
   Роли цвета: темно-синий – текст и хром, индиго – все, что нажимается, оранжевый – метка программы
   (полосы, линии, заливки, крупные номера), никогда не текст на белом. Шаг отступов – 4 px (tokens.css),
   поля экрана – var(--gutter): 24 px, на телефоне 16 px. Общие компоненты – base.css, каркас – shell.css. */

/* ------------------------------------------------------------------ */
/* Общее                                                               */
/* ------------------------------------------------------------------ */
.screen { padding: var(--sp-5) var(--gutter) var(--sp-7); display: flex; flex-direction: column; gap: var(--sp-5); min-height: 100%; }
.screen-head { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; }
/* заголовок всегда сверху: высокий правый блок не сдвигает h1 вниз (было align-items: flex-end) */
.head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3) var(--sp-5); flex-wrap: wrap; }
.head-row > :not(.head-titles) { align-self: flex-end; }
.screen-head .head-titles { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.head-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-2); flex-wrap: wrap; }
.head-note { flex-basis: 100%; text-align: right; }
.banners { display: flex; flex-direction: column; gap: var(--sp-2); }
.stack { display: flex; flex-direction: column; gap: var(--sp-2); }
.facts-list { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: var(--sp-2) var(--sp-3); font-size: var(--fs-cell); align-items: baseline; }
.facts-list dt { padding-top: 1px; }
.facts-list dd { margin: 0; min-width: 0; }

/* Строка-надпись над заголовком: Raleway 600, прописные, разрядка (как подписи разделов на skolkovo.ru) */
.eyebrow {
  font-family: var(--font-display); font-weight: var(--fw-strong); font-size: var(--fs-eyebrow); line-height: var(--lh-eyebrow);
  letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--c-ink-2); font-variant-numeric: var(--num-display);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.screen-head .display, .p-head .display { font-family: var(--font-display); font-weight: var(--fw-strong); letter-spacing: var(--ls-display); font-variant-numeric: var(--num-display); }
.screen .title, .p-head .title, .run-panel .title, .rpanel .title, .data-main .title, .evidence .title {
  font-family: var(--font-display); font-weight: var(--fw-strong); letter-spacing: var(--ls-title); font-variant-numeric: var(--num-display);
}

/* Таблица шире экрана прокручивается внутри своей рамки, страница – нет */
.table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.table-scroll > .ledger { min-width: 100%; }

/* Метка состояния вместо черных уголков: «✓ Данные утверждены 27.11 · О. К.» */
.stamp {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill);
  background: var(--c-band); color: var(--c-ink); font-size: var(--fs-meta); line-height: 1; white-space: nowrap; max-width: 100%;
}
.stamp > span { overflow: hidden; text-overflow: ellipsis; }
.stamp .mk { width: 10px; height: 10px; }

/* Горячие клавиши: свернуты, раскрываются по щелчку */
details.keys { font-size: var(--fs-meta); color: var(--c-ink-2); }
details.keys > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--c-ink-2);
  min-height: 24px; user-select: none;
}
details.keys > summary::-webkit-details-marker { display: none; }
details.keys > summary::before { content: ""; width: 0; height: 0; border-left: 4px solid currentColor; border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent; transition: transform var(--dur-fast) var(--ease); }
details.keys[open] > summary::before { transform: rotate(90deg); }
details.keys > summary:hover { color: var(--c-indigo); }
.keys-list { display: flex; flex-wrap: wrap; gap: 4px var(--sp-4); padding-top: var(--sp-1); }
.keys-list kbd { font-family: var(--font-mono); font-size: 11px; color: var(--c-ink); border: var(--line-seam); background: var(--c-band); padding: 0 4px; line-height: 16px; display: inline-block; margin-right: 2px; }

/* Нумерованные шаги «01 / 02 / 03» – как строки плана в отчете и программа на skolkovo.ru */
.ordinals { display: flex; flex-direction: column; counter-reset: none; }
.ord { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: var(--sp-1) var(--sp-3); padding: var(--sp-4) 0; border-top: var(--line-seam); align-items: start; }
.ord:last-child { border-bottom: var(--line-seam); }
.ord-no {
  position: relative; padding-top: 12px; font-family: var(--font-display); font-weight: var(--fw-strong); font-size: 22px; line-height: 1;
  color: var(--c-navy); font-variant-numeric: var(--num-display); letter-spacing: -0.01em;
}
.ord-no::before { content: ""; position: absolute; left: 0; top: 0; width: 24px; height: 3px; background: var(--c-orange); }
.ord-body { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; padding-top: 8px; }
.ord-title { font-family: var(--font-display); font-weight: var(--fw-strong); font-size: 16px; line-height: 1.3; color: var(--c-ink); font-variant-numeric: var(--num-display); }
.ord-text { font-size: var(--fs-cell); line-height: var(--lh-cell); color: var(--c-ink-2); }
.ord-act { padding-top: 6px; align-self: start; }
.ord.done .ord-no { color: var(--c-ink-3); }
.ord.done .ord-no::before { background: var(--c-seam); }

/* Ход запуска: заголовок, «Готово 0 из 2», полоса по выпускникам, ссылка справа */
.progress-line {
  display: flex; align-items: center; gap: var(--sp-2) var(--sp-5); flex-wrap: wrap;
  padding: var(--sp-3) var(--sp-4); background: var(--c-band); box-shadow: inset 3px 0 0 var(--c-orange); min-width: 0;
}
.pl-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 0 1 auto; }
.pl-title { font-size: var(--fs-body); font-weight: var(--fw-strong); color: var(--c-ink); display: inline-flex; align-items: center; gap: var(--sp-2); }
.pl-meta { font-size: var(--fs-meta); color: var(--c-ink-2); font-variant-numeric: var(--num-table); }
.pl-bar { flex: 1 1 200px; display: flex; gap: 2px; height: 8px; min-width: 120px; max-width: 520px; }
.pl-seg { flex: 1 1 0; min-width: 4px; background: var(--c-seam); display: block; }
.pl-seg.done { background: var(--c-navy); }
.pl-seg.errors { background: var(--st-error); }
.pl-seg.running {
  background: repeating-linear-gradient(135deg, var(--c-orange) 0 4px, var(--c-orange-light) 4px 8px);
  background-size: 11.3px 11.3px; animation: pl-move 0.9s linear infinite;
}
@keyframes pl-move { to { background-position: 11.3px 0; } }
@media (prefers-reduced-motion: reduce) { .pl-seg.running { animation: none; } }
.progress-line .pl-go { margin-left: auto; flex: none; }

/* Поиск в панели инструментов – залитое поле, как поиск каталога skolkovo.ru */
.toolbar { display: flex; align-items: center; gap: var(--sp-3) var(--sp-4); flex-wrap: wrap; }
.tb-search {
  display: flex; align-items: center; gap: var(--sp-2); height: var(--h-ctl); padding: 0 var(--sp-2) 0 var(--sp-3);
  background: var(--c-stage); color: var(--c-ink-2); min-width: 0;
}
.tb-search:focus-within { background: var(--c-canvas); box-shadow: inset 0 0 0 2px var(--c-indigo); }
.tb-search .icon { flex: none; }
.tb-search .input, .tb-search .input.sm { border: 0; background: transparent; width: 240px; height: 100%; padding: 0 2px; color: var(--c-ink); }
.tb-search .input::placeholder { color: var(--c-ink-2); }
.tb-search .input:focus-visible { outline: none; }
.tb-search kbd { font-family: var(--font-mono); font-size: 11px; border: var(--line-seam); background: var(--c-canvas); color: var(--c-ink-2); padding: 0 5px; line-height: 16px; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.tb-density select { width: 128px; }
/* подпись и поле – одна пара, при переносе они не расходятся */
.filter { display: inline-flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.filter > .label, .filter > .meta { white-space: nowrap; }

/* Пустое состояние экрана: заголовок Raleway, текст, одно действие */
.empty-block { display: flex; flex-direction: column; gap: var(--sp-2); align-items: flex-start; max-width: 560px; padding: var(--sp-6) 0; }
.empty-block .title { font-size: var(--fs-title); }
.empty-block p { font-size: var(--fs-body); color: var(--c-ink-2); }
.empty-block .actions { margin-top: var(--sp-2); }

/* ------------------------------------------------------------------ */
/* «Группа»                                                            */
/* ------------------------------------------------------------------ */
.scr-cohort { padding-bottom: 0; }
.status-strip { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: stretch; }
/* колонки по содержимому: подписи в одну строку, без переносов внутри слова (было 7 равных колонок) */
.ss-tabs {
  flex: 1 1 auto; min-width: 0; display: grid; grid-auto-flow: column; grid-auto-columns: auto;
  gap: 1px; background: var(--c-seam); border: var(--line-seam);
}
.ss-kpis {
  flex: 0 0 auto; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(112px, auto);
  gap: 1px; background: var(--c-seam); border: var(--line-seam); border-top: var(--line-accent);
}
.ss-cell, .ss-kpi {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: var(--sp-2);
  min-height: 76px; min-width: 0; padding: var(--sp-3) var(--sp-4) var(--sp-3) var(--sp-3);
  background: var(--c-canvas); border: 0; color: var(--c-ink); text-align: left; text-decoration: none; font: inherit; cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease);
}
.ss-kpi { background: var(--c-band); cursor: default; }
a.ss-kpi { cursor: pointer; }
.ss-cell:hover, a.ss-kpi:hover { background: var(--c-hover); }
.ss-cell:focus-visible, a.ss-kpi:focus-visible { outline: var(--focus-ring); outline-offset: -2px; }
.ss-count {
  font-family: var(--font-display); font-weight: var(--fw-medium); font-size: 26px; line-height: 1; letter-spacing: -0.01em;
  font-variant-numeric: var(--num-display); color: var(--c-ink);
}
.ss-label { display: flex; align-items: center; gap: 6px; font-size: var(--fs-meta); line-height: 1.3; color: var(--c-ink-2); white-space: nowrap; }
.ss-label .mk { flex: none; }
/* выбранная плитка – темно-синяя, как плитка «в цифрах» на skolkovo.ru; метки переходят в светлые */
.ss-cell[aria-selected="true"] {
  background: var(--c-navy);
  --c-ink: #FFFFFF; --c-ink-2: var(--c-on-navy-2); --c-ink-3: var(--c-on-navy-2);
  --st-idle: var(--c-on-navy-2); --st-attention: var(--c-orange-light); --st-error: #FFFFFF;
}
.ss-cell[aria-selected="true"] .ss-label { color: var(--c-on-navy); }
.ss-cell[aria-selected="true"]:focus-visible { outline-color: var(--c-focus-on-navy); }

.table-wrap { min-width: 0; }
.cohort-table { table-layout: fixed; }
.cohort-table .col-cb { width: 40px; }
.cohort-table .col-no { width: 48px; }
.cohort-table .col-name { width: 19%; }
.cohort-table .col-status { width: 22%; }
.cohort-table .col-profile { width: 64px; }
.cohort-table .col-avg { width: 76px; }
.cohort-table .col-issues { width: 100px; }
.cohort-table .col-cost { width: 88px; }
.cohort-table .col-upd { width: 88px; }
.cohort-table .col-next { width: auto; }
.cohort-table td { overflow: hidden; }
.cohort-table.tall td { padding-top: var(--sp-2); padding-bottom: var(--sp-2); }
.cohort-table td .nm { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* вторая строка статуса – до двух строк, а не обрезка на полуслове */
.cohort-table td .line2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; white-space: normal; }
.cohort-table td.col-next { white-space: nowrap; }
.cohort-table td.col-next .dl-links { display: flex; gap: var(--sp-3); -webkit-line-clamp: none; }
.cohort-table tbody tr:focus-visible { outline: var(--focus-ring); outline-offset: -2px; }
.cohort-table tbody tr[aria-selected="true"] > td { background: var(--c-indigo-tint); }
.cohort-table tbody tr[aria-selected="true"] > td:first-child { box-shadow: inset 3px 0 0 var(--c-indigo); }
.cohort-table td.num, .cohort-table tfoot td { font-variant-numeric: var(--num-table); }
.issues-link { display: inline-flex; gap: var(--sp-2); align-items: center; text-decoration: none; }
.issues-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* пакетные действия – темно-синяя полоса, кнопки в варианте «на синем» */
.batch-band {
  position: sticky; bottom: 0; z-index: 5; margin: 0 calc(var(--gutter) * -1);
  min-height: 52px; padding: var(--sp-1) var(--gutter);
  background: var(--c-navy); color: var(--c-on-navy);
  display: flex; align-items: center; gap: var(--sp-2) var(--sp-3); flex-wrap: wrap;
}
.batch-band[hidden] { display: none; }
.batch-band .bb-count { font-weight: var(--fw-strong); margin-right: var(--sp-2); }
.batch-band .bb-spacer { flex: 1; }
.batch-band .meta { color: var(--c-on-navy-2); }
.batch-band .btn { background: transparent; color: var(--c-on-navy); border-color: rgba(255, 255, 255, 0.4); }
.batch-band .btn:hover { background: var(--c-navy-2); }
.batch-band .btn-primary { background: #FFFFFF; color: var(--c-indigo); border-color: #FFFFFF; }
.batch-band .btn-primary:hover { background: var(--c-indigo-tint); }
.batch-band .btn[aria-disabled="true"] { background: transparent; color: var(--c-on-navy-2); border-color: var(--c-navy-line); }
.batch-band .ta { color: var(--c-on-navy); }
.batch-band .ta:hover { color: var(--c-orange-light); }
.batch-band :focus-visible { outline-color: var(--c-focus-on-navy); }
/* итоговая строка таблицы не прячется под полосой выбора */
.scr-cohort:has(.batch-band:not([hidden])) .cohort-table tfoot td { bottom: 52px; }
.scr-cohort > :last-child:not(.batch-band) { margin-bottom: var(--sp-7); }
.scr-cohort .table-wrap { margin-bottom: var(--sp-5); }

/* Пустая группа: что загрузить и в каком порядке */
.intake-entry { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, 1fr); gap: var(--sp-6); align-items: start; padding-bottom: var(--sp-7); }
.intake-entry .ord-act .btn { white-space: nowrap; }
.intake-entry .checklist { background: var(--c-band); padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); }
.intake-entry .checklist ul { display: flex; flex-direction: column; gap: 6px; }
.intake-entry .checklist li { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-cell); }

/* ------------------------------------------------------------------ */
/* «Группы»                                                            */
/* ------------------------------------------------------------------ */
.cohort-filters { gap: var(--sp-2) var(--sp-5); }
.cohort-filters select { min-width: 180px; }
.cohort-years { display: flex; flex-direction: column; gap: var(--sp-6); }
.cohort-year > .title { display: flex; align-items: baseline; gap: var(--sp-2); margin: 0 0 var(--sp-3); }
.cohort-program { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-4); }
.cohort-program-name { margin: 0; }
.ledger.cohorts td { padding-top: var(--sp-2); padding-bottom: var(--sp-2); vertical-align: top; height: auto; }
.ledger.cohorts td:first-child a { font-weight: var(--fw-strong); color: var(--c-indigo); text-decoration: none; }
.ledger.cohorts td:first-child a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ledger.cohorts .inline { row-gap: 2px; column-gap: var(--sp-3); }
.ledger.cohorts td:last-child { white-space: nowrap; }

/* Новая группа: раздел во всю ширину, форма – две колонки по 340 px */
.new-cohort { display: flex; flex-direction: column; gap: var(--sp-3); padding-top: var(--sp-5); border-top: var(--line-hair); }
.new-cohort > .btn, .new-cohort .form-actions { align-self: flex-start; }
.new-cohort.card { border: var(--line-seam); border-top: var(--line-accent); padding: var(--sp-5); background: var(--c-canvas); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); gap: var(--sp-4) var(--sp-5); align-items: start; }
.form-grid .input { width: 100%; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
/* Первый вход: как получить отчеты – слева шаги, справа форма */
.first-run { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: var(--sp-6); align-items: start; max-width: 1180px; }
.first-run .guide { display: flex; flex-direction: column; gap: var(--sp-3); }
.first-run .new-cohort .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cohorts-foot { margin-top: calc(var(--sp-2) * -1); }

/* ------------------------------------------------------------------ */
/* Шапка выпускника и вкладки этапов (общие для «Данные», «Запуск», «Отчет») */
/* ------------------------------------------------------------------ */
.scr-data, .scr-report, .scr-run { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.data-top, .report-top, .run-top { padding: var(--sp-5) var(--gutter) 0; display: flex; flex-direction: column; gap: var(--sp-3); flex: none; min-width: 0; }
.p-head { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; }
/* имя не обрезается: если действиям не хватает места, они переносятся строкой ниже */
.p-main { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-3) var(--sp-5); min-width: 0; flex-wrap: wrap; }
.p-id { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; flex: 1 1 340px; }
/* стрелки – после имени, рядом с «14 из 17»: левый край заголовка совпадает с другими экранами */
.p-switch { display: flex; align-items: center; gap: var(--sp-1); min-width: 0; }
.p-switch .display { order: -1; padding: 0; margin-right: var(--sp-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.p-pos { margin-left: var(--sp-2); white-space: nowrap; font-variant-numeric: var(--num-table); }
.p-sub { display: flex; align-items: center; gap: var(--sp-2) var(--sp-3); flex-wrap: wrap; min-height: 24px; }
.p-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-2) var(--sp-3); flex-wrap: nowrap; flex: none; margin-left: auto; }
.p-actions .version-pick select { width: 196px; }
.p-actions .p-narrow { display: none; }   /* «…» с действиями, которые на широком экране стоят кнопками */
/* старое место глифа в шапке не используется: профиль – в строке вкладок */
.p-main > .p-glyph { display: none; }
/* вкладки этапов – единственный разделитель шапки и рабочей области, во всю ширину */
.stage-row {
  display: flex; align-items: center; gap: var(--sp-4); min-height: 40px; min-width: 0;
  margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); border-bottom: var(--line-hair);
}
.stage-row > .tabs { border-bottom: 0; flex: 0 1 auto; min-width: 0; }
.stage-tabs { gap: var(--sp-3); }
.stage-tabs .tab .mk { width: 8px; height: 8px; }
.stage-row .p-glyph { margin-left: auto; display: flex; align-items: center; gap: var(--sp-3); flex: none; color: var(--c-ink-2); font-size: var(--fs-meta); }
.p-glyph svg.strip { height: 28px; width: 72px; }
.p-glyph .avg { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.p-glyph .avg b { font-family: var(--font-display); font-weight: var(--fw-medium); font-size: 20px; line-height: 1; color: var(--c-ink); font-variant-numeric: var(--num-display); }

/* ------------------------------------------------------------------ */
/* «Данные»                                                            */
/* ------------------------------------------------------------------ */
.data-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) var(--w-evidence); }
.data-main { overflow: auto; padding: var(--sp-5) var(--gutter) var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-5); min-width: 0; }
.evidence { overflow: auto; border-left: var(--line-hair); padding: var(--sp-5) var(--gutter) var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-4); min-width: 0; scroll-padding: var(--sp-5); }
.data-msg { padding: var(--sp-5) var(--gutter); display: flex; flex-direction: column; gap: var(--sp-3); max-width: calc(var(--w-form) + 2 * var(--gutter)); }
.data-intro { display: flex; flex-direction: column; gap: var(--sp-2); max-width: 760px; }
.data-intro .lead { color: var(--c-ink); }
/* первая строка тела: фраза о данных и метки рядом с ней (способ чтения, «утверждены», «отчет устарел») */
.di-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); min-width: 0; }
.di-head .lead { margin: 0; flex: 0 1 auto; min-width: 0; }
.data-next { display: flex; align-items: center; gap: var(--sp-2) var(--sp-4); flex-wrap: wrap; }

.dmatrix {
  --cols: minmax(156px, 1.5fr) minmax(56px, 0.55fr) minmax(56px, 0.55fr) minmax(84px, 0.7fr) minmax(84px, 0.7fr) minmax(104px, 0.8fr) minmax(176px, 1.4fr);
  display: flex; flex-direction: column; gap: 1px; background: var(--c-seam); border: var(--line-seam); max-width: 1040px;
}
.drow { display: grid; grid-template-columns: var(--cols); gap: 1px; }
.drow > * { background: var(--c-canvas); min-height: var(--h-row-matrix); padding: 0 var(--sp-2); display: flex; align-items: center; gap: 4px; min-width: 0; }
.drow.head > * { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; font-size: var(--fs-meta); color: var(--c-ink-2); min-height: 48px; padding-top: var(--sp-1); padding-bottom: var(--sp-1); }
.drow .ch-top { display: flex; align-items: center; gap: 6px; color: var(--c-ink); font-weight: var(--fw-strong); }
.drow .ch-sub { font-size: 11px; color: var(--c-ink-2); display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.drow .ch-sub svg { width: 18px; }
.drow .rh { font-size: var(--fs-cell); justify-content: space-between; color: var(--c-ink); }
.drow .score { justify-content: center; font-size: var(--fs-score); font-variant-numeric: var(--num-table); position: relative; cursor: default; }
.drow .score.editable { cursor: pointer; }
.drow .score.editable:hover { color: var(--c-indigo); }
.drow .score.integral .val { font-weight: var(--fw-strong); }
/* отмеченная ячейка: метка «▲ ?» и тонировка, сырой текст – в источниках справа */
.drow .score.flagged, .drow:not(.head):hover > .score.flagged, .drow.row-focus > .score.flagged {
  box-shadow: inset 3px 0 0 var(--st-attention); background: var(--st-attention-tint); color: var(--st-attention); gap: 6px;
}
.drow .score.flagged .q { font-weight: var(--fw-strong); }
.drow .score .chg { font-size: 11px; color: var(--c-ink-2); }
.drow .cls-cell { font-size: var(--fs-cell); justify-content: space-between; }
.drow > [role="gridcell"]:focus-visible { outline: var(--focus-ring); outline-offset: -2px; }
.drow:not(.head):hover > *, .drow.row-focus > * { background: var(--c-hover); }
.drow:hover .term, .drow.row-focus .term { opacity: 1; }
.matrix-legend { max-width: 760px; }

.ev-head { display: flex; flex-direction: column; gap: var(--sp-1); }
.fx-card { background: var(--c-band); padding: var(--sp-3) var(--sp-4); display: flex; flex-direction: column; gap: 4px; }
.fx { font-size: var(--fs-cell); font-variant-numeric: var(--num-table); }
.fx.active { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ev-list { display: flex; flex-direction: column; gap: var(--sp-4); }
.ev-foot { margin-top: auto; padding-top: var(--sp-2); }
/* имя файла – своей строкой, разделитель «·» никогда не начинает строку */
.evidence .x-meta { row-gap: 2px; }
.evidence .x-meta .x-file { flex-basis: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-meta .sep-after::after { content: " ·"; }

/* Отметки: когда они блокируют утверждение – блок над матрицей и тонированный */
.flags { display: flex; flex-direction: column; gap: var(--sp-3); }
.flags.todo { background: var(--st-attention-tint); box-shadow: inset 3px 0 0 var(--st-attention); padding: var(--sp-4) var(--sp-5); max-width: 1040px; scroll-margin-top: var(--sp-4); }
.flags-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.flag { border-top: var(--line-hair); padding-top: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-2); }
.flags.todo .flag { border-top-color: rgba(154, 91, 30, 0.22); }
.flags.todo .flag .excerpt .x-text { background: var(--c-canvas); padding: 6px var(--sp-2); }
.flag-head { display: flex; align-items: center; gap: var(--sp-2); font-weight: var(--fw-strong); flex-wrap: wrap; }
.flag-head .ta { margin-left: auto; font-size: var(--fs-meta); font-weight: var(--fw-regular); }
.flag-q { display: flex; align-items: center; gap: var(--sp-2) var(--sp-3); flex-wrap: wrap; }
.flag-info { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.flags-sub { margin-top: var(--sp-2); }
.edits ul { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.editor-grid { display: flex; gap: var(--sp-2); align-items: flex-start; margin: var(--sp-2) 0; }
.popover .presets { font-size: var(--fs-meta); gap: var(--sp-1) var(--sp-2); margin-bottom: var(--sp-2); flex-wrap: wrap; }
.popover .excerpt { margin: 6px 0; }
.popover .field-error { margin-bottom: var(--sp-2); }
.file-problems { display: flex; flex-direction: column; gap: 6px; }
.data-main > details.keys { margin-top: auto; }

@media (max-width: 1279px) {
  .data-body { display: block; overflow: auto; }
  .data-main, .evidence { overflow: visible; }
  .evidence { border-left: 0; border-top: var(--line-hair); }
}

/* ------------------------------------------------------------------ */
/* «Запуск»                                                            */
/* ------------------------------------------------------------------ */
.run-top { padding-bottom: 0; }
.scr-run.job .run-top { padding-bottom: var(--sp-4); }
.job-head .title-line { display: flex; align-items: center; gap: var(--sp-2) var(--sp-3); flex-wrap: wrap; }
.job-head .title-line .st { font-size: var(--fs-cell); }
.run-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.scr-run.job .run-body { border-top: var(--line-hair); }
.run-body.solo { grid-template-columns: minmax(0, 1fr); }
.run-rail { border-right: var(--line-hair); overflow: auto; padding: var(--sp-3) 0 var(--sp-5); }
.rr-item { display: flex; align-items: center; gap: var(--sp-2); height: 36px; padding: 0 var(--gutter); text-decoration: none; color: var(--c-ink); font-size: var(--fs-cell); }
.rr-item:hover { background: var(--c-hover); color: var(--c-indigo); }
.rr-item[aria-current="page"] { box-shadow: inset 3px 0 0 var(--c-indigo); font-weight: var(--fw-strong); color: var(--c-indigo); background: var(--c-indigo-tint); }
.rr-item:focus-visible { outline: var(--focus-ring); outline-offset: -2px; }
.rr-p .no { color: var(--c-ink-2); font-variant-numeric: var(--num-table); }
.rr-p .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-group { padding: var(--sp-4) var(--gutter) var(--sp-1); }
.segbar { display: inline-flex; gap: 1px; }
.segbar i { width: 6px; height: 8px; background: var(--c-seam); display: block; }
.segbar i.on { background: var(--c-navy); }
.segbar i.cur { background: var(--c-orange); }
.run-panel { overflow: auto; min-width: 0; }
.panel-pad { padding: var(--sp-5) var(--gutter) var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-5); max-width: 1160px; }
.panel-head { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.run-empty { padding: var(--sp-5) var(--gutter); }
.run-summary-line { display: flex; flex-direction: column; gap: var(--sp-2); }
.run-summary-line .lead { color: var(--c-ink); }
.run-summary-line .pl-bar { flex: none; height: 8px; width: 100%; max-width: 520px; }
.run-details > summary, details.log > summary {
  cursor: pointer; list-style: none; display: inline-flex; gap: 6px; align-items: center; font-size: var(--fs-cell); color: var(--c-indigo);
}
.run-details > summary::-webkit-details-marker, details.log > summary::-webkit-details-marker { display: none; }
.run-details > summary::before, details.log > summary::before {
  content: ""; width: 0; height: 0; border-left: 5px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  transition: transform var(--dur-fast) var(--ease);
}
.run-details[open] > summary::before, details.log[open] > summary::before { transform: rotate(90deg); }
.run-details > summary:hover, details.log > summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.run-details[open] > summary { margin-bottom: var(--sp-3); }

.spine { display: flex; flex-direction: column; }
.spine-step { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); padding-bottom: var(--sp-4); }
.spine-step::before {
  content: ""; position: absolute; left: 7px; top: 20px; bottom: 0; width: 2px;
  background: repeating-linear-gradient(to bottom, var(--c-navy) 0 5px, transparent 5px 9px);
}
.spine-step:last-child::before { display: none; }
.spine-step.s-pending::before, .spine-step.s-skipped::before { background: repeating-linear-gradient(to bottom, var(--c-ink-3) 0 5px, transparent 5px 9px); }
.spine-step.s-running::before, .spine-step.s-repairing::before { animation: march 1s linear infinite; }
@keyframes march { to { background-position: 0 9px; } }
@media (prefers-reduced-motion: reduce) { .spine-step::before { animation: none !important; } }
.spine-step .node { position: relative; width: 16px; height: 16px; display: grid; place-items: center; margin-top: 3px; background: var(--c-canvas); z-index: 1; }
.spine-step .node .mk { width: 12px; height: 12px; }
.spine-step .node::after { content: ""; position: absolute; left: 19px; top: 7px; width: 16px; border-top: 2px dashed var(--c-navy); }
.spine-step.s-pending .node::after, .spine-step.s-skipped .node::after { border-top-color: var(--c-ink-3); }
.step-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.step-name { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-lead); line-height: var(--lh-lead); flex-wrap: wrap; }
.spine-step.s-pending .step-name > span:first-child, .spine-step.s-skipped .step-name > span:first-child { color: var(--c-ink-3); }
.step-ledger { color: var(--c-ink-2); font-size: var(--fs-cell); }
.section-ledger { grid-template-columns: 36px minmax(170px, 1.8fr) minmax(140px, 1fr) minmax(72px, 0.5fr) minmax(88px, 0.6fr); margin-top: 6px; }
.section-ledger.detailed { grid-template-columns: 36px minmax(170px, 1.6fr) minmax(130px, 1fr) minmax(64px, 0.55fr) minmax(64px, 0.55fr) minmax(64px, 0.5fr) minmax(104px, 0.7fr) minmax(96px, 0.6fr); }
.section-ledger > * { min-height: 32px; font-size: var(--fs-meta); }
.section-ledger > .num { justify-content: flex-end; font-variant-numeric: var(--num-table); }
.section-ledger .col-head { min-height: 28px; }
.repairs { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-cell); margin-top: 4px; }
.step-error { margin-top: 6px; }

.log { font-size: var(--fs-cell); }
.log-tools { display: flex; align-items: center; gap: var(--sp-2) var(--sp-4); margin: var(--sp-3) 0 var(--sp-2); flex-wrap: wrap; }
.log-well {
  font-family: var(--font-mono); font-size: var(--fs-log); line-height: var(--lh-log);
  border: 0; background: var(--c-band); padding: var(--sp-3); max-height: 320px; overflow: auto;
  white-space: pre-wrap; margin: 0; color: var(--c-ink);
}
.log-well .ln { color: var(--c-ink-3); }
.log-well .lv-warn { color: var(--st-attention); }
.log-well .lv-err { color: var(--st-error); }

/* ------------------------------------------------------------------ */
/* «Отчет»                                                             */
/* ------------------------------------------------------------------ */
.report-top { padding-bottom: 0; }
.report-banners { padding: var(--sp-3) var(--gutter); display: flex; flex-direction: column; gap: var(--sp-2); flex: none; border-bottom: var(--line-hair); }
/* три колонки начинаются от одной линии вкладок, их шапки – одной высоты 40 px */
.desk { --w-strip: 96px; flex: 1; min-height: 0; display: grid; grid-template-columns: var(--w-strip) minmax(0, 1fr) var(--w-evidence); }
.desk.secs { --w-strip: 128px; }
.page-strip { border-right: var(--line-hair); overflow: auto; padding: 0; display: flex; flex-direction: column; align-items: stretch; min-height: 0; }
.strip-toggle {
  flex: none; height: 40px; width: 100%; justify-content: center; gap: 2px; border-bottom: var(--line-hair);
  position: sticky; top: 0; z-index: 1; background: var(--c-canvas); flex-wrap: nowrap;
}
.strip-toggle button { padding: 0 6px; height: 26px; min-height: 0; font-size: var(--fs-meta); }
.thumbs { display: flex; flex-direction: column; gap: var(--sp-3); align-items: center; padding: var(--sp-4) 0 var(--sp-5); }
.thumb { background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.thumb .t-img { position: relative; width: 64px; aspect-ratio: var(--ratio-page); background: #FFFFFF; border: 1px solid var(--c-page-edge); display: block; }
.thumb .t-img img { width: 100%; height: 100%; object-fit: contain; }
.thumb.cur .t-img { outline: 2px solid var(--c-indigo); outline-offset: 0; }
.thumb:hover .t-img { border-color: var(--c-ink-3); }
.thumb .t-mark { position: absolute; top: 2px; right: 2px; background: var(--c-canvas); padding: 1px; display: grid; }
.thumb .t-no { font-size: var(--fs-meta); color: var(--c-ink-2); font-variant-numeric: var(--num-table); }
.thumb.cur .t-no { color: var(--c-indigo); font-weight: var(--fw-strong); }
.sec-list { width: 100%; padding: var(--sp-2) 0 var(--sp-5); }
.sec-item { width: 100%; text-align: left; background: none; border: 0; padding: 6px var(--sp-3); display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-meta); cursor: pointer; color: var(--c-ink); }
.sec-item:hover { background: var(--c-hover); color: var(--c-indigo); }
.sec-item.cur { box-shadow: inset 3px 0 0 var(--c-indigo); font-weight: var(--fw-strong); color: var(--c-indigo); }
.sec-item:focus-visible, .thumb:focus-visible { outline: var(--focus-ring); outline-offset: -2px; }
.sec-meta { display: flex; gap: 4px; align-items: center; color: var(--c-ink-2); }

.canvas { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.canvas-bar {
  display: flex; align-items: center; gap: var(--sp-3); padding: 0 var(--gutter); border-bottom: var(--line-hair);
  background: var(--c-canvas); flex: none; height: 40px; white-space: nowrap; overflow: hidden;
}
.canvas-bar .zoom { display: flex; align-items: center; gap: 2px; }
.canvas-bar .seg { flex-wrap: nowrap; flex: none; }
.canvas-bar .layer { margin-left: auto; }
.canvas-bar .page-acts { display: flex; gap: var(--sp-3); font-size: var(--fs-cell); margin-left: auto; }
.canvas-bar .page-acts + .layer { margin-left: var(--sp-2); }
.canvas-bar .cb-note { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.page-scroll { flex: 1; min-height: 0; overflow: auto; display: flex; justify-content: flex-start; padding: var(--sp-4) var(--gutter); }
.page-col { display: flex; flex-direction: column; gap: var(--sp-2); margin: 0 auto; }
.page-meta { display: flex; gap: var(--sp-2); align-items: center; min-height: 20px; }
.page-meta .pm-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.page-meta .pm-nav { margin-left: auto; display: inline-flex; gap: 2px; }
.page-wrap { position: relative; }
.report-page img { width: 100%; height: auto; }
.region { position: absolute; background: transparent; border: 0; padding: 0; outline: 1.5px solid var(--st-attention); outline-offset: 4px; cursor: pointer; }
.region.r-err { outline-color: var(--st-error); }
.region.sel { outline-width: 2px; }
.region:focus-visible { outline: var(--focus-ring); outline-offset: 4px; }
.margin-chips { position: absolute; top: 0; bottom: 0; left: calc(100% + 8px); width: 96px; }
.margin-chips .qchip { position: absolute; left: 0; }
.page-below { display: flex; gap: var(--sp-4); align-items: center; padding-top: 6px; flex-wrap: wrap; }

/* Вид «Текст»: превью отчета в теме skolkovo (токены --rp-*) */
.text-scroll { flex: 1; min-height: 0; overflow: auto; padding: var(--sp-4) var(--gutter) var(--sp-6); }
.text-view {
  background: #FFFFFF; border: 1px solid var(--c-page-edge); max-width: 760px; margin: 0 auto; padding: 40px 48px;
  font-family: var(--font-report); font-size: 13px; line-height: 1.5; color: var(--rp-ink);
}
.text-view h2 { font-family: var(--font-display); font-size: 18px; line-height: 1.2; color: var(--rp-rust); font-weight: var(--fw-strong); margin: 0; font-variant-numeric: var(--num-display); }
.text-view h3 { font-family: var(--font-display); font-size: 15px; line-height: 1.3; font-weight: var(--fw-strong); margin: 14px 0 6px; color: var(--rp-ink); font-variant-numeric: var(--num-display); }
.text-view h4 { font-size: 13px; font-weight: 700; margin: 10px 0 4px; }
.text-view p { margin: 0 0 8px; }
.text-view ul { list-style: disc; padding-left: 18px; margin: 0 0 8px; }
.text-view ol.tv-top { list-style: decimal; padding-left: 18px; }
.text-view li { margin-bottom: 4px; }
.text-view a { color: var(--rp-link); }
.tv-sec { padding-bottom: var(--sp-4); margin-bottom: var(--sp-4); border-bottom: 1px solid var(--rp-callout-edge); }
.tv-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-2); margin-bottom: 8px; }
.tv-sec-head .ta { font-family: var(--font-ui); font-size: var(--fs-meta); }
/* плашка главы, как в отчете: оранжевая заливка, темно-синий текст (6.01) */
.tv-chapter {
  font-family: var(--font-display); font-weight: var(--fw-strong); font-size: 12px; letter-spacing: var(--ls-eyebrow); text-transform: uppercase;
  background: var(--rp-accent); color: var(--c-navy); padding: 6px 12px; margin: 0 0 var(--sp-4);
}
.tv-sub { color: var(--rp-ink); font-weight: 700; }
.tv-muted { color: var(--rp-muted); }
.tv-b { font-weight: 700; margin-bottom: 2px; }
.tv-level { display: flex; flex-wrap: wrap; gap: 6px; font-weight: 700; }
.tv-level .tv-muted { font-weight: 400; }
.tv-cap { font-size: 12px; color: var(--rp-muted); font-style: italic; display: flex; align-items: center; gap: 8px; }
.tv-intro { color: var(--rp-muted); }
.tv-band { font-family: var(--font-ui); font-size: var(--fs-meta); color: var(--c-ink-2); border-top: var(--line-hair); padding-top: 6px; margin-top: 10px; }
/* плитки KPI отчета – заливка цветом класса, как на странице 1 отчета; цвет никогда не текст на светлом */
.tv-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 12px 0; border-top: 3px solid var(--rp-accent); padding-top: 4px; }
.tv-kpi > div { background: var(--rp-callout); color: var(--rp-ink); padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tv-kpi > div.k-strong { background: var(--class-strong); color: #FFFFFF; }
.tv-kpi > div.k-resource { background: var(--class-resource); color: #FFFFFF; }
.tv-kpi > div.k-development { background: var(--class-development); color: var(--c-navy); }
.tv-kpi > div.k-priority { background: var(--class-priority); color: var(--c-navy); }
.tv-kpi-v { font-family: var(--font-display); font-weight: var(--fw-strong); font-size: 24px; line-height: 1; font-variant-numeric: var(--num-display); }
.tv-kpi-l { font-size: 11px; line-height: 1.3; opacity: 0.92; }
.lvl-strong { color: var(--class-text-strong); }
.lvl-resource { color: var(--class-text-resource); }
.lvl-development { color: var(--class-text-development); }
.lvl-priority { color: var(--class-text-priority); }
.tv-quote { margin: 10px 0; padding: 8px 12px; border-left: 2px solid var(--c-navy); background: var(--rp-callout); font-style: italic; }
.tv-quote cite { display: block; font-style: normal; font-size: 11px; color: var(--c-ink-2); margin-top: 4px; }
.qchip {
  font-family: var(--font-ui); font-size: 11px; font-style: normal; font-weight: 400; display: inline-flex; align-items: center; gap: 2px;
  height: 18px; padding: 0 5px; margin: 0 2px; border: 1px solid var(--c-field-edge); background: var(--c-canvas); color: var(--c-ink-2);
  cursor: pointer; vertical-align: 1px; white-space: nowrap; line-height: 1;
}
.qchip .mono { font-size: 10px; color: var(--c-ink); }
.qchip.warn { border-color: var(--st-attention); color: var(--st-attention); }
.qchip:hover { background: var(--c-hover); border-color: var(--c-indigo); }
.qchip.sel, .mchip.sel { border-color: var(--c-indigo); color: var(--c-indigo); }
.qchip.static { cursor: default; flex: none; }
.qchip.static:hover { border-color: var(--c-field-edge); background: var(--c-canvas); }
.mchip { position: absolute; left: 0; font-family: var(--font-ui); font-size: 11px; height: 18px; padding: 0 5px; border: 1px solid var(--c-field-edge); background: var(--c-canvas); color: var(--c-ink-2); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; }
.mchip .mono { font-size: 10px; color: var(--c-ink); }
.mchip.warn { border-color: var(--st-attention); color: var(--st-attention); }

.rpanel { border-left: var(--line-hair); min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.panel-tabs { padding: 0 var(--gutter); flex: none; }
.panel-tabs .tab .meta { font-variant-numeric: var(--num-table); }
.rp-body { flex: 1; overflow: auto; padding: var(--sp-4) var(--gutter) var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); min-height: 0; }
/* проверка: строка «Автопроверка …» и «Обновить» в первой строке, счетчики – второй */
.vbanner { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-2); font-size: var(--fs-cell); padding-bottom: var(--sp-3); border-bottom: var(--line-hair); }
.vbanner > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vbanner > .ta { flex: none; }
.checks { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-cell); }
.checks li { display: flex; align-items: center; gap: 6px; }
.rp-filters { display: flex; flex-direction: column; align-items: stretch; gap: var(--sp-2); }
.rp-filters .seg { flex-wrap: wrap; }
.rp-filters select { width: 100%; }
.findings { display: flex; flex-direction: column; border-top: var(--line-hair); }
.finding { border-bottom: var(--line-hair); }
.f-head {
  width: 100%; background: none; border: 0; padding: var(--sp-2) 4px; cursor: pointer; text-align: left; font-size: var(--fs-cell);
  display: grid; grid-template-columns: 12px minmax(0, 1fr); column-gap: 6px; row-gap: 2px; align-items: center; color: var(--c-ink);
}
.f-head.static { cursor: default; }
.f-head:hover { background: var(--c-hover); }
.f-head:focus-visible { outline: var(--focus-ring); outline-offset: -2px; }
.f-head .f-line { font-size: var(--fs-meta); }
.f-head .f-title { grid-column: 2; }
.finding.open .f-head .f-title { font-size: var(--fs-lead); line-height: var(--lh-lead); }
.f-body { padding: 0 4px var(--sp-3) 22px; display: flex; flex-direction: column; gap: var(--sp-2); }
.f-fragment { background: var(--c-band); padding: var(--sp-2) var(--sp-3); display: flex; flex-direction: column; gap: 2px; }
.f-fragment p { font-size: 13px; line-height: 1.45; }
.f-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); font-size: var(--fs-cell); }
.accepted { display: flex; flex-direction: column; gap: 6px; }
.sources { display: flex; flex-direction: column; border-top: var(--line-hair); }
.src-item { border-bottom: var(--line-hair); padding: var(--sp-2) 0; display: flex; flex-direction: column; gap: 6px; }
.src-item.sel { box-shadow: inset 3px 0 0 var(--c-indigo); padding-left: var(--sp-3); }
.src-head { background: none; border: 0; padding: 0; display: flex; gap: var(--sp-2); align-items: flex-start; text-align: left; cursor: pointer; color: var(--c-ink); }
.src-quote { font-size: 13px; line-height: 1.4; }
.excerpt.src .x-actions { font-size: var(--fs-meta); }
.rp-body > details.keys { margin-top: auto; padding-top: var(--sp-3); }
.report-empty { padding: var(--sp-6) var(--gutter); display: flex; flex-direction: column; gap: var(--sp-3); align-items: flex-start; max-width: 560px; }
.report-empty .title { font-size: var(--fs-title); }
.radios { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.radios legend { margin-bottom: 6px; }
.section-text { max-height: 260px; overflow: auto; background: var(--c-band); padding: var(--sp-3); font-size: 12px; line-height: 1.45; }
.section-text p { margin-bottom: 6px; }
.diff-par { padding: 6px 0; border-bottom: var(--line-hair); font-size: 13px; }
.diff-par.changed { box-shadow: inset 3px 0 0 var(--c-indigo); padding-left: var(--sp-2); }
.diff-par .old { text-decoration: line-through; color: var(--c-ink-2); margin-bottom: 4px; }
.facts-list.compact { grid-template-columns: 100px minmax(0, 1fr); gap: 4px var(--sp-2); margin: 6px 0 var(--sp-2); }

/* ------------------------------------------------------------------ */
/* «Загрузка»                                                          */
/* ------------------------------------------------------------------ */
.scr-import { padding-bottom: 0; }
.stepper { display: flex; align-items: stretch; gap: var(--sp-4); height: 40px; border-bottom: var(--line-hair); min-width: 0; overflow-x: auto; scrollbar-width: none; }
.stepper::-webkit-scrollbar { display: none; }
.stepper .tab { gap: var(--sp-2); flex: none; font-family: var(--font-display); font-weight: var(--fw-medium); font-variant-numeric: var(--num-display); }
.stepper .arrow-sep { display: flex; align-items: center; color: var(--c-ink-3); flex: none; }
.stepper .tab[aria-current="step"] { color: var(--c-ink); font-weight: var(--fw-strong); }
.stepper .tab[aria-current="step"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--c-indigo); }
.step-no {
  width: 20px; height: 20px; border: 1px solid var(--c-ink-3); border-radius: var(--r-marker); display: inline-grid; place-items: center;
  font-family: var(--font-ui); font-size: 11px; line-height: 1; font-variant-numeric: var(--num-table); color: var(--c-ink-2); flex: none;
}
.stepper .tab[aria-current="step"] .step-no { background: var(--c-indigo); border-color: var(--c-indigo); color: #FFFFFF; }
.dz-row { display: flex; align-items: baseline; gap: var(--sp-2) var(--sp-4); flex-wrap: wrap; }
.up-progress { display: flex; align-items: center; gap: 4px var(--sp-2); font-size: var(--fs-cell); flex-wrap: wrap; }
.up-progress .up-name { flex-basis: auto; }
.up-progress .bar { width: 160px; height: 6px; background: var(--c-seam); display: inline-block; margin-left: var(--sp-2); }
.up-progress .bar i { display: block; height: 100%; background: var(--c-indigo); }
.import-cols { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr); gap: var(--sp-5); align-items: start; }
.file-ledger { min-width: 0; }
.fl-tools { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); flex-wrap: wrap; padding-bottom: var(--sp-3); border-bottom: var(--line-rule); }
.fl-tools .tb-search .input { width: 200px; }
.fl-hint { padding-top: var(--sp-2); }
.fl-group { border-bottom: var(--line-hair); padding: var(--sp-3) 0; }
.fl-group.focus { box-shadow: inset 3px 0 0 var(--c-indigo); padding-left: var(--sp-3); }
.fl-ghead { display: flex; align-items: baseline; gap: 6px; font-size: var(--fs-body); margin-bottom: 4px; flex-wrap: wrap; }
.fl-ghead .no { color: var(--c-ink-2); font-variant-numeric: var(--num-table); }
.fl-add { font-size: var(--fs-meta); cursor: pointer; }
/* первая строка имени, метки и сводки совпадает с полем роли (было по центру строки) */
.fl-row { display: grid; grid-template-columns: 18px minmax(160px, 1.4fr) minmax(240px, 1.4fr) minmax(130px, 1fr) minmax(36px, auto); gap: var(--sp-2) var(--sp-3); align-items: start; min-height: 40px; padding: 4px 0; font-size: var(--fs-cell); }
.fl-st { display: grid; place-items: center; padding-top: 10px; }
.fl-name { display: flex; flex-direction: column; min-width: 0; padding-top: 6px; }
.fl-name .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-role { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; min-width: 0; }
.role-select { width: 208px; max-width: 100%; }
.fl-sum { min-width: 0; padding-top: 7px; }
.fl-act { min-width: 0; display: flex; justify-content: flex-end; align-items: flex-start; }
.fl-act .ta { white-space: normal; text-align: right; padding-top: 6px; }
.fl-act select { max-width: 220px; }
.fl-issues { margin: 4px 0 var(--sp-2) 30px; padding: var(--sp-2) var(--sp-3); background: var(--st-attention-tint); box-shadow: inset 3px 0 0 var(--st-attention); display: flex; flex-direction: column; gap: 4px; }
.fl-issues.blocking { background: var(--st-error-tint); box-shadow: inset 3px 0 0 var(--st-error); }
.fl-issue { display: flex; gap: 6px; align-items: baseline; }
.fl-issue .mk { flex: none; transform: translateY(1px); }
.completeness { position: sticky; top: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
.completeness td.cmp, .completeness th:not(:first-child) { text-align: center; }
.completeness td.cmp .mk { margin: 0 auto; }
.legend { display: flex; align-items: center; gap: 4px var(--sp-1); flex-wrap: wrap; }
.legend .lg { display: inline-flex; align-items: center; gap: 4px; margin-right: var(--sp-3); }
.single-q { display: flex; align-items: center; gap: var(--sp-2); justify-content: space-between; border-top: var(--line-hair); padding-top: var(--sp-2); }
/* нижняя полоса шага прижата к низу экрана, а не висит посередине */
.sticky-foot {
  position: sticky; bottom: 0; z-index: 5; margin: auto calc(var(--gutter) * -1) 0; background: var(--c-band); border-top: var(--line-seam);
  box-shadow: 0 -1px 0 rgba(16, 24, 42, 0.04); min-height: 56px; padding: var(--sp-2) var(--gutter); display: flex; align-items: center; gap: var(--sp-2) var(--sp-3); flex-wrap: wrap;
}
.sticky-foot .bb-spacer, .fl-ghead .bb-spacer { flex: 1; }
.roster-head { display: flex; justify-content: space-between; gap: var(--sp-2) var(--sp-4); flex-wrap: wrap; align-items: baseline; }
.roster-result { display: flex; flex-direction: column; gap: var(--sp-2); }
.mapping { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--sp-5); }
.map-list { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-2) var(--sp-4); align-items: center; font-size: var(--fs-cell); }
.map-samples { display: flex; flex-direction: column; gap: var(--sp-2); }
.roster-table { display: flex; flex-direction: column; gap: var(--sp-2); }
.roster-table .gender-pick { width: 92px; }
.result-table td { height: 48px; }
.ledger.result-table td { padding-top: 6px; padding-bottom: 6px; }
.src-marks { display: flex; gap: 2px var(--sp-3); flex-wrap: wrap; }
.src-mark { display: inline-flex; gap: 4px; align-items: center; font-size: var(--fs-meta); }
@media (max-width: 1279px) { .import-cols { grid-template-columns: minmax(0, 1fr); } .completeness { position: static; } }

/* ------------------------------------------------------------------ */
/* «Настройки»                                                         */
/* ------------------------------------------------------------------ */
.anchor-tabs { display: flex; gap: var(--sp-5); height: 40px; border-bottom: var(--line-hair); position: sticky; top: 0; background: var(--c-canvas); z-index: 4; box-shadow: var(--shadow-bar); }
.set-section { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-2) 0 var(--sp-5); scroll-margin-top: 56px; }
.set-section > .title { margin-bottom: var(--sp-1); }
.set-row { display: grid; grid-template-columns: 240px minmax(0, 720px); gap: var(--sp-4) var(--sp-5); padding: var(--sp-3) 0; border-top: var(--line-hair); align-items: start; }
.set-label { font-size: var(--fs-body); padding-top: 8px; }
.set-row.plain { align-items: baseline; }
.set-row.plain .set-label { padding-top: 0; }
.set-control { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; }
.inline { display: inline-flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.saved { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-meta); color: var(--c-ink-2); }
.input.w-m { width: min(360px, 100%); }
.input.w-s { width: min(220px, 100%); }
.input.w-xs { width: 88px; }
.models-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--sp-5); align-items: start; max-width: 960px; }
.models-grid select { width: min(300px, 100%); }
.model-card { background: var(--c-band); padding: var(--sp-3) var(--sp-4); display: flex; flex-direction: column; gap: 6px; margin-top: var(--sp-3); }
.radio-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--c-seam); border: var(--line-seam); max-width: 640px; }
.radio-card { background: var(--c-canvas); padding: var(--sp-3) var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); cursor: pointer; }
.radio-card:hover { background: var(--c-hover); }
.radio-card.on { box-shadow: inset 0 0 0 2px var(--c-indigo); }
.rc-top { display: flex; align-items: center; gap: var(--sp-2); }
.rc-sample { font-size: var(--fs-body); }
.engines { display: flex; flex-direction: column; gap: var(--sp-2); }
.engine.disabled { color: var(--c-ink-3); cursor: not-allowed; }
/* технические настройки – свернуты: их меняют вместе с тем, кто обслуживает сервис */
details.tech { border-top: var(--line-seam); padding-top: var(--sp-4); scroll-margin-top: 56px; }
details.tech > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--sp-3); }
details.tech > summary::-webkit-details-marker { display: none; }
details.tech > summary .title { margin: 0; }
details.tech > summary::after {
  content: ""; width: 8px; height: 8px; border-right: 1.5px solid var(--c-indigo); border-bottom: 1.5px solid var(--c-indigo);
  transform: rotate(45deg) translateY(-3px); transition: transform var(--dur-fast) var(--ease);
}
details.tech[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
details.tech > summary:hover .title { color: var(--c-indigo); }
.tech-note { margin: var(--sp-2) 0 var(--sp-3); max-width: 720px; }
.tech-body { display: flex; flex-direction: column; gap: var(--sp-4); padding-top: var(--sp-2); }

/* ------------------------------------------------------------------ */
/* «Запуски»                                                           */
/* ------------------------------------------------------------------ */
.history { margin-bottom: var(--sp-6); min-width: 0; }
.hl-row {
  display: grid; grid-template-columns: 28px minmax(220px, 1.8fr) minmax(140px, 1.2fr) minmax(120px, 0.9fr) 88px minmax(110px, 0.8fr);
  gap: var(--sp-2) var(--sp-3); align-items: center; min-height: 56px; border-bottom: var(--line-hair); text-decoration: none; color: var(--c-ink);
  padding: var(--sp-1) var(--sp-2) var(--sp-1) 0; font-size: var(--fs-cell);
}
.history.with-cost .hl-row { grid-template-columns: 28px minmax(200px, 1.6fr) minmax(130px, 1fr) minmax(120px, 0.9fr) 84px 170px 90px minmax(110px, 0.8fr) minmax(80px, 0.6fr); }
.hl-row .num { text-align: right; font-variant-numeric: var(--num-table); }
.hl-head { font-size: var(--fs-meta); color: var(--c-ink-2); border-bottom: var(--line-rule); min-height: 32px; position: sticky; top: 0; background: var(--c-canvas); z-index: 2; font-weight: var(--fw-strong); }
a.hl-row:hover { background: var(--c-hover); }
a.hl-row:hover .hl-title > span:first-child { color: var(--c-indigo); }
a.hl-row:focus-visible { outline: var(--focus-ring); outline-offset: -2px; }
.hl-body { position: relative; }
.hl-body::before { content: ""; position: absolute; left: 13px; top: 0; bottom: 0; border-left: var(--line-spine); }
.hl-node { position: relative; z-index: 1; display: grid; place-items: center; width: 16px; height: 16px; background: var(--c-canvas); margin-left: 6px; }
.hl-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hl-title { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-body); flex-wrap: wrap; }
.hl-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.history-kpis .kpi a { color: var(--c-indigo); text-decoration: none; font-size: var(--fs-meta); }
.history-kpis .kpi a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ */
/* «Администраторы»                                                    */
/* ------------------------------------------------------------------ */
.scr-admins .admin-section { display: flex; flex-direction: column; gap: var(--sp-3); padding-top: var(--sp-5); border-top: var(--line-hair); }
.scr-admins .admin-section:first-of-type { border-top: 0; padding-top: 0; }
.scr-admins .admin-add { margin-top: var(--sp-4); }
.screen h3.title, .set-section h3.title { font-size: 17px; line-height: 1.25; }
.admin-add, .admin-password { display: flex; flex-direction: column; gap: var(--sp-3); }
.admin-add > .btn, .admin-password > .btn { align-self: flex-start; }
.ledger.admins td { padding-top: var(--sp-2); padding-bottom: var(--sp-2); height: auto; }
.ledger.admins td.mono { font-size: var(--fs-cell); }
.ledger.admins td.num { text-align: right; width: 1%; white-space: nowrap; }

/* ------------------------------------------------------------------ */
/* Вход и шапка на телефоне – совместимость: основное оформление каркаса и входа – в shell.css   */
/* ------------------------------------------------------------------ */
.login-page {
  height: 100vh; height: 100dvh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column;
  padding: var(--sp-5) var(--sp-4);
  background: var(--c-band);
}
.login-card {
  margin: auto;
  width: 100%; max-width: 400px;
  background: var(--c-canvas); border: var(--line-seam); border-top: var(--line-accent);
  padding: var(--sp-6) var(--sp-5) var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-3);
}
.login-identity { letter-spacing: 0.02em; }
.login-title { margin: 0; }
.login-form { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-2); }
.login-input { height: var(--h-ctl-lg); font-size: 16px; /* 16px: iOS не увеличивает страницу при вводе */ }
.login-code { font-family: var(--font-mono); letter-spacing: 0.4em; text-align: center; font-size: 20px; }
.login-submit { width: 100%; justify-content: center; }
.login-link { align-self: flex-start; background: none; border: 0; padding: var(--sp-1) 0; cursor: pointer; font: inherit; }
.login-msg:empty { display: none; }
.login-foot { margin-top: var(--sp-2); border-top: var(--line-hair); padding-top: var(--sp-3); }
@media (max-width: 480px) {
  .login-page { padding: 0; background: var(--c-canvas); }
  .login-card { margin: 0; flex: 1 0 auto; max-width: none; border: 0; padding: var(--sp-6) var(--sp-4) var(--sp-5);
    justify-content: center; }
}

.masthead .who { display: flex; align-items: center; gap: var(--sp-3); flex: none; padding-left: var(--sp-3);
  border-left: var(--line-hair); margin-left: var(--sp-1); }
.masthead .who:empty { display: none; }
.masthead .who-name { font-size: var(--fs-cell); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.masthead .who .ta { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

.menu-btn, .rail-scrim { display: none; }
.menu-btn { place-items: center; width: 44px; height: 44px; flex: none; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }
.menu-btn svg { width: 20px; height: 20px; }

/* на любой ширине: окна не выше экрана, увеличенная страница не уходит влево */
.popover { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); overflow: auto; overscroll-behavior: contain; }
@media (min-width: 761px) { .page-meta .pm-nav { display: none; } }   /* на компьютере листают лентой и PageUp/PageDown */

@media (max-width: 1279px) { .masthead .sys .mono { display: none; } }

/* ------------------------------------------------------------------ */
/* Ноутбук и планшет                                                   */
/* ------------------------------------------------------------------ */
@media (max-width: 1439px) {
  .desk { --w-strip: 88px; }
  .thumb .t-img { width: 56px; }
}

@media (max-width: 1279px) {
  /* узкий холст отчета: панель замечаний уже, в строке холста – только вид, масштаб и слой источников */
  .desk { --w-evidence: 320px; }
  .canvas-bar { gap: var(--sp-2); padding: 0 var(--sp-3); }
  .canvas-bar .cb-note, .canvas-bar .page-acts { display: none; }
  .canvas-bar .layer { margin-left: auto; }
}

@media (max-width: 1023px) {
  .app { min-width: 0; }
  /* шапка выпускника переносится: иначе main.main.fixed (overflow:hidden) срезает кнопки действий */
  .p-main { flex-wrap: wrap; align-items: flex-start; }
  .p-id { flex: 1 1 100%; }
  .p-actions { flex-wrap: wrap; justify-content: flex-start; }
  /* «Группа»: колонка «Что дальше» не схлопывается в ноль */
  .cohort-table .col-profile, .cohort-table .col-cost, .cohort-table .col-upd, .cohort-table tfoot { display: none; }
  .cohort-table .col-name { width: 24%; }
  .cohort-table .col-status { width: 26%; }
  /* «Запуски»: без колонок токенов, модели и автора */
  .history .hl-row, .history.with-cost .hl-row { grid-template-columns: 28px minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 0.9fr) 84px; }
  .history .hl-row > :nth-child(n+6) { display: none; }
  .first-run, .intake-entry { grid-template-columns: minmax(0, 1fr); }
  .desk { --w-strip: 72px; }
  .desk.secs { --w-strip: 112px; }
  .thumb .t-img { width: 48px; }
}

/* ------------------------------------------------------------------ */
/* Телефон                                                             */
/* ------------------------------------------------------------------ */
@media (max-width: 760px) {
  /* каркас: колонка – выезжающее меню, полоса состояния скрыта */
  .app { height: 100vh; height: 100dvh; grid-template-rows: var(--h-header) minmax(0, 1fr); }
  .statusbar { display: none; }
  .masthead { gap: var(--sp-2); padding: 0 var(--gutter) 0 var(--sp-1); }
  .menu-btn { display: grid; }
  .masthead .sys { display: none; }
  .wirepath .wire { display: none; }
  .wirepath li:not(:last-child) { display: none; }
  .wirepath .node { max-width: 100%; padding: 0; font-weight: var(--fw-strong); }
  .masthead .who { border-left: 0; padding-left: 0; margin-left: 0; }
  .masthead .who-name { display: none; }
  .masthead .who .ta { min-height: 44px; display: inline-flex; align-items: center; }
  .frame { grid-template-columns: minmax(0, 1fr); }
  .rail {
    position: fixed; top: var(--h-header); left: 0; bottom: 0; width: min(300px, 86vw); z-index: 60;
    transform: translateX(-102%); border-right: 0; box-shadow: var(--shadow-float);
    visibility: hidden;   /* закрытое меню не ловит Tab и не читается экранным диктором */
    transition: transform var(--dur) var(--ease), visibility 0s linear var(--dur);
  }
  body.rail-open .rail { transform: none; visibility: visible; transition: transform var(--dur) var(--ease), visibility 0s; }
  .rail-scrim { position: fixed; top: var(--h-header); left: 0; right: 0; bottom: 0; background: var(--c-scrim); z-index: 55; }
  body.rail-open .rail-scrim { display: block; }
  /* в меню колонка всегда развернута, кнопка «Свернуть» не нужна */
  .frame.rail-collapsed .rail .label, .frame.rail-collapsed .rail .count, .frame.rail-collapsed .rail .nm,
  .frame.rail-collapsed .rail .strip, .frame.rail-collapsed .rail .rail-head .cohort-meta,
  .frame.rail-collapsed .rail .rail-head .meta { display: revert; }
  .frame.rail-collapsed .rail .rail-head .cohort-name { display: block; }
  .frame.rail-collapsed .rail .rail-group { display: block; }
  .frame.rail-collapsed .rail .rail-head { display: block; padding: var(--sp-3) var(--gutter) var(--sp-2); }
  .frame.rail-collapsed .rail-nav a { justify-content: flex-start; padding: 0 var(--gutter); }
  .frame.rail-collapsed .rail-index a { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; justify-content: initial;
    gap: 6px; padding: 0 var(--sp-3) 0 var(--gutter); }
  .frame.rail-collapsed .rail-index .glyphs { order: 0; }
  .rail-nav a { height: 44px; }
  .rail-index a, .frame.rail-collapsed .rail-index a { height: 44px; }
  .frame .rail-foot, .frame.rail-collapsed .rail-foot { display: none; }
  .frame.rail-collapsed .rail .rail-head, .frame.rail-collapsed .rail .rail-head * { text-align: left; }

  /* общие элементы */
  .screen { padding: var(--sp-4) var(--gutter) var(--sp-6); gap: var(--sp-4); }
  .screen.scr-cohort, .screen.scr-import { padding-bottom: 0; }
  .head-row { flex-direction: column; align-items: stretch; gap: var(--sp-3); }
  .head-row > :not(.head-titles) { align-self: stretch; }
  .head-actions, .p-actions { justify-content: flex-start; column-gap: var(--sp-2); }
  .head-actions .btn, .p-actions .btn { flex: 1 1 auto; justify-content: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  /* главная кнопка – первой строкой, «…» – рядом с ней (без «…» главная – во всю строку),
     остальные кнопки – строкой ниже и не уже своей подписи, текстовое действие – последней строкой */
  .head-actions .btn-primary, .p-actions .btn-primary { order: -2; flex: 1 1 calc(100% - 56px); }
  .head-actions:not(:has(.btn-icon)) .btn-primary, .p-actions:not(:has(.btn-icon)) .btn-primary { flex-basis: 100%; }
  .head-actions .btn-icon, .p-actions .btn-icon { order: -1; flex: none; }
  .head-actions .btn:not(.btn-primary):not(.btn-icon), .p-actions .btn:not(.btn-primary):not(.btn-icon) { flex: 1 1 auto; min-width: min(100%, max-content); padding: 0 var(--sp-3); }
  .p-actions .ta { order: 3; flex: 1 1 100%; min-height: 40px; display: inline-flex; align-items: center; }
  /* на телефоне второстепенные действия шапки выпускника – в меню «…» */
  .p-actions .p-wide { display: none; }
  .p-actions .p-narrow { display: inline-flex; }
  .head-note { text-align: left; }
  .btn { min-height: 40px; }
  .btn-icon { min-width: 40px; }
  /* iOS не увеличивает страницу при вводе: 16px и у маленьких полей (.input.sm сильнее простого .input) */
  .input, select.input, textarea.input, .input.sm { font-size: 16px; }
  .input.sm { height: 40px; }
  .login-input.login-code { font-size: 20px; }
  .facts-list { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .facts-list dd { margin-bottom: var(--sp-2); }
  .facts-list.compact { grid-template-columns: 100px minmax(0, 1fr); }
  .facts-list.compact dd { margin-bottom: 0; }
  .kpis { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis > :last-child:nth-child(3n+1) { grid-column: 1 / -1; }   /* без серых пустых клеток */
  .kpis > :last-child:nth-child(3n+2) { grid-column: span 2; }
  .kpi { padding: var(--sp-2) var(--sp-3); }
  /* баннер: заголовок рядом с меткой, на новую строку уходят только действия */
  .banner { flex-wrap: wrap; }
  .banner .b-body { flex: 1 1 0; min-width: 0; }
  .banner .b-actions { flex-basis: 100%; margin-left: 18px; flex-wrap: wrap; }
  .menu [role="menuitem"] { min-height: 44px; }
  .toast .btn-icon { width: 40px !important; height: 40px !important; }
  .table-scroll { margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
  .tb-search { width: 100%; height: 40px; }
  .tb-search .input, .tb-search .input.sm { width: 100%; flex: 1 1 auto; }
  .tb-search kbd { display: none; }
  .filter { flex: 1 1 100%; }
  .filter select { flex: 1 1 auto; min-width: 0; }
  .ord { grid-template-columns: 44px minmax(0, 1fr); }
  .ord-act { grid-column: 2; padding-top: var(--sp-1); }
  .empty-block { padding: var(--sp-4) 0; }
  .progress-line { padding: var(--sp-3); gap: var(--sp-2) var(--sp-3); }
  .pl-bar { flex: 1 1 100%; max-width: none; order: 1; }
  .progress-line .pl-go { margin-left: 0; order: 2; }
  .progress-line .pl-text { flex: 1 1 auto; }

  /* «Группа»: 4 колонки статусов («Все» – на две), подписи переносятся только между словами */
  .status-strip { flex-direction: column; gap: var(--sp-3); }
  .ss-tabs { flex: none; grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-columns: auto; }
  .ss-tabs > :first-child { grid-column: span 2; }
  .ss-kpis { grid-auto-columns: minmax(0, 1fr); }
  .ss-cell, .ss-kpi { min-height: 72px; padding: var(--sp-2) 6px; gap: var(--sp-1); justify-content: flex-start; }
  .ss-count { font-size: 22px; padding-right: 14px; }
  .ss-label { white-space: normal; overflow-wrap: normal; word-break: normal; hyphens: manual; display: block; font-size: var(--fs-meta); line-height: 1.25; }
  .ss-cell .ss-label .mk { position: absolute; top: 10px; right: 8px; }
  /* фильтры – чипы в два ряда без пустых полос */
  .scr-cohort .toolbar { gap: var(--sp-3); }
  .scr-cohort .toolbar .seg { display: flex; flex-wrap: wrap; gap: var(--sp-2); row-gap: var(--sp-2); width: 100%; }
  .scr-cohort .toolbar .seg button { flex: none; min-height: 36px; height: 36px; padding: 0 var(--sp-3); border: var(--line-seam); border-radius: var(--r-pill); background: var(--c-canvas); }
  .scr-cohort .toolbar .seg button[aria-pressed="true"] { background: var(--c-navy); border-color: var(--c-navy); color: #FFFFFF; font-weight: var(--fw-regular); }
  .tb-right { margin-left: 0; width: 100%; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-2); }
  .cohort-table, .cohort-table tbody { display: block; width: 100%; }
  .cohort-table thead, .cohort-table tfoot { display: none; }
  .cohort-table tr {
    display: grid; grid-template-columns: 28px 32px minmax(0, 1fr) auto;
    grid-template-areas: "cb no name avg" "cb no status issues" ". . next next";
    column-gap: var(--sp-2); row-gap: 4px; padding: var(--sp-3) 0; border-bottom: var(--line-hair);
  }
  .cohort-table td { display: block; height: auto !important; padding: 0 !important; border: 0 !important; width: auto !important; overflow: visible; }
  .cohort-table .col-cb { grid-area: cb; padding-top: 2px !important; }
  .cohort-table input.cb { width: 22px; height: 22px; }
  .cohort-table .col-no { grid-area: no; text-align: left !important; color: var(--c-ink-2); }
  .cohort-table .col-name { grid-area: name; min-width: 0; }
  .cohort-table .col-avg { grid-area: avg; }
  .cohort-table .col-status { grid-area: status; min-width: 0; }
  .cohort-table .col-issues { grid-area: issues; text-align: right; }
  .cohort-table .col-next { grid-area: next; white-space: normal !important; display: flex !important; flex-wrap: wrap; align-items: center; gap: 0 var(--sp-4); }
  .cohort-table .col-profile, .cohort-table .col-cost, .cohort-table .col-upd { display: none !important; }
  .cohort-table td .nm { white-space: normal; }
  .cohort-table td.col-next > .ta { min-height: 40px; display: inline-flex; align-items: center; }
  .cohort-table td.col-next .dl-links { display: inline-flex; flex-wrap: wrap; margin: 0; }
  .cohort-table .dl-links .ta, .f-actions .ta, .flag-head .ta { min-height: 36px; display: inline-flex; align-items: center; }
  .cohort-table tbody tr[aria-selected="true"] { background: var(--c-indigo-tint); box-shadow: inset 3px 0 0 var(--c-indigo); }
  .cohort-table tbody tr[aria-selected="true"] > td { background: none; box-shadow: none !important; }
  .ledger tbody tr:hover > td { background: none; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .batch-band { margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); padding: var(--sp-2) var(--gutter); }
  .batch-band .bb-skip { flex-basis: 100%; order: 5; }
  .sticky-foot { margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); padding: var(--sp-2) var(--gutter); flex-wrap: nowrap; }
  .sticky-foot .meta, .sticky-foot .sf-note { display: none; }
  .sticky-foot .btn-primary { flex: 1 1 auto; }

  /* выпускник: шапка, «Данные», «Запуск», «Отчет» – панели друг под другом, страница прокручивается целиком */
  main.main.fixed { overflow: auto; display: block; }
  .scr-data, .scr-report, .scr-run { height: auto; min-height: 0; }
  .desk, .canvas, .page-scroll, .data-body, .run-body { flex: none; }
  .data-top, .report-top, .run-top { padding: var(--sp-4) var(--gutter) 0; gap: var(--sp-2); }
  .scr-run.job .run-top { padding-bottom: var(--sp-3); }
  .p-switch .display { white-space: normal; }
  .p-actions { width: 100%; }

  .p-actions .version-pick { flex: 1 1 100%; }
  .p-actions .version-pick select { width: 100%; }
  .stage-row { gap: var(--sp-3); }
  .stage-row .p-glyph { display: none; }
  .stage-tabs { overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
  .stage-tabs::-webkit-scrollbar { display: none; }
  .data-body { display: block; overflow: visible; }
  .data-main { overflow: visible; padding: var(--sp-4) var(--gutter); }
  .data-main > * { max-width: 100%; }
  .evidence { border-left: 0; border-top: var(--line-hair); overflow: visible; padding: var(--sp-4) var(--gutter) var(--sp-6); }
  .flags.todo { margin: 0 calc(var(--gutter) * -1); padding: var(--sp-4) var(--gutter); }
  /* матрица баллов прокручивается сама, названия компетенций остаются на месте, справа – подсказка-растушевка */
  .dmatrix {
    --cols: 116px 44px 44px 56px 60px 64px 128px;
    overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  .dmatrix .drow { min-width: max-content; }
  .dmatrix .drow > :first-child { position: sticky; left: 0; z-index: 1; }
  .dmatrix .drow .rh { white-space: normal; line-height: 1.25; }
  .drow .ch-sub { display: none; }
  /* «Запуск №N»: участники – горизонтальная лента над панелью, а не список на экран */
  .run-body { display: block; }
  .run-rail { display: flex; overflow-x: auto; border-right: 0; border-bottom: var(--line-hair); padding: 0 var(--gutter); scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .run-rail::-webkit-scrollbar { display: none; }
  .run-rail .rr-group { display: none; }
  .rr-item { flex: none; height: 44px; padding: 0 var(--sp-3); }
  .rr-item[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--c-indigo); background: none; }
  .rr-p .nm { flex: none; }
  .panel-pad { padding: var(--sp-4) var(--gutter) var(--sp-6); gap: var(--sp-4); }
  .run-empty { padding: var(--sp-4) var(--gutter); }
  .spine-step { grid-template-columns: 28px minmax(0, 1fr); }
  .spine-step .node::after { width: 6px; }
  .section-ledger, .section-ledger.detailed { overflow-x: auto; grid-template-columns: 28px minmax(140px, 1fr) minmax(120px, auto); }
  .section-ledger > :nth-child(5n+4), .section-ledger > :nth-child(5n+5) { display: none; }
  .section-ledger.detailed > * { display: flex; }
  .section-ledger.detailed { grid-template-columns: 28px 150px 130px 64px 64px 64px 96px 88px; }
  .run-panel .ledger { min-width: 560px; }
  /* «Отчет»: замечания – над страницей и прокручиваются сами, все блоки на одном поле 16 px */
  .desk, .desk.secs { display: flex; flex-direction: column; }
  .desk > .rpanel { order: -1; border-left: 0; border-bottom: var(--line-hair); }
  .rpanel .rp-body { max-height: 50vh; overflow: auto; padding: var(--sp-3) var(--gutter) var(--sp-4); }
  .panel-tabs { padding: 0 var(--gutter); }
  .page-strip { display: none; }
  .canvas { min-height: 0; }
  .canvas-bar { height: auto; min-height: 44px; flex-wrap: wrap; white-space: normal; overflow: visible; row-gap: 2px;
    padding: 4px var(--gutter); gap: var(--sp-2) var(--sp-3); }
  .canvas-bar .cb-note { display: none; }
  .canvas-bar .page-acts, .canvas-bar .layer { margin-left: 0; }
  .canvas-bar .seg { flex-wrap: nowrap; flex: none; }
  .page-scroll { padding: var(--sp-3) var(--gutter); overflow-x: auto; overflow-y: visible; }
  .margin-chips { display: none; }
  .text-scroll { overflow: visible; padding: var(--sp-3) var(--gutter) var(--sp-5); }
  .text-view { padding: 20px 16px; }
  .tv-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-body > details.keys { display: none; }
  .page-meta .pm-nav .btn { min-height: 40px; width: 40px; }
  .report-banners { padding: var(--sp-3) var(--gutter); }
  .report-empty { padding: var(--sp-5) var(--gutter); }
  details.keys { display: none; }

  /* «Загрузка», «Запуски», «Настройки», «Группы» */
  .import-cols, .mapping, .models-grid { grid-template-columns: minmax(0, 1fr); }
  .models-grid select { width: 100%; }
  .roster-table .ledger { min-width: 0; }
  .roster-table td:nth-child(1), .roster-table th:nth-child(1) { width: 32px; }
  .roster-table td:nth-child(3), .roster-table th:nth-child(3) { width: 84px; }
  .roster-table td:nth-child(4), .roster-table th:nth-child(4) { display: none; }   /* статус – на странице группы */
  .roster-table .gender-pick { width: 76px; }
  .result-table th:nth-child(3), .result-table td:nth-child(3) { display: none; }   /* полоска профиля */
  .result-table td .ta, .roster-table td .st { white-space: normal; }
  .ledger.result-table td { vertical-align: top; }
  .fl-tools .tb-search .input { width: 100%; }
  .fl-row { grid-template-columns: 18px minmax(0, 1fr) 40px; }
  .fl-row > .fl-role, .fl-row > .fl-sum { grid-column: 2 / 3; }
  .fl-row > .fl-act { grid-column: 3; grid-row: 1; }
  .fl-row > .fl-act.wide { grid-column: 2 / 4; grid-row: auto; justify-content: flex-start; }
  .fl-act .ta { text-align: left; }
  .fl-role { flex-wrap: nowrap; }
  .role-select { width: auto; flex: 1 1 auto; min-width: 0; }
  .fl-sum { padding-top: 0; }
  .fl-issues { margin-left: 0; }
  .set-row { grid-template-columns: minmax(0, 1fr); gap: var(--sp-1); }
  .anchor-tabs { gap: var(--sp-3); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
  .anchor-tabs::-webkit-scrollbar { display: none; }
  .anchor-tabs .tab { flex: none; }
  .radio-cards { grid-template-columns: minmax(0, 1fr); }
  .form-grid, .first-run .new-cohort .form-grid { grid-template-columns: minmax(0, 1fr); }
  .new-cohort.card { padding: var(--sp-4); }
  .new-cohort .form-grid .input { width: 100% !important; }   /* у полей ширина задана в разметке */
  .history .hl-row, .history.with-cost .hl-row { grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "node main status" "node pids pids";
    row-gap: 2px; padding: var(--sp-2) var(--sp-1) var(--sp-2) 0; }
  .hl-row > :nth-child(1) { grid-area: node; }
  .hl-row > :nth-child(2) { grid-area: main; }
  .hl-row > :nth-child(3) { grid-area: pids; }
  .hl-row > :nth-child(4) { grid-area: status; justify-self: end; }
  .history .hl-row > :nth-child(n+5) { display: none; }
  .hl-head { display: none; }
  .ledger.admins, .ledger.admins tbody { display: block; }
  .ledger.admins thead { display: none; }
  .ledger.admins tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name act" "mail act" "how last";
    gap: 2px var(--sp-2); padding: var(--sp-3) 0; border-bottom: var(--line-hair); }
  .ledger.admins td { display: block; height: auto; padding: 0; border: 0; overflow-wrap: anywhere; width: auto; }
  .ledger.admins td.num { width: auto; }
  .ledger.admins td:nth-child(1) { grid-area: name; font-weight: var(--fw-strong); }
  .ledger.admins td:nth-child(2) { grid-area: mail; }
  .ledger.admins td:nth-child(3) { grid-area: how; }
  .ledger.admins td:nth-child(4) { grid-area: last; text-align: right; }
  .ledger.admins td:nth-child(5) { grid-area: act; justify-self: end; align-self: start; }
  .cohorts thead { display: none; }
  .cohorts, .cohorts tbody { display: block; overflow: visible; }
  .cohorts tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name month" "prog created" "st st";
    gap: 4px var(--sp-2); padding: var(--sp-3) 0; border-bottom: var(--line-hair); }
  .ledger.cohorts td { display: block; height: auto; padding: 0; border: 0; }
  .cohorts td:nth-child(1) { grid-area: name; }
  .cohorts td:nth-child(2) { grid-area: prog; }
  .cohorts td:nth-child(3) { grid-area: month; text-align: right; }
  .cohorts td:nth-child(4) { grid-area: st; }
  .cohorts td:nth-child(5) { grid-area: created; text-align: right; }

  /* окна: по центру экрана, кнопки во всю ширину, флажки побольше */
  .scrim { padding: 12px; }
  .dialog, .dialog.wide { max-height: calc(100dvh - 24px); }   /* ширина – min(…, 100%) из base.css */
  .dialog-foot .btn { flex: 1 1 auto; }
  .dialog .check { min-height: 40px; }
  .dialog input.cb, .dialog input.rb { width: 20px; height: 20px; }
  .drawer { top: 0; bottom: 0; width: 100%; min-width: 0; }
  .drawer-head { padding-right: 56px; }
  .drawer-head .close { width: 44px; height: 44px; top: 8px; right: 8px; }
  .popover { max-width: calc(100vw - 16px); }
  .dialog-foot, .drawer-foot { flex-wrap: wrap; padding: var(--sp-2) var(--gutter); }
}
