/* ============================================================
   PTNL Rating — functionality.css
   Страница «Функционал»: сквозной сценарий из шести шагов.
   Подключается только в functionality.html, после site.css.
   Все классы с префиксом fx-, чтобы не задевать общие стили.
   ============================================================ */

:root {
  --fx-hdr: 86px; /* высота фиксированной шапки; точное значение ставит functionality.js */
  --fx-nav: 56px; /* высота липкой ленты шагов */
  --fx-shot-bg: #e6ebf5; /* фон подложки под светлыми кадрами — как фон самой системы */
}

/* .r-up в site.css центрирует текст — внутри шагов и сеток нужен левый край,
   а заголовки разделов и финальная полоса остаются по центру */
.fx-flow .r-up,
.fx-all.r-up {
  text-align: left;
}
.fx-flow .fx-pause-head.r-up {
  text-align: center;
}

/* ---------- липкая лента шагов ----------
   До 1080px внутри .wrap, боковые отступы — как у .wrap. Прилипает под шапкой
   с зазором 14px: --fx-hdr — настоящая высота шапки (ставит functionality.js;
   постоянные 70px давали наезд на 9px, 28.09) */
.fx-nav {
  position: sticky;
  top: calc(var(--fx-hdr) + 14px);
  z-index: 60;
  display: flex;
  justify-content: center;
  padding: 0 40px;
  pointer-events: none; /* кликабельна только сама плашка */
}
@media (max-width: 680px) {
  .fx-nav {
    padding: 0 22px;
  }
}
.fx-nav-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 2px;
  width: 100%;
  max-width: 1080px;
  padding: 5px;
  border: 1px solid var(--stroke);
  border-radius: var(--r-pill);
  background: rgba(8, 22, 31, 0.78);
  backdrop-filter: blur(var(--blur-strong)) saturate(1.2);
  box-shadow: var(--sh-2);
  overflow-x: auto;
  scrollbar-width: none;
}
.fx-nav-inner::-webkit-scrollbar {
  display: none;
}
.fx-nav a {
  position: relative;
  flex: 1 1 auto; /* пункты делят ширину плашки поровну по содержимому */
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  padding: 9px 13px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-soft);
  white-space: nowrap;
  transition:
    background var(--d-base),
    color var(--d-base);
}

.fx-nav a:hover {
  color: var(--text);
  background: rgba(232, 235, 247, 0.05);
}
.fx-nav a.on {
  color: var(--text);
  background: rgba(232, 235, 247, 0.1);
}

@media (max-width: 900px) {
  /* на планшете и телефоне лента во всю ширину экрана и листается вбок */
  .fx-nav {
    padding: 0;
  }
  .fx-nav-inner {
    max-width: none;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    padding: 5px 12px;
  }
  .fx-nav a {
    flex: 0 0 auto;
    padding: 8px 11px;
    font-size: 13.5px;
  }
}

/* ---------- шаг: общий каркас ---------- */
.fx-step {
  padding: 88px 0 24px;
  scroll-margin-top: calc(var(--fx-hdr) + var(--fx-nav) + 20px);
}
@media (max-width: 900px) {
  .fx-step {
    padding-top: 64px;
  }
}
.fx-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.fx-kicker b {
  color: var(--accent-400);
  font-weight: 700;
}
.fx-h {
  font-size: clamp(26px, 3.2vw, 38px);
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin-bottom: 20px;
}
/* вводная фраза шага: одна-две строки вместо «Кто / Задача / Результат» */
.fx-lead {
  margin: 0 0 20px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-soft);
}
.fx-step .fr-list li {
  line-height: 1.55;
}

/* шаги 01–02 — плотнее по высоте: после них шаг 03 читается как пауза.
   Кадры и подписи не меняются, только отступы и выравнивание текста по кадру */
#fx-team,
#fx-catalog {
  padding-top: 56px;
}
#fx-team .fx-row,
#fx-catalog .fx-row {
  align-items: center;
}
#fx-team .fx-h,
#fx-catalog .fx-h {
  margin-bottom: 14px;
}
#fx-team .fx-lead,
#fx-catalog .fx-lead {
  margin-bottom: 16px;
}
#fx-team .fx-tabs,
#fx-catalog .fx-tabs {
  margin-top: 14px;
}
#fx-team .fx-cap,
#fx-catalog .fx-cap {
  margin-top: 8px;
}
@media (max-width: 900px) {
  #fx-team,
  #fx-catalog {
    padding-top: 44px;
  }
  #fx-team .fx-row,
  #fx-catalog .fx-row {
    gap: 22px;
  }
}

/* ---------- шаг 03: анкета — четыре вида вопросов ----------
   Сетка «вид вопроса · конструктор · эксперт»: в каждой строке — подлинные
   карточки одного вопроса из двух экранов системы, обе в одном масштабе
   (карточки в конструкторе и на планшете одной ширины). Полоса чуть светлее
   фона отделяет разворот от соседних шагов. */
.fx-pair-step {
  margin-top: 64px;
  padding: 80px 0 72px;
  background: rgba(232, 235, 247, 0.028);
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
}
.fx-flow .fx-pair-head.r-up,
.fx-flow .fx-pair-note.r-up,
.fx-flow .fx-qmore.r-up {
  text-align: center;
}
.fx-pair-head {
  max-width: 760px;
  margin: 0 auto 36px;
}
.fx-pair-head .fx-h {
  margin-bottom: 14px;
}
.fx-pair-lead {
  margin: 0;
  font-size: 19px;
  line-height: 1.5;
  color: var(--text-soft);
}
/* 28.09: оба фрагмента строки — одного размера (у коротких поля белым до высоты
   соседа, масштаб не меняется); подписи столбцов крупные */
.fx-qgrid {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px 20px;
  align-items: stretch;
}
.fx-qhead,
.fx-qrow {
  display: contents;
}
.fx-qhead span {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 4px;
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}
.fx-qhead span:first-child {
  grid-column: 2;
}
.fx-qtype i {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--stroke-2);
  font-style: normal;
  font-size: 12px;
  color: var(--accent-400);
}
.fx-qtype {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding-top: 14px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}
/* фрагмент — карточка вопроса как есть, без рамки кадра поверх */
.fx-shot-open.fx-qfrag {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: var(--r-md);
  background: #fff;
}
.fx-qcol {
  display: none;
}
.fx-qfrag picture,
.fx-qfrag img {
  display: block;
  width: 100%;
  height: auto;
}
/* лупа на фрагменте — только при наведении: восемь постоянных значков шумели бы */
.fx-qfrag .fx-zoom {
  opacity: 0;
  transition: opacity var(--d-base);
}
.fx-qfrag:hover .fx-zoom,
.fx-qfrag:focus-visible .fx-zoom {
  opacity: 1;
}
.fx-pair-note {
  max-width: 720px;
  margin: 26px auto 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-mute);
}
.fx-qmore {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}
/* полные кадры — крупными кнопками (28.09: ссылки текстом не замечали) */
.fx-shot-open.fx-pair-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: auto;
  padding: 14px 24px;
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-pill);
  overflow: visible;
  background: rgba(232, 235, 247, 0.06);
  box-shadow: none;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition:
    border-color var(--d-base),
    background var(--d-base);
}
.fx-shot-open.fx-pair-more::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L20 20M10.5 7.5v6M7.5 10.5h6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L20 20M10.5 7.5v6M7.5 10.5h6'/%3E%3C/svg%3E") center / contain no-repeat;
  color: var(--accent-400);
}
.fx-shot-open.fx-pair-more:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--accent-500);
  background: rgba(239, 78, 53, 0.14);
}
@media (max-width: 640px) {
  .fx-qmore {
    flex-direction: column;
    align-items: stretch;
  }
  .fx-shot-open.fx-pair-more {
    justify-content: center;
    font-size: 15px;
    padding: 13px 18px;
  }
}
/* планшет лёжа и небольшой ноутбук (1001–1200 px): вид вопроса — строкой над
   парой фрагментов, сами фрагменты — во всю ширину (с колонкой вида при 1024 px
   текст был ≈6,5 px, теперь ≈8,5, как на компьютере) (28.09) */
@media (min-width: 1001px) and (max-width: 1200px) {
  .fx-qgrid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px 20px;
  }
  .fx-qhead span:first-child {
    grid-column: 1;
  }
  .fx-qtype {
    grid-column: 1 / -1;
    padding-top: 16px;
  }
}
/* планшет (до 1000 px): в две колонки фрагменты сжимались до ≈6 px текста —
   одна колонка, у каждого фрагмента своя подпись, как на телефоне (28.09) */
@media (max-width: 1000px) {
  .fx-qgrid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    max-width: 760px;
    margin-inline: auto;
  }
  .fx-qhead {
    display: none;
  }
  .fx-qtype {
    padding-top: 18px;
  }
  .fx-qrow:first-of-type .fx-qtype {
    padding-top: 0;
  }
  .fx-qcol {
    display: block;
    padding: 8px 12px 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #50607c;
    text-align: left;
  }
  .fx-shot-open.fx-qfrag {
    justify-content: flex-start;
  }
}
@media (max-width: 900px) {
  .fx-pair-step {
    margin-top: 44px;
    padding: 56px 0 52px;
  }
  .fx-pair-head {
    margin-bottom: 24px;
  }
  .fx-pair-lead {
    font-size: 17px;
  }
}
/* телефон: одна колонка и подписи фрагментов — из блока до 1000 px выше */
@media (max-width: 640px) {
  .fx-pair-step {
    margin-top: 36px;
    padding: 44px 0 40px;
  }
  .fx-pair-head .fx-h {
    margin-bottom: 10px;
  }
  .fx-qgrid {
    gap: 8px;
  }
  .fx-pair-note {
    margin-top: 18px;
    font-size: 14px;
  }
}

/* компактный ряд: короткий текст + стопка кадров; кадрам — две трети ширины,
   иначе экран системы в стопке уменьшается впятеро и не читается */
.fx-row {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(28px, 4.5vw, 64px);
  align-items: start;
}
.fx-row.rev {
  grid-template-columns: minmax(0, 1.28fr) minmax(0, 0.72fr);
}
.fx-row.rev .fx-copy {
  order: 2;
}
/* колонки сетки не растягиваются под ряд вкладок без переноса */
.fx-row > *,
.fx-stack {
  min-width: 0;
}
@media (max-width: 900px) {
  .fx-row,
  .fx-row.rev {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .fx-row.rev .fx-copy {
    order: 0;
  }
}

/* широкий шаг: текст в две колонки над кадрами */
.fx-wide-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px clamp(28px, 4.5vw, 64px);
  align-items: end;
  margin-bottom: 36px;
}
.fx-wide-head .fx-lead {
  margin-bottom: 0;
}
@media (max-width: 900px) {
  .fx-wide-head {
    grid-template-columns: 1fr;
    margin-bottom: 24px;
  }
}

/* ---------- стопка кадров с подписями ---------- */
.fx-stack {
  position: relative;
}
.fx-stack-cards {
  position: relative;
  aspect-ratio: 4 / 3;
  margin: 26px 30px 0 0; /* место под выглядывающие задние карточки */
  cursor: zoom-in;
}
.fx-card {
  position: absolute;
  inset: 0;
  margin: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--stroke);
  background: var(--fx-shot-bg);
  transition:
    transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.45s ease,
    box-shadow 0.45s ease;
  will-change: transform;
}
.fx-card picture,
.fx-card img {
  display: block;
  width: 100%;
  height: 100%;
}
.fx-card img {
  object-fit: contain;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}
.fx-card[data-pos="0"] {
  z-index: 4;
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.45),
    0 14px 32px rgba(0, 0, 0, 0.25);
}
.fx-card[data-pos="1"] {
  z-index: 3;
  transform: translate(3.5%, -4.5%) scale(0.95);
  opacity: 0.7;
}
.fx-card[data-pos="2"] {
  z-index: 2;
  transform: translate(7%, -9%) scale(0.9);
  opacity: 0.4;
}
.fx-card[data-pos="3"],
.fx-card[data-pos="4"] {
  z-index: 1;
  transform: translate(7%, -9%) scale(0.9);
  opacity: 0;
}
.fx-card.fx-leaving {
  transform: translate(-12%, 5%) rotate(-3deg) scale(0.96);
  opacity: 0;
}
/* вкладки кадров. 28.09 (пользователь не видел, какой кадр выбран): крупнее,
   выбранная — сплошная акцентная «таблетка» (акцент = активное, по айдентике).
   Не влезают в строку — переносятся на следующую (раньше ряд листался вбок, и на
   телефоне последняя вкладка, например «Роли» в шаге 01, была срезана краем) */
.fx-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding: 4px 3px; /* место под рамку фокуса и тень */
}
.fx-tab {
  flex: 0 0 auto;
  white-space: nowrap;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  padding: 11px 20px;
  border-radius: var(--r-pill);
  border: 1px solid var(--stroke-2);
  background: rgba(232, 235, 247, 0.05);
  color: var(--text);
  cursor: pointer;
  transition:
    background var(--d-base),
    color var(--d-base),
    border-color var(--d-base),
    box-shadow var(--d-base);
}
.fx-tab:hover {
  border-color: rgba(232, 235, 247, 0.4);
  background: rgba(232, 235, 247, 0.1);
}
.fx-tab[aria-selected="true"] {
  color: #fff;
  background: var(--accent-500);
  border-color: var(--accent-500);
  box-shadow: 0 6px 18px -6px rgba(239, 78, 53, 0.7);
}
@media (max-width: 640px) {
  .fx-tab {
    font-size: 14px;
    padding: 10px 16px;
  }
}

/* лупа в углу переднего кадра — открыть крупно (клик по кадру делает то же) */
.fx-zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--stroke-2);
  background: rgba(8, 22, 31, 0.78);
  backdrop-filter: blur(8px);
  color: #fff;
  cursor: zoom-in;
  box-shadow: var(--sh-2);
  transition:
    border-color var(--d-base),
    transform var(--d-base) var(--e-out);
}
.fx-zoom:hover {
  border-color: var(--accent-500);
  transform: scale(1.06);
}
.fx-zoom[hidden] {
  display: none;
}
/* у стопки лупа сидит на углу переднего кадра, наполовину за краем:
   внутри кадра она закрывала шапки таблиц и кнопки в правом верхнем углу */
.fx-stack-cards > .fx-zoom {
  top: -16px;
  right: -16px;
}
/* та же лупа на широких кадрах — значок, кликается весь кадр */
.fx-shot-open {
  position: relative;
}
.fx-shot-open .fx-zoom {
  pointer-events: none;
}
.fx-cap {
  margin: 12px 0 0;
  min-height: 3.2em; /* две строки — подпись не дёргает раскладку при смене кадра */
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-soft);
}
@media (max-width: 640px) {
  .fx-stack-cards {
    aspect-ratio: 1 / 1;
    margin: 18px 18px 0 0;
  }
}

/* кадр с «горячей зоной»: рамка ровно по картинке, чтобы зону можно было
   задать в процентах от кадра (--x --y --w --h; для телефона --mx…) */
.fx-card {
  container-type: size;
}
.fx-frame {
  --ar: var(--dar); /* пропорции задаются в разметке: --dar компьютер, --mar телефон */
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(100cqw, calc(100cqh * var(--ar)));
  height: min(100cqh, calc(100cqw / var(--ar)));
}
.fx-frame picture,
.fx-frame img {
  width: 100%;
  height: 100%;
}
.fx-card .fx-frame img {
  object-fit: fill;
}
.fx-hot {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: calc(var(--w) * 1%);
  height: calc(var(--h) * 1%);
  z-index: 2;
  border-radius: 10px;
  outline: 2px dashed transparent;
  outline-offset: 4px;
  transition: outline-color var(--d-base);
}
@media (max-width: 640px) {
  .fx-frame {
    --ar: var(--mar);
  }
  .fx-hot {
    left: calc(var(--mx) * 1%);
    top: calc(var(--my) * 1%);
    width: calc(var(--mw) * 1%);
    height: calc(var(--mh) * 1%);
  }
}
/* значок-подсказка в углу зоны */
.fx-hot::before {
  content: "↗";
  position: absolute;
  right: -14px;
  top: -14px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-500);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 0 0 0 rgba(239, 78, 53, 0.55);
  animation: fx-pulse 2.2s ease-out infinite;
}
.fx-hot span {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translate(-50%, 4px);
  width: max-content;
  max-width: 230px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #0b1b2b;
  border: 1px solid var(--stroke-2);
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity var(--d-base),
    transform var(--d-base);
}
.fx-hot:hover,
.fx-hot:focus-visible {
  outline-color: var(--accent-500);
}
.fx-hot:hover span,
.fx-hot:focus-visible span {
  opacity: 1;
  transform: translate(-50%, 0);
}
@keyframes fx-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 78, 53, 0.55);
  }
  70%,
  100% {
    box-shadow: 0 0 0 12px rgba(239, 78, 53, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .fx-hot::before {
    animation: none;
  }
}

/* ---------- широкие кадры (шаги 4 и 5, аналитика) ---------- */
.fx-shot {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fx-shot-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--fx-shot-bg);
  cursor: zoom-in;
  box-shadow: var(--sh-2);
  transition:
    transform var(--d-base) var(--e-out),
    box-shadow var(--d-base) var(--e-out);
}
.fx-shot-open:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-3);
}
.fx-shot-open img {
  display: block;
  width: 100%;
  height: auto;
}
.fx-shot figcaption {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-soft);
}
.fx-shot figcaption b {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-400);
}

/* шаг 05: в колонке текста — что делает каждая сторона (28.09: раньше две
   колонки под широкой стопкой) */
.fx-copy-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 10px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
}
.fx-copy-sub::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--d-cyan);
}
.fx-copy-sub ~ .fx-copy-sub::before {
  background: var(--accent-500);
}
.fx-copy .fx-copy-sub + .fr-list {
  margin-top: 0;
}

/* ---------- шаг 06: сначала результат, потом детали ----------
   Заголовок и три факта в одну строку, сразу под ними — график. При 1280×720
   начало графика видно на первом экране раздела, на телефоне — без прокрутки
   через текст. */
.fx-res-step {
  padding-top: 64px;
}
.fx-res-head {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 16px clamp(28px, 4.5vw, 64px);
  align-items: end;
  /* 29.09 (замечание пользователя: метрики и кадры слиплись): отступ схлопывается
     с запасом стопки (.fx-stack-cards, margin-top 26), а задние кадры поднимаются
     на эти ~25 px — при 22 px они вставали в 1 px под плитками. 48 = запас стопки
     + видимый зазор ≈22 px над задним кадром */
  margin-bottom: 48px;
}
.fx-res-head .fx-h {
  margin-bottom: 10px;
}
.fx-res-head .fx-lead {
  margin: 0;
}
.fx-facts-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.fx-facts dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.fx-fact {
  display: flex;
  flex-direction: column-reverse; /* цифра над подписью, в разметке — dt первым */
  justify-content: flex-end;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--stroke);
  border-radius: var(--r-md);
  background: rgba(232, 235, 247, 0.035);
}
.fx-fact dd {
  margin: 0;
  font-family: var(--f-display);
  font-size: 28px;
  line-height: 1.1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.fx-fact dt {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-soft);
}
/* партия, которая выделилась, — единственный акцент блока */
.fx-fact.is-hot {
  border-color: rgba(239, 78, 53, 0.55);
  background: rgba(239, 78, 53, 0.08);
}
.fx-fact.is-hot dd {
  color: var(--accent-400);
}
/* под кадром: группы и вкладки группы в одну строку */
.fx-res-nav {
  display: flex;
  align-items: center;
  gap: 10px 18px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.fx-res-nav .fx-tabs {
  margin-top: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.fx-tab[hidden] {
  display: none;
}
.fx-groups {
  flex: 0 0 auto;
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--stroke);
  border-radius: var(--r-pill);
  background: rgba(232, 235, 247, 0.04);
}
/* группы шага 06 («Итог / Причины / Документы») — выбранная светлая, чтобы не
   спорить с акцентной вкладкой кадра рядом (28.09) */
.fx-group {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  padding: 10px 20px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition:
    background var(--d-base),
    color var(--d-base);
}
.fx-group:hover {
  color: var(--text);
}
.fx-group[aria-pressed="true"] {
  background: #eaf0fa;
  color: #08161f;
}
@media (max-width: 900px) {
  .fx-res-head {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 40px; /* кадры меньше — задние поднимаются меньше */
  }
}
@media (max-width: 640px) {
  .fx-res-step {
    padding-top: 44px;
  }
  .fx-facts dl {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 1.2fr);
    gap: 6px;
  }
  .fx-fact {
    padding: 10px;
  }
  .fx-fact dd {
    font-size: 22px;
  }
  .fx-fact dt {
    font-size: 11.5px;
  }
  .fx-res-nav {
    margin-top: 14px;
  }
  .fx-groups {
    width: 100%;
  }
  .fx-group {
    flex: 1 1 0;
    padding: 8px 6px;
  }
}

/* «Фрагмент экрана» — превью показывает часть экрана, целиком он открывается
   по клику. Метка сидит на краю рамки, как лупа, и не закрывает сам кадр.
   data-frag переднего кадра стопка переносит на рамку (functionality.js):
   d — на компьютере, m — на телефоне, dm — везде */
.fx-stack-cards::before {
  content: "Фрагмент экрана · целиком по клику";
  position: absolute;
  left: 14px;
  top: -13px;
  z-index: 6;
  display: none;
  padding: 5px 11px;
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-pill);
  background: rgba(8, 22, 31, 0.9);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  pointer-events: none;
}
.fx-stack-cards[data-frag="d"]::before,
.fx-stack-cards[data-frag="dm"]::before {
  display: block;
}
@media (max-width: 640px) {
  .fx-stack-cards[data-frag="m"]::before {
    display: block;
  }
  .fx-stack-cards[data-frag="d"]::before {
    display: none;
  }
}

/* широкая стопка (шаги 05–07): кадры во всю ширину, чтобы цифры читались.
   На телефоне рамка квадратная, как у обычной стопки: в полосе 4:3 шириной
   330 px экран системы не читался — у каждого кадра своё телефонное превью */
.fx-stack--wide .fx-stack-cards {
  aspect-ratio: 16 / 9;
}
@media (max-width: 640px) {
  .fx-stack--wide .fx-stack-cards {
    aspect-ratio: 1 / 1;
  }
  /* результаты: графики из узкого окна и панели ответов — в рамке 5:6 целиком */
  .fx-stack--res .fx-stack-cards {
    aspect-ratio: 5 / 6;
  }
}
/* пункты под широкой стопкой — в две колонки */
.fr-list--cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px clamp(28px, 4.5vw, 64px);
  margin-top: 28px;
}
@media (max-width: 900px) {
  .fr-list--cols {
    grid-template-columns: 1fr;
  }
}

/* ---------- аналитика: визуальная пауза ---------- */
.fx-pause {
  padding: 96px 0 40px;
  scroll-margin-top: calc(var(--fx-hdr) + var(--fx-nav) + 20px);
}
.fx-pause-head {
  max-width: 760px;
  margin: 0 auto 36px;
  text-align: center;
}
.fx-pause-head .h2 {
  margin-bottom: 18px;
}
.fx-pause-head .lede {
  max-width: none;
  margin: 0 auto;
}
/* 28.09: четыре кадра Metabase одной величины — сетка 2×2; колонка на 1440 = 564 px,
   ровно карточка Metabase в кадре (mbsaus13.py, окно 607) */
.fx-pause-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
  align-items: start;
  margin-top: 28px;
}
.fx-note-wide {
  margin-top: 28px;
}
/* что есть в каждой установке и что добавляет Metabase */
.fx-an-tiers {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 28px;
  text-align: left;
}
.fx-an-tier {
  padding: 22px 24px;
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  background: rgba(10, 24, 36, 0.55);
}
.fx-an-tier h3 {
  margin-bottom: 12px;
  font-family: var(--f-text);
  font-size: 17px;
  font-weight: 600;
}
.fx-an-tier p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-soft);
}
.fx-an-tier a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent-500);
  text-underline-offset: 3px;
}
@media (max-width: 760px) {
  .fx-an-tiers {
    grid-template-columns: 1fr;
  }
}
.fx-note {
  padding: 20px 22px;
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  background: rgba(232, 235, 247, 0.035);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-soft);
}
.fx-note p + p {
  margin-top: 10px;
}
.fx-note b {
  color: var(--text);
}
@media (max-width: 640px) {
  .fx-pause-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- все возможности одним списком ---------- */
.fx-all {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px 28px;
}
.fx-all h3 {
  margin-bottom: 12px;
  font-family: var(--f-text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}
.fx-all h3 a {
  color: var(--text);
}
.fx-all h3 a:hover {
  color: var(--accent-400);
}
.fx-all h3 i {
  font-style: normal;
  margin-right: 6px;
  color: var(--accent-400);
}
.fx-all ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.fx-all li {
  position: relative;
  padding-left: 22px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-soft);
}
.fx-all li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.42em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--d-cyan);
  border-bottom: 2px solid var(--d-cyan);
  transform: rotate(-45deg);
}
@media (max-width: 1000px) {
  .fx-all {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .fx-all {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}
.fx-after .sec-head {
  margin-bottom: var(--s7);
}
/* свечение за заголовком раздела (home3d-acts.css, inset -60px по бокам)
   на телефоне выходило за экран и давало горизонтальную прокрутку на 21 px.
   clip, а не hidden: hidden сделал бы раздел прокручиваемым по вертикали */
.fx-after .sec {
  overflow-x: clip;
}

/* ---------- просмотр кадра в полный размер ---------- */
.fx-lb {
  width: min(1200px, 96vw);
  max-width: none;
  max-height: 94vh;
  margin: auto;
  padding: 0;
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-lg);
  background: #0b1b2b;
  color: var(--text);
  overflow: hidden;
}
.fx-lb::backdrop {
  background: rgba(3, 10, 15, 0.86);
  backdrop-filter: blur(4px);
}
.fx-lb-view {
  position: relative;
}
.fx-lb-media {
  max-height: calc(94vh - 72px);
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--fx-shot-bg);
}
/* по умолчанию кадр вписан в окно целиком — и по ширине, и по высоте, без
   прокрутки: прокрутку внутри просмотра не замечали, и было непонятно, что кадр
   длиннее (27.09). Предел высоты ставит functionality.js (высота окна минус
   подпись), узкий кадр (data-full-max) стоит по центру. Настоящая величина —
   лупой «Увеличить», там прокрутка ожидаема */
.fx-lb-media img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
}
.fx-lb-media:has(+ .fx-lb-zoom:not([hidden])) img {
  cursor: zoom-in;
}
/* увеличенный кадр — в настоящую величину экрана системы (ширину ставит скрипт) */
.fx-lb-media.is-zoomed img {
  cursor: zoom-out;
}
/* лупа на кадре: увеличить / вписать в экран */
.fx-lb-zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--stroke-2);
  background: rgba(8, 22, 31, 0.86);
  backdrop-filter: blur(8px);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--sh-2);
  transition: border-color var(--d-base);
}
.fx-lb-zoom:hover,
.fx-lb-zoom[aria-pressed="true"] {
  border-color: var(--accent-500);
}
.fx-lb-zoom[aria-pressed="true"] .fx-lb-zoom-v {
  display: none; /* «+» становится «−» */
}
.fx-lb-zoom[hidden] {
  display: none;
}
/* «Листайте вниз»: кадр длиннее экрана — затемнение снизу и кнопка по центру;
   пропадает, когда кадр пролистан до конца (functionality.js, updateMore) */
.fx-lb-more {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 110px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 16px;
  border: 0;
  background: linear-gradient(rgba(11, 27, 43, 0), rgba(11, 27, 43, 0.82));
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  pointer-events: none;
}
.fx-lb-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font: inherit;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--stroke-2);
  background: rgba(8, 22, 31, 0.86);
  box-shadow: var(--sh-2);
  pointer-events: auto;
  cursor: pointer;
  transition: border-color var(--d-base);
}
.fx-lb-more-btn:hover {
  border-color: var(--accent-500);
}
.fx-lb-more[hidden] {
  display: none;
}
.fx-lb-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-soft);
}
.fx-lb-cap {
  flex: 1 1 auto;
}
/* листание кадров: ‹ 2 / 5 › */
.fx-lb-nav {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.fx-lb-nav[hidden] {
  display: none;
}
.fx-lb-prev,
.fx-lb-next {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--stroke-2);
  background: rgba(232, 235, 247, 0.06);
  color: var(--text);
  cursor: pointer;
  transition:
    background var(--d-base),
    border-color var(--d-base);
}
.fx-lb-prev:hover,
.fx-lb-next:hover {
  border-color: var(--accent-500);
  background: rgba(239, 78, 53, 0.14);
}
.fx-lb-count {
  min-width: 44px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-soft);
}
.fx-lb-close {
  flex: 0 0 auto;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--stroke-2);
  background: rgba(232, 235, 247, 0.06);
  color: var(--text);
  cursor: pointer;
}
/* на телефоне просмотр на весь экран: кадр сначала целиком по ширине,
   лупой — в настоящую величину, тогда листается пальцем */
@media (max-width: 700px) {
  .fx-lb {
    width: 100vw;
    max-height: 100vh;
    height: 100%;
    border-radius: 0;
    border: 0;
  }
  /* кадр занимает всё, что осталось над панелью с подписью и листанием */
  .fx-lb[open] {
    display: flex;
    flex-direction: column;
  }
  .fx-lb-view {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .fx-lb-media {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    display: grid; /* невысокий кадр — посередине экрана, а не прилипшим к верху */
  }
  .fx-lb-media img {
    width: 100%; /* телефон: кадр по ширине экрана, длинный листается пальцем */
    margin: auto; /* у кадра больше экрана отступ обнуляется — верх не срезается */
  }
  .fx-lb-foot {
    flex-direction: column;
    align-items: stretch;
  }
  .fx-lb-nav {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fx-card,
  .fx-shot-open {
    transition: none;
  }
}
