/* Первый экран 2.2: полоса «путь материала» + окно ролей, переключаются вместе (замечание автора З5, 16.10).
 * Токены — сайта (после brand.css = программы). */
.h2x { padding: 40px 0 64px; }
.h2x__top { text-align: center; max-width: 860px; margin: 0 auto; }
.h2x h1 { margin: 0; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.05; letter-spacing: -0.02em; font-weight: 600; }
.h2x__sub { margin: 16px auto 0; font-size: clamp(18px, 2vw, 22px); color: var(--text-dim); max-width: 640px; }
.h2x .hero__cta { justify-content: center; margin-top: 26px; }
.h2x__facts { margin: 14px 0 0; color: var(--text-faint); font-size: 14px; }

/* ---- полоса ---- */
.f2 { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: 132px 28px minmax(0, 1fr) 28px 150px; align-items: stretch; }
.f2 button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; justify-items: center; align-content: start; gap: 6px; text-align: center;
  width: 100%; height: 100%; padding: 14px 8px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel);
  position: relative; overflow: hidden; transition: border-color .35s, background .35s, transform .35s, opacity .5s; }
.f2 button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.f2 button:hover { border-color: var(--border-strong); }
.f2 svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s; }
.f2 b { font-size: 14.5px; font-weight: 600; line-height: 1.25; color: var(--text); }
.f2 small { font-size: 12.5px; line-height: 1.35; color: var(--text-dim); }
.f2 .f2-sum { font-size: 11.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.f2-arr { display: grid; place-items: center; color: var(--text-faint); font-size: 18px; }
.f2-app { border: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 16px; padding: 10px; display: grid; gap: 8px; }
.f2-app__name { font-size: 13px; font-weight: 600; color: var(--accent); padding: 0 4px; }
.f2-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
/* до анимации шаги приглушены, затем загораются по очереди */
.f2:not(.lit) button { opacity: .35; }
/* активный шаг — тот, что сейчас показывает окно */
.f2 button.on { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-3px); }
.f2 button.on svg { transform: scale(1.12); }
.f2 button.done b::after { content: " ✓"; color: var(--ok); }
.f2 button i { /* полоска времени сцены */
  position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--accent); }
.f2-hint { text-align: center; color: var(--text-faint); font-size: 13px; margin: 12px 0 0; }

/* ---- окно ролей под полосой ---- */
.h2x .msd { margin-top: 30px; }

@media (max-width: 980px) {
  .f2 { grid-template-columns: 1fr; gap: 0; }
  .f2-arr { transform: rotate(90deg); height: 26px; }
  .f2-steps { grid-template-columns: 1fr 1fr; }
  .f2-steps li:last-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .h2x { padding: 32px 0 48px; }
  .f2 { margin-top: 30px; }
  .f2 button { grid-template-columns: 30px 1fr; justify-items: start; text-align: left; align-items: center; column-gap: 12px; row-gap: 2px; padding: 10px 12px; }
  .f2 button svg { grid-row: span 3; align-self: center; }
  .f2-steps { grid-template-columns: 1fr; gap: 6px; }
  .f2-steps li:last-child { grid-column: auto; }
  .f2 button.on { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .f2 button, .f2 svg { transition: none; }
  .f2:not(.lit) button { opacity: 1; }
}

/* ---- 16.10, круг 1: окошки по краям + окно ролей; широкий экран ---- */
.wrap--wide { max-width: 1680px; padding: 0 clamp(16px, 2.5vw, 40px); }
.hx { display: grid; grid-template-columns: 170px minmax(0, 1fr) 190px; gap: 22px; align-items: start; margin-top: 34px; }
.hx-side { position: sticky; top: 90px; display: grid; justify-items: center; text-align: center; gap: 4px; padding: 18px 12px;
  border-radius: 14px; border: 1px solid var(--border); background: var(--panel); transition: border-color .4s, background .4s, box-shadow .4s; }
.hx-side svg { width: 30px; height: 30px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }
.hx-side b { font-size: 16px; }
.hx-side > span { font-size: 13px; color: var(--text-dim); }
.hx-side ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 3px; font-size: 13px; color: var(--text-dim); }
.hx-side.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.hx-side[data-side="in"]::after, .hx-side[data-side="out"]::before { content: "→"; position: absolute; top: 50%; color: var(--text-faint); font-size: 18px; transform: translateY(-50%); }
.hx-side[data-side="in"]::after { right: -18px; }
.hx-side[data-side="out"]::before { left: -18px; }
.hx-name { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--accent); }
.hx-mid { border: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 18px; padding: 12px 14px 14px; min-width: 0; }
.hx-mid .msd { max-width: none; margin: 0; }
/* вкладки = шаги: все видны сразу, значок сверху */
.hx-mid .msd__tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); overflow: visible; }
.hx-mid .msd__tab { min-width: 0; padding: 8px 9px 10px; }
.hx-mid .msd__tab b { font-size: 13px; }
.hx-mid .msd__tab small { font-size: 11.5px; line-height: 1.3; }
@media (max-width: 1180px) {
  .hx { grid-template-columns: 1fr; gap: 12px; }
  .hx-side { position: static; grid-template-columns: auto auto 1fr; justify-items: start; text-align: left; align-items: center; column-gap: 10px; padding: 12px 14px; }
  .hx-side svg { margin: 0; }
  .hx-side ul { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 2px 0 0; }
  .hx-side[data-side="in"]::after, .hx-side[data-side="out"]::before { content: none; }
}
@media (max-width: 680px) {
  .hx-mid { padding: 8px; border-width: 1px; }
  .hx-mid .msd__tabs { display: flex; overflow-x: auto; }
  .hx-mid .msd__tab { min-width: 140px; }
}

/* ---- 16.10, круг 2 ---- */
.draftbar { font-size: 12.5px; color: var(--text-faint); text-align: center; padding: 6px 12px; background: var(--panel); border-bottom: 1px solid var(--border); }
.draftbar a { color: var(--accent); }
/* заголовок: первая строка меньше, «Синхронизировано.» — во всю ширину */
.h2x__h { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.h2x__l1 { display: block; font-size: clamp(30px, 4.4vw, 68px); }
.h2x__l2 { display: inline-block; font-size: clamp(44px, 9.4vw, 158px); line-height: 1.05; padding-bottom: .06em; }
.h2x__h--c { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.05; }
.h2x__top { max-width: none; }
/* подзаголовок — одной строкой, где хватает ширины */
.h2x__sub { max-width: none; white-space: nowrap; font-size: clamp(16px, 1.55vw, 22px); }
@media (max-width: 900px) { .h2x__sub { white-space: normal; } }
.h2x .dl-alt { margin: 10px 0 0; font-size: 14px; color: var(--text-faint); }
.h2x .dl-alt a { color: var(--accent); }
/* вкладки: значок, должность и функция — по центру, как в окошках по краям */
.hx-mid .msd__tab { text-align: center; display: grid; justify-items: center; align-content: start; }
.hx-mid .msd__tab svg { margin: 0 0 4px; }

/* вариант Г: нижняя строка капслоком, ширина = ширине верхней (размер шрифта подгоняет hero.js) */
.h2x__h--d { display: inline-grid; justify-items: center; }
.h2x__h--d .h2x__l1 { display: inline-block; white-space: nowrap; }
.h2x__h--d .h2x__l2 { display: inline-block; white-space: nowrap; letter-spacing: 0; line-height: 1.05; margin-top: .06em; }

/* длинная должность («Звукорежиссёр», «Оператор-постановщик») не раздвигает вкладку: колонка = ширине вкладки, слово переносится */
.hx-mid .msd__tab { grid-template-columns: minmax(0, 1fr); padding: 8px 6px 10px; }
.hx-mid .msd__tab b, .hx-mid .msd__tab small { max-width: 100%; }
/* должность — без переноса внутри слова (автор 16.10): «Звукорежиссёр» одним словом; «Оператор-постановщик» переносится только по дефису */
.hx-mid .msd__tab b { font-size: 12.5px; letter-spacing: -0.01em; overflow-wrap: normal; hyphens: manual; }

/* «СИНХРОНИЗИРОВАНО» — градиент медленно переливается (автор 16.10). Цвета — те же, что у .hl сайта; цикл 10 с, туда и обратно. */
.h2x__h .hl {
  background-image: linear-gradient(90deg, var(--v1), var(--a2), var(--a1), var(--v1), var(--a2));
  background-size: 300% 100%;
  animation: hl-flow 10s ease-in-out infinite alternate;
}
@keyframes hl-flow { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@media (prefers-reduced-motion: reduce) { .h2x__h .hl { animation: none; } }

/* заголовок Г на узком телефоне: при 30 px строка «Стоп. Снято. Скопировано.» шире экрана 375 px (365 px при 343 доступных) */
@media (max-width: 480px) { .h2x__h--d .h2x__l1 { font-size: 7.2vw; } }

/* ---- автор 18.10: должности окна ролей всегда в одну строку ----
   Сначала, когда места мало, уходят «Съёмка» и «Готовый проект» по бокам; если и тогда 9 вкладок не помещаются,
   строка вкладок прокручивается вбок (на компьютере видно край следующей вкладки). Двух рядов нет нигде. */
.hx-mid .msd__tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(112px, 1fr); grid-template-columns: none;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
@media (max-width: 1600px) {
  .hx { grid-template-columns: minmax(0, 1fr); }
  .hx-side { display: none; }
}
@media (max-width: 680px) {
  .hx-mid .msd__tabs { display: flex; }
  .hx-mid .msd__tab { min-width: 140px; }
}
