:root {
  --ground: #f4f6f8;
  --surface: #ffffff;
  --ink: #1a2430;
  --muted: #5d6b7a;
  --accent: #1d4f76;
  --line: #d9e0e7;
  --bad: #9b2c2c;
  --bad-soft: #fdeaea;
  --good: #167a46;
  --good-soft: #e9f7ef;
  --accent-soft: #edf4fa;
  /* Подложка под кадром в рамке превью — видна там, где кадр рамку не
     заполняет (вертикальный ролик, ролик ещё без превью). Темнее карточки,
     чтобы читалась как углубление, а не как продолжение карточки. */
  --media-well: #e8edf2;
  /* «Требует действия, но ничего не сломано» — между спокойным акцентом и
     красной ошибкой. Незавершённая загрузка: её надо докачать, а не ждать. */
  --warn: #a8681a;
  --warn-soft: #fbf2e3;
}

* { box-sizing: border-box; }

html { scrollbar-gutter: stable; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

body {
  margin: 0;
  padding: 0 20px 64px;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.55 -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.wrap { max-width: 640px; margin: 0 auto; }
.wrap--wide { max-width: 900px; }

header.site {
  max-width: 1160px;
  margin: 0 auto 32px;
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
header.site a { color: var(--accent); }
.site-workspace { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 6px; min-width: 0; }
.site-workspace__mark, .site-workspace__back {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; color: var(--accent);
}
.site-workspace__mark svg, .site-workspace__back svg { width: 20px; height: 20px; }
.site-workspace__back { border-radius: 6px; text-decoration: none; }
.site-workspace__back:hover { background: var(--accent-soft); }
.site-workspace__back:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.context-return { margin: -8px 0 20px; font-size: 14px; }
.context-return a { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); text-decoration: none; }
.context-return a:hover { text-decoration: underline; }
.context-return a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.site-name { font-weight: 600; font-size: 18px; text-decoration: none; }
.site-name:hover { text-decoration: underline; }
.jury-nav { display: inline-flex; align-items: center; gap: 10px; margin-right: 8px; }
.jury-nav__item {
  justify-content: center; min-width: 76px; border-color: var(--accent); background: var(--surface);
}
.jury-nav__item:hover { background: var(--accent-soft); text-decoration: none; }
header.site .jury-nav__item--active, header.site .jury-nav__item--active:hover {
  background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); color: #fff; font-weight: 600;
}
.site-tools { display: flex; align-items: center; gap: 12px; min-width: 0; }
header.site--coordinator { align-items: center; }
header.site--coach { align-items: center; }
header.site--coordinator .jury-nav__item--active { font-weight: 600; }
header.site--jury { align-items: center; }
header.site--jury .site-tools { flex-wrap: wrap; }
header.site--jury .jury-nav { flex-wrap: wrap; }
header.site--jury .jury-nav__item--active { font-weight: 600; }

.form-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.form-status-chip:hover { border-color: var(--accent); background: #e1edf5; text-decoration: none; }
header.site .form-status-chip, header.site .form-status-chip:hover { font-weight: 600; text-decoration: none; }
.form-status-chip__state { color: var(--muted); font-weight: 400; }
.form-status-chip--submitted { background: var(--good-soft); color: var(--good); }
.form-status-chip--submitted .form-status-chip__state { color: var(--good); }
.form-status-chip--incomplete .status-dot { background: #c43b36; }
.form-status-chip--pending .status-dot { background: #c18a08; }

.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.form-status-chip--submitted .status-dot, .intake-status--open .status-dot, .video-status--ready .status-dot { background: var(--good); }

.account-menu { position: relative; }
.account-menu summary { list-style: none; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu__trigger { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.account-menu__avatar, .account-menu__initial {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); flex: 0 0 auto;
}
.account-menu__avatar { object-fit: cover; }
.account-menu__initial { display: inline-flex; align-items: center; justify-content: center; background: var(--surface); color: var(--muted); font-size: 14px; font-weight: 600; }
.account-menu__name { font-size: 14px; color: var(--muted); }
.account-menu__panel {
  position: absolute; right: 0; z-index: 5; display: grid; gap: 3px; min-width: 190px;
  margin-top: 8px; padding: 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 6px; box-shadow: 0 8px 18px rgba(26, 36, 48, .12);
}
.account-menu__panel form { margin-top: 6px; }

h1 { font-size: 26px; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 19px; margin: 32px 0 10px; }
p { margin: 0 0 14px; max-width: 62ch; }
.lede { color: var(--muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
}

label { display: block; font-weight: 600; margin: 16px 0 6px; }
.field {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
.field:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.region-choice-search { margin-bottom: 6px; }
.helptext { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }

button, .button {
  margin-top: 22px;
  padding: 11px 20px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}
button:hover, .button:hover { filter: brightness(1.1); }

.errors {
  background: var(--bad-soft);
  border-left: 3px solid var(--bad);
  color: var(--bad);
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: 0 6px 6px 0;
}
.errors ul { margin: 0; padding-left: 18px; }

.muted { color: var(--muted); font-size: 14px; }
.links { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; }
.links a { color: var(--accent); margin-right: 18px; }

.auth-page { min-height: 100vh; padding-bottom: 24px; }
.auth-wrap { max-width: 440px; margin: clamp(56px, 12vh, 112px) auto 0; }
.auth-card { padding: 26px 28px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.auth-brand { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; color: var(--accent); font-size: 15px; font-weight: 600; text-decoration: none; }
.auth-brand:hover { text-decoration: underline; }
.auth-brand-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 22px; }
.auth-brand-row .auth-brand { margin-bottom: 0; white-space: nowrap; }
.auth-brand-row__regulations { color: var(--accent); font-size: 13px; }
.auth-brand__mark { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 6px; }
.auth-brand__mark svg { width: 16px; height: 16px; }
.auth-card h1 { margin-bottom: 6px; font-size: 24px; }
.auth-card .lede { margin-bottom: 18px; font-size: 14px; line-height: 1.5; }
.auth-card label { margin-top: 14px; }
.auth-card button { width: 100%; margin-top: 20px; }
.auth-card__links { display: grid; gap: 8px; margin-top: 20px; padding-top: 16px; font-size: 14px; }
.auth-card__links a { margin-right: 0; }

ul.plain { list-style: none; padding: 0; }
ul.plain li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.tag { font-size: 13px; color: var(--muted); }

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #121a23;
    --surface: #1a232e;
    --ink: #e2e8ee;
    --muted: #93a1b0;
    --accent: #7cb0d8;
    --line: #2a3644;
    --bad: #f0a0a0;
    --bad-soft: #33232a;
    /* Тот же принцип, что и в светлой теме: темнее карточки (--surface
       #1a232e), а не светлее. Без этой строки поля по бокам вертикального
       ролика светились бы светло-серым на тёмной странице. */
    --media-well: #121a23;
    --warn: #e0ae5c;
    --warn-soft: #2e2618;
  }
  .field { background: #121a23; }
}

/* Кнопка выхода должна выглядеть ссылкой: выход обязан быть POST-ом
   (в Django 5 GET на выход отдаёт 405), но человеку это знать незачем. */
.linklike {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.linklike:hover { filter: none; opacity: .75; }

/* Обёртка поля формы. Без блока input и кнопка встают в одну строку. */
.row { margin-bottom: 4px; }
.row .field { max-width: 420px; }

/* Кнопка "показать пароль по удержанию" — static/js/password-toggle.js,
   оборачивает input[type=password] сам, разметки в шаблоне для неё нет.
   max-width — на обёртке, а не на .field, как в правиле выше: две колонки
   (поле + кнопка) вместе не должны быть шире, чем было одно поле. */
.password-field-wrap { position: relative; max-width: 420px; }
.password-field-wrap .field { max-width: none; width: 100%; padding-right: 40px; }
/* .password-field-wrap .password-toggle, а не голое .password-toggle: на
   странице входа есть .auth-card button { width: 100%; margin-top: 20px },
   у него специфичность выше одного класса — без второго уровня кнопка-глаз
   растягивалась на всю ширину поля и уезжала на 20px вниз (найдено здесь
   же при первой проверке в браузере, не на глаз в редакторе). */
.password-field-wrap .password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
}
.password-field-wrap .password-toggle:hover,
.password-field-wrap .password-toggle[aria-pressed="true"] { color: var(--accent); }
.password-field-wrap .password-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: 4px;
}

/* Анкета */
.req { color: var(--bad); }
.actions { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.notice {
  margin-top: 22px;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 6px 6px 0;
}
/* Напоминание «идёт обработка, не грузите повторно» — оно должно быть
   заметнее обычной заметки, иначе его прочитают ровно те, кто и так бы не
   стал грузить второй раз. Фон акцентный, но не тревожный: ничего плохого
   не случилось, ждать — это норма. */
.notice--processing {
  background: var(--accent-soft);
  line-height: 1.55;
}
/* Незавершённая загрузка — в отличие от обработки, здесь ждать нечего,
   нужно действие тренера. Поэтому другой цвет, а не тот же спокойный. */
.notice--unfinished {
  background: var(--warn-soft);
  border-left-color: var(--warn);
  line-height: 1.55;
}
.msg { padding: 12px 16px; border-radius: 6px; margin-bottom: 18px; background: var(--surface); border-left: 3px solid var(--accent); }
.msg.error { border-color: var(--bad); color: var(--bad); background: var(--bad-soft); }
ul.checks { list-style: none; padding: 0; margin: 8px 0 0; }
ul.checks li { padding: 2px 0; }

/* Карточка тренера */
.card-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.card-table th, .card-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.card-table th { width: 34%; font-weight: 600; }
.thumb { max-width: 120px; max-height: 120px; border-radius: 4px; border: 1px solid var(--line); vertical-align: middle; margin-right: 10px; }

/* Фотография тренера — на экране, в PDF не попадает (TZ §13.17) */
.coach-header { display: flex; gap: 20px; align-items: center; margin-bottom: 4px; }
.coach-header h1 { margin-bottom: 4px; }
.avatar {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--line); flex-shrink: 0;
}
.avatar-placeholder {
  width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0;
  background: var(--line); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 600;
}
.avatar--lg, .avatar-placeholder.avatar--lg { width: 96px; height: 96px; font-size: 34px; }
.avatar-card { display: flex; gap: 20px; align-items: flex-start; }
.avatar-card .avatar, .avatar-card .avatar-placeholder { width: 96px; height: 96px; font-size: 34px; }
.avatar-controls { flex: 1; min-width: 220px; }
.avatar-controls label { margin-top: 0; }
.avatar-controls .actions { margin-top: 16px; }

/* Список тренеров */
.filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin: 20px 0 26px; }
.filter { display: flex; flex-direction: column; }
.filter label { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.filter .field { width: auto; min-width: 150px; }
.filter--actions { flex-direction: row; gap: 10px; }
.filter--actions button, .filter--actions .button { margin-top: 0; }
.warn { color: var(--flag, #a8681a); }

/* Кабинет тренера: видео остаются рабочим экраном, а не списком ссылок. */
.wrap--catalog { max-width: 1160px; }
.video-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.video-page-header .lede { margin-bottom: 6px; }
.jury-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.jury-page-header h1 { margin-bottom: 4px; }
.jury-page-header .lede { margin: 0; }
.jury-page-header__count { flex: 0 0 auto; margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.jury-filter-panel { margin: 0 0 22px; padding: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.jury-filter-panel > summary { padding: 12px 0; color: var(--accent); cursor: pointer; font-weight: 600; }
.jury-filter-panel[open] > summary { border-bottom: 1px solid var(--line); }
.jury-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 14px 0 16px; }
.jury-filters .filter { min-width: 0; }
.jury-filters .filter label { margin: 0 0 5px; color: var(--muted); font-size: 13px; font-weight: 600; }
.jury-filters .field { width: 100%; min-width: 0; }
.jury-filter-actions { display: flex; align-items: flex-end; gap: 14px; min-width: 0; }
.jury-filter-actions button { margin: 0; white-space: nowrap; }
.jury-filter-actions a { padding: 11px 0; color: var(--accent); font-size: 14px; white-space: nowrap; }
.jury-result-summary { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.video-grid--jury { margin-bottom: 24px; }
.jury-video-card__coach { display: block; margin-top: 7px; color: var(--accent); font-size: 14px; font-weight: 600; text-decoration: none; }
.jury-video-card__coach:hover { text-decoration: underline; }
.jury-video-card__meta { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.jury-video-card__footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.jury-video-card__footer span:last-child { flex: 0 0 auto; }
.jury-video-card__status { margin: 8px 0 0; color: var(--bad); font-size: 13px; }
.jury-pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.jury-pagination .button { margin: 0; }
.jury-pagination > span { color: var(--muted); font-size: 14px; text-align: center; }
.jury-empty-state { padding: 24px 0; border-top: 1px solid var(--line); }
.jury-empty-state h2 { margin: 0 0 8px; }
.jury-empty-state p { color: var(--muted); }
.coordinator-search, .coordinator-team { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.coordinator-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.coordinator-overview .jury-page-header { margin: 0; }
.coordinator-overview .coordinator-search { margin: 0; padding: 0; border: 0; min-width: 0; }
.coordinator-overview__meta { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.coordinator-overview__meta a { color: var(--accent); }
.team-review-actions { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 16px 14px; align-items: center; }
.team-review-actions > span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.team-review-delivery button { margin-top: 0; }
.team-review-actions a { display: inline-flex; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--accent); background: var(--accent-soft); font-size: 14px; font-weight: 600; text-decoration: none; }
.team-review-actions a:hover { border-color: var(--accent); }
.team-review-delivery p { margin: 8px 0 0; font-size: 13px; }
.review-selection-line { display: flex; align-items: center; gap: 8px; min-height: 32px; margin-top: 4px; }
.review-selection-line > small { white-space: nowrap; }
.review-selection-line .review-consent { flex: 0 0 32px; width: 32px; height: 32px; margin: 0 6px 0 0; color: var(--accent); }
.review-selection-line .review-consent--missing { color: #ad6509; cursor: default; }
.review-star-form { display: inline-block; flex: 0 0 32px; margin: 0; }
.review-star-form .review-star { margin: 0; }
.review-star { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 4px; background: transparent; color: #75818d; border: 1px solid var(--line); border-radius: 5px; }
.review-star span { width: 22px; height: 22px; background: currentColor; mask: url("../vendor/lucide/star.bed445d40988.svg") center / contain no-repeat; }
.review-star.is-selected { color: #b77908; background: #fff4ce; border-color: #dec06c; }
.review-star:hover { background: #fff4ce; }
.own-territory { margin: 20px 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.own-territory dl { margin: 0 0 12px; }
.own-territory dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 12px; margin-bottom: 8px; }
.own-territory dt { color: var(--muted); }
.own-territory dd { margin: 0; overflow-wrap: anywhere; }
.own-territory summary { color: var(--accent); cursor: pointer; font-weight: 600; }
.own-territory form { max-width: 100%; }
.own-territory .field { width: 100%; min-width: 0; }
.review-video-state { font-size: 12px; color: var(--muted); }
.team-review-matrix .team-matrix__cell { flex-wrap: wrap; }
@media (max-width: 760px) {
  .team-review-actions { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .team-review-actions a { justify-self: start; }
  .team-review-actions > span { margin-bottom: 12px; }
  .team-review-matrix .team-matrix { min-width: 850px; }
  .team-review-matrix .team-matrix th, .team-review-matrix .team-matrix td { display: table-cell; }
}
@media (max-width: 760px) {
  .coordinator-overview { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
.jury-coordinator-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin: 0 0 18px; padding-block: 16px; border-block: 1px solid var(--line); }
.jury-coordinator-filters > div:first-child { flex: 1 1 260px; }
.jury-coordinator-filters > div:nth-child(2) { flex: 0 1 230px; }
.jury-coordinator-filters label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 13px; }
.jury-coordinator-filters .field { width: 100%; }
.jury-coordinator-filters button { margin: 0; }
.jury-coordinator-table { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.jury-coordinator-table__head, .jury-coordinator-table__row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) 100px minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px 16px; }
.jury-coordinator-table__head { color: var(--muted); background: #e8edf2; font-size: 12px; font-weight: 600; }
.jury-coordinator-table__row { min-height: 68px; border-top: 1px solid var(--line); }
.jury-coordinator-table__row:nth-child(odd) { background: #f8fafb; }
.jury-coordinator-table__row strong, .jury-coordinator-table__row .muted { display: block; }
.jury-coordinator-table__row a { display: block; color: var(--accent); }
@media (max-width: 760px) {
  .jury-coordinator-table__head { display: none; }
  .jury-coordinator-table__row { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 10px; }
  .jury-coordinator-table__row .jury-coach-cell__label { display: block; }
}
@media (max-width: 480px) {
  .jury-page-header--coordinators { flex-direction: column; align-items: flex-start; gap: 2px; }
  .jury-page-header--coordinators .jury-page-header__count { margin: 0; }
}
.coordinator-search h2, .coordinator-team h2 { margin: 0 0 10px; font-size: 18px; }
.coordinator-search__hint { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.coordinator-candidates__list, .coordinator-team__list { margin: 14px 0 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.coordinator-candidate, .coordinator-team__list li { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 72px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.coordinator-candidate:nth-child(even), .coordinator-team__list li:nth-child(even) { background: #f8fafb; }
.coordinator-candidate:last-child, .coordinator-team__list li:last-child { border-bottom: 0; }
.coordinator-candidate strong, .coordinator-team__list strong { display: block; font-size: 15px; }
.coordinator-candidate p, .coordinator-team__list span { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.coordinator-candidate .jury-status-pill { margin-top: 7px; }
.coordinator-candidate form { flex: 0 0 auto; margin: 0; }
.coordinator-candidate button { margin: 0; white-space: nowrap; }
.coordinator-pending-row form, .coordinator-pending-row button { flex: 0 0 auto; margin: 0; }
.coordinator-pending-row .button--secondary { color: var(--accent); background: var(--surface); border-color: var(--line); }
.coordinator-pending-row .button--secondary:hover { background: var(--accent-soft); }
.coordinator-invitation { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 20px; padding: 16px; border: 1px solid #b9dfc9; border-left: 3px solid var(--good); border-radius: 6px; background: var(--good-soft); }
.coordinator-invitation h2 { margin: 0 0 4px; font-size: 17px; }
.coordinator-invitation p { margin: 0; }
.coordinator-invitation__actions { display: flex; flex: 0 0 auto; gap: 8px; }
.coordinator-invitation__actions form, .coordinator-invitation__actions button { margin: 0; }
.coordinator-invitation__actions .button--secondary { color: var(--accent); background: var(--surface); border-color: var(--line); }
.coordinator-invitation__actions .button--secondary:hover { background: var(--accent-soft); }
.jury-list-toolbar {
  position: relative; display: grid; grid-template-columns: minmax(280px, 1fr) auto;
  align-items: center; gap: 12px; margin-bottom: 14px; padding: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
}
.jury-coach-toolbar { grid-template-columns: minmax(280px, 1fr) auto auto; }
.jury-list-search { display: flex; gap: 8px; min-width: 0; }
.jury-list-search .field { width: 100%; min-width: 0; }
.jury-list-search button { flex: 0 0 auto; margin: 0; padding: 10px 18px; }
.jury-advanced-filters { position: static; }
.jury-advanced-filters > summary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 9px 14px; color: var(--accent); background: var(--surface); border: 1px solid var(--accent);
  border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 600; list-style: none;
}
.jury-advanced-filters > summary::-webkit-details-marker { display: none; }
.jury-advanced-filters > summary:hover, .jury-advanced-filters[open] > summary { background: var(--accent-soft); }
.jury-filter-indicator { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--good); }
.jury-filters--popover {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 8;
  grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(760px, 100%);
  padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 12px 28px rgba(26, 36, 48, .16);
}
.jury-filters--popover .jury-filter-actions { grid-column: 1 / -1; align-items: center; }
.jury-filters--popover .jury-filter-actions button { margin: 0; }
.jury-export-actions { display: flex; align-items: center; gap: 8px; }
.jury-export-actions .button, .jury-export-actions__secondary {
  min-width: 54px; margin: 0; padding: 10px 13px; text-align: center;
}
.jury-export-actions__secondary {
  color: var(--accent); background: var(--surface); border: 1px solid var(--line);
  border-radius: 6px; font-size: 14px; font-weight: 600; text-decoration: none;
}
.jury-export-actions__secondary:hover { border-color: var(--accent); background: var(--accent-soft); }
.jury-coach-table { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.jury-coach-table__head, .jury-coach-row {
  display: grid; grid-template-columns: minmax(260px, 1.5fr) minmax(190px, 1.2fr) minmax(150px, .8fr) minmax(190px, 1fr);
  align-items: center; column-gap: 18px;
}
.jury-coach-table__head {
  padding: 9px 16px; color: var(--muted); background: #e8edf2;
  border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; text-transform: uppercase;
}
.jury-coach-list { margin: 0; padding: 0; list-style: none; }
.jury-coach-row {
  min-height: 74px; padding: 11px 16px; border-bottom: 1px solid var(--line); transition: background-color .15s ease;
}
.jury-coach-row:nth-child(even) { background: #f8fafb; }
.jury-coach-row:hover { background: var(--accent-soft); }
.jury-coach-row:last-child { border-bottom: 0; }
.jury-coach-row__identity { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 12px; min-width: 0; }
.jury-coach-row__portrait {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; overflow: hidden;
  color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 50%;
  font-size: 16px; font-weight: 600; text-decoration: none;
}
.jury-coach-row__portrait img { width: 100%; height: 100%; object-fit: cover; }
.jury-coach-row__body { min-width: 0; }
.jury-coach-row__name { color: var(--ink); font-weight: 600; text-decoration: none; }
.jury-coach-row__name:hover { color: var(--accent); text-decoration: underline; }
.jury-coach-row__meta { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.jury-coach-row__inactive { display: inline-block; margin-left: 8px; color: var(--bad); font-size: 12px; }
.jury-coach-row__class { min-width: 0; color: var(--ink); font-size: 14px; overflow-wrap: anywhere; }
.jury-coach-row__questionnaire { display: grid; justify-items: start; gap: 4px; min-width: 0; }
.jury-status-pill {
  display: inline-flex; padding: 3px 8px; color: #8a5a14; background: #fff4e5;
  border: 1px solid #ead4ad; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.jury-status-pill--submitted { color: var(--good); background: var(--good-soft); border-color: #b9dfc9; }
.jury-coach-row__incomplete { color: #8a5a14; font-size: 12px; }
.jury-coach-row__video-cell { min-width: 0; }
.jury-coach-row__videos {
  display: inline-flex; padding: 5px 9px; color: var(--accent); background: var(--accent-soft);
  border: 1px solid transparent; border-radius: 6px; font-size: 13px; font-weight: 600; text-decoration: none;
}
.jury-coach-row__videos:hover { border-color: var(--accent); text-decoration: none; }
.jury-coach-row__team { display: block; min-height: 44px; }
.jury-coach-row__team { display: inline-flex; align-items: center; min-height: 36px; color: var(--accent); font-size: 14px; font-weight: 600; text-decoration: none; }
.jury-coach-row__team:hover { text-decoration: underline; }
.jury-coach-row__team::after { content: ""; width: 16px; height: 16px; margin-left: 4px; background: currentColor; mask: url("../vendor/lucide/chevron-right.04f1c1b73b2b.svg") center / contain no-repeat; }
.jury-coach-row__video-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.jury-coach-row__video-cell .jury-coach-cell__label { width: 100%; }
.jury-coach-row__open {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  color: var(--muted); border-radius: 6px; text-decoration: none;
}
.jury-coach-row__open:hover { color: var(--accent); background: var(--surface); }
.jury-coach-row__open svg { width: 18px; height: 18px; }
.jury-coach-cell__label { display: none; color: var(--muted); font-size: 12px; font-weight: 400; }
.jury-coach-profile__heading { display: flex; align-items: center; gap: 18px; margin-bottom: 12px; }
.jury-coach-profile__portrait { width: 80px; height: 80px; flex: 0 0 80px; object-fit: cover; border: 1px solid var(--line); border-radius: 50%; }
.jury-coach-profile__portrait--placeholder { display: flex; align-items: center; justify-content: center; color: var(--muted); background: var(--surface); font-size: 28px; font-weight: 600; }
.jury-coach-profile__heading h1 { margin-bottom: 4px; }
.jury-coach-profile__heading .lede { margin-bottom: 4px; }
.jury-coach-profile__status { display: inline-flex; align-items: center; gap: 7px; margin: 0; color: var(--muted); font-size: 14px; }
.jury-coach-profile__status--submitted { color: var(--good); }
.jury-coach-profile__status--submitted .status-dot { background: var(--good); }
.jury-coach-profile__contacts { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 0 16px; color: var(--muted); font-size: 14px; border-bottom: 1px solid var(--line); }
.jury-coach-profile__section { margin-top: 26px; }
.jury-coach-profile__section h2 { margin: 0 0 10px; }
.jury-coach-profile__section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.jury-coach-profile__section-heading h2 { margin: 0; }
.jury-coach-profile__section-heading span { color: var(--muted); font-size: 14px; }
.jury-coach-profile__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.jury-coach-profile__actions .button, .jury-coach-profile__actions form { margin: 0; }
.jury-coach-profile__action-link { color: var(--accent); font-size: 14px; }
.video-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.video-detail-header__title { min-width: 0; max-width: 100%; }
.video-detail-header h1 { margin-bottom: 4px; overflow-wrap: anywhere; }
.video-detail-header .lede { margin: 0; }
.video-detail-header__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.video-detail-header__edit { flex: 0 0 auto; margin: 0; }
.video-author {
  display: grid; grid-template-columns: 36px minmax(0, auto) 18px; align-items: center; gap: 9px;
  min-width: 0; padding: 6px 8px; color: var(--accent); background: var(--surface);
  border: 1px solid var(--line); border-radius: 6px; text-decoration: none;
}
.video-author:hover { border-color: var(--accent); background: var(--accent-soft); }
.video-author__portrait {
  display: flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  object-fit: cover; border: 1px solid var(--line); border-radius: 50%;
}
.video-author__portrait--placeholder { color: var(--muted); background: var(--ground); font-size: 14px; font-weight: 600; }
.video-author__copy { display: grid; min-width: 0; line-height: 1.25; }
.video-author__copy > span { color: var(--muted); font-size: 11px; font-weight: 400; }
.video-author__copy strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.video-author > svg { width: 18px; height: 18px; color: var(--muted); }
.video-detail-player { padding: 24px; }
/* Ограничение по ВЫСОТЕ, а не по ширине. Раньше стояло width: 100% без
   потолка: горизонтальный ролик при этом ложился нормально, а вертикальный
   с телефона при той же ширине становился в 1,8 раза выше — измерено на
   настоящем ролике 608×1080: 850×1510 при окне 720px, то есть 2,1 экрана
   (жалоба 06.09.2026).
   max-height ограничивает вертикальный ролик, а max-width — горизонтальный,
   и каждый упирается в свой предел: у горизонтального при 72vh запас по
   высоте остаётся, у вертикального первым срабатывает потолок. Поэтому
   width: auto, а не 100% — иначе элемент остался бы во всю ширину, а
   вертикальное видео поехало бы в него с чёрными полями по бокам вместо
   того, чтобы просто стать уже.
   Проверено на обоих: горизонтальный 1920×1080 как был 850×478, так и
   остался — правка его не трогает вовсе. */
.video-detail-player video {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 72vh;
  margin: 0 auto;
}
.video-viewing-tools { margin-top: 12px; }
.video-viewing-tools summary { color: var(--accent); cursor: pointer; font-size: 14px; }
.video-viewing-tools__panel { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.video-viewing-tools__panel label { margin: 0; color: var(--muted); font-size: 14px; font-weight: 400; }
.video-viewing-tools__panel select { min-height: 38px; padding: 7px 10px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.video-viewing-tools__panel button { margin: 0; padding: 8px 12px; }
.video-description h2 { margin-bottom: 10px; }
.video-details { margin: 0; border-top: 1px solid var(--line); }
.video-details > div { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(0, 1.2fr); gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.video-details dt { color: var(--muted); font-weight: 400; }
.video-details dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.video-details__text { color: var(--ink); font-weight: 400; }
.intake-status { display: inline-flex; align-items: center; gap: 7px; margin: 0; color: var(--muted); font-size: 14px; }
.coordinator-summary { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.coordinator-summary strong { color: var(--ink); }
.coordinator-team__list a:not(.button) { color: var(--accent); text-decoration: none; }
.coordinator-team__list a:not(.button):hover { text-decoration: underline; }
.coordinator-team__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.coordinator-team__actions .coordinator-action { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; font-size: 14px; }
.coordinator-action__icon { display: inline-block; flex: 0 0 18px; width: 18px; height: 18px; background: currentColor; }
.coordinator-action__icon--results { mask: url("../vendor/lucide/chevron-right.04f1c1b73b2b.svg") center / contain no-repeat; }
.coordinator-action__icon--protocol { mask: url("../vendor/lucide/file-text.9575e4237503.svg") center / contain no-repeat; }
.coordinator-team__list a:focus-visible, .team-review-video:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 3px; }
.coordinator-team__counts { display: block; }
.team-review-owner { margin: 8px 0; }
.cycle-statistics-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-top: 24px; padding-block: 14px; border-block: 1px solid var(--line); }
.cycle-statistics-summary a { color: var(--accent); font-weight: 600; }
.cycle-statistics-summary span { color: var(--muted); font-size: 14px; }
.athlete-results-header > div { min-width: 0; overflow-wrap: anywhere; }
.video-result-value { font-size: 24px; margin: 10px 0; }
.video-result-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; margin: 14px 0 0; font-size: 24px; line-height: 1.25; }
.video-result-line span { font-weight: 700; }
.video-result-line strong { color: var(--ink); font-size: 24px; font-weight: 800; }
.athlete-results-header > .button { flex-shrink: 0; }
.athlete-result { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.athlete-result h2 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.roster-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin: 16px 0; }
.cycle-statistics-selector { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; margin: 16px 0; }
.cycle-statistics-selector label { grid-column: 1 / -1; }
.cycle-statistics-selector .field { min-width: 0; width: 100%; }
.cycle-statistics-selector button { margin: 0; }
.team-review-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; padding: 18px 0; border-block: 1px solid var(--line); margin: 20px 0; }
.team-review-filters > div { min-width: 0; }
.team-review-filters label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.team-review-filters .field { width: 100%; min-width: 0; }
.team-review-filters button { margin: 0; }
.team-review-filters--jury { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.team-review-video { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.team-review-video img { width: 72px; height: 41px; object-fit: cover; border-radius: 4px; }
.team-review-video .team-review-video__fallback { width: 24px; height: 24px; }
.team-review-video { min-height: 44px; min-width: 44px; justify-content: center; }
@media (max-width: 680px) { .team-review-filters { grid-template-columns: minmax(0, 1fr); } }
.athlete-result p { margin: 6px 0 0; }
.athlete-result__form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; margin: 0; }
.athlete-result__form label { display: block; margin: 0 0 5px; color: var(--muted); font-size: 13px; }
.athlete-result__form .field { width: 100%; min-width: 0; }
.athlete-result__form button { margin: 24px 0 0; }
.team-add { margin: 0 0 20px; padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.team-add > summary { display: inline-flex; min-height: 40px; align-items: center; padding: 8px 13px; color: var(--accent); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; font-weight: 600; list-style: none; }
.team-add > summary::-webkit-details-marker { display: none; }
.team-add__form { display: grid; grid-template-columns: minmax(240px, 1.5fr) minmax(130px, .65fr) minmax(150px, .8fr) auto; gap: 12px; align-items: end; max-width: 860px; margin-top: 14px; }
.team-add__form label { display: block; margin: 0 0 5px; color: var(--muted); font-size: 13px; font-weight: 600; }
.team-add__form .field { width: 100%; min-width: 0; }
.team-add__form button { margin: 0; }
.team-summary { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0 0 20px; padding: 0; list-style: none; color: var(--muted); }
.team-summary li { display: flex; align-items: baseline; gap: 8px; }
.team-summary strong { color: var(--ink); }
.team-summary a, .team-roster a { color: var(--accent); }
.team-roster { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 15px; }
.team-roster__athlete-col { width: 32%; }
.team-roster__exercise-col { width: 30%; }
.team-roster__result-col { width: 17%; }
.team-roster__video-col { width: 21%; }
.team-roster th, .team-roster td { padding: 10px 16px; text-align: left; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); }
.team-roster thead th { color: var(--muted); font-size: 13px; font-weight: 400; padding-top: 0; }
.team-roster tbody:nth-of-type(odd) { background: var(--surface); }
.team-roster .team-roster__athlete { vertical-align: top; padding-top: 20px; }
.team-roster__athlete > a { font-weight: 600; text-decoration: none; }
.team-roster__athlete > a:hover { text-decoration: underline; }
.team-roster__athlete > span { display: block; color: var(--muted); font-size: 14px; font-weight: 400; margin-top: 4px; }
.team-roster__result strong { font-weight: 600; }
.team-roster__video-link { display: inline-flex; align-items: center; min-height: 44px; }
.team-roster .team-roster__video-link--ready { color: var(--good); }
.team-roster .team-roster__video-link--error { color: var(--bad); }
.team-roster__empty { color: var(--muted); }
.team-roster__empty a { display: inline-flex; align-items: center; min-height: 44px; margin-left: 20px; }
.upload-details { position: relative; flex: 0 0 auto; }
.upload-details summary { list-style: none; }
.upload-details summary::-webkit-details-marker { display: none; }
.upload-details__trigger { margin-top: 0; }
.upload-panel {
  position: absolute; right: 0; z-index: 4; width: min(440px, calc(100vw - 40px));
  margin-top: 10px; padding: 18px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 6px; box-shadow: 0 8px 18px rgba(26, 36, 48, .12);
}
.upload-panel__label { display: block; margin-bottom: 6px; font-weight: 600; }
.upload-panel__status { min-height: 22px; margin-top: 10px; }
.upload-panel progress { width: 100%; height: 8px; margin-top: 2px; accent-color: var(--accent); }
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; padding: 0; margin: 0; list-style: none; }
.video-grid--coach { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.video-card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.video-grid--coach .video-card { overflow: visible; }
.video-card__preview { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; overflow: hidden; background: var(--media-well); color: var(--muted); font-size: 14px; text-align: center; text-decoration: none; }
.video-grid--coach .video-card__preview { border-radius: 7px 7px 0 0; }
/* contain, а не cover: cover заполняет рамку и срезает всё, что не влезло.
   На горизонтальном ролике это незаметно (пропорции те же), а вертикальный
   с телефона показывался обрезанной серединой — измерено на настоящем
   превью 640×1138: видно было 32% кадра (жалоба 06.09.2026).
   Рамка остаётся 16:9, поэтому строки карточек не разъезжаются по высоте —
   узким становится только сам кадр, заголовок и описание под ним держат
   всю ширину карточки. По бокам — --media-well (см. :root). */
.video-card__preview img { width: 100%; height: 100%; object-fit: contain; }
.video-card__duration { position: absolute; right: 8px; bottom: 8px; padding: 2px 6px; border-radius: 4px; background: rgba(26, 36, 48, .86); color: #fff; font-size: 13px; font-weight: 600; }
.video-card__body { padding: 14px; }
.video-card__title-row { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; }
.video-card__title { color: var(--ink); font-weight: 600; line-height: 1.35; text-decoration: none; }
.video-card__title:hover { color: var(--accent); text-decoration: underline; }
.video-card__result { display: flex; flex-wrap: wrap; gap: 5px 8px; margin: 5px 0 0; color: var(--muted); font-size: 14px; line-height: 1.35; }
.video-card__result strong { color: var(--ink); font-weight: 700; }
.video-card .tag { margin-top: 6px; }
.video-status { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; color: var(--muted); font-size: 14px; }
.video-status .status-dot { background: #a8681a; }
.video-status.video-status--ready .status-dot { background: var(--good); }
.video-card__message { margin-top: 10px; color: var(--muted); font-size: 14px; }
.video-card__message--error { color: var(--bad); }
.video-actions { position: relative; flex: 0 0 auto; }
.video-actions[open] { z-index: 2; }
.video-actions summary { width: 28px; height: 28px; padding: 0; border: 1px solid transparent; border-radius: 4px; color: var(--muted); cursor: pointer; font-weight: 700; line-height: 24px; text-align: center; list-style: none; }
.video-actions summary:hover { border-color: var(--line); background: var(--ground); }
.video-actions summary::-webkit-details-marker { display: none; }
.video-actions__menu { position: absolute; top: 34px; right: 0; z-index: 3; min-width: 132px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 18px rgba(26, 36, 48, .12); }
.video-actions__menu a, .video-actions__delete { display: block; width: 100%; padding: 7px 8px; color: var(--accent); text-align: left; text-decoration: none; }
.video-actions__menu a:hover, .video-actions__delete:hover { background: var(--ground); }
.video-actions__delete { color: var(--bad); }
.empty-video-state { max-width: 560px; padding: 26px 0; border-top: 1px solid var(--line); }
.empty-video-state h2 { margin: 0 0 8px; }
.empty-video-state p { color: var(--muted); }

@media (min-width: 681px) and (max-width: 900px) {
  .team-add__form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 680px) {
  .auth-page { padding: 0 16px 32px; }
  .auth-wrap { margin-top: 32px; }
  .auth-card { padding: 22px 20px; }
  .site-workspace { max-width: 100%; }
  .site-tools { width: 100%; flex-wrap: wrap; gap: 10px; }
  .site-tools > * { flex-shrink: 0; }
  .site-tools .account-menu { margin-left: auto; }
  .jury-nav { gap: 6px; margin-right: 0; flex-wrap: wrap; max-width: 100%; }
  .jury-nav__item { min-width: 0; }
  .form-status-chip { max-width: 100%; }
  .account-menu__name { display: none; }
  .video-page-header { flex-direction: column; gap: 16px; }
  .jury-page-header { align-items: baseline; }
  .jury-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .jury-filter-actions { align-items: flex-end; }
  .jury-filter-actions button { padding-left: 12px; padding-right: 12px; }
  .jury-pagination { gap: 8px; }
  .jury-pagination .button { padding-left: 12px; padding-right: 12px; }
  .jury-list-toolbar, .jury-coach-toolbar { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 10px; }
  .jury-list-search { grid-column: 1 / -1; }
  .jury-filters--popover { left: 0; right: 0; width: auto; }
  .jury-export-actions { justify-self: end; }
  .jury-coach-table__head { display: none; }
  .jury-coach-row {
    position: relative; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px;
    min-height: 0; padding: 14px 48px 14px 14px;
  }
  .jury-coach-row__identity { grid-column: 1 / -1; }
  .jury-coach-row__class, .jury-coach-row__questionnaire, .jury-coach-row__video-cell { display: grid; justify-items: start; gap: 3px; }
  .jury-coach-row__video-cell { grid-column: 2; grid-row: 2 / span 2; align-self: center; }
  .jury-coach-row__open { position: absolute; top: 18px; right: 10px; }
  .jury-coach-row { grid-template-columns: minmax(0, 1fr); padding-right: 14px; }
  .jury-coach-row__class, .jury-coach-row__questionnaire, .jury-coach-row__video-cell { grid-column: 1; grid-row: auto; }
  .jury-coach-cell__label { display: block; }
  .jury-coach-profile__heading { align-items: flex-start; gap: 14px; }
  .jury-coach-profile__portrait { width: 60px; height: 60px; flex-basis: 60px; font-size: 22px; }
  .jury-coach-profile__contacts { display: grid; gap: 3px; }
  .jury-coach-profile__section { margin-top: 22px; }
  .jury-coach-profile__actions { align-items: flex-start; flex-direction: column; }
  .video-detail-header { flex-direction: column; gap: 12px; }
  .video-detail-header__actions { width: 100%; justify-content: flex-start; }
  .video-author { max-width: 100%; }
  .video-detail-header__edit { padding: 8px 12px; font-size: 14px; }
  .video-detail-player { padding: 12px; }
  .video-viewing-tools__panel { align-items: flex-start; flex-wrap: wrap; }
  .video-details > div { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 10px 0; }
  .upload-details { width: 100%; }
  .upload-details__trigger { width: 100%; text-align: center; }
  .upload-panel { left: 0; right: auto; width: 100%; }
  .coordinator-invitation { align-items: stretch; flex-direction: column; gap: 12px; }
  .coordinator-invitation__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .coordinator-invitation__actions button { width: 100%; }
  .video-grid { grid-template-columns: 1fr; }
  .team-add__form { grid-template-columns: 1fr; }
  .athlete-result { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .athlete-results-header { flex-direction: column; align-items: flex-start; }
  .coordinator-candidate, .coordinator-team__list li { flex-direction: column; align-items: stretch; gap: 10px; overflow-wrap: anywhere; }
  .coordinator-candidate button, .coordinator-pending-row button { width: 100%; }
  .team-add__form button { width: 100%; }
  .coach-team-header { flex-wrap: wrap; gap: 12px; }
  .coach-team-header > div { flex: 1 0 200px; }
  .coach-team-header > .button { margin-top: 0; }
  .team-summary { gap: 8px 18px; }
  .team-roster, .team-roster tbody { display: block; }
  .team-roster colgroup { display: none; }
  .team-roster thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
  .team-roster tbody { margin-bottom: 20px; border-block: 1px solid var(--line); }
  .team-roster tr { display: grid; grid-template-columns: minmax(0, 1fr) 112px; column-gap: 12px; padding: 0 12px; }
  .team-roster th, .team-roster td { min-width: 0; padding: 0; border: 0; }
  .team-roster .team-roster__athlete { grid-column: 1 / -1; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .team-roster .team-roster__exercise { grid-column: 1; padding-top: 12px; }
  .team-roster .team-roster__result { grid-column: 1; padding: 2px 0 12px; }
  .team-roster__video { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .team-roster tr:first-child .team-roster__video { grid-row: 2 / 4; }
  .team-roster tr + tr { border-top: 1px solid var(--line); }
  .team-roster .team-roster__empty { grid-column: 1 / -1; padding: 12px 0; }
  .team-roster__empty a { margin-left: 0; display: flex; }
}

@media (min-width: 681px) and (max-width: 920px) {
  .video-grid--coach { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Своя анкета тренера: длинная форма читается с телефона как один список. */
.wrap--profile { max-width: 760px; }
.own-profile__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; margin-bottom: 20px; }
.own-profile__identity { min-width: 0; }
.own-profile__heading h1 { margin-bottom: 4px; }
.own-profile__heading .lede { margin-bottom: 5px; }
.own-profile__portrait { width: 110px; height: 140px; flex: 0 0 auto; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; }
.profile-status { display: inline-flex; align-items: center; gap: 7px; margin: 0; color: var(--muted); font-size: 14px; }
.profile-status--submitted { color: var(--good); }
.profile-status--submitted .status-dot { background: var(--good); }
.own-profile-preview { margin-top: 20px; }
.own-profile-preview > summary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 0 18px; color: var(--accent); background: #eef5fb;
  border: 1px solid var(--line); border-radius: 6px; cursor: pointer;
  font-weight: 600; line-height: 1.2; list-style-position: inside;
}
.own-profile-preview > summary:hover { background: #e4eff8; }
.own-profile-preview[open] > summary { color: var(--surface); background: var(--accent); border-color: var(--accent); }
.own-profile-preview__content { margin-top: 18px; }
.own-profile__section { margin-top: 22px; }
.own-profile__section--answers { margin-top: 0; }
.own-profile__section h2 { margin: 0 0 10px; }
.questionnaire-summary { margin: 0; border-top: 1px solid var(--line); }
.questionnaire-summary > div { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(0, 1.2fr); gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.questionnaire-summary dt { color: var(--muted); }
.questionnaire-summary dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.questionnaire-summary dd .tag { font-weight: 400; }
.questionnaire-summary .tag { display: block; margin-top: 3px; }
.document-list {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
  margin: 0; padding: 0; list-style: none;
}
.document-list li { min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.document-card__preview {
  display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 4 / 3;
  overflow: hidden; background: #e8edf2; border-bottom: 1px solid var(--line); color: var(--muted); text-decoration: none;
}
.document-card__body { min-width: 0; padding: 11px 12px 12px; overflow-wrap: anywhere; }
.document-card__title { display: block; color: var(--accent); font-weight: 600; line-height: 1.35; }
.document-card__body .tag { margin-top: 4px; }
.document-list .thumb { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; border-radius: 0; object-fit: contain; }
.document-file-list { margin: 0 0 14px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.document-file-list li {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  min-width: 0; padding: 10px 0; border-bottom: 1px solid var(--line);
}
.document-file-list li > div { min-width: 0; overflow-wrap: anywhere; }
.document-file-list__title { font-weight: 600; }
.document-file-list .tag { margin-top: 3px; }
.document-file-list--editing button { flex: 0 0 auto; margin: 0; }
.document-preview-dialog {
  width: min(900px, calc(100vw - 32px)); max-width: none;
  height: min(760px, calc(100dvh - 32px)); max-height: none;
  margin: auto; padding: 0; overflow: hidden;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 18px 48px rgba(26, 36, 48, .28);
}
.document-preview-dialog::backdrop { background: rgba(26, 36, 48, .72); }
.document-preview-dialog__surface { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; }
.document-preview-dialog__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line); }
.document-preview-dialog__header h2 { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: 18px; }
.document-preview-dialog__header form { margin: 0; flex: 0 0 auto; }
.document-preview-dialog__close {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  margin: 0; padding: 0; color: var(--muted); background: transparent; border: 0;
  font-size: 28px; font-weight: 400; line-height: 1;
}
.document-preview-dialog__close:hover { color: var(--ink); background: var(--ground); filter: none; }
.document-preview-dialog__stage { display: flex; align-items: center; justify-content: center; min-height: 0; padding: 16px; overflow: hidden; background: #e8edf2; }
.document-preview-dialog__stage img { width: 100%; height: 100%; object-fit: contain; }
.document-preview-dialog__footer { display: flex; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); }
.document-preview-dialog__footer .button { margin: 0; }
.own-profile__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); }
.own-profile__actions .button, .own-profile__actions button { margin-top: 0; }
.own-profile__actions .button:first-child { flex: 1; min-width: 0; text-align: center; }
.own-profile__actions form { margin: 0; }

/* Редактирование собственной анкеты повторяет композицию её просмотра. */
.profile-editor__title-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.profile-editor__mode { color: var(--muted); font-size: 14px; }
.video-editor__heading { margin-bottom: 20px; }
.video-editor__heading .lede { margin-bottom: 0; }
.profile-editor__fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.profile-editor__fields[disabled] { opacity: .68; }
.profile-editor__row {
  display: grid; grid-template-columns: minmax(180px, .8fr) minmax(0, 1.2fr); gap: 20px;
  align-items: start; padding: 11px 0; border-bottom: 1px solid var(--line);
}
.profile-editor__row:first-of-type { border-top: 1px solid var(--line); }
.profile-editor__row > label { margin: 9px 0 0; color: var(--muted); font-weight: 400; line-height: 1.35; }
.profile-editor__control { min-width: 0; }
.profile-editor__control .field { width: 100%; max-width: none; min-width: 0; }
.profile-editor__control textarea.field { resize: vertical; }
.profile-editor__control > input[type="checkbox"] { width: 20px; height: 20px; margin: 10px 0; accent-color: var(--accent); }
.profile-editor__control ul { margin: 0; padding: 7px 0; list-style: none; }
.profile-editor__control ul label, .profile-editor__control > div label { margin: 0; font-weight: 400; }
.profile-editor__control ul input { margin-right: 7px; accent-color: var(--accent); }
.profile-editor__control .errors { margin-bottom: 0; }
.profile-editor__section { margin-top: 26px; }
.profile-editor__section h2 { margin: 0 0 10px; }

.profile-editor__photo { position: relative; flex: 0 0 auto; text-align: center; }
.profile-editor__photo .own-profile__portrait { display: block; }
.profile-editor__portrait-placeholder {
  display: flex; align-items: center; justify-content: center; width: 110px; height: 140px;
  background: var(--line); color: var(--muted); border-radius: 6px; font-size: 28px; font-weight: 600;
}
.profile-photo-menu { margin-top: 5px; text-align: right; }
.profile-photo-menu summary { color: var(--accent); font-size: 14px; cursor: pointer; list-style: none; }
.profile-photo-menu summary::-webkit-details-marker { display: none; }
.profile-photo-menu summary:hover { text-decoration: underline; }
.profile-photo-menu__panel {
  position: absolute; top: 100%; right: 0; z-index: 6; width: min(360px, calc(100vw - 40px));
  margin-top: 7px; padding: 16px; text-align: left; background: var(--surface);
  border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 18px rgba(26, 36, 48, .14);
}
.profile-photo-menu__label { display: block; margin: 0 0 6px; font-weight: 600; }
.profile-photo-menu__actions { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.profile-photo-menu__actions button { margin: 0; }
.profile-editor__danger { color: var(--bad); }

.profile-document-slots { margin: 0 0 20px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.profile-document-slots li {
  display: grid; grid-template-columns: minmax(180px, .8fr) minmax(0, 1.2fr); gap: 20px;
  align-items: start; padding: 11px 0; border-bottom: 1px solid var(--line);
}
.profile-document-slots li > div:first-child { color: var(--muted); }
.profile-document-slots__label { font-weight: 400; }
.profile-document-slots__value { min-width: 0; overflow-wrap: anywhere; }
.profile-document-slots__value > a { font-weight: 600; }
.profile-document-slots__missing { color: var(--ink); font-weight: 600; }
.profile-document-slots__value .tag { display: block; margin-top: 3px; }
.profile-document-slots__value button { margin-top: 6px; }
.profile-editor__documents h3 { margin: 20px 0 10px; font-size: 16px; }
.document-list--editing .document-card__remove { margin-top: 8px; }
.profile-document-upload { margin-top: 18px; border-top: 1px solid var(--line); }
.profile-document-upload > summary {
  display: inline-flex; align-items: center; min-height: 42px; margin-top: 14px; padding: 8px 14px;
  color: var(--accent); background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  cursor: pointer; font-weight: 600; list-style: none;
}
.profile-document-upload > summary::-webkit-details-marker { display: none; }
.profile-document-upload > summary:hover { border-color: var(--accent); }
.profile-document-upload__panel { max-width: 560px; padding-top: 10px; }
.profile-document-upload__panel .field { max-width: 100%; min-width: 0; }
.profile-document-upload__field { margin-top: 14px; }
.profile-document-upload__field > label,
.profile-document-upload__label { display: block; margin: 0 0 6px; font-weight: 600; }
.file-picker { position: relative; }
.file-picker__input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.file-picker__surface {
  display: flex; align-items: center; gap: 12px; min-height: 88px; margin: 0; padding: 14px 16px;
  color: var(--ink); background: var(--surface); border: 1px dashed var(--line); border-radius: 6px;
  cursor: pointer;
}
.file-picker__surface:hover,
.file-picker--dragging .file-picker__surface { border-color: var(--accent); background: var(--accent-soft); }
.file-picker__input:focus-visible + .file-picker__surface { outline: 2px solid var(--accent); outline-offset: 2px; }
.file-picker--selected .file-picker__surface { border-style: solid; }
.file-picker__icon {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  flex: 0 0 38px; color: var(--accent); background: var(--accent-soft); border-radius: 6px;
  font-size: 24px; line-height: 1;
}
.file-picker__copy { min-width: 0; }
.file-picker__name { display: block; overflow-wrap: anywhere; color: var(--accent); font-weight: 600; }
.file-picker__hint { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.file-picker--compact .file-picker__surface { min-height: 72px; padding: 12px; }
.file-picker--compact .file-picker__icon { width: 34px; height: 34px; flex-basis: 34px; font-size: 22px; }
.profile-document-title { margin-top: 13px; }
.profile-document-title > summary { color: var(--accent); cursor: pointer; font-size: 14px; }
.profile-document-title__field { margin-top: 5px; }
.profile-document-title__field label { margin-top: 0; }
.profile-document-upload__submit { margin-top: 18px; }
.profile-document-upload__submit:disabled { opacity: .5; cursor: not-allowed; }

.profile-editor__actions {
  display: flex; align-items: center; gap: 16px;
  margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line);
}
.profile-editor__actions button { flex: 1; margin: 0; }
.profile-editor__actions .profile-editor__cancel { flex: 0 0 auto; margin: 0; color: var(--surface); }

@media (max-width: 680px) {
  .wrap--profile { max-width: none; }
  .own-profile__heading { margin-bottom: 16px; }
  .own-profile__portrait { display: none; }
  .questionnaire-summary > div { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 10px 0; }
  .own-profile__section { margin-top: 20px; }
  .own-profile__section--answers { margin-top: 0; }
  .document-list { display: block; border-top: 1px solid var(--line); }
  .document-list li {
    display: flex; align-items: center; gap: 12px; padding: 12px 0;
    overflow: visible; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  }
  .document-card__preview { width: 86px; height: 112px; aspect-ratio: auto; flex: 0 0 86px; border: 1px solid var(--line); }
  .document-card__body { padding: 0; }
  .document-preview-dialog { width: calc(100vw - 16px); height: calc(100dvh - 16px); }
  .document-preview-dialog__header { padding: 10px 10px 10px 14px; }
  .document-preview-dialog__header h2 { font-size: 17px; }
  .document-preview-dialog__stage { padding: 8px; }
  .document-preview-dialog__footer { padding: 10px 14px; }
  .profile-editor__title-row { display: block; }
  .profile-editor__mode { display: block; margin-top: 2px; }
  .profile-editor__heading { gap: 14px; }
  .profile-editor__photo .own-profile__portrait,
  .profile-editor__portrait-placeholder { display: flex; width: 64px; height: 80px; font-size: 20px; }
  .profile-editor__photo .own-profile__portrait { object-fit: cover; }
  .profile-photo-menu { margin-top: 3px; }
  .profile-photo-menu summary { max-width: 80px; font-size: 13px; line-height: 1.25; }
  .profile-editor__row { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 12px 0; }
  .profile-editor__row > label { margin: 0; }
  .profile-editor__control > input[type="checkbox"] { margin: 6px 0 2px; }
  .profile-editor__section { margin-top: 22px; }
  .profile-document-slots li { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 12px 0; }
  .profile-document-upload__panel { max-width: none; }
  .profile-document-upload__submit { width: 100%; }
  .profile-editor__actions {
    gap: 10px; margin: 24px 0 0; padding-top: 14px;
  }
  .profile-editor__actions button, .profile-editor__actions .profile-editor__cancel { padding-left: 12px; padding-right: 12px; }
  .own-profile__actions {
    position: sticky; bottom: 0; z-index: 2; display: grid;
    grid-template-columns: minmax(0, 1fr) auto; margin: 22px -20px 0; padding: 12px 20px;
    background: var(--surface); box-shadow: 0 -8px 14px rgba(26, 36, 48, .08);
  }
  .own-profile__actions .button { padding-left: 12px; padding-right: 12px; }
  .own-profile__actions .button:first-child { grid-column: 1 / -1; }
  .own-profile__actions form { grid-column: 1 / -1; width: 100%; }
  .own-profile__actions form button { width: 100%; }
}

.own-profile-workspace { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.own-profile-workspace > section { min-width: 0; }
.own-cycle-statistics { border-left: 1px solid var(--line); padding-left: 28px; }
.own-cycle-statistics h2 { margin: 0 0 4px; font-size: 24px; line-height: 1.3; }
.own-cycle-statistics .lede { margin-bottom: 5px; }
.own-cycle-statistics__values { margin: 20px 0 0; }
.own-cycle-statistics__values > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.own-cycle-statistics__values dt { color: var(--muted); overflow-wrap: anywhere; }
.own-cycle-statistics__values dd { margin: 0; font-weight: 600; }
.own-cycle-statistics__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.own-cycle-statistics__actions .button { margin: 0; }
.own-profile-workspace .own-profile__actions { display: flex; flex-wrap: wrap; position: static; margin: 24px 0 0; padding: 14px 0 0; background: none; box-shadow: none; }
.own-profile-workspace .own-profile__actions .button:first-child { flex: 0 1 auto; }
.own-profile-workspace .own-profile__actions form { width: auto; }
@media (max-width: 980px) {
  .own-profile-workspace { grid-template-columns: minmax(0, 1fr); }
  .own-cycle-statistics { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; }
}

/* Правовые документы доступны из контекста, без общего подвала кабинета. */
.account-menu__link { margin-top: 8px; color: var(--accent); font-size: 14px; }
.auth-legal-links {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 12px; line-height: 1.4;
}
.auth-legal-links a { color: var(--muted); }
.auth-legal-links a:hover { color: var(--accent); }

.legal-index-page { display: flow-root; }
.legal-index-wrap { max-width: 760px; }
.legal-index-wrap.auth-wrap { max-width: 600px; }
.legal-index__heading { margin-bottom: 24px; }
.legal-index__heading h1 { font-size: 24px; }
.legal-index__heading .lede { margin: 0; font-size: 14px; }
.legal-guide { margin: 24px 0; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.legal-guide h2 { font-size: 19px; margin: 0 0 12px; }
.legal-guide p, .legal-guide li { font-size: 14px; line-height: 1.6; }
.legal-guide .button { white-space: normal; max-width: 100%; box-sizing: border-box; }
.legal-guide__steps { padding-left: 22px; }
.legal-guide__downloads { display:flex; flex-wrap:wrap; align-items:center; gap:12px 18px; }
.legal-guide__downloads a:not(.button) { color:var(--accent); }
.legal-guide__steps li { padding-left: 4px; margin: 14px 0; }
.team-editor-field:has([data-consent-file]), .team-editor-field:has([name="consent_confirm"]) { grid-column: 1 / -1; }
.team-editor-field input[type="file"] { max-width: 100%; }
.team-editor-field input[data-consent-file] { display: block; width: 100%; padding: 0; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 14px; }
.team-editor-field input[data-consent-file]::file-selector-button { margin-right: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 5px; background: var(--accent-soft); color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.team-editor-field input[data-consent-file]::file-selector-button:hover { border-color: var(--accent); }
.team-editor-field input[data-consent-file]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.team-consent-selection { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.team-editor-field .team-consent-confirm { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; }
.team-consent-confirm input { flex: 0 0 auto; margin-top: 5px; }
.team-consent-help a { color: var(--accent); }
.team-matrix .team-consent-missing { color: #9a4327; }
.team-matrix .legal-document-list__icon { width: 18px; height: 20px; }
.candidate-status-pill {
  display: inline-grid; place-items: center; width: 28px; height: 28px; margin-top: 9px;
  color: #b77908;
}
.candidate-status-pill > span:first-child {
  display: block; width: 23px; height: 23px; background: currentColor;
  mask: url("../vendor/lucide/star.bed445d40988.svg") center / contain no-repeat;
}
.legal-document-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.legal-document-list li { border-bottom: 1px solid var(--line); }
.legal-document-list a {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) 18px; align-items: center; gap: 14px;
  min-height: 80px; padding: 16px 12px; color: var(--accent); text-decoration: none;
  font-size: 16px; font-weight: 600; line-height: 1.4;
}
.legal-document-list a > span { min-width: 0; overflow-wrap: anywhere; }
.legal-document-list a:hover, .legal-index__review:hover { background: var(--surface); }
.legal-document-list a:focus-visible, .legal-index__review:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.legal-document-list__icon {
  display: grid; place-items: center; width: 40px; height: 40px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 6px;
}
.legal-document-list__icon::before {
  content: ""; display: block; width: 21px; height: 21px; background: currentColor;
  mask: url("../vendor/lucide/file-text.9575e4237503.svg") center / contain no-repeat;
}
.legal-index__arrow {
  display: block; width: 18px; height: 18px; color: var(--muted); background: currentColor;
  mask: url("../vendor/lucide/chevron-right.04f1c1b73b2b.svg") center / contain no-repeat;
}
.legal-index__review {
  display: grid; grid-template-columns: minmax(0, 1fr) 18px; align-items: center; gap: 14px;
  margin-top: 12px; padding: 12px; color: var(--accent); text-decoration: none;
  font-size: 14px; line-height: 1.4;
}
.legal-index__review > span { min-width: 0; overflow-wrap: anywhere; }
.legal-index__review-title { display: block; font-weight: 600; }
.legal-index__review-note { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
.legal-index__operator { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.legal-index__operator h2 { margin: 0 0 6px; color: var(--muted); font-size: 13px; font-weight: 400; }
.legal-index__operator p { margin: 0; font-size: 14px; overflow-wrap: anywhere; }

.cabinet-info__section { margin-top: 24px; }
.cabinet-info__section h2 { margin: 0 0 12px; }

.manual-wrap { max-width: 1040px; }
.manual-page__header { margin-bottom: 22px; }
.manual-page__header .lede { margin: 0; }
.manual-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 22px;
}
.manual-step {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.manual-step__text { min-width: 0; }
.manual-step__number {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.manual-step h2 { margin: 0 0 8px; }
.manual-step p { margin: 0; color: var(--muted); font-size: 14px; }
.manual-step__image-link {
  display: block;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}
.manual-step__image-link:hover { border-color: var(--accent); }
.manual-step__image-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.manual-step__image {
  display: block;
  width: 100%;
  height: auto;
}

.filming-manual__rule { margin: 18px 0 10px; font-size: 18px; font-weight: 600; }
.filming-manual__body { min-width: 0; }
.filming-manual__body p { color: var(--ink); font-size: 15px; }
.filming-manual__body p + p { margin-top: 12px; }
.filming-manual__body ul { margin: 0; padding-left: 20px; }
.filming-manual__body li { margin-bottom: 10px; font-size: 15px; }
.filming-manual__body li:last-child { margin-bottom: 0; }
.filming-manual__example { padding-left: 14px; border-left: 3px solid var(--accent); }
.filming-manual__figure { margin: 0 0 18px; }
.filming-manual__figure figcaption { margin-top: 8px; color: var(--muted); font-size: 12px; }

.legal-doc { max-width: 920px; margin: 0 auto; padding-bottom: 40px; }
.legal-doc h1 { max-width: 760px; }
.legal-doc h2 { margin-top: 34px; }
.legal-doc p { max-width: 78ch; }
.legal-consent-blank p { overflow-wrap: anywhere; }
.legal-doc ul { max-width: 78ch; margin: 0 0 18px; padding-left: 22px; }
.legal-doc li { margin-bottom: 7px; }
.legal-meta { margin-bottom: 24px; color: var(--muted); font-size: 14px; }
.legal-note {
  max-width: 78ch; margin: 20px 0; padding: 14px 18px;
  border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0;
  background: var(--surface);
}
.legal-fields { width: 100%; margin: 16px 0 22px; border-collapse: collapse; }
.legal-fields th,
.legal-fields td {
  padding: 10px 12px; border-bottom: 1px solid var(--line);
  text-align: left; vertical-align: top;
}
.legal-fields th { width: 32%; color: var(--muted); font-weight: 600; }

/* Макет согласий изолирован от действующих полей формы. */
.legal-preview { margin: 16px 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.legal-preview__status { margin: 0 0 10px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.legal-preview__statement { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 10px; font-size: 13px; line-height: 1.5; }
.legal-preview__statement input { width: 20px; height: 20px; margin: 1px 0 0; }
.legal-preview__statement > div { min-width: 0; overflow-wrap: anywhere; }
.legal-preview__links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0 30px; font-size: 13px; line-height: 1.4; }
.legal-context-note { margin: 18px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.legal-placement-review .legal-preview { max-width: 560px; }
.upload-panel .legal-preview { margin-top: 10px; }

/* Переход к соседнему правовому документу — внизу каждого из них. */
.legal-siblings { max-width: 920px; margin: 30px auto 0; padding-top: 20px; border-top: 1px solid var(--line); }
.legal-siblings h2 { margin: 0 0 10px; font-size: 15px; }
.legal-siblings ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.legal-siblings li { line-height: 1.45; }
.legal-siblings__current { color: var(--muted); }
.legal-siblings__here { font-size: 13px; }

.protocol-header-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.protocol-meta { display: grid; gap: 4px; margin-bottom: 18px; overflow-wrap: anywhere; }
.protocol-meta > span, .protocol-birth-year { color: var(--muted); font-size: 13px; }
.protocol-counts { display: flex; flex-wrap: wrap; gap: 18px 40px; margin: 0 0 22px; }
.protocol-counts dt { color: var(--muted); font-size: 13px; }
.protocol-counts dd { margin: 3px 0 0; font-size: 22px; font-weight: 600; }
.protocol-coverage { border-block: 1px solid var(--line); padding: 12px 0; margin-bottom: 20px; }
.protocol-coverage > summary { cursor: pointer; color: var(--accent); }
.protocol-coverage__groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.protocol-coverage h2, .protocol-incomplete h2, .protocol-history h2 { font-size: 17px; margin: 18px 0 10px; }
.protocol-coverage ul, .protocol-history ul { list-style: none; padding: 0; margin: 0; }
.protocol-coverage li { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; font-size: 13px; overflow-wrap: anywhere; }
.protocol-coverage li > * { min-width: 0; }
.protocol-coverage li strong { font-size: 12px; text-align: right; }
.protocol-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.protocol-table th, .protocol-table td { text-align: left; vertical-align: top; padding: 12px 10px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.protocol-table th { color: var(--muted); font-weight: 400; font-size: 13px; }
.protocol-table th:first-child { width: 30%; }
.protocol-table th:nth-child(2) { width: 12%; }
.protocol-table th:nth-child(3) { width: 24%; }
.protocol-table th:nth-child(4) { width: 16%; }
@media (min-width: 681px) {
  .team-review-table th:first-child { width: calc(50% - 112px); }
  .team-review-table th:nth-child(4) { width: 14%; }
  .team-review-table th:last-child { width: 112px; }
  .team-review-table th:last-child, .team-review-table td:last-child { text-align: right; }
}
.protocol-table tbody tr:nth-child(odd) { background: var(--surface); }
.protocol-birth-year { display: block; margin-top: 3px; }
.protocol-table a, .protocol-incomplete a { color: var(--accent); }
.protocol-table a.protocol-ready { color: #157347; }
.protocol-generation { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.protocol-generation > p { font-size: 13px; }
.protocol-generation button { margin: 0; }
.protocol-issues { padding-left: 20px; margin: 0 0 16px; }
.protocol-history { margin-top: 28px; }
.protocol-history li { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.protocol-history li > div { display: grid; gap: 3px; min-width: 0; }
.protocol-history li span { color: var(--muted); font-size: 13px; }
@media (max-width: 680px) {
  .protocol-coverage__groups { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .protocol-counts { gap: 14px 24px; }
  .protocol-table, .protocol-table tbody, .protocol-table tr, .protocol-table td { display: block; width: 100%; }
  .protocol-table thead { display: none; }
  .protocol-table tr { padding: 12px; border-bottom: 1px solid var(--line); }
  .protocol-table td { padding: 3px 0; border: 0; }
  .protocol-table td:first-child { margin-bottom: 7px; }
  .protocol-table td[data-label] { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
  .protocol-table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 13px; }
  .protocol-generation button { width: 100%; }
  .protocol-history li { flex-wrap: wrap; gap: 10px; }
}
.legal-siblings .links { margin-top: 14px; }
.backup-actions { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0; border-block: 1px solid var(--line); }
.backup-actions form { margin: 0; }
.backup-actions button { margin: 0; }
@media (max-width: 680px) {
  .backup-actions { align-items: stretch; flex-direction: column; gap: 14px; }
  .backup-actions button { width: 100%; }
  .health-table, .health-table tbody { display: block; width: 100%; }
  .health-table tr { display: grid; width: 100%; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .health-table tr:first-child { display: none; }
  .health-table td { display: block; min-width: 0; padding: 3px 0; border: 0; overflow-wrap: anywhere; }
  .health-table--indicators td:nth-child(2)::before { content: "Сейчас: "; color: var(--muted); }
  .health-table--indicators td:nth-child(3)::before { content: "Норма: "; color: var(--muted); }
  .health-table--commands td:nth-child(2) { margin-top: 5px; }
  .health-table--storage td:nth-child(2)::before { content: "Занимает: "; color: var(--muted); }
  .health-table--storage td:nth-child(3)::before { content: "Файлов: "; color: var(--muted); }
  .health-table--cleanup td:nth-child(2)::before { content: "Оригинал: "; color: var(--muted); }
  .health-table--cleanup td:nth-child(3)::before { content: "Результат: "; color: var(--muted); }
}

/* Действующая галочка согласия. Раскладка та же, что у макета выше, но текст
   кликабелен вместе с квадратом: попасть в 20 px на телефоне трудно. */
.consent-row { margin: 16px 0 4px; }
.consent-statement { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 10px; font-size: 13px; line-height: 1.5; font-weight: 400; cursor: pointer; }
.consent-statement input { width: 20px; height: 20px; margin: 1px 0 0; }
.consent-statement > span { min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 680px) {
  .auth-legal-links { display: grid; gap: 7px; }
  .legal-index__heading { margin-bottom: 20px; }
  .legal-document-list a { grid-template-columns: 36px minmax(0, 1fr) 18px; gap: 12px; padding: 14px 0; }
  .legal-document-list__icon { width: 36px; height: 36px; }
  .legal-index__review { padding-left: 0; padding-right: 0; }
  .legal-index__operator { margin-top: 22px; }
  .manual-wrap { max-width: 100%; }
  .manual-step { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px 0; }
  .manual-step__text { order: -1; }
  .legal-doc { padding-bottom: 24px; }
  .legal-doc h2 { margin-top: 28px; }
  .legal-note { padding: 12px 14px; }
  .legal-fields,
  .legal-fields tbody,
  .legal-fields tr,
  .legal-fields th,
  .legal-fields td { display: block; width: 100%; }
  .legal-fields tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .legal-fields th,
  .legal-fields td { padding: 2px 0; border: 0; }
}
