/* ========== Tokens ========== */
:root {
  --blue: #2f66f5;
  --blue-600: #2453df;
  --blue-300: #8fb0ff;
  --ink: #161b36;
  --text: #2b3150;
  --muted: #5d6585;
  --bg: #f6f7fd;
  --white: #fff;
  --card-blue: #ebf1fe;
  --card-lav: #efedfc;
  --lav: #e3e0fb;
  --mint: #a9f1da;
  --line: #dfe6fb;
  --chip: #e5eafb;
  --radius: 24px;
  --shadow: 0 12px 34px rgba(47, 102, 245, .07);
  --font-head: "Montserrat", "Manrope", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-hand: "Caveat", "Comic Sans MS", cursive;
  --gap: 14px;
  --pad: clamp(16px, 2vw, 28px);
}

/* ========== Base ========== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 85% -10%, #e9eeff 0%, transparent 60%),
    radial-gradient(700px 500px at -10% 40%, #eef0ff 0%, transparent 60%),
    var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--pad); }
.page { display: flex; flex-direction: column; gap: 18px; padding-bottom: 32px; }

/* ========== UI atoms ========== */
.chip {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  line-height: 1.6;
  color: #4a5480;
  background: var(--chip);
  border-radius: 8px;
}
.chip--lg { font-size: 14px; padding: 3px 12px; color: #3e4b86; }

.h2 {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(24px, 2vw, 30px);
  line-height: 1.12;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: 10px 0 12px;
}
.h2--sm { font-size: clamp(21px, 1.6vw, 24px); }
.accent { color: var(--blue); }
.muted { color: var(--muted); }
.small { font-size: 13.5px; line-height: 1.5; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 999px;
  border: 1.5px solid transparent;
  white-space: nowrap;
  transition: transform .2s, box-shadow .2s, background-color .2s, border-color .2s, color .2s;
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .2s; }
.btn:hover svg { transform: translateX(3px); }
.btn--primary {
  color: #fff;
  background: linear-gradient(180deg, #3b72ff, var(--blue-600));
  box-shadow: 0 8px 20px rgba(47, 102, 245, .28);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(47, 102, 245, .36); }
.btn--outline { color: var(--blue); background: rgba(255,255,255,.7); border-color: #b9cbfb; }
.btn--outline:hover { border-color: var(--blue); background: #fff; }
.btn--lg { min-height: 52px; padding: 12px 26px; font-size: 15px; }
.btn--sm { min-height: 34px; padding: 6px 16px; font-size: 12.5px; }
.btn--sm svg { width: 15px; height: 15px; }
.btn[data-copy]:hover svg { transform: none; }

.link {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--blue); font-size: 16px; font-weight: 500;
}
.link svg { width: 20px; height: 20px; transition: transform .2s; }
button.link { border: 0; background: none; padding: 0; }
.codex-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.link:hover svg { transform: translateX(4px); }


.card {
  position: relative;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(223, 230, 251, .9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}
.card--blue { background: linear-gradient(160deg, #eef3ff, var(--card-blue)); }

.sticker { filter: drop-shadow(0 10px 18px rgba(30, 50, 140, .16)); user-select: none; -webkit-user-drag: none; }

.deco { position: absolute; color: var(--blue); pointer-events: none; }

.note {
  position: absolute;
  font-family: var(--font-hand);
  font-weight: 600;
  color: #5560a8;
  background: var(--lav);
  border-radius: 20px;
  line-height: 1.05;
  box-shadow: 0 10px 24px rgba(80, 70, 180, .12);
}

/* ========== Header ========== */
.header { position: sticky; top: 0; z-index: 50; transition: background-color .25s, box-shadow .25s; }
.header.is-scrolled { background: rgba(246, 247, 253, .88); backdrop-filter: blur(12px); box-shadow: 0 6px 20px rgba(30, 50, 140, .06); }
.header__inner { position: relative; display: flex; align-items: center; gap: 14px; min-height: 76px; }

.logo { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.logo__mark {
  width: 100px; height: 30px; flex: none;
  background: var(--blue);
  -webkit-mask: url("assets/logo-mask.png") center / contain no-repeat;
          mask: url("assets/logo-mask.png") center / contain no-repeat;
}
.logo__text { font-size: 11.5px; font-weight: 600; line-height: 1.2; letter-spacing: .02em; text-transform: uppercase; color: var(--ink); }
.logo--sm .logo__mark { width: 84px; height: 26px; }
.logo--sm .logo__text { font-size: 10px; }

.header__cta { padding: 10px 22px; font-weight: 600; font-size: 13px; flex: none; }

.burger { display: none; width: 44px; height: 44px; flex: none; border: 0; border-radius: 14px; background: #fff; box-shadow: var(--shadow); position: relative; margin-left: auto; }
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .25s; }
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 27px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* обычное меню на десктопе и планшете */
.nav { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 2.4vw, 36px); flex: 1; min-width: 0; }
.nav a:not(.btn) { position: relative; padding: 6px 0; font-size: 13.5px; color: var(--text); white-space: nowrap; transition: color .2s; }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--blue); border-radius: 2px; transform: scaleX(0); transition: transform .25s;
}
.nav a:not(.btn):hover, .nav a.is-active { color: var(--blue); }
.nav a:not(.btn):hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav__cta { display: none; }

/* ========== Hero ========== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 24px;
  align-items: center;
  padding: 10px 0 6px;
}
.hero__text { display: flex; flex-direction: column; align-items: flex-start; padding: 10px 0; }
.hero__title {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(32px, 4.1vw, 54px);
  line-height: 1.05;
  letter-spacing: -.015em;
  color: var(--ink);
  margin: 14px 0 22px;
}
.hero__title mark {
  color: inherit;
  background: var(--mint);
  border-radius: 12px;
  padding: 0 .18em;
  margin-left: -.18em;
  -webkit-box-decoration-break: clone;
          box-decoration-break: clone;
}
.hero__lead { font-size: clamp(14.5px, 1.25vw, 17px); color: var(--muted); line-height: 1.6; margin-bottom: 28px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }

.hero__visual { position: relative; aspect-ratio: 1.12; width: 100%; max-width: 520px; justify-self: end; }
.sticker--hero { position: absolute; right: 4%; bottom: 0; width: 82%; }
.note--hero {
  left: 0; bottom: 12%;
  padding: 14px 18px;
  font-size: clamp(20px, 2vw, 28px);
  transform: rotate(-12deg);
  z-index: 2;
}
.deco--burst-hero { width: 46px; height: 46px; top: 2%; right: 4%; transform: rotate(10deg); }
.deco--cursor-hero { width: 30px; height: 30px; top: 24%; right: 0; }
.deco--spark-hero { width: 34px; height: 34px; left: 4%; top: 14%; }
.deco--tw1 { width: 14px; height: 14px; right: 2%; bottom: 18%; opacity: .6; }
.deco--tw2 { width: 12px; height: 12px; left: 40%; top: 2%; opacity: .5; }

/* ========== Кодекс этики ========== */
.codex-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 22px; row-gap: 6px; align-items: center;
  padding: 30px 150px 30px 34px; overflow: hidden;
}
.codex-card__icon { width: 46px; height: 46px; color: var(--blue); grid-row: span 3; align-self: start; margin-top: 4px; }
.codex-card__title { font-family: var(--font-head); font-weight: 500; font-size: clamp(24px, 2.2vw, 30px); color: var(--ink); }
.codex-card__text { color: var(--muted); font-size: 15px; margin-bottom: 10px; }
.deco--plane { width: 64px; height: 64px; right: 48px; top: 50%; transform: translateY(-50%) rotate(-6deg); }
.deco--dash1 { width: 14px; height: 30px; right: 60px; top: 12%; }
.deco--dash2 { width: 30px; height: 30px; right: 120px; bottom: 14%; }

/* ========== Зачем нужен ========== */
.why { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; padding: 30px 34px; }
.why__text .muted { font-size: 14.5px; margin-bottom: 20px; max-width: 420px; }

.orbit { position: relative; aspect-ratio: 320 / 260; width: 100%; max-width: 360px; justify-self: center; }
.orbit__svg { width: 100%; height: 100%; overflow: visible; }
.orbit__ring { fill: none; stroke: #9fc9d9; stroke-width: 1.3; }
.orbit__ring--2 { stroke: #b6c7f5; }
.orbit__dot { fill: var(--blue); }
.orbit__dot--static { fill: #6f93f7; }
.pill {
  position: absolute;
  padding: 6px 14px;
  font: inherit; font-size: 12.5px; font-weight: 500;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(30, 50, 140, .08);
  white-space: nowrap;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform .25s, color .25s, border-color .25s, background-color .25s;
}
.pill:hover { transform: translate(-50%, -50%) scale(1.06); color: var(--blue); border-color: #b9cbfb; }
.pill[aria-pressed="true"] { color: #fff; background: var(--blue); border-color: var(--blue); box-shadow: 0 8px 18px rgba(47, 102, 245, .35); }
.pill--1 { left: 22%; top: 12%; }
.pill--2 { left: 86%; top: 26%; }
.pill--3 { left: 82%; top: 58%; }
.pill--4 { left: 10%; top: 72%; }
.pill--5 { left: 46%; top: 92%; }
.values { display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.value-card {
  position: relative; display: grid; align-self: stretch;
  padding: 14px 16px 16px; border-radius: 16px; overflow: hidden;
  font-size: 13px; line-height: 1.5; color: var(--muted);
  background: var(--card-blue);
}
.value-card__item { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .35s, transform .35s, visibility .35s; }
.value-card__item.is-active { opacity: 1; visibility: visible; transform: none; }
.value-card__title { font-family: var(--font-head); font-weight: 600; font-size: 14px; color: var(--blue); margin-bottom: 4px; }
.value-card p { margin-bottom: 6px; }
/* полоска до автопереключения; при ручном выборе скрыта */
.value-card__timer { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(47, 102, 245, .1); transition: opacity .3s; }
.value-card__timer span { display: block; height: 100%; background: var(--blue); transform-origin: left; transform: scaleX(0); animation: valueBar 5s linear forwards; animation-play-state: paused; }
.value-card.is-running .value-card__timer span { animation-play-state: running; }
@keyframes valueBar { to { transform: scaleX(1); } }
.value-card.is-locked .value-card__timer { opacity: 0; }
.link--sm { font-size: 13px; gap: 8px; }
.link--sm svg { width: 16px; height: 16px; }

/* ========== Принципы ========== */
.principles { padding: 30px 34px; }
.principles__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; align-items: end; }
.principles__head > :not(.btn-pair) { grid-column: 1; }
.principles__head .chip { justify-self: start; }
.principles__head .h2 { margin-bottom: 8px; }
.btn-pair--head { grid-column: 2; grid-row: 1 / span 3; align-self: end; margin: 0; }
.principles__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.sub { display: flex; gap: 16px; padding: 22px 20px; border-radius: 18px; }
.sub--blue { background: var(--card-blue); }
.sub--lav { background: var(--card-lav); }
.sub__icon { width: 36px; height: 36px; flex: none; color: var(--blue); }
.sub--lav .sub__icon { color: #5a55d8; }
.sub__title { font-family: var(--font-head); font-weight: 500; font-size: 18px; color: var(--blue); margin: 4px 0 8px; }
.sub--lav .sub__title { color: #4a47c9; }
.sub__text { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.sub .btn--outline { background: #fff; }

.sub__body { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.sub__body .sub__text { margin-bottom: 18px; }

/* большая кнопка «Читать…» + круглая «копировать» */
.btn-pair { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.btn-pair .btn { min-height: 46px; padding: 10px 24px; font-size: 14.5px; }
.btn--violet { background: linear-gradient(180deg, #6d63f3, #4f45d6); box-shadow: 0 8px 20px rgba(90, 80, 220, .3); }
.btn--violet:hover { box-shadow: 0 12px 26px rgba(90, 80, 220, .38); }
.btn-icon {
  position: relative; width: 46px; height: 46px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--blue); background: #fff; border: 1.5px solid #b9cbfb;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn-icon svg { width: 19px; height: 19px; }
.btn-icon:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-icon:active { transform: scale(.93); }
.btn-icon--violet { color: #5249d8; border-color: #cbc6f7; }
.btn-icon--violet:hover { background: #5249d8; border-color: #5249d8; color: #fff; }
/* галочка после копирования */
.btn-icon.is-copied svg, .btn.is-copied svg { animation: copied .4s ease; }
.btn-icon.is-copied { background: #22b07d; border-color: #22b07d; color: #fff; }
@keyframes copied { 50% { transform: scale(1.3); } }

/* темы «человек / ИИ» */
.risks { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.risks__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; }
.risks__title { font-family: var(--font-head); font-weight: 500; font-size: 20px; color: var(--ink); }
.risks__tabs {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px;
}
.risks__tabs::-webkit-scrollbar { display: none; }
.risks__tab {
  flex: none; scroll-snap-align: center;
  padding: 9px 16px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500; white-space: nowrap;
  color: var(--text); background: #fff; border: 1px solid var(--line);
  transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s;
}
.risks__tab:hover { color: var(--blue); border-color: #b9cbfb; }
.risks__tab[aria-selected="true"] { color: #fff; background: var(--blue); border-color: var(--blue); box-shadow: 0 8px 18px rgba(47, 102, 245, .3); }
.risks__panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; touch-action: pan-y; }
.stack { display: grid; }
.stack > p { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .3s, transform .3s, visibility .3s; }
.stack > p.is-active { opacity: 1; visibility: visible; transform: none; }
.risk-card--ai .stack > p { transition-delay: .05s; }
.risk-card { padding: 20px 22px; border-radius: 18px; min-height: 120px; }
.risk-card--human { background: var(--card-blue); }
.risk-card--ai { background: var(--card-lav); }
.risk-card__label { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 600; font-size: 14px; color: var(--blue); margin-bottom: 10px; }
.risk-card--ai .risk-card__label { color: #4a47c9; }
.risk-card__label svg { width: 20px; height: 20px; }
.risk-card p { font-size: 15px; line-height: 1.55; color: var(--ink); }
.risks__nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
.risks__nav .carousel__btn[data-risk-step="-1"] svg { transform: scaleX(-1); }
.risks__count { min-width: 52px; text-align: center; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* затухание у краёв горизонтальных лент (классы ставит JS) */
.fade-start { -webkit-mask-image: linear-gradient(90deg, transparent, #000 44px); mask-image: linear-gradient(90deg, transparent, #000 44px); }
.fade-end { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); }
.fade-start.fade-end { -webkit-mask-image: linear-gradient(90deg, transparent, #000 44px, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, transparent, #000 44px, #000 calc(100% - 44px), transparent); }

/* ========== Дорожная карта ========== */
.roadmap { padding: 30px 34px; display: flex; flex-direction: column; align-items: flex-start; }
.steps {
  align-self: stretch;
  list-style: none; margin: 24px 0 22px; padding: 0 52px 0 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
  position: relative;
}
.steps::before {
  content: ""; position: absolute; left: 14px; right: 44px; top: 14px; height: 1.5px;
  background: linear-gradient(90deg, #b8c9fb, #d6e0fd);
}
/* стрелка в конце линии этапов */
.steps::after {
  content: ""; position: absolute; right: 0; top: -2px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid #b9cbfb; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12h15m-6-6 6 6-6 6' fill='none' stroke='%232f66f5' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.step { position: relative; }
.step__btn {
  width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 0 0 6px; border: 0; background: none; text-align: left; border-radius: 10px;
}
.step__num {
  width: 29px; height: 29px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: var(--blue); font-size: 13px; font-weight: 600;
  border: 1.5px solid #b9cbfb;
  box-shadow: 0 0 0 4px #fff;
  margin-bottom: 8px;
  transition: transform .2s, background-color .2s, color .2s, border-color .2s, box-shadow .2s;
}
.step--current .step__num, .step__btn[aria-pressed="true"] .step__num {
  background: var(--blue); color: #fff; border-color: var(--blue);
  box-shadow: 0 0 0 4px #fff, 0 4px 10px rgba(47, 102, 245, .35);
}
.step__btn[aria-pressed="true"] .step__num { transform: scale(1.12); box-shadow: 0 0 0 4px #fff, 0 0 0 7px rgba(47,102,245,.18), 0 4px 10px rgba(47, 102, 245, .35); }
.step__btn:hover .step__num { transform: scale(1.1); border-color: var(--blue); }
.step__title { font-size: 14px; line-height: 1.35; color: var(--ink); font-weight: 500; transition: color .2s; }
.step__btn[aria-pressed="true"] .step__title, .step__btn:hover .step__title { color: var(--blue); }
.step__date { font-size: 13.5px; color: var(--blue); }
.roadmap__detail {
  align-self: stretch;
  padding: 14px 16px; border-radius: 14px;
  display: grid; gap: 4px;
  font-size: 13.5px; color: var(--muted); background: var(--card-blue);
}
.roadmap__detail.is-in { animation: fadeUp .35s ease; }
.roadmap__badge { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.roadmap__dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #9db2ec; }
.roadmap__detail.is-current .roadmap__dot { background: var(--blue); box-shadow: 0 0 0 4px rgba(47,102,245,.18); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(47,102,245,.06); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }

/* ========== Следите за проектом ========== */
.follow {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "title visual" "text visual";
  align-items: center; column-gap: 24px;
  padding: 30px 34px 0; overflow: hidden;
}
.follow__title {
  grid-area: title; align-self: end;
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-head); font-weight: 500; font-size: clamp(22px, 2vw, 28px);
  color: var(--blue); margin: 0 0 12px;
}
.follow__bell { width: 34px; height: 34px; flex: none; }
.follow__text { grid-area: text; align-self: start; padding-bottom: 30px; }
.follow__text .muted { margin-bottom: 20px; max-width: 340px; font-size: 14.5px; }
.follow__visual { grid-area: visual; position: relative; display: flex; align-items: flex-end; justify-content: center; align-self: end; }
.sticker--follow { width: 100%; max-width: 420px; margin-bottom: -6px; }
.deco--burst-follow { width: 38px; height: 38px; left: 0; top: 24%; transform: rotate(-80deg); }

/* ========== Стикерпак ========== */
.results { overflow: hidden; padding: 30px 34px 10px; }
.results__head .h2 { margin-bottom: 6px; }
.results__lead { font-size: 15px; }
/* блок «делитесь / скачивайте» — справа в ряду управления каруселью */
.results__cta { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.results__cta p { display: grid; gap: 2px; text-align: right; font-size: 13px; color: var(--muted); }
.results__cta b { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.results__cta .btn { min-height: 46px; padding: 10px 24px; }
/* летящий стикер при скачивании */
.fly-sticker { position: fixed; z-index: 300; margin: 0; object-fit: contain; pointer-events: none; transform-origin: center; filter: drop-shadow(0 12px 22px rgba(30, 50, 140, .25)); will-change: transform, opacity; }
.fly-target {
  position: fixed; z-index: 301; top: 8px; right: 16px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: var(--blue);
  box-shadow: 0 8px 20px rgba(47, 102, 245, .4); pointer-events: none;
}
.fly-target svg { width: 18px; height: 18px; }
.carousel { margin: 8px -34px 0; position: relative; }
.carousel__viewport {
  overflow-x: auto; overflow-y: hidden;
  padding: 16px 34px 20px;
  scrollbar-width: none;
  cursor: grab;
  -webkit-mask: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
          mask: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.carousel__viewport::-webkit-scrollbar { display: none; }
.carousel__viewport:focus-visible { outline-offset: -4px; }
.carousel__viewport.is-dragging { cursor: grabbing; }
.carousel__viewport.is-dragging .carousel__item { pointer-events: none; }
.carousel__track { position: relative; display: flex; gap: 20px; width: max-content; }
.carousel__item {
  flex: none; padding: 0; border: 0; background: none; border-radius: 18px; cursor: zoom-in;
  transition: transform .3s;
}
.carousel__item img {
  height: 230px; width: auto;
  filter: drop-shadow(0 10px 16px rgba(30, 50, 140, .14));
  user-select: none; -webkit-user-drag: none;
}
.carousel__item:hover { transform: scale(1.05) rotate(-1.5deg); }
.carousel__controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 10px; padding: 0 34px 14px; }
.carousel__btn, .carousel__play {
  width: 42px; height: 42px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--blue); background: #fff; border: 1.5px solid #c9d7fc;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.carousel__btn svg { width: 18px; height: 18px; }
.carousel__btn[data-dir="-1"] svg { transform: scaleX(-1); }
.carousel__btn:hover, .carousel__play:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.carousel__btn:active { transform: scale(.94); }
.carousel__play { width: 34px; height: 34px; border-color: transparent; background: var(--card-blue); }
.carousel__play span { width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.carousel__play.is-paused span { width: 0; height: 0; border: 0; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px; }
.carousel__hint { margin-left: 6px; font-size: 12.5px; color: var(--muted); }

/* ========== О команде / футер ========== */
.team {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
  grid-template-areas: "about visual" "socials visual" "brand brand";
  align-items: center;
  column-gap: 24px;
  padding: 30px 34px 22px;
  background: linear-gradient(100deg, #eceffe 0%, #f1f3ff 50%, #f0eefc 100%);
}
.team__about { grid-area: about; }
.team__about .h2 { margin: 8px 0 10px; }
.team__about .muted { max-width: 460px; margin-bottom: 16px; font-size: 14px; }
.team__visual { grid-area: visual; position: relative; display: flex; justify-content: center; align-self: end; }
.sticker--team { width: 100%; max-width: 250px; margin-bottom: -4px; }
.deco--burst-team { width: 40px; height: 40px; right: 8%; top: 6px; transform: rotate(20deg); }
.socials { grid-area: socials; list-style: none; margin: 18px 0 6px; padding: 0; display: flex; gap: 14px; }
.socials a {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; background: var(--blue);
  box-shadow: 0 6px 14px rgba(47, 102, 245, .28);
  transition: transform .2s, background-color .2s;
}
.socials a:hover { transform: translateY(-2px); background: var(--blue-600); }
.socials svg { width: 19px; height: 19px; }
.team__brand {
  grid-area: brand;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line);
}
.team__brand br { display: none; }

/* ========== Dialogs & toast ========== */
.dialog {
  width: min(560px, calc(100% - 32px));
  border: 0; border-radius: 26px; padding: 30px 30px 26px;
  color: var(--text); background: #fff;
  box-shadow: 0 30px 80px rgba(20, 30, 90, .25);
}
.dialog::backdrop { background: rgba(22, 27, 54, .45); backdrop-filter: blur(4px); }
.dialog[open] { animation: pop .25s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.dialog__close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px;
  border: 0; border-radius: 50%; background: var(--card-blue); color: var(--blue); font-size: 22px; line-height: 1;
}
.copy-area {
  width: 100%; margin-top: 14px; padding: 14px; resize: vertical;
  font: 13.5px/1.5 var(--font-body); color: var(--text);
  border: 1px solid var(--line); border-radius: 14px; background: var(--bg);
}
.dialog--codex { width: min(780px, calc(100% - 24px)); max-height: min(88vh, 900px); padding: 0; }
.dialog--codex[open] { display: flex; flex-direction: column; }
.dialog__head { position: relative; padding: 26px 70px 18px 30px; border-bottom: 1px solid var(--line); }
.dialog__head .h2 { margin: 10px 0 14px; }
.dialog__tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.codex-toc { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.codex-toc::-webkit-scrollbar { display: none; }
.codex-toc__item {
  flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--muted); font-size: 12.5px; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s;
}
.codex-toc__item:hover { color: var(--blue); border-color: #b9cbfb; }
.codex-toc__item.is-active { color: var(--blue); background: var(--card-blue); border-color: #b9cbfb; }
.codex-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; }
.codex-progress span { display: block; height: 100%; background: var(--blue); transform-origin: left; transform: scaleX(0); }
.codex-body .is-flash { animation: flash 1.8s ease; border-radius: 8px; }
@keyframes flash { 0%, 40% { background: #dfe8ff; box-shadow: 0 0 0 6px #dfe8ff; } 100% { background: transparent; box-shadow: 0 0 0 6px transparent; } }
.codex-body { position: relative; overflow-y: auto; padding: 8px 30px 30px; font-size: 14.5px; line-height: 1.6; overscroll-behavior: contain; }
.codex-body h3 {
  font-family: var(--font-head); font-weight: 600; font-size: 16px; color: var(--blue);
  margin: 22px 0 10px; padding-top: 4px;
}
.codex-body p { margin: 0 0 10px; }
.codex-body b { color: var(--ink); }
.codex-body ul { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; }
.codex-body li::marker { color: var(--blue); }

/* Правила и промпт в модалках */
.dialog--list .dialog__head p.muted { margin: -6px 0 14px; }
.rule-list { list-style: none; counter-reset: rule; margin: 0; padding: 14px 30px 28px; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 10px; }
.rule-list__item {
  counter-increment: rule;
  display: grid; grid-template-columns: 34px 1fr; column-gap: 14px; row-gap: 4px; align-items: start;
  padding: 14px 16px; border-radius: 16px; background: var(--card-blue);
}
.rule-list__item::before {
  content: counter(rule); grid-row: span 2;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 14px; color: #fff; background: var(--blue);
}
.rule-list__topic { font-family: var(--font-head); font-weight: 600; font-size: 14px; color: var(--blue); }
.rule-list__item p { font-size: 14.5px; line-height: 1.5; color: var(--ink); }
.prompt-box { overflow-y: auto; overscroll-behavior: contain; padding: 14px 30px 28px; }
.prompt-box__text {
  margin: 0; padding: 18px 20px; border-radius: 16px;
  background: #f3f2ff; border: 1px dashed #c9c4f6;
  font: 14px/1.65 var(--font-body); color: var(--ink);
  white-space: pre-wrap; word-break: break-word;
}

/* Lightbox */
.dialog--sticker { width: min(820px, calc(100% - 24px)); padding: 22px 22px 18px; background: linear-gradient(160deg, #f3f6ff, #fff); }
.lightbox { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.lightbox__figure { margin: 0; display: grid; justify-items: center; gap: 14px; touch-action: pan-y; user-select: none; }
.lightbox__figure img { width: 100%; height: min(52vh, 460px); object-fit: contain; filter: drop-shadow(0 16px 28px rgba(30, 50, 140, .2)); }
.lightbox__figure img.from-right { animation: slideIn .35s ease; --from: 40px; }
.lightbox__figure img.from-left { animation: slideIn .35s ease; --from: -40px; }
@keyframes slideIn { from { opacity: 0; transform: translateX(var(--from)); } }
.lightbox__figure figcaption { text-align: center; display: grid; align-content: start; gap: 4px; max-width: 520px; min-height: 5.6em; }
.lightbox__figure b { font-family: var(--font-head); font-weight: 600; font-size: 17px; color: var(--ink); }
.lightbox__figure span { font-size: 14px; color: var(--muted); }
.lightbox__nav {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  color: var(--blue); background: #fff; border: 1.5px solid #c9d7fc;
  transition: background-color .2s, color .2s, border-color .2s;
}
.lightbox__nav:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.lightbox__nav svg { width: 20px; height: 20px; }
.lightbox__nav--prev svg { transform: scaleX(-1); }
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.lightbox__count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lightbox__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* To top */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 46px; height: 46px; border-radius: 50%; border: 0;
  display: grid; place-items: center;
  color: #fff; background: var(--blue); box-shadow: 0 10px 24px rgba(47, 102, 245, .35);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .25s, transform .25s, background-color .2s;
}
.to-top svg { width: 20px; height: 20px; transform: rotate(-90deg); }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--blue-600); }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100;
  padding: 12px 20px; border-radius: 14px;
  background: var(--ink); color: #fff; font-size: 14px;
  box-shadow: 0 14px 30px rgba(20, 30, 90, .3);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ========== Motion ========== */
.float { animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ========== Responsive ========== */
@media (max-width: 1100px) {
  .logo__text { display: none; }
}
@media (max-width: 900px) {
  .header__cta { display: none; }
  .nav { justify-content: flex-end; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 6px; }
  .hero__visual { justify-self: center; max-width: 480px; }
  .why { grid-template-columns: 1fr; }
  .orbit { max-width: 380px; }
  .codex-card { padding-right: 110px; }
  .deco--plane { right: 30px; width: 52px; height: 52px; }
  .deco--dash1, .deco--dash2 { display: none; }
}

@media (max-width: 640px) {
  .logo__text { display: block; }
  .burger { display: block; }
  .nav {
    position: fixed; top: 74px; left: 12px; right: 12px;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 2px;
    padding: 12px; border-radius: 22px; background: #fff;
    box-shadow: 0 24px 60px rgba(20, 30, 90, .18);
    opacity: 0; transform: translateY(-10px); pointer-events: none; visibility: hidden;
    transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }
  .nav a:not(.btn) { font-size: 16px; padding: 12px 14px; border-radius: 12px; }
  .nav a:not(.btn)::after { display: none; }
  .nav a:not(.btn):hover, .nav a.is-active { background: var(--card-blue); }
  .nav__cta { display: inline-flex; justify-content: center; margin-top: 8px; min-height: 48px; }
  .principles__head { grid-template-columns: 1fr; }
  .btn-pair--head { grid-column: 1; grid-row: auto; margin-top: 14px; }
}

@media (max-width: 720px) {
  .principles__grid { grid-template-columns: 1fr; }
  .risks__panel { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; padding-right: 0; }
  .steps::before, .steps::after { display: none; }
  .follow { grid-template-columns: 1fr; grid-template-areas: "title" "text" "visual"; padding-bottom: 0; }
  .follow__text { padding-bottom: 6px; }
  .sticker--follow { max-width: 360px; }
  .team { grid-template-columns: 1fr; grid-template-areas: "visual" "about" "socials" "brand"; }
  .team__visual { align-self: center; margin-top: -10px; }
  .sticker--team { max-width: 200px; }
}

@media (max-width: 560px) {
  body { font-size: 14.5px; }
  .header__inner { min-height: 68px; }

  .logo__mark { width: 80px; height: 24px; }
  .logo__text { font-size: 10px; }

  .card, .codex-card, .why, .principles, .roadmap, .results, .team { padding: 22px 18px; border-radius: 22px; }
  .follow { padding: 22px 18px 0; border-radius: 22px; }
  .hero__title br, .hero__lead br { display: none; }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1 1 100%; justify-content: center; }
  .hero__visual { aspect-ratio: 1.05; }
  .sticker--hero { width: 86%; right: 0; }
  .note--hero { font-size: 19px; padding: 10px 14px; bottom: 8%; }
  .codex-card { column-gap: 14px; }
  .codex-card__icon { width: 36px; height: 36px; }
  .deco--plane { display: none; }
  .codex-card__actions { gap: 12px 18px; }

  .steps { grid-template-columns: 1fr; gap: 18px; margin-top: 16px; }
  .steps::before { display: block; left: 14px; right: auto; top: 14px; bottom: 14px; width: 1.5px; height: auto; background: linear-gradient(180deg, #b8c9fb, #d6e0fd); }
  .step__btn { display: grid; grid-template-columns: 29px 1fr auto; column-gap: 14px; align-items: center; padding: 0; }
  .step__num { margin: 0; }
  .step__title { font-size: 13.5px; }
  .step__title br { display: none; }
  .follow__visual { margin: 0 -18px; }
  .deco--burst-follow { display: none; }

  .risks__tabs { flex-wrap: nowrap; margin: 14px -18px 0; padding: 4px 18px 6px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
  .risk-card { padding: 16px 18px; min-height: 0; }
  .risk-card p { font-size: 14.5px; }
  .sub { flex-direction: column; gap: 10px; padding: 18px 16px; }
  .sub__title { margin-top: 0; }
  .btn-pair { width: 100%; }
  .btn-pair .btn { flex: 1 1 auto; justify-content: center; min-width: 0; }
  .rule-list, .prompt-box { padding: 12px 16px 22px; }
  .rule-list__item { grid-template-columns: 30px 1fr; column-gap: 12px; padding: 12px 14px; }
  .rule-list__item::before { width: 30px; height: 30px; font-size: 13px; }
  .carousel { margin: 4px -18px 0; }
  .carousel__viewport { padding: 10px 18px 14px; }
  .carousel__item img { height: 170px; }
  .carousel__item:hover { transform: none; }
  .carousel__controls { padding: 0 18px 4px; flex-wrap: wrap; }
  .carousel__hint { flex-basis: 100%; margin: 4px 0 0; }
  .results__lead { font-size: 14.5px; }
  .results__cta { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 12px; margin: 14px 0 6px; padding-top: 16px; border-top: 1px solid var(--line); }
  .results__cta p { text-align: left; }
  .results__cta .btn { justify-content: center; }

  .team__brand { flex-direction: column; align-items: flex-start; gap: 12px; }
  .dialog { padding: 26px 20px 22px; }
  .dialog--codex { padding: 0; }
  .dialog--sticker { padding: 18px 12px 14px; }
  .lightbox { grid-template-columns: 1fr; position: relative; }
  .lightbox__nav { position: absolute; top: 38%; z-index: 1; width: 38px; height: 38px; background: rgba(255,255,255,.9); }
  .lightbox__nav--prev { left: 0; }
  .lightbox__nav:not(.lightbox__nav--prev) { right: 0; }
  .lightbox__figure img { height: min(42vh, 380px); }
  .lightbox__figure figcaption { min-height: 7.2em; }
  .lightbox__bar { justify-content: center; }
  .lightbox__actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .lightbox__actions .btn { justify-content: center; }
  #lb-share { grid-column: 1 / -1; }
  .to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; }
  .dialog__head { padding: 22px 60px 16px 20px; }
  .codex-body { padding: 4px 20px 24px; font-size: 14px; }
}
