/* =============================================================
   EmplyFlow — телеком-кейс «Один AI. Три режима развития»
   Метафора: сигнал, который становится сетью.
   Токены наследуют design-system/colors_and_type.css.
   ============================================================= */

:root {
  --navy: #050230;
  --navy-2: #0a0540;
  --navy-3: #100b52;
  --indigo: #4a3bff;
  --indigo-2: #6a5cff;
  --pink: #ffb8e2;
  --mint: #d5fff3;
  --peri: #cec8ff;
  --fog: #d9d6ff;
  --peach: #ffb777;

  --fg1: #ffffff;
  --fg2: rgba(217, 214, 255, 0.78);
  --fg3: rgba(217, 214, 255, 0.52);
  --fg4: rgba(217, 214, 255, 0.34);
  --stroke: rgba(217, 214, 255, 0.14);
  --stroke-2: rgba(217, 214, 255, 0.26);
  --glass: rgba(217, 214, 255, 0.05);
  --glass-2: rgba(217, 214, 255, 0.09);

  --font: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  --shell: min(1240px, 100% - clamp(28px, 7vw, 120px));

  /* активная тема ветки — переопределяется на секциях */
  --accent: var(--indigo-2);
  --accent-soft: rgba(106, 92, 255, 0.16);
}

[data-theme="violet"] { --accent: #8a7bff; --accent-soft: rgba(138, 123, 255, 0.16); }
[data-theme="mint"]   { --accent: #7fe9cd; --accent-soft: rgba(127, 233, 205, 0.14); }
[data-theme="peach"]  { --accent: #ffb777; --accent-soft: rgba(255, 183, 119, 0.16); }

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--fg1);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

a { color: inherit; }
img, svg, canvas, video { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.shell { width: var(--shell); margin-inline: auto; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 12px 20px;
  border-radius: 0 0 14px 14px;
  background: var(--indigo);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}

.skip-link:focus { top: 0; }

/* ---------- типографика ---------- */

.h-display {
  font-size: clamp(34px, 4.9vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.032em;
  font-weight: 700;
  margin: 0;
}

.h-chapter {
  font-size: clamp(29px, 3.9vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.028em;
  font-weight: 700;
  margin: 0;
}

.h-scene {
  font-size: clamp(23px, 2.3vw, 36px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0;
}

.h-sub {
  font-size: clamp(18px, 1.35vw, 22px);
  line-height: 1.35;
  font-weight: 600;
  margin: 0;
}

.lead {
  font-size: clamp(17px, 1.25vw, 21px);
  line-height: 1.55;
  color: var(--fg2);
  margin: 0;
}

.muted { color: var(--fg3); }
.tiny { font-size: 13px; line-height: 1.45; color: var(--fg3); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg3);
  margin: 0;
}

.eyebrow b {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--accent);
}

/* ---------- статусные плашки фактов ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--stroke-2);
  color: var(--fg3);
  background: var(--glass);
}

.badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge--demo { color: var(--peri); border-color: rgba(206, 200, 255, 0.34); }
.badge--client { color: var(--peach); border-color: rgba(255, 183, 119, 0.4); }
.badge--verified { color: var(--mint); border-color: rgba(213, 255, 243, 0.3); }

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--ease) 0.25s, background 0.25s, border-color 0.25s, color 0.25s;
}

.btn:hover { transform: translateY(-2px); }

.btn--primary { background: var(--indigo); color: #fff; }
.btn--primary:hover { background: var(--indigo-2); }

.btn--ghost {
  background: transparent;
  border-color: var(--stroke-2);
  color: var(--fg1);
}
.btn--ghost:hover { border-color: var(--peri); background: var(--glass); }

/* =============================================================
   PRELOADER — импульс проходит три узла
   ============================================================= */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background: var(--navy);
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}

.preloader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

.preloader__inner { display: grid; gap: 26px; justify-items: center; width: min(420px, 82vw); }

.preloader__track {
  position: relative;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--stroke-2) 12%, var(--stroke-2) 88%, transparent);
}

.preloader__nodes {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preloader__node {
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 1.5px solid var(--stroke-2);
  background: var(--navy);
  transition: background 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s, transform 0.35s var(--ease);
}

.preloader__node.is-on {
  background: var(--indigo-2);
  border-color: var(--indigo-2);
  box-shadow: 0 0 0 5px rgba(106, 92, 255, 0.16);
  transform: scale(1.15);
}

.preloader__pulse {
  position: absolute;
  top: 50%;
  left: 0;
  width: 46px;
  height: 2px;
  margin-top: -1px;
  background: linear-gradient(90deg, transparent, var(--mint), transparent);
  animation: pulse-run 1.5s var(--ease-soft) infinite;
}

@keyframes pulse-run {
  0%   { transform: translateX(-46px); opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateX(min(420px, 82vw)); opacity: 0; }
}

.preloader__labels {
  display: grid;
  gap: 6px;
  justify-items: center;
  min-height: 26px;
}

.preloader__label {
  font-size: 14.5px;
  color: var(--fg3);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), color 0.4s;
  grid-area: 1 / 1;
}

.preloader__label.is-on { opacity: 1; transform: none; color: var(--fg1); }

.preloader__brand {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg4);
  font-weight: 700;
}

/* =============================================================
   ТОПБАР
   ============================================================= */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.topbar > .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: var(--shell);
}

.topbar.is-stuck {
  background: rgba(5, 2, 48, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--stroke);
}

.topbar__back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--fg2);
  text-decoration: none;
  transition: color 0.2s;
}
.topbar__back:hover { color: var(--fg1); }

.topbar__right { display: flex; align-items: center; gap: 16px; }

.topbar__progress {
  position: absolute;
  left: 0; bottom: -1px;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(var(--read, 0));
  background: linear-gradient(90deg, var(--indigo-2), var(--mint), var(--peach));
  transition: transform 0.1s linear;
}

.topbar__cta { padding: 10px 18px; font-size: 14.5px; }

/* ---------- переключатель веток ---------- */

.branchnav {
  position: fixed;
  top: 72px;
  left: 0; right: 0;
  z-index: 55;
  padding: 10px 0;
  background: rgba(5, 2, 48, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--stroke);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.32s var(--ease), transform 0.32s var(--ease), visibility 0.32s;
}

.branchnav.is-on { opacity: 1; visibility: visible; transform: none; }

.branchnav > .shell {
  display: flex;
  align-items: center;
  gap: 14px;
}

.branchnav__label {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--fg4);
  flex: none;
}

.branchnav__list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.branchnav__list::-webkit-scrollbar { display: none; }

.branchnav__btn {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  flex: none;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--glass);
  color: var(--fg2);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.24s var(--ease), background 0.24s var(--ease), color 0.24s var(--ease);
}

.branchnav__btn:hover { color: var(--fg1); border-color: var(--stroke-2); }

.branchnav__btn-n {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg4);
}

.branchnav__btn.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--fg1);
}

.branchnav__btn.is-active .branchnav__btn-n { color: var(--accent); }

/* =============================================================
   ГЛАВА 1. HERO
   ============================================================= */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 132px 0 96px;
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1000px 620px at 74% 22%, rgba(106, 92, 255, 0.3), transparent 62%),
    radial-gradient(760px 520px at 16% 78%, rgba(255, 184, 226, 0.16), transparent 66%),
    var(--navy);
}

.hero__canvas,
.hero__video {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.85;
}

.hero__video {
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}

.hero__video.is-ready { opacity: 0.9; }

/* Видео не должно спорить с текстом левой колонки */
.hero__video::after { content: ""; }

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(5, 2, 48, 0.92) 0%, rgba(5, 2, 48, 0.62) 42%, rgba(5, 2, 48, 0.15) 100%);
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 76px);
  align-items: center;
  width: var(--shell);
  margin-inline: auto;
}

.hero__title { max-width: 18ch; }
.hero__title em { font-style: normal; color: var(--mint); }

.hero__lead { margin-top: 22px; max-width: 46ch; }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--glass);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fg2);
}

.hero__chip i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  font-style: normal;
}

/* переход времени */
.hero__shift {
  margin-top: 34px;
  padding: 20px 22px;
  border-radius: 22px;
  border: 1px solid var(--stroke);
  background: var(--glass);
  display: grid;
  gap: 14px;
}

.hero__shift-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.hero__shift-from {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 700;
  color: var(--fg3);
  text-decoration: line-through;
  text-decoration-color: rgba(255, 184, 226, 0.6);
  text-decoration-thickness: 2px;
}

.hero__shift-to {
  font-size: clamp(24px, 2.6vw, 38px);
  font-weight: 800;
  color: var(--mint);
  letter-spacing: -0.02em;
}

.hero__shift-arrow { color: var(--fg3); font-size: 20px; }

/* волна, которая сжимается в чат */
.hero__wave {
  position: relative;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(217, 214, 255, 0.1);
}

.hero__wave-fill {
  position: absolute;
  inset: 0;
  transform-origin: 0 50%;
  transform: scaleX(var(--squeeze, 1));
  background: linear-gradient(90deg, var(--pink), var(--indigo-2) 55%, var(--mint));
  transition: transform 0.2s linear;
}

/* правая колонка — живой диалог */
.hero__stage { position: relative; }

.dialogue {
  display: grid;
  gap: 12px;
  padding: 22px;
  border-radius: 26px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(16, 11, 82, 0.86), rgba(10, 5, 64, 0.7));
  box-shadow: 0 40px 90px -50px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dialogue__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--stroke);
}

.dialogue__who {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 700;
}

.dialogue__avatar {
  width: 28px; height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--indigo);
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
}

.dialogue__timer {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg3);
}

.msg {
  display: grid;
  gap: 6px;
  padding: 13px 16px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.msg.is-in { opacity: 1; transform: none; }

.msg--ai {
  background: rgba(217, 214, 255, 0.08);
  border: 1px solid var(--stroke);
  justify-self: start;
  max-width: 94%;
}

.msg--user {
  background: rgba(74, 59, 255, 0.24);
  border: 1px solid rgba(138, 123, 255, 0.4);
  justify-self: end;
  max-width: 94%;
}

.msg__tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fg3);
}

.msg--user .msg__tag { color: var(--peri); }

/* индикаторы вокруг диалога */
.hero__indicators {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.ind-chip {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px dashed var(--stroke-2);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg3);
  opacity: 0.45;
  transition: opacity 0.4s var(--ease), color 0.4s, border-color 0.4s, background 0.4s;
}

.ind-chip.is-on {
  opacity: 1;
  color: var(--navy);
  background: var(--mint);
  border-color: transparent;
  border-style: solid;
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg4);
  font-weight: 700;
}

.hero__scroll span {
  width: 1px; height: 30px;
  background: linear-gradient(180deg, var(--fog), transparent);
}

/* =============================================================
   ОБЩАЯ СЕКЦИЯ
   ============================================================= */

.chapter { position: relative; padding: clamp(78px, 10vw, 148px) 0; }

.chapter__head { max-width: 62ch; display: grid; gap: 18px; }
.chapter__head .lead { max-width: 56ch; }

.section-line {
  width: var(--shell);
  margin: 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--stroke), transparent);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* =============================================================
   ГЛАВА 2. МАСШТАБ
   ============================================================= */

.scale__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(30px, 4.4vw, 68px);
  margin-top: clamp(38px, 5vw, 64px);
  align-items: start;
}

.room {
  position: relative;
  border-radius: 28px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(16, 11, 82, 0.6), rgba(5, 2, 48, 0.4));
  padding: 26px;
  overflow: hidden;
}

.room__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg3);
  margin-bottom: 18px;
}

.room__count {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--peach);
}

.room__queue {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13px, 1fr));
  gap: 6px;
  min-height: 148px;
  align-content: start;
}

.room__dot {
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(217, 214, 255, 0.16);
  transition: background 0.4s var(--ease), transform 0.4s var(--ease);
}

.room__dot.is-served { background: var(--mint); }
.room__dot.is-wait { background: rgba(255, 183, 119, 0.5); }

.room__foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--stroke);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 13px;
  color: var(--fg3);
}

.room__foot b { color: var(--fg1); font-weight: 700; }

.limits { display: grid; gap: 12px; }

.limit {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: var(--glass);
}

.limit__n {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--peach);
  padding-top: 2px;
}

.limit__text { font-size: 15.5px; line-height: 1.45; color: var(--fg2); }

.scale__turn {
  margin-top: clamp(40px, 5vw, 70px);
  padding: clamp(28px, 3.6vw, 46px);
  border-radius: 30px;
  border: 1px solid var(--stroke-2);
  background:
    radial-gradient(680px 300px at 80% 0%, rgba(106, 92, 255, 0.24), transparent 70%),
    var(--glass);
  display: grid;
  gap: 14px;
}

/* =============================================================
   ГЛАВА 3. МАРШРУТИЗАТОР СИГНАЛА
   ============================================================= */

.router { position: relative; }

.router__stage {
  position: relative;
  margin-top: clamp(34px, 4.5vw, 60px);
}

.router__svg {
  width: 100%;
  height: clamp(190px, 22vw, 300px);
  overflow: visible;
}

.router__path {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: var(--len, 1000);
  stroke-dashoffset: calc(var(--len, 1000) * (1 - var(--draw, 0)));
  transition: stroke-dashoffset 0.25s linear;
}

.router__core {
  fill: var(--navy);
  stroke: var(--indigo-2);
  stroke-width: 2;
}

.router__core-glow { fill: rgba(106, 92, 255, 0.2); }

.router__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 24px);
  margin-top: clamp(18px, 2.4vw, 30px);
}

.branch-card {
  position: relative;
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 26px 24px 24px;
  border-radius: 26px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(16, 11, 82, 0.66), rgba(10, 5, 64, 0.34));
  text-align: left;
  font: inherit;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.35s var(--ease), background 0.3s;
}

.branch-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(var(--fill, 0));
  transform-origin: 0 50%;
  transition: transform 0.5s var(--ease);
}

.branch-card:hover,
.branch-card.is-active {
  border-color: var(--accent);
  transform: translateY(-4px);
  background: linear-gradient(180deg, rgba(16, 11, 82, 0.9), rgba(10, 5, 64, 0.5));
}

.branch-card.is-active { --fill: 1; }

.branch-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.branch-card__n {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent);
}

.branch-card__status {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg3);
}

.branch-card__title { font-size: clamp(19px, 1.5vw, 24px); font-weight: 700; line-height: 1.2; margin: 0; }
.branch-card__sub { font-size: 14.5px; color: var(--fg2); margin: 0; }

.branch-card__metric {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding-top: 14px;
  border-top: 1px solid var(--stroke);
}

.branch-card__value {
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
  white-space: nowrap;
}

.branch-card__label { font-size: 12.5px; color: var(--fg3); }

.branch-card__preview { font-size: 13.5px; color: var(--fg3); margin: 0; }

/* =============================================================
   ВЕТКИ — общая оболочка
   ============================================================= */

.branch {
  position: relative;
  padding: clamp(78px, 9vw, 136px) 0 clamp(84px, 9vw, 140px);
  scroll-margin-top: 148px;
  border-top: 2px solid var(--accent);
}

.branch::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1100px 560px at 50% 0%, var(--accent-soft), transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 42%);
  pointer-events: none;
}

.branch__head {
  display: grid;
  gap: 18px;
  max-width: 68ch;
}

.branch__cover {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(18px, 2.6vw, 34px);
  align-items: center;
  margin-bottom: clamp(22px, 2.6vw, 34px);
  padding: clamp(22px, 2.8vw, 38px) clamp(22px, 2.8vw, 38px);
  border-radius: 26px;
  border: 1px solid var(--accent);
  background: linear-gradient(135deg, var(--accent-soft), rgba(5, 2, 48, 0.42) 62%);
}

.branch__cover-n {
  font-family: var(--mono);
  font-size: clamp(46px, 6.4vw, 96px);
  line-height: 0.9;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.04em;
}

.branch__cover-txt { display: grid; gap: 12px; }

.branch__cover-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--fg3);
}

.branch__cover-status {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  letter-spacing: 0.06em;
}

.scene { margin-top: clamp(44px, 5.6vw, 92px); }

.scene__head {
  display: grid;
  gap: 12px;
  max-width: 62ch;
  margin-bottom: clamp(22px, 2.6vw, 34px);
}

.scene__n {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
}

/* =============================================================
   ВЕТКА 1 — КОНСТРУКТОР КОМПЕТЕНЦИИ
   ============================================================= */

.ui {
  border-radius: 24px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(16, 11, 82, 0.72), rgba(10, 5, 64, 0.42));
  overflow: hidden;
}

.ui__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--stroke);
  background: rgba(5, 2, 48, 0.5);
  flex-wrap: wrap;
}

.ui__tab {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg3);
  border: 1px solid transparent;
}

.ui__tab.is-on {
  color: var(--fg1);
  border-color: var(--stroke-2);
  background: var(--glass-2);
}

.ui__spacer { flex: 1; }

.ui__ai {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(138, 123, 255, 0.42);
  background: rgba(74, 59, 255, 0.16);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--peri);
}

.ui__ai i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--mint);
  font-style: normal;
}

.ui__body { padding: clamp(18px, 2.2vw, 28px); display: grid; gap: 24px; }

.ui__block { display: grid; gap: 12px; }

.ui__block--cta {
  padding-top: 4px;
  border-top: 1px solid var(--stroke);
  margin-top: 4px;
}

.ui__block--cta .btn {
  justify-self: start;
  text-decoration: none;
  text-align: center;
}

.ui__block-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg3);
}

.ui__block-title b {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 12px;
}

.field {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(5, 2, 48, 0.42);
  font-size: 15px;
  color: var(--fg2);
}

.field--name { color: var(--fg1); font-weight: 700; font-size: 17px; }

.field__hint { font-size: 12.5px; color: var(--fg4); margin-top: 6px; }

/* индикаторы с весами */
.ind-list { display: grid; gap: 8px; }

.ind-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(5, 2, 48, 0.36);
  transition: border-color 0.35s, background 0.35s, transform 0.35s var(--ease);
}

.ind-row.is-lit {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateX(4px);
}

.ind-row__n { font-family: var(--mono); font-size: 12.5px; color: var(--fg3); }
.ind-row.is-lit .ind-row__n { color: var(--accent); }

.ind-row__title { font-size: 14.5px; line-height: 1.35; }

.ind-row__base {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--peri);
  vertical-align: middle;
}

.ind-row__weight {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--fg3);
  white-space: nowrap;
}

/* настройки интервью */
.settings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.setting {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(5, 2, 48, 0.36);
  display: grid;
  gap: 5px;
}

.setting__label { font-size: 12.5px; color: var(--fg3); line-height: 1.3; }
.setting__value { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }

/* шкала */
.scaleline { display: grid; gap: 10px; }

.scaleline__bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.scaleline__step {
  padding: 11px 10px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(5, 2, 48, 0.36);
  display: grid;
  gap: 3px;
  text-align: center;
}

.scaleline__score { font-size: 17px; font-weight: 800; color: var(--accent); }
.scaleline__name { font-size: 11.5px; color: var(--fg3); line-height: 1.25; }

.scaleline__rules {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.rule-chip {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--stroke);
  color: var(--fg3);
}

/* корзины кейсов */
.baskets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.basket {
  padding: 20px;
  border-radius: 20px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(16, 11, 82, 0.6), rgba(10, 5, 64, 0.3));
  display: grid;
  gap: 12px;
  align-content: start;
}

.basket__title { font-size: 15px; font-weight: 700; }
.basket__focus { font-size: 13.5px; color: var(--fg2); }

.basket__cases {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.basket__case {
  width: 26px; height: 32px;
  border-radius: 6px;
  border: 1px solid var(--stroke-2);
  background: rgba(217, 214, 255, 0.07);
  transition: background 0.4s var(--ease), border-color 0.4s, transform 0.4s var(--ease);
}

.basket__case.is-picked {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-4px);
}

.basket__inds { display: flex; gap: 5px; flex-wrap: wrap; }

.mini-ind {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--glass-2);
  color: var(--fg3);
}

.combo {
  margin-top: 16px;
  padding: 16px 20px;
  border-radius: 18px;
  border: 1px dashed var(--stroke-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.combo__text { font-size: 14.5px; color: var(--fg2); }

/* диалог с уточнениями */
.probe {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(18px, 2.4vw, 32px);
  align-items: start;
  max-width: 720px;
}

.probe__thread { display: grid; gap: 10px; }

.probe__depth {
  display: grid;
  gap: 8px;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid var(--stroke);
  background: var(--glass);
  position: sticky;
  top: 96px;
}

.depth-row {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--stroke);
  font-size: 14px;
  color: var(--fg3);
  transition: color 0.4s;
}

.depth-row:last-child { border-bottom: 0; }

.depth-row i {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--stroke-2);
  font-style: normal;
  transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
}

.depth-row.is-on { color: var(--fg1); }
.depth-row.is-on i {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.probe__controls { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* отчёт */
.report {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(18px, 2.4vw, 32px);
  align-items: start;
}

.report__score {
  padding: 26px;
  border-radius: 24px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  display: grid;
  gap: 8px;
}

.report__score-value {
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.report__score-level { font-size: 15px; font-weight: 700; color: var(--accent); }

.report__timing {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--stroke-2);
  display: grid;
  gap: 8px;
  font-size: 13.5px;
  color: var(--fg2);
}

.report__timing b { color: var(--fg1); }

.report__body { display: grid; gap: 12px; }

.report__insight {
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: var(--glass);
  display: grid;
  gap: 7px;
}

.report__insight h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fg3);
}

.report__insight p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--fg2); }

.report__more { display: grid; gap: 10px; }

.skills { display: grid; gap: 10px; }

.skill {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(5, 2, 48, 0.36);
  border: 1px solid var(--stroke);
  font-size: 14px;
}

.skill__head {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.skill__n { font-family: var(--mono); font-size: 12px; color: var(--fg4); padding-top: 3px; }

.skill__title {
  font-weight: 650;
  line-height: 1.35;
  color: var(--fg1);
}

.skill__res {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  justify-self: end;
}

.skill__res[data-res="positive"] { background: rgba(213, 255, 243, 0.16); color: var(--mint); }
.skill__res[data-res="partial"]  { background: rgba(255, 183, 119, 0.16); color: var(--peach); }
.skill__res[data-res="none"]     { background: rgba(217, 214, 255, 0.08); color: var(--fg3); }

.skill__analysis {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--fg2);
}

.skill__quotes { display: grid; gap: 8px; }

.skill__quote {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border-left: 3px solid var(--accent);
  background: rgba(138, 123, 255, 0.08);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--fg1);
  font-style: normal;
}

.report__blocks { display: flex; flex-wrap: wrap; gap: 7px; }

.disclosure {
  border: 0;
  padding: 0;
  margin: 0;
}

.disclosure__btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--stroke-2);
  background: transparent;
  color: var(--fg1);
  font: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
}

.disclosure__btn:hover { border-color: var(--accent); background: var(--glass); }

.disclosure__btn i {
  font-style: normal;
  transition: transform 0.3s var(--ease);
}

.disclosure__btn[aria-expanded="true"] i { transform: rotate(180deg); }

.disclosure__panel { margin-top: 14px; display: grid; gap: 12px; }
.disclosure__panel[hidden] { display: none; }

/* =============================================================
   ВЕТКА 2 — ОБУЧЕНИЕ
   ============================================================= */

.track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: clamp(24px, 3vw, 38px);
}

.track__step {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: var(--glass);
  display: grid;
  gap: 6px;
  position: relative;
}

.track__step::after {
  content: "";
  position: absolute;
  right: -6px; top: 50%;
  width: 6px; height: 1px;
  background: var(--stroke-2);
}
.track__step:last-child::after { display: none; }

.track__n { font-family: var(--mono); font-size: 11.5px; color: var(--accent); }
.track__label { font-size: 15px; font-weight: 700; }

.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 26px);
}

.answer {
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(16, 11, 82, 0.6), rgba(10, 5, 64, 0.3));
  display: grid;
  gap: 16px;
  align-content: start;
}

.answer--after { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), rgba(10, 5, 64, 0.3)); }

.answer__cap {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fg3);
}

.answer--after .answer__cap { color: var(--accent); }

.answer__text {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--fg2);
  margin: 0;
}

.answer__bars { display: grid; gap: 9px; }

.abar { display: grid; gap: 5px; }

.abar__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--fg3);
}

.abar__track {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: rgba(217, 214, 255, 0.1);
  overflow: hidden;
}

.abar__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  width: calc(var(--v, 0) / 3 * 100%);
  transition: width 0.9s var(--ease);
}

.answer__notes { display: grid; gap: 6px; }

.note {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  font-size: 13.5px;
  color: var(--fg3);
  align-items: start;
}

.note i { font-style: normal; color: var(--peach); }
.answer--after .note i { color: var(--mint); }

/* графики пилота */
.pilot {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(20px, 2.6vw, 36px);
  align-items: start;
  max-width: 720px;
}

.dist {
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--stroke);
  background: var(--glass);
  display: grid;
  gap: 14px;
}

.dist__chart { width: 100%; height: 170px; }
.dist__line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.dist__area { fill: var(--accent-soft); }
.dist__axis { stroke: var(--stroke); stroke-width: 1; }
.dist__tick { fill: var(--fg4); font-size: 11px; font-family: var(--mono); }

.bars { display: grid; gap: 22px; }

.barset { display: grid; gap: 12px; }

.barset__q { font-size: 15px; font-weight: 700; margin: 0; }

.barset__rows { display: grid; gap: 8px; }

.pie {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(0, 1fr);
  gap: 20px 24px;
  align-items: center;
}

.pie__chart {
  width: min(180px, 42vw);
  aspect-ratio: 1;
  border-radius: 50%;
  justify-self: center;
  box-shadow: inset 0 0 0 1px rgba(217, 214, 255, 0.12);
  mask: radial-gradient(circle at center, transparent 42%, #000 43%);
  -webkit-mask: radial-gradient(circle at center, transparent 42%, #000 43%);
}

.pie__legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.pie__item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.pie__swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  margin-top: 3px;
}

.pie__label {
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--fg2);
}

.pie__val {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--fg1);
  white-space: nowrap;
}

@media (max-width: 560px) {
  .pie {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .pie__legend { width: 100%; }
}

.brow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 14px;
  align-items: center;
}

.brow__label { font-size: 13.5px; color: var(--fg2); line-height: 1.3; }

.brow__bar {
  display: block;
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 999px;
  background: rgba(217, 214, 255, 0.09);
  overflow: hidden;
}

.brow__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), rgba(213, 255, 243, 0.65));
  transition: width 1s var(--ease);
}

.brow__val {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--fg1);
  text-align: right;
}

/* =============================================================
   ВЕТКА 3 — ПЕРЕГОВОРЫ
   ============================================================= */

.modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
}

.mode {
  padding: 26px;
  border-radius: 24px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(16, 11, 82, 0.6), rgba(10, 5, 64, 0.3));
  display: grid;
  gap: 14px;
  align-content: start;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease);
}

.mode:hover { transform: translateY(-3px); }

.mode.is-on {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-soft), rgba(10, 5, 64, 0.3));
}

.mode__lead {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fg3);
}

.mode.is-on .mode__lead { color: var(--accent); }

.mode__title { font-size: clamp(19px, 1.5vw, 24px); font-weight: 700; margin: 0; }

.mode__items { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }

.mode__items li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
  font-size: 14px;
  color: var(--fg2);
  align-items: start;
}

.mode__items li::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 8px;
}

/* конфигуратор роли */
.role {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(18px, 2.4vw, 32px);
  align-items: start;
}

.role__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 9px;
}

.role__cell {
  padding: 13px 15px;
  border-radius: 13px;
  border: 1px solid var(--stroke);
  background: rgba(5, 2, 48, 0.36);
  display: grid;
  gap: 4px;
}

.role__key { font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg4); }
.role__val { font-size: 14.5px; font-weight: 600; }

.role__preview {
  padding: 26px;
  border-radius: 24px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  display: grid;
  gap: 14px;
  align-content: start;
  position: sticky;
  top: 96px;
}

.role__preview-cap {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}

.role__preview-text {
  font-size: clamp(17px, 1.3vw, 21px);
  line-height: 1.45;
  font-weight: 600;
  margin: 0;
}

.role__preview-meta { font-size: 13px; color: var(--fg2); }

/* переговорный demo */
.nego {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(18px, 2.4vw, 32px);
  align-items: start;
}

.nego__thread {
  display: grid;
  gap: 12px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(16, 11, 82, 0.72), rgba(10, 5, 64, 0.4));
}

.nego__choices { display: grid; gap: 9px; margin-top: 4px; }

.choice {
  display: grid;
  gap: 5px;
  padding: 15px 18px;
  border-radius: 16px;
  border: 1px solid var(--stroke-2);
  background: rgba(5, 2, 48, 0.4);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
}

.choice:hover { border-color: var(--accent); transform: translateX(4px); }
.choice.is-picked { border-color: var(--accent); background: var(--accent-soft); }
.choice[disabled] { cursor: default; opacity: 0.5; }
.choice[disabled]:hover { transform: none; border-color: var(--stroke-2); }
.choice.is-picked[disabled] { opacity: 1; border-color: var(--accent); }

.choice__text { font-size: 15px; font-weight: 600; }

.nego__explain {
  margin-top: 12px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px dashed var(--stroke-2);
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg2);
}

.nego__side { display: grid; gap: 14px; position: sticky; top: 96px; }

.nego__skills {
  padding: 22px;
  border-radius: 22px;
  border: 1px solid var(--stroke);
  background: var(--glass);
  display: grid;
  gap: 10px;
}

.nskill { display: grid; gap: 5px; }

.nskill__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  color: var(--fg2);
}

.nskill__track {
  display: block;
  height: 5px;
  border-radius: 999px;
  background: rgba(217, 214, 255, 0.1);
  overflow: hidden;
}

.nskill__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  width: calc(var(--v, 0) * 25%);
  transition: width 0.6s var(--ease);
}

/* попытки */
.attempts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
}

.attempt {
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(16, 11, 82, 0.6), rgba(10, 5, 64, 0.3));
  display: grid;
  gap: 14px;
  align-content: start;
}

.attempt--second { border-color: var(--accent); }

.attempt__n {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.attempt__summary { font-size: 15.5px; line-height: 1.45; margin: 0; }

.attempt__skills { display: grid; gap: 5px; }

.askill {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12px;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  color: var(--fg3);
  padding: 7px 0;
  border-bottom: 1px solid var(--stroke);
}

.askill:last-child { border-bottom: 0; }

.askill i {
  width: 10px; height: 10px;
  border-radius: 50%;
  font-style: normal;
}

.askill i[data-res="positive"] { background: var(--mint); }
.askill i[data-res="partial"]  { background: var(--peach); }
.askill i[data-res="none"]     { background: rgba(217, 214, 255, 0.18); }

/* карта профилей */
.map {
  position: relative;
  border-radius: 26px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(16, 11, 82, 0.6), rgba(5, 2, 48, 0.5));
  overflow: hidden;
  padding: 22px 22px 42px 46px;
}

.map__canvas {
  width: 100%;
  height: clamp(300px, 42vw, 480px);
  border-radius: 18px;
}

.map__axis {
  position: absolute;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--fg3);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.map__axis--x { bottom: 14px; left: 50%; transform: translateX(-50%); }

.map__axis--y {
  bottom: 42px;
  left: 20px;
  transform-origin: 0 100%;
  transform: rotate(-90deg);
}

.map__legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.map__seg {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 13px;
  color: var(--fg2);
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(5, 2, 48, 0.3);
}

.map__seg i {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 4px;
  font-style: normal;
}

/* поединки */
.pairing {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
}

.pair-box {
  padding: 24px;
  border-radius: 24px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(16, 11, 82, 0.6), rgba(10, 5, 64, 0.3));
  display: grid;
  gap: 16px;
  align-content: start;
}

.pair-box--balanced { border-color: var(--accent); }

.pair-box__cap {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fg3);
}

.pair-box--balanced .pair-box__cap { color: var(--accent); }

.pair-list { display: grid; gap: 9px; }

.pair {
  display: grid;
  grid-template-columns: 1fr 26px 1fr;
  gap: 10px;
  align-items: center;
}

.pair__side {
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(217, 214, 255, 0.06);
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 12.5px;
  color: var(--fg3);
  position: relative;
  overflow: hidden;
}

.pair__side::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: calc(var(--lvl, 0.5) * 100%);
  background: var(--accent);
  opacity: 0.28;
}

.pair__side span { position: relative; }

.pair__vs {
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg4);
}

/* =============================================================
   КОНСТРУКТОР AI-ИНТЕРВЬЮ — sticky-сцена
   ============================================================= */

.builder { position: relative; }

.builder__stage {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(20px, 2.8vw, 40px);
  align-items: start;
  margin-top: clamp(30px, 4vw, 52px);
}

.builder__steps { display: grid; gap: 10px; }

.bstep {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  padding: 17px 19px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: var(--glass);
  align-items: start;
  text-align: left;
  color: inherit;
  font: inherit;
  width: 100%;
  cursor: pointer;
  transition: border-color 0.35s, background 0.35s, transform 0.35s var(--ease);
}

.bstep:hover { border-color: rgba(217, 214, 255, 0.28); }

.bstep:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.bstep.is-on {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateX(5px);
}

.bstep__n {
  width: 34px; height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 13px;
  border: 1px solid var(--stroke-2);
  color: var(--fg3);
  transition: background 0.35s, color 0.35s, border-color 0.35s;
}

.bstep.is-on .bstep__n { background: var(--accent); color: var(--navy); border-color: transparent; font-weight: 700; }

.bstep__title { display: block; font-size: 15.5px; font-weight: 700; }
.bstep__note { display: block; font-size: 13.5px; color: var(--fg3); margin-top: 4px; line-height: 1.4; }

.builder__panel {
  position: sticky;
  top: 92px;
  border-radius: 26px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(16, 11, 82, 0.78), rgba(10, 5, 64, 0.5));
  overflow: hidden;
  min-height: 400px;
}

.bpanel { padding: 22px; display: grid; gap: 14px; }

.bpanel__screen {
  display: none;
  gap: 12px;
}

.bpanel__screen.is-on { display: grid; }

.bpanel__cap {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fg3);
}

.bpanel__task {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--stroke-2);
  background: rgba(5, 2, 48, 0.5);
  font-size: 15.5px;
  line-height: 1.5;
  min-height: 62px;
}

.bpanel__caret {
  display: inline-block;
  width: 2px; height: 17px;
  background: var(--accent);
  vertical-align: -3px;
  animation: caret 1s steps(2) infinite;
}

@keyframes caret { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

.bpanel__chips { display: flex; flex-wrap: wrap; gap: 6px; }

.bchip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(5, 2, 48, 0.4);
  font-size: 12.5px;
  color: var(--fg3);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), color 0.3s, border-color 0.3s;
}

.bchip.is-in { opacity: 1; transform: none; }
.bchip.is-edited { color: var(--navy); background: var(--accent); border-color: transparent; font-weight: 700; }

.bpanel__controls {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 6px;
  max-height: 190px;
  overflow: hidden;
}

.bctl {
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  font-size: 12px;
  color: var(--fg3);
  background: rgba(5, 2, 48, 0.34);
}

.bpanel__note {
  font-size: 13px;
  color: var(--fg3);
  padding-top: 12px;
  border-top: 1px solid var(--stroke);
}

/* =============================================================
   РЕЗУЛЬТАТЫ
   ============================================================= */

.results__set { display: grid; gap: clamp(18px, 2.4vw, 30px); margin-top: clamp(32px, 4vw, 54px); }

.rblock {
  padding: clamp(24px, 3vw, 40px);
  border-radius: 30px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(16, 11, 82, 0.6), rgba(10, 5, 64, 0.28));
  display: grid;
  gap: 20px;
}

.rblock__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.rblock__title { font-size: clamp(20px, 1.8vw, 27px); font-weight: 700; margin: 0; }

/* время */
.timeline-bar { display: grid; gap: 12px; }

.tbar { display: grid; gap: 7px; }

.tbar__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--fg2);
}

.tbar__top b { font-size: 17px; color: var(--fg1); }

.tbar__track {
  height: 14px;
  border-radius: 999px;
  background: rgba(217, 214, 255, 0.08);
  overflow: hidden;
}

.tbar__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  width: calc(var(--w, 100) * 1%);
  transition: width 1.1s var(--ease);
}

.tbar--manual .tbar__fill { background: linear-gradient(90deg, rgba(255, 184, 226, 0.75), rgba(255, 183, 119, 0.6)); }
.tbar--ai .tbar__fill { background: linear-gradient(90deg, var(--indigo-2), var(--mint)); }
.tbar--report .tbar__fill { background: var(--mint); }

/* масштаб */
.scale-viz {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
}

.scale-card {
  padding: 22px;
  border-radius: 22px;
  border: 1px solid var(--stroke);
  background: rgba(5, 2, 48, 0.34);
  display: grid;
  gap: 10px;
  align-content: start;
}

.scale-card__value {
  font-size: clamp(32px, 3.4vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}

.scale-card--verified .scale-card__value { color: var(--mint); }
.scale-card--client .scale-card__value { color: var(--peach); }

.scale-card__label { font-size: 14.5px; color: var(--fg2); }

/* разветвление */
.fanout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(18px, 2.4vw, 34px);
  align-items: center;
}

.fanout__from {
  padding: 18px 22px;
  border-radius: 18px;
  border: 1px solid var(--stroke-2);
  font-size: 15.5px;
  font-weight: 700;
  white-space: nowrap;
}

.fanout__to { display: grid; gap: 8px; }

.fanout__item {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  align-items: center;
  font-size: 15px;
  color: var(--fg2);
}

.fanout__item span {
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

/* =============================================================
   ОБРАТНАЯ СВЯЗЬ
   ============================================================= */

.fb__flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 26px);
  margin-top: clamp(30px, 3.6vw, 48px);
}

.fb-card {
  padding: 28px 24px;
  border-radius: 26px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(16, 11, 82, 0.62), rgba(10, 5, 64, 0.3));
  display: grid;
  gap: 14px;
  align-content: start;
  position: relative;
  overflow: hidden;
}

.fb-card__quote {
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg2);
  margin: 0;
}

.fb-card__value {
  font-size: clamp(38px, 4.2vw, 62px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--mint);
}

.fb-card__label { font-size: 14px; color: var(--fg3); }

.fb__node {
  position: absolute;
  right: 20px; top: 20px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 5px rgba(213, 255, 243, 0.12);
}

.fb__note {
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--fg3);
  max-width: 82ch;
}

/* =============================================================
   ФИНАЛ
   ============================================================= */

.finale {
  position: relative;
  padding: clamp(84px, 10vw, 156px) 0;
  overflow: hidden;
}

.finale__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 50% 34%, rgba(106, 92, 255, 0.28), transparent 66%),
    var(--navy);
}

.finale__canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.7;
}

.finale__inner { display: grid; gap: 28px; justify-items: center; text-align: center; }

.finale__title { max-width: 20ch; }

.finale__lines {
  display: grid;
  gap: 10px;
  font-size: clamp(26px, 3.4vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.finale__lines span:nth-child(1) { color: var(--indigo-2); }
.finale__lines span:nth-child(2) { color: var(--mint); }
.finale__lines span:nth-child(3) { color: var(--peach); }

.finale__roles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 74ch;
}

.finale__role {
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--glass);
  font-size: 13.5px;
  color: var(--fg2);
}

.finale__lib-note {
  margin: 0 auto 8px;
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg2);
}

.finale__cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.finale__cta .btn { text-decoration: none; }

/* ======================== DEMO MODAL =========================== */

.ef-demo-modal { position: fixed; inset: 0; z-index: 260; display: grid; place-items: center; padding: 20px; }
.ef-demo-modal[hidden] { display: none !important; }
.ef-demo-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(5, 2, 48, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.ef-demo-modal__panel {
  position: relative;
  z-index: 1;
  width: min(480px, calc(100vw - 32px));
  max-height: min(92vh, 780px);
  overflow: auto;
  border-radius: 28px;
  padding: clamp(24px, 4vw, 34px);
  background: #fff;
  color: #151515;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8);
}
.ef-demo-modal__close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px;
  border: 0; border-radius: 999px;
  background: rgba(5, 2, 48, 0.07);
  color: #050230;
  font-size: 22px; line-height: 1;
  cursor: pointer;
}
.ef-demo-modal__close:hover { background: rgba(5, 2, 48, 0.12); }
.ef-demo-modal__title {
  margin: 0 30px 10px 0;
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #050230;
}
.ef-demo-modal__lead { margin: 0 0 22px; font-size: 14px; line-height: 1.5; color: rgba(5, 2, 48, 0.68); }
.ef-demo-modal .ef-lead-form { max-width: none; }

.finale__next {
  display: grid;
  gap: 9px;
  margin-top: 8px;
  padding: 22px 26px;
  border-radius: 22px;
  border: 1px dashed var(--stroke-2);
  text-align: left;
  max-width: 74ch;
}

.finale__next-cap {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fg3);
}

.finale__next li { font-size: 14.5px; color: var(--fg2); }
.finale__next ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }

/* =============================================================
   ФУТЕР
   ============================================================= */

.foot {
  border-top: 1px solid var(--stroke);
  padding: 46px 0 60px;
}

.foot__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.foot__links { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14.5px; }
.foot__links a { color: var(--fg2); text-decoration: none; transition: color 0.2s; }
.foot__links a:hover { color: var(--fg1); }

/* =============================================================
   АДАПТИВ
   ============================================================= */

@media (max-width: 1080px) {
  .hero__grid,
  .scale__grid,
  .probe,
  .report,
  .pilot,
  .role,
  .nego,
  .builder__stage { grid-template-columns: minmax(0, 1fr); }

  .probe__depth,
  .role__preview,
  .nego__side,
  .builder__panel { position: static; }

  .router__cards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

@media (max-width: 760px) {
  body { font-size: 16px; }

  .hero { padding: 112px 0 72px; min-height: auto; }
  .hero__scroll { display: none; }

  .track { grid-template-columns: repeat(2, 1fr); }
  .track__step::after { display: none; }

  .compare,
  .modes,
  .attempts,
  .pairing,
  .scale-viz,
  .fb__flow { grid-template-columns: minmax(0, 1fr); }

  .scaleline__bar { grid-template-columns: repeat(2, 1fr); }

  .fanout { grid-template-columns: minmax(0, 1fr); }
  .fanout__from { white-space: normal; }

  .report__blocks { gap: 6px; }

  .map__axis--y { display: none; }
  .map__canvas { height: 320px; }

  .ui__bar { gap: 6px; }
  .ui__tab { font-size: 12px; padding: 6px 11px; }

  .branchnav { top: 66px; padding: 8px 0; }
  .branchnav__label { display: none; }
  .branchnav__btn { font-size: 12.5px; padding: 7px 12px; }
  .branch { scroll-margin-top: 128px; }
}

@media (max-width: 520px) {
  .settings { grid-template-columns: minmax(0, 1fr); }
  .ind-row { grid-template-columns: 22px minmax(0, 1fr); }
  .ind-row__weight { grid-column: 2; }
  .skill__head { grid-template-columns: 20px minmax(0, 1fr); }
  .skill__res { grid-column: 2; justify-self: start; }

  .branch__cover { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

/* =============================================================
   REDUCED MOTION
   ============================================================= */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal { opacity: 1; transform: none; }
  .msg { opacity: 1; transform: none; }
  .bchip { opacity: 1; transform: none; }

  .probe__depth,
  .role__preview,
  .nego__side,
  .builder__panel { position: static; }

  .preloader { display: none; }

  .hero__canvas,
  .finale__canvas { display: none; }

  .bpanel__screen { display: grid; }
  .bpanel__screen:not(.is-on) { opacity: 0.55; }
}
