/* ==========================================================================
   Unibrain — посадочная страница
   Mobile-first: базовые стили для телефонов, медиа-запросы расширяют сетку.
   ========================================================================== */

:root {
  --bg: #f6f5f1;
  --bg-elev: #ffffff;
  --bg-soft: #eeece5;
  --text: #15151a;
  --text-2: #4a4a55;
  --text-3: #6f6f7a;
  --line: #e1ded5;
  --line-strong: #cbc7bb;
  --accent: #5b3df5;
  --accent-hover: #4a2ee0;
  --accent-soft: #ebe7ff;
  --accent-ink: #ffffff;
  --ok: #11804c;
  --ok-soft: #dff3e8;
  --warn: #8f5d00;
  --warn-soft: #f9eed6;
  --danger: #c0262d;
  --header-bg: rgba(246, 245, 241, 0.86);
  --shadow: 0 18px 40px -22px rgba(35, 25, 90, 0.28), 0 1px 3px rgba(20, 20, 30, 0.05);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --container: 1160px;
  --gutter: 16px;
  --header-h: 60px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e12;
    --bg-elev: #17171d;
    --bg-soft: #131318;
    --text: #ededf2;
    --text-2: #b6b6c2;
    --text-3: #8d8d99;
    --line: #26262f;
    --line-strong: #383844;
    --accent: #8b7bff;
    --accent-hover: #a094ff;
    --accent-soft: #221d45;
    --accent-ink: #0e0e12;
    --ok: #52d394;
    --ok-soft: #12291d;
    --warn: #f0b24a;
    --warn-soft: #2b2212;
    --danger: #ff6b70;
    --header-bg: rgba(14, 14, 18, 0.84);
    --shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.75), 0 1px 3px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

@media (min-width: 768px) {
  :root {
    --gutter: 28px;
    --header-h: 68px;
  }
}

/* ---------- База ---------- */

[hidden] {
  display: none !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body.is-locked {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 1.15rem + 2.8vw, 3.3rem);
  font-weight: 700;
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.55rem, 1.15rem + 1.6vw, 2.35rem);
  font-weight: 700;
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

p {
  margin: 0;
}

code,
pre {
  font-family: var(--mono);
}

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

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

.container--narrow {
  max-width: 860px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--text-3);
  background: var(--bg-elev);
}

.btn--sm {
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: 8px;
}

.btn--lg {
  min-height: 52px;
  padding: 0 24px;
  font-size: 16px;
}

.btn--block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* ---------- Шапка ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.header.is-scrolled {
  border-bottom-color: var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

/* Пропорции как в исходном логотипе: высота надписи — 0,63 от высоты знака. */
.logo__mark {
  width: 34px;
  height: 30px;
}

.logo__word {
  width: 92px;
  height: 19px;
  fill: currentColor;
}

.logo--small {
  gap: 5px;
}

.logo--small .logo__mark {
  width: 29px;
  height: 26px;
}

.logo--small .logo__word {
  width: 80px;
  height: 16.5px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Скрытое поле-ловушка для ботов в форме регистрации. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.header__signup {
  display: none;
}

/* Мобильное меню */
.nav {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  display: flex;
  flex-direction: column;
  padding: 8px max(var(--gutter), env(safe-area-inset-left)) 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  visibility: hidden;
  opacity: 0;
}

.nav.is-open {
  visibility: visible;
  opacity: 1;
}

.nav a {
  display: flex;
  align-items: center;
  min-height: 52px;
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.nav__signup {
  margin-top: 16px;
  min-height: 50px;
}

.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.burger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 600px) {
  .header__signup {
    display: inline-flex;
  }
}

@media (min-width: 1100px) {
  .nav {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 26px;
    margin-left: 24px;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    visibility: visible;
    opacity: 1;
  }

  .nav a {
    min-height: 0;
    font-size: 15px;
    color: var(--text-2);
    white-space: nowrap;
    border: 0;
  }

  .nav a:hover {
    color: var(--text);
  }

  .nav__signup,
  .burger {
    display: none;
  }
}

/* ---------- Первый экран ---------- */

.hero {
  padding: 32px 0 48px;
}

.hero__grid {
  display: grid;
  gap: 40px;
}

.lead {
  margin-top: 18px;
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.22rem);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 60ch;
}

.hero__points {
  display: grid;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.hero__points li {
  position: relative;
  padding-left: 26px;
  font-weight: 500;
}

.hero__points li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 5px;
  width: 6px;
  height: 11px;
  border: solid var(--accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.hero__cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.hero__note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-3);
  max-width: 52ch;
}

@media (min-width: 560px) {
  .hero__cta {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (min-width: 1024px) {
  .hero {
    padding: 64px 0 56px;
  }

  .hero__grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 56px;
  }
}

/* ---------- Макет диалога ---------- */

.mock {
  width: 100%;
  max-width: 540px;
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-size: 14px;
}

.mock__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}

.mock__dots {
  display: inline-flex;
  flex-shrink: 0;
  gap: 6px;
}

.mock__dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
}

.mock__app {
  flex-shrink: 0;
  font-weight: 600;
}

.mock__conn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock__live {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
}

.mock__body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 12px;
  line-height: 1.5;
}

.msg--user {
  justify-self: end;
  background: var(--accent);
  color: var(--accent-ink);
  border-bottom-right-radius: 4px;
}

.msg--ai {
  background: var(--bg-soft);
  border-bottom-left-radius: 4px;
}

.tool {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-3);
}

.tool__label {
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.tool code {
  overflow-wrap: anywhere;
}

.ctx {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.ctx__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-3);
}

.ctx__list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}

.ctx__list div {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
}

.ctx__list dt {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  padding-top: 1px;
}

.ctx__list dd {
  margin: 0;
}

.ctx__files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.ctx__files span {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
}

.ctx__tasks {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.ctx__tasks {
  grid-template-columns: auto 1fr;
  column-gap: 12px;
}

.ctx__tasks li {
  display: contents;
}

.ctx__tasks span {
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
  padding-top: 1px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pill--ok {
  background: var(--ok-soft);
  color: var(--ok);
}

/* ---------- Секции ---------- */

.section {
  padding: 56px 0;
}

.hero + .section {
  padding-top: 24px;
}

.section--soft {
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
}

.section__head {
  max-width: 760px;
  margin-bottom: 28px;
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.kicker {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.section__sub {
  margin-top: 14px;
  font-size: 17px;
  color: var(--text-2);
}

.fn-ref {
  color: var(--text-3);
  text-decoration: none;
}

.footnote {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-3);
}

@media (min-width: 1024px) {
  .section {
    padding: 88px 0;
  }

  .hero + .section {
    padding-top: 40px;
  }

  .section__head {
    margin-bottom: 40px;
  }
}

/* ---------- Сравнение «сейчас / с Unibrain» ---------- */

.compare {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}

.compare__row {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.compare__pain {
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 8px;
  row-gap: 4px;
}

.compare__num {
  grid-row: span 2;
  padding-top: 3px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-3);
}

.compare__title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}

/* Проблему зачёркиваем акцентной линией — её решает блок справа */
.compare__title s {
  text-decoration-line: line-through;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
}

.compare__pain p:not(.compare__title) {
  color: var(--text-3);
}

.compare__arrow {
  width: 22px;
  height: 22px;
  margin-left: 6px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(90deg);
}

.compare__fix {
  justify-self: stretch;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  font-weight: 500;
}

.compare__label {
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

@media (min-width: 768px) {
  .compare__row {
    grid-template-columns: 1fr 36px 1fr;
    align-items: center;
    gap: 24px;
  }

  .compare__arrow {
    justify-self: center;
    margin: 0;
    transform: none;
  }
}

/* ---------- Шаги ---------- */

.how {
  display: grid;
  gap: 28px;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}

.step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.step__num {
  padding-top: 2px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
}

.step p {
  margin-top: 8px;
  color: var(--text-2);
}

.prompt {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  overflow: hidden;
}

.prompt figcaption {
  padding: 11px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
}

.prompt pre {
  margin: 0;
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text-2);
}

.prompt__note {
  padding: 0 18px 16px;
  font-size: 13px;
  color: var(--text-3);
}

@media (min-width: 1024px) {
  .how {
    grid-template-columns: 1.3fr 1fr;
    gap: 56px;
    align-items: start;
  }

  .prompt {
    position: sticky;
    top: calc(var(--header-h) + 24px);
  }
}

/* ---------- Новый аккаунт ---------- */

.split {
  display: grid;
  gap: 36px;
}

.restore-list {
  margin: 26px 0 0;
  border-top: 1px solid var(--line-strong);
}

.restore-list div {
  display: grid;
  gap: 2px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.restore-list dt {
  font-weight: 600;
}

.restore-list dd {
  margin: 0;
  color: var(--text-2);
}

@media (min-width: 480px) {
  .restore-list div {
    grid-template-columns: 170px 1fr;
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
  }
}

/* ---------- Возможности ---------- */

.specs {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--line-strong);
}

.spec {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.spec dt {
  font-size: 18px;
  font-weight: 600;
}

.spec dd {
  margin: 8px 0 0;
  color: var(--text-2);
}

.spec__sample {
  display: inline-block;
  margin-top: 12px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-elev);
  font-size: 12.5px;
  color: var(--text-2);
  overflow-wrap: anywhere;
}

@media (min-width: 768px) {
  .specs {
    grid-template-columns: 1fr 1fr;
    column-gap: 56px;
  }
}

/* ---------- Для кого ---------- */

.quotes {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}

.quote {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.quote__role {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.quote blockquote {
  margin: 8px 0 0;
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.25rem);
  font-weight: 500;
  line-height: 1.45;
}

@media (min-width: 768px) {
  .quotes {
    grid-template-columns: 1fr 1fr;
    column-gap: 56px;
  }
}

/* ---------- Совместимость ---------- */

.compat {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  overflow: hidden;
}

.compat li {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "name status"
    "detail status";
  column-gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.compat li:last-child {
  border-bottom: 0;
}

.compat__name {
  grid-area: name;
  font-weight: 600;
}

.compat__detail {
  grid-area: detail;
  font-size: 14px;
  color: var(--text-3);
}

.status {
  grid-area: status;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}

.status--ok {
  color: var(--ok);
}

.status--ok::before {
  background: var(--ok);
}

.status--warn {
  color: var(--warn);
}

.status--warn::before {
  background: var(--warn);
}

@media (min-width: 860px) {
  .compat {
    grid-template-columns: 1fr 1fr;
  }

  .compat li:nth-child(odd) {
    border-right: 1px solid var(--line);
  }

  .compat li:nth-last-child(2):nth-child(odd) {
    border-bottom: 0;
  }
}

.compat-note {
  margin-top: 14px;
  padding: 14px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--text-2);
}

.compat-note strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Тарифы ---------- */

.pricing-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.seg {
  display: inline-flex;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-elev);
  min-width: 0;
}

.seg label {
  position: relative;
  flex: 1 1 auto;
}

.seg input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.seg span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}

.seg input:checked + span {
  background: var(--text);
  color: var(--bg);
}

.seg input:focus-visible + span {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.seg__badge {
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  color: var(--ok);
}

.seg input:checked + span .seg__badge {
  color: inherit;
  opacity: 0.8;
}

.seg--small span {
  min-width: 44px;
  padding: 0 12px;
}

.seg--full {
  display: flex;
  width: 100%;
}

.seg--compact span {
  min-height: 38px;
  padding: 0 10px;
  font-size: 14px;
}

.plans {
  display: grid;
  gap: 16px;
  max-width: 520px;
  margin-inline: auto;
}

@media (min-width: 1024px) {
  .plans {
    max-width: none;
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
    gap: 20px;
  }
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
}

.plan--featured {
  border: 2px solid var(--accent);
}

.plan__badge {
  position: absolute;
  top: -12px;
  left: 22px;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
}

.plan__name {
  font-size: 22px;
  font-weight: 700;
}

.plan__desc {
  margin-top: 6px;
  min-height: 3.2em;
  color: var(--text-2);
}

.plan__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.plan__amount {
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.plan__unit {
  color: var(--text-3);
  font-weight: 500;
}

.plan__billing {
  min-height: 1.6em;
  margin: 8px 0 20px;
  font-size: 14px;
  color: var(--text-3);
}

.plan__billing strong {
  color: var(--ok);
  font-weight: 600;
}

.plan__features {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.plan__features li {
  position: relative;
  padding-left: 26px;
  color: var(--text-2);
}

.plan__features li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 5px;
  width: 6px;
  height: 11px;
  border: solid var(--accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.pricing-note {
  margin-top: 26px;
  text-align: center;
  font-size: 14px;
  color: var(--text-3);
}

/* ---------- FAQ ---------- */

.faq {
  border-top: 1px solid var(--line-strong);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 16px 44px 16px 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-2);
}

.faq summary::after {
  transform: rotate(90deg);
}

.faq details[open] summary::after {
  transform: none;
}

.faq details p {
  padding: 0 0 12px;
}

.faq details p:last-child {
  padding-bottom: 20px;
  color: var(--text-2);
  max-width: 70ch;
}

/* ---------- Финальный блок ---------- */

.final-cta {
  padding: 56px 0;
  background: var(--accent-soft);
}

.final-cta__inner {
  text-align: center;
}

.final-cta h2 {
  max-width: 22ch;
  margin-inline: auto;
}

.final-cta p {
  margin: 14px auto 0;
  max-width: 54ch;
  font-size: 17px;
  color: var(--text-2);
}

.final-cta .btn--ghost {
  background: var(--bg-elev);
  border-color: transparent;
}

.final-cta .btn--ghost:hover {
  border-color: var(--accent);
}

.final-cta__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 26px;
}

@media (min-width: 560px) {
  .final-cta__actions {
    flex-direction: row;
    justify-content: center;
  }
}

@media (min-width: 1024px) {
  .final-cta {
    padding: 80px 0;
  }
}

/* ---------- Документы: оферта, политика, согласие ---------- */

.doc {
  padding: 32px 0 56px;
  border-bottom: 1px solid var(--line);
}

.doc__inner {
  max-width: 800px;
}

.doc h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem);
}

.doc__meta {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-3);
}

.doc__note {
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--text-2);
}

.doc__note strong {
  color: var(--text);
  font-weight: 600;
}

.doc__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 24px 0 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.doc__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 15px;
  color: var(--accent);
}

.doc__nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.doc__body {
  color: var(--text-2);
}

.doc__body > p,
.doc__body section > p {
  margin-top: 10px;
}

.doc__body h2 {
  margin: 32px 0 4px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

.doc__body ul {
  margin: 10px 0 0;
  padding-left: 22px;
}

.doc__body li + li {
  margin-top: 6px;
}

.doc__body strong {
  color: var(--text);
  font-weight: 600;
}

.doc__body a {
  color: var(--accent);
  overflow-wrap: anywhere;
}

@media (min-width: 768px) {
  .doc {
    padding: 56px 0 88px;
  }
}

/* ---------- Подвал ---------- */

.footer {
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom));
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 14px;
  color: var(--text-2);
  text-decoration: none;
}

.footer__links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer__copy {
  font-size: 14px;
  color: var(--text-3);
}

@media (min-width: 768px) {
  .footer__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ---------- Липкая кнопка (только телефоны) ---------- */

.mobile-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 10px max(var(--gutter), env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom));
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.2s ease;
}

.mobile-cta.is-visible {
  transform: none;
}

@media (min-width: 768px) {
  .mobile-cta {
    display: none;
  }
}

/* ---------- Окно регистрации ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 16, 0.55);
}

.modal__panel {
  position: relative;
  width: 100%;
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 26px max(var(--gutter), env(safe-area-inset-left)) calc(22px + env(safe-area-inset-bottom));
  border-radius: 16px 16px 0 0;
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}

@media (min-width: 640px) {
  .modal {
    align-items: center;
    padding: 24px;
  }

  .modal__panel {
    max-width: 480px;
    padding: 32px;
    border-radius: var(--radius-lg);
  }
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}

.modal__close:hover {
  background: var(--bg-soft);
}

.modal__close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.signup {
  display: grid;
  gap: 16px;
}

.signup h2,
.signup-done h2 {
  font-size: 24px;
  padding-right: 40px;
}

.signup__sub {
  margin-top: -8px;
  color: var(--text-2);
}

.signup fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.signup__plans legend,
.field label,
.seats label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

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

.plan-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  cursor: pointer;
}

.plan-option input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.plan-option__name {
  font-weight: 600;
}

.plan-option__price {
  margin-left: auto;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
}

.plan-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

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

.seats label {
  margin: 0;
}

.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
}

.stepper button {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 20px;
  cursor: pointer;
}

.stepper button:hover {
  background: var(--bg-soft);
}

.stepper input {
  width: 56px;
  height: 44px;
  border: 0;
  border-inline: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* 16px — iOS не масштабирует страницу при фокусе */
}

.field textarea {
  display: block;
  min-height: 116px;
  padding: 12px 16px;
  line-height: 1.5;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-3);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.field__error {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
}

.field__error:empty {
  display: none;
}

#consent-error {
  margin-top: -10px;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-2);
  cursor: pointer;
}

.consent input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.consent a {
  color: var(--accent);
}

.signup__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--bg-soft);
}

.signup__total span {
  font-weight: 500;
  color: var(--text-2);
}

.signup__total strong {
  font-size: 18px;
  font-weight: 600;
  text-align: right;
}

.signup__fine {
  font-size: 13px;
  color: var(--text-3);
  text-align: center;
}

.signup__fine a {
  color: var(--accent);
}

.signup-done {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 12px 0 4px;
  text-align: center;
}

.signup-done h2 {
  padding: 0;
}

.signup-done p {
  color: var(--text-2);
  max-width: 40ch;
}

.signup-done .btn {
  margin-top: 8px;
}

.signup-done__icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--ok-soft);
}

.signup-done__icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--ok);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Необязательное сообщение после регистрации */
.followup {
  justify-self: stretch;
  display: grid;
  gap: 12px;
  margin-top: 6px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.followup h3 {
  font-size: 17px;
}

.signup-done .followup__sub {
  max-width: none;
  margin-top: -4px;
  font-size: 14px;
}

.signup-done .followup .btn {
  margin-top: 0;
}

.signup-done .followup-thanks {
  justify-self: stretch;
  max-width: none;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--ok-soft);
  color: var(--text);
  text-align: left;
}

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

  .mobile-cta,
  .header {
    transition: none;
  }
}
