/* ============================================================================
   Happ Plus — лендинг оплаты подписки
   Порядок: токены · база · утилиты · шапка · герой · секции · чекаут · motion
   ========================================================================= */

/* --- Токены --------------------------------------------------------------- */
:root {
  --paper: #eef0f4;
  --paper-deep: #e4e7ee;
  --white: #ffffff;

  --ink: #14161c;
  --ink-2: #454b58;
  --ink-3: #79808f;

  --line: rgba(20, 22, 28, 0.1);
  --line-soft: rgba(20, 22, 28, 0.055);

  --accent: #4a3ff0;
  --accent-soft: rgba(74, 63, 240, 0.09);
  /* Цвет названия в заголовке — меняется здесь одним значением */
  --brand: #5b4fce;

  /* Единственный цветной сигнал на странице — строка «работает в России».
     --live — точка, --live-ink — текст: он тёмнее, иначе 13 px не читаются на светлом. */
  --live: #16a06a;
  --live-ink: #0b6b45;
  --live-soft: rgba(22, 160, 106, 0.22);

  /* Красный живёт в одном месте — линия поверх цены до скидки. Приглушён
     намеренно: чистый #f00 на фарфоровом фоне звенит и тянет взгляд с цены,
     ради которой экран и сделан. */
  --sale: #d92d20;

  --glass: rgba(255, 255, 255, 0.7);
  --glass-strong: rgba(255, 255, 255, 0.86);

  /* Вертикальный ритм первого экрана. Три ступени вместо семи разных чисел:
     pair — внутри пары «заголовок + отметка», note — подпись под кнопкой,
     block — между смысловыми блоками. Правятся здесь, а не по месту. */
  --gap-pair: 10px;
  --gap-note: 16px;
  --gap-block: 28px;

  /* Масштаб макета телефона. Единица — исходный размер, 342×676 px.
     Переопределяется по высоте окна в «Адаптиве», а не задаётся по месту. */
  --phone-zoom: 1;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --shadow-soft: 0 2px 6px rgba(20, 22, 28, 0.04), 0 12px 32px -12px rgba(20, 22, 28, 0.14);
  --shadow-lift: 0 4px 12px rgba(20, 22, 28, 0.06), 0 32px 70px -28px rgba(20, 22, 28, 0.35);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.22, 0.7, 0.24, 1);
  --shell: 1160px;
  --gutter: clamp(20px, 5vw, 40px);
}

/* --- База ----------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Шапка прижата к верху и перекрывает цель перехода — отступ для якорей */
  scroll-padding-top: 84px;
  /* Сцена в герое намеренно уходит за правый край — обрезаем её, а не растим документ */
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* overflow-x здесь не ставить: он делает body контейнером прокрутки,
     и position: sticky у шапки перестаёт работать. Сцена героя обрезается
     на html через overflow-x: clip — тот scroll-контейнера не создаёт. */
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--ink);
  color: var(--white);
}

/* Фон страницы: два очень мягких пятна, зафиксированы — не перерисовываются при скролле */
.canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vw 50vh at 82% -6%, rgba(101, 90, 255, 0.12), transparent 65%),
    radial-gradient(55vw 45vh at 4% 20%, rgba(255, 176, 138, 0.14), transparent 62%),
    linear-gradient(180deg, #f3f5f8 0%, var(--paper) 42%, var(--paper-deep) 100%);
}

.shell {
  width: min(var(--shell), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--r-sm);
  transition: top 0.2s var(--ease);
}

.skip-link:focus-visible {
  top: 12px;
}

/* --- Типографика ---------------------------------------------------------- */
.kicker {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.section__title {
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.032em;
  font-weight: 600;
}

.section__lead {
  margin-top: 16px;
  max-width: 42ch;
  font-size: clamp(15px, 1.5vw, 17px);
  color: var(--ink-2);
}

/* --- Кнопки --------------------------------------------------------------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    transform 0.18s var(--ease),
    background-color 0.18s var(--ease),
    box-shadow 0.18s var(--ease),
    opacity 0.18s var(--ease);
}

.btn--primary {
  --btn-bg: var(--ink);
  --btn-fg: var(--white);
  box-shadow: 0 1px 2px rgba(20, 22, 28, 0.2), 0 12px 26px -12px rgba(20, 22, 28, 0.6);
}

.btn--primary:hover {
  --btn-bg: #23262f;
  transform: translateY(-1px);
}

.btn--primary:active {
  transform: translateY(0) scale(0.988);
}

.btn--ghost {
  --btn-bg: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn--ghost:hover {
  --btn-bg: var(--glass-strong);
}

.btn--sm {
  min-height: 36px;
  padding: 0 15px;
  font-size: 14px;
}

.btn--lg {
  min-height: 54px;
  padding: 0 30px;
  font-size: 16.5px;
  font-weight: 500;
}

.btn--block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.55;
  pointer-events: none;
}

/* --- Шапка ---------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 14px 0;
  background: rgba(238, 240, 244, 0.72);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.topbar.is-stuck {
  border-bottom-color: var(--line-soft);
  background: rgba(238, 240, 244, 0.86);
}


.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand__mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  flex: none;
  display: block;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar__link {
  padding: 8px 12px;
  font-size: 14.5px;
  color: var(--ink-2);
  border-radius: var(--r-sm);
  transition: color 0.18s var(--ease);
}

.topbar__link:hover {
  color: var(--ink);
}

/* --- 01 · Герой ----------------------------------------------------------- */
.hero {
  padding: clamp(26px, 5vh, 52px) 0 clamp(48px, 9vh, 96px);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.68fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}

/* Единый вертикальный ритм колонки: каждый блок задаёт свой отступ сверху */
.hero__copy > * + * {
  margin-top: 0;
}

/* Отметка свежести под заголовком: зелёная строка с «онлайн»-точкой.
   Время подставляет src/lib/checked-at.js, в разметке лежит запасной вариант. */
.status {
  position: relative;
  margin-top: var(--gap-pair);
  /* Строка обычная текстовая, а не флекс: при переносе «проверено ...» уходит
     под первую строку, а не под точку */
  padding-left: 16px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--live-ink);
}

.status b {
  font-weight: 600;
}

.status__note {
  opacity: 0.82;
  font-variant-numeric: tabular-nums;
}

/* Точка выведена из потока — иначе она смещала бы вторую строку */
.status__dot {
  position: absolute;
  left: 0;
  top: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  animation: live-pulse 2s var(--ease) infinite;
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 var(--live-soft);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(22, 160, 106, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(22, 160, 106, 0);
  }
}

.hero__title {
  font-size: clamp(32px, 4.3vw, 52px);
  line-height: 1.07;
  letter-spacing: -0.038em;
  font-weight: 600;
}

.hero__brand {
  white-space: nowrap;
  color: var(--brand);
}

/* Три преимущества: одинаковые колонки, иконки и подписи на одной линии */
.perks {
  margin-top: var(--gap-block);
  display: grid;
  /* Колонки под длину подписи: все заголовки и описания ложатся в одну строку */
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 0.95fr) minmax(0, 1.35fr);
  gap: 20px;
  align-items: start;
}

.perk {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-width: 0;
}

.perk__icon {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.perk__icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.perk__icon svg .is-filled {
  fill: var(--accent);
  stroke: none;
}

.perk__body {
  min-width: 0;
  padding-top: 1px;
}

.perk__body b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.3;
}

.perk__body em {
  display: block;
  margin-top: 3px;
  font-size: 13.5px;
  font-style: normal;
  line-height: 1.35;
  color: var(--ink-3);
}

.hero__line {
  margin-top: var(--gap-block);
  display: flex;
  flex-wrap: wrap;
  gap: 2px 9px;
  font-size: 14px;
  color: var(--ink-2);
}

.hero__line b {
  font-weight: 600;
  color: var(--ink);
}

.hero__line b[data-platforms-inline] {
  font-weight: inherit;
  color: inherit;
}

.hero__line span:not(:last-child)::after {
  content: "·";
  margin-left: 9px;
  color: var(--ink-3);
  opacity: 0.6;
}

.hero__buy {
  margin-top: var(--gap-block);
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.price__value {
  font-size: clamp(32px, 3.4vw, 42px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.price__period {
  font-size: 14.5px;
  color: var(--ink-3);
}

/* Цена до скидки: слева и выше текущей.
   Остальные элементы строки выровнены по базовой линии, этот — по верху,
   иначе он встал бы в одну линию с крупным числом и читался как часть цены.
   Цифры приглушены, красная — только линия: она и есть сигнал, а бордовое
   число рядом с чёрным спорило бы с ним за внимание. */
.price__old {
  align-self: flex-start;
  font-size: 16px;
  line-height: 1.2;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  text-decoration-line: line-through;
  text-decoration-color: var(--sale);
  text-decoration-thickness: 1.5px;
  /* Иначе линия расступается вокруг выносных элементов и рвётся на части */
  text-decoration-skip-ink: none;
}

.btn__arrow {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s var(--ease);
}

.btn--primary:hover .btn__arrow {
  transform: translateX(3px);
}

/* Строка способов оплаты: иконка + подпись, разделители не отрываются при переносе */
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.hero__meta {
  margin-top: var(--gap-note);
}

.hero__meta li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero__meta li:not(:last-child)::after {
  content: "·";
  margin-left: 4px;
  color: var(--ink-3);
  opacity: 0.6;
}

.pay-marks {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero__meta svg {
  flex: none;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero__meta svg .is-filled {
  fill: var(--ink-3);
  stroke: none;
}

.hero__meta .icon-sbp {
  flex: none;
  width: 17px;
  height: 17px;
  object-fit: contain;
}

/* --- Сцена: интерфейс Happ ------------------------------------------------- */
.hero__scene {
  position: relative;
  min-width: 0;
  display: flex;
  justify-content: center;
}

/* Фиолетовый — родной акцент самого приложения, живёт только внутри макета */
.phone {
  --happ: #6558d6;
  position: relative;
  width: min(100%, 342px);
  /* Макет уменьшается целиком, а не сужается: его высота (676 px) задана
     строками списка — шрифтом и отступами, — поэтому от ширины окна она
     не зависит вовсе, и узкий корпус остался бы ровно той же высоты.
     zoom взят вместо transform: scale намеренно — он меняет и раскладку,
     а scale оставил бы под уменьшенным телефоном пустое место в его
     прежние 676 px. */
  zoom: var(--phone-zoom);
  padding: 9px;
  border-radius: 54px;
  /* Титановая рамка: блики по граням, как на корпусе */
  background: linear-gradient(148deg, #55555c 0%, #2b2b30 26%, #1d1d21 52%, #35353c 78%, #5c5c64 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 2px 6px rgba(20, 22, 28, 0.18),
    0 46px 90px -34px rgba(20, 22, 28, 0.6);
  will-change: transform;
}

/* Боковые клавиши: слева действие и громкость, справа питание */
.phone__keys,
.phone__power {
  position: absolute;
  width: 2.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, #46464d, #26262b);
}

.phone__keys {
  left: -2px;
  top: 104px;
  height: 152px;
  background-image:
    linear-gradient(#46464d, #26262b),
    linear-gradient(#46464d, #26262b),
    linear-gradient(#46464d, #26262b);
  background-size: 100% 24px, 100% 46px, 100% 46px;
  background-position: 0 0, 0 46px, 0 106px;
  background-repeat: no-repeat;
  background-color: transparent;
}

.phone__power {
  right: -2px;
  top: 150px;
  height: 74px;
}

/* Мягкий свет за корпусом — объём без отдельного элемента в композиции */
.phone::before {
  content: "";
  position: absolute;
  inset: -12% -22%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(101, 88, 214, 0.18), transparent 70%);
  filter: blur(30px);
  z-index: -1;
}

.phone__body {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 12px 12px 13px;
  border-radius: 45px;
  background: radial-gradient(130% 70% at 50% 0%, #fdfdff 0%, #f1f2f7 100%);
  box-shadow: 0 0 0 2px #101013;
  overflow: hidden;
}

/* Динамический остров */
.phone__island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 98px;
  height: 27px;
  border-radius: 999px;
  background: #0a0a0c;
}

/* Индикатор домой */
.phone__home {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 108px;
  height: 4px;
  border-radius: 999px;
  background: rgba(20, 22, 28, 0.32);
  z-index: 1;
}

/* Строка состояния */
.phone__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 27px;
  padding: 0 6px 0 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.phone__signals {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.phone__signals svg {
  height: 10px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.2;
  stroke-linecap: round;
}

.phone__signals svg:first-child {
  width: 15px;
  fill: var(--ink);
  stroke: none;
}

.phone__signals svg:nth-child(2) {
  width: 13px;
}

.phone__signals svg:last-child {
  width: 21px;
  stroke: rgba(20, 22, 28, 0.4);
}

.phone__signals .is-filled {
  fill: var(--ink);
  stroke: none;
}

.phone__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 0 4px;
}

.phone__gear {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.7;
  stroke-linejoin: round;
  opacity: 0.7;
}

.phone__plus {
  position: relative;
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

.phone__plus::before,
.phone__plus::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  background: var(--ink);
}

.phone__plus::before {
  width: 16px;
  height: 2px;
}

.phone__plus::after {
  width: 2px;
  height: 16px;
}

/* Круглая кнопка подключения — самый узнаваемый элемент Happ */
.phone__dial {
  position: relative;
  width: 92px;
  height: 92px;
  margin: 16px auto 0;
  display: grid;
  place-items: center;
}

/* Кольцо вокруг кнопки: тонкая линия с мягким переливом, как в приложении */
.phone__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 205deg,
    rgba(101, 88, 214, 0.55),
    rgba(122, 196, 220, 0.45),
    rgba(232, 152, 162, 0.45),
    rgba(101, 88, 214, 0.55)
  );
  -webkit-mask: radial-gradient(circle closest-side, transparent calc(100% - 1.6px), #000 calc(100% - 1.6px));
  mask: radial-gradient(circle closest-side, transparent calc(100% - 1.6px), #000 calc(100% - 1.6px));
}

.phone__btn {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ffffff, #f7f8fb);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 24px -10px rgba(20, 22, 28, 0.3),
    0 2px 6px rgba(20, 22, 28, 0.06);
}

.phone__btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--happ);
  stroke-width: 2;
  stroke-linecap: round;
}

.phone__state {
  margin-top: 13px;
  text-align: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Шторка со списком серверов */
.phone__sheet {
  margin-top: 18px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 -2px 8px rgba(20, 22, 28, 0.04), 0 14px 30px -18px rgba(20, 22, 28, 0.4);
  overflow: hidden;
}

.phone__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px 8px;
  border-bottom: 1px solid var(--line-soft);
}

.phone__chev {
  flex: none;
  width: 7px;
  height: 7px;
  border-top: 1.4px solid var(--ink-3);
  border-left: 1.4px solid var(--ink-3);
  transform: rotate(45deg);
  margin-top: 2px;
}

.phone__sub {
  flex: 1;
  min-width: 0;
}

.phone__sub > b {
  display: block;
  line-height: 1.3;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.phone__word {
  display: inline;
  font-weight: inherit;
  font-size: inherit;
}

.phone__sub em {
  display: block;
  margin-top: 1px;
  line-height: 1.3;
  font-size: 9.5px;
  font-style: normal;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone__tools {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
}

.phone__tools svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: var(--happ);
  stroke-width: 1.8;
  stroke-linecap: round;
  opacity: 0.85;
}

.phone__rows li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--ink-2);
  transition: background-color 0.45s var(--ease), color 0.45s var(--ease);
}

.phone__rows li + li {
  border-top: 1px solid var(--line-soft);
}

.phone__rows li span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone__rows li em {
  font-family: var(--mono);
  font-size: 10.5px;
  font-style: normal;
  color: var(--ink-3);
  transition: color 0.45s var(--ease);
}

.phone__rows li.is-active {
  background: color-mix(in srgb, var(--happ) 9%, transparent);
  color: var(--ink);
  font-weight: 500;
}

.phone__rows li.is-active::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  width: 4px;
  height: 4px;
  margin-top: -2px;
  border-radius: 50%;
  background: var(--happ);
}

.phone__rows li.is-active em {
  color: var(--happ);
}

/* Флаги: эмодзи там, где браузер их рисует; нарисованные — как запасной вариант */
.flag {
  flex: none;
  width: 18px;
  height: 13px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(20, 22, 28, 0.08) inset;
  background-size: cover;
}

.flag--nl {
  background-image: linear-gradient(180deg, #ae1c28 0 33.3%, #fff 33.3% 66.6%, #21468b 66.6%);
}

.flag--de {
  background-image: linear-gradient(180deg, #000 0 33.3%, #d00 33.3% 66.6%, #ffce00 66.6%);
}

.flag--se {
  background-image:
    linear-gradient(90deg, transparent 0 32%, #fecc00 32% 48%, transparent 48%),
    linear-gradient(180deg, transparent 0 38%, #fecc00 38% 62%, transparent 62%),
    linear-gradient(#006aa7, #006aa7);
}

.flag--us {
  background-image:
    linear-gradient(#3c3b6e, #3c3b6e),
    repeating-linear-gradient(180deg, #b22234 0 15.4%, #fff 15.4% 30.8%);
  background-size: 44% 54%, 100% 100%;
  background-position: left top, left top;
  background-repeat: no-repeat, repeat;
}

.flag--fr {
  background-image: linear-gradient(90deg, #002395 0 33.3%, #fff 33.3% 66.6%, #ed2939 66.6%);
}

.flag--it {
  background-image: linear-gradient(90deg, #008c45 0 33.3%, #f4f5f0 33.3% 66.6%, #cd212a 66.6%);
}

.flag--pl {
  background-image: linear-gradient(180deg, #fff 0 50%, #dc143c 50%);
}

.flag--es {
  background-image: linear-gradient(180deg, #aa151b 0 25%, #f1bf00 25% 75%, #aa151b 75%);
}

.flag--fi {
  background-image:
    linear-gradient(90deg, transparent 0 24%, #003580 24% 44%, transparent 44%),
    linear-gradient(180deg, transparent 0 36%, #003580 36% 64%, transparent 64%),
    linear-gradient(#fff, #fff);
}

.flag--gb {
  background-image:
    linear-gradient(90deg, transparent 0 41%, #c8102e 41% 59%, transparent 59%),
    linear-gradient(180deg, transparent 0 36%, #c8102e 36% 64%, transparent 64%),
    linear-gradient(90deg, transparent 0 33%, #fff 33% 67%, transparent 67%),
    linear-gradient(180deg, transparent 0 27%, #fff 27% 73%, transparent 73%),
    linear-gradient(55deg, transparent 45%, #fff 45% 55%, transparent 55%),
    linear-gradient(-55deg, transparent 45%, #fff 45% 55%, transparent 55%),
    linear-gradient(#012169, #012169);
}

.flag--ai {
  display: grid;
  place-items: center;
  background: none;
  box-shadow: none;
}

.flag--ai svg {
  width: 15px;
  height: 15px;
}

/* Эмодзи рисует сам шрифт — коробка, рамка и скругление тут лишние */
.flag--emoji {
  width: 20px;
  height: auto;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: 15px;
  line-height: 1;
  font-style: normal;
  text-align: center;
}

/* Подпись «(для нейросетей)» рядом с названием сервера */
.phone__rows li span i {
  font-style: normal;
  font-size: 10px;
  color: var(--ink-3);
}

.phone__rows li.is-active span i {
  color: color-mix(in srgb, var(--happ) 75%, var(--ink-3));
}

/* --- Секции --------------------------------------------------------------- */
.section {
  padding: clamp(46px, 6.6vh, 80px) 0;
}

/* 02 · Шаги */
.steps__rail {
  --steps-gap: clamp(20px, 3vw, 40px);
  margin-top: clamp(30px, 4vw, 46px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--steps-gap);
}

.steps__item {
  position: relative;
  padding-top: 26px;
}

/* Связка между шагами: тянется только до следующего шага */
.steps__item::before {
  content: "";
  position: absolute;
  top: 4.5px;
  left: 14px;
  right: calc(var(--steps-gap) * -1);
  height: 1px;
  background: var(--line);
}

.steps__item:last-child::before {
  display: none;
}

.steps__dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
}

.steps__item h3 {
  font-size: 17.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.steps__item p {
  margin-top: 7px;
  font-size: 14.5px;
  color: var(--ink-2);
  max-width: 34ch;
}

/* 03 · Локации */
.places__list {
  margin-top: clamp(26px, 3.5vw, 40px);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 26px;
  font-size: clamp(19px, 2.4vw, 27px);
  line-height: 1.45;
  letter-spacing: -0.028em;
  color: var(--ink-3);
}

.places__list li {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  transition: color 0.3s var(--ease);
}

.places__list li:hover {
  color: var(--ink-2);
}

/* Флаг рисует сам шрифт — коробка и рамка, как у нарисованных флагов в макете
   приложения, здесь только мешали бы. Размер в em: список набран clamp'ом,
   и флаг должен ехать вместе с ним.
   Там, где система флаговые эмодзи не показывает (Windows), скрипт не выводит
   этот элемент вовсе: нарисованных флагов для Бразилии, Индии, Малайзии
   и Индонезии не существует, а буквы «BR» вместо флага хуже, чем ничего. */
.places__flag {
  flex: none;
  font-size: 0.62em;
  line-height: 1;
}

/* Gemini живёт в том же списке, но читается как отдельная вещь */
.places__list .is-special {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  color: var(--ink);
}

.places__list .is-special b {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 6px;
}

/* 04 · Устройства */
.devices__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
}

.devices__platforms {
  margin-top: 26px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  line-height: 1.9;
}

/* Сцена с двумя устройствами.
   Размер задан пропорцией, а не высотой, и внутри всё считается в cqw —
   от ширины самой сцены. Поэтому макет уменьшается целиком и одинаково
   на любой ширине, и адаптивных правил для него не нужно ни одного. */
.devices__art {
  position: relative;
  container-type: inline-size;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1.72;
  margin-inline: auto;
}

/* Мягкий свет за сценой — объём без отдельного элемента, как у макета в герое */
.devices__art::before {
  content: "";
  position: absolute;
  inset: 6% 4% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(101, 88, 214, 0.16), transparent 70%);
  filter: blur(26px);
  z-index: -1;
}

.dev {
  --happ: #6558d6;
  position: absolute;
}

/* Титановая рамка: те же блики по граням, что у корпуса в первом экране */
.dev__screen {
  background: linear-gradient(148deg, #55555c 0%, #2b2b30 26%, #1d1d21 52%, #35353c 78%, #5c5c64 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 2px 6px rgba(20, 22, 28, 0.16),
    0 6cqw 12cqw -6cqw rgba(20, 22, 28, 0.5);
}

/* --- Ноутбук --- */
/* Сдвинут вправо ровно на свес основания: оно шире крышки, и без этого
   отступа на узких экранах вылезало за пределы оболочки. */
.dev--laptop {
  left: 2.8cqw;
  top: 0;
  width: 83cqw;
}

.dev--laptop .dev__screen {
  aspect-ratio: 16 / 10.4;
  padding: 1.1cqw;
  border-radius: 2.4cqw 2.4cqw 0.5cqw 0.5cqw;
}

/* Основание: шире крышки, с вырезом под палец — по нему читается ноутбук */
.dev__base {
  position: relative;
  width: 106%;
  margin-left: -3%;
  height: 1.7cqw;
  border-radius: 0 0 1.4cqw 1.4cqw;
  background: linear-gradient(180deg, #4c4c55 0%, #303036 45%, #1e1e22 100%);
  box-shadow: 0 1.4cqw 2.4cqw -1.4cqw rgba(20, 22, 28, 0.45);
}

.dev__base::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 13%;
  height: 0.55cqw;
  border-radius: 0 0 0.6cqw 0.6cqw;
  background: rgba(12, 13, 16, 0.55);
}

/* --- Телефон --- */
.dev--phone {
  right: 0;
  bottom: 0;
  width: 20.5cqw;
  z-index: 1;
}

.dev--phone .dev__screen {
  position: relative;
  aspect-ratio: 9 / 19.5;
  padding: 0.7cqw;
  border-radius: 3.2cqw;
}

.dev__island {
  position: absolute;
  z-index: 2;
  top: 1.5cqw;
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  height: 1.5cqw;
  border-radius: 999px;
  background: #0b0c0f;
}

/* --- Экран Happ внутри устройства --- */
.app {
  height: 100%;
  border-radius: inherit;
  background: radial-gradient(130% 70% at 50% 0%, #fdfdff 0%, #f1f2f7 100%);
  overflow: hidden;
}

/* На ноутбуке кнопка слева, список справа — так выглядит настольное окно.
   Справа полоса шире остальных отступов: на неё ложится телефон, и колонка
   пингов иначе оказалась бы под ним. */
.dev--laptop .app {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  align-items: center;
  gap: 2.6cqw;
  padding: 3cqw 9.5cqw 3cqw 3.2cqw;
  border-radius: 1.6cqw;
}

/* На телефоне всё в столбец */
.app--stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4.4cqw 1.5cqw 1.5cqw;
  border-radius: 2.6cqw;
}

.app__side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4cqw;
}

/* Кольцо вокруг кнопки подключения — конусный градиент с вырезанной серединой,
   как в макете первого экрана */
.app__dial {
  position: relative;
  display: grid;
  place-items: center;
  width: 17cqw;
  aspect-ratio: 1;
}

.app--stack .app__dial {
  width: 11cqw;
}

.app__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 205deg,
    rgba(101, 88, 214, 0.55),
    rgba(122, 196, 220, 0.45),
    rgba(232, 152, 162, 0.45),
    rgba(101, 88, 214, 0.55)
  );
  -webkit-mask: radial-gradient(circle closest-side, transparent calc(100% - 0.5cqw), #000 calc(100% - 0.5cqw));
  mask: radial-gradient(circle closest-side, transparent calc(100% - 0.5cqw), #000 calc(100% - 0.5cqw));
}

.app__btn {
  width: 68%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ffffff, #f7f8fb);
  box-shadow: 0 0.4cqw 1cqw -0.4cqw rgba(20, 22, 28, 0.35);
}

.app__btn svg {
  width: 46%;
  fill: none;
  stroke: var(--happ);
  stroke-width: 2;
  stroke-linecap: round;
}

.app__state {
  font-family: var(--mono);
  font-size: 1.35cqw;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

.app--stack .app__state {
  margin-top: 1.2cqw;
}

/* Список серверов: имя и пинг, без флагов — на таком размере они превратились
   бы в цветные точки, а Windows и вовсе показал бы вместо них буквы */
.app__rows {
  width: 100%;
  min-width: 0;
}

.app--stack .app__rows {
  margin-top: 1.6cqw;
}

.app__rows > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 1cqw;
  padding: 1.35cqw 1.4cqw;
  border-radius: 0.9cqw;
  font-size: 2.1cqw;
  line-height: 1.25;
  color: var(--ink-3);
}

/* На телефоне только название: вместе с пингом строка не помещается в ширину
   корпуса и название обрывается многоточием. */
/* Кегль подобран по самому длинному названию — «Нидерланды» — с запасом.
   Впритык здесь мало: на экранах с высокой плотностью округление съедает
   последний пиксель, и название обрывается многоточием. */
.app--stack .app__rows > li {
  grid-template-columns: minmax(0, 1fr);
  padding: 0.9cqw 0.85cqw;
  font-size: 2cqw;
}

.app--stack .app__rows > li > em {
  display: none;
}

.app__rows > li > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app__rows > li > em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.86em;
  color: var(--ink-3);
  white-space: nowrap;
}

/* Активная строка подсвечена родным фиолетовым приложения — он живёт
   только внутри макетов и за их пределы не выходит */
.app__rows > li.is-active {
  background: rgba(101, 88, 214, 0.09);
  color: var(--ink);
}

.app__rows > li.is-active > em {
  color: var(--happ);
}

/* 05 · Покупка: короткие факты под шагами */
.facts {
  margin-top: clamp(40px, 5vw, 60px);
  padding-top: clamp(22px, 3vw, 30px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 44px);
}

.facts > li > b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.facts > li > span {
  display: block;
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.facts a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
}

.facts a:hover {
  text-decoration-color: var(--ink-3);
}

/* 06 · FAQ */
.faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.faq .section__title {
  position: sticky;
  top: 92px;
}

.faq__list {
  border-top: 1px solid var(--line);
}

.qa {
  border-bottom: 1px solid var(--line);
}

.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 19px 2px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.015em;
  cursor: pointer;
  list-style: none;
  transition: color 0.18s var(--ease);
}

.qa summary::-webkit-details-marker {
  display: none;
}

.qa summary:hover {
  color: var(--ink-2);
}

.qa summary i {
  position: relative;
  flex: none;
  width: 13px;
  height: 13px;
}

.qa summary i::before,
.qa summary i::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  background: var(--ink-3);
  transition: transform 0.25s var(--ease);
}

.qa summary i::before {
  width: 13px;
  height: 1.5px;
}

.qa summary i::after {
  width: 1.5px;
  height: 13px;
}

.qa[open] summary i::after {
  transform: scaleY(0);
}

.qa__body {
  padding: 0 44px 20px 2px;
  font-size: 15px;
  color: var(--ink-2);
}

.qa__body a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 07 · Финальный CTA */
.closing {
  padding: clamp(64px, 11vh, 128px) 0 clamp(72px, 12vh, 132px);
  text-align: center;
  position: relative;
}

.closing::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(46vw 40vh at 50% 46%, rgba(101, 90, 255, 0.11), transparent 68%);
  pointer-events: none;
}

.closing__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.closing__title {
  font-size: clamp(28px, 4.4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.038em;
  font-weight: 600;
}

.closing__lead {
  font-size: clamp(15px, 1.6vw, 17px);
  color: var(--ink-2);
  max-width: 34ch;
}

.closing__inner > div {
  margin-top: 10px;
}

/* --- Подвал --------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--line-soft);
  padding: 26px 0 calc(26px + env(safe-area-inset-bottom));
  font-size: 13px;
  color: var(--ink-3);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.footer nav {
  display: flex;
  gap: 20px;
}

.footer a:hover {
  color: var(--ink-2);
}

/* --- Липкая кнопка на мобильном ------------------------------------------- */
.sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(238, 240, 244, 0.82);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-top: 1px solid var(--line-soft);
  transform: translateY(120%);
  visibility: hidden;
  transition:
    transform 0.32s var(--ease),
    visibility 0s linear 0.32s;
}

.sticky.is-visible {
  transform: translateY(0);
  visibility: visible;
  transition-delay: 0s;
}

.sticky__row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sticky__price {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
}

@media (min-width: 861px) {
  .sticky {
    display: none;
  }
}

/* --- Чекаут --------------------------------------------------------------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(16, 18, 24, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.26s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.backdrop.is-open {
  opacity: 1;
}

.sheet {
  position: relative;
  width: min(452px, 100%);
  max-height: min(88svh, 760px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 26px 26px 22px;
  border-radius: var(--r-xl);
  background: rgba(252, 252, 253, 0.94);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 40px 90px -30px rgba(12, 14, 20, 0.55);
  transform: translateY(14px) scale(0.975);
  opacity: 0;
  transition:
    transform 0.34s var(--ease),
    opacity 0.24s var(--ease);
}

.backdrop.is-open .sheet {
  transform: none;
  opacity: 1;
}

.sheet__grab {
  display: none;
}

.sheet__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 22, 28, 0.05);
  cursor: pointer;
  transition: background-color 0.18s var(--ease);
}

.sheet__close:hover {
  background: rgba(20, 22, 28, 0.1);
}

.sheet__close svg {
  width: 13px;
  height: 13px;
  stroke: var(--ink-2);
  stroke-width: 1.8;
  stroke-linecap: round;
  fill: none;
}

.sheet__title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  padding-right: 40px;
}

/*
 * Заголовок только для читалок.
 *
 * Не `display: none` и не `visibility: hidden`: то и другое убирает элемент из
 * дерева доступности, а окно ссылается на него как на своё имя — диалог остался
 * бы безымянным. Прямоугольник в один пиксель с обрезкой содержимого элемент
 * оставляет, но не показывает.
 */
.sheet__title--quiet {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Выбор срока и числа устройств */
.plan {
  margin-top: 20px;
}

.plan__block + .plan__block {
  margin-top: 18px;
}

.plan__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  font-size: 13px;
  color: var(--ink-3);
}

.plan__label b {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* Срок — сегментированный переключатель: вариантов четыре, они короткие
   и должны читаться разом, а не списком в высоту окна. */
.terms {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.6);
}

.term {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 9px 4px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color 0.18s var(--ease),
    color 0.18s var(--ease);
}

.term input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.term__label {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink-2);
  transition: color 0.18s var(--ease);
}

.term__save {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.term:hover {
  background: rgba(255, 255, 255, 0.9);
}

.term.is-selected {
  background: var(--ink);
}

.term.is-selected .term__label {
  color: var(--white);
}

.term.is-selected .term__save {
  color: rgba(255, 255, 255, 0.62);
}

/* Клавиатура: рамка на плашке, а не на скрытом радиоинпуте */
.term:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Устройства — ползунок: значений десять, плашками они заняли бы полокна,
   а точное число человеку важнее, чем выбор из списка.
   Заполненная часть рисуется градиентом по --fill, его ставит скрипт. */
.slider {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 22px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--ink) 0 var(--fill, 0%),
    rgba(20, 22, 28, 0.1) var(--fill, 0%) 100%
  );
}

.slider::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--ink) 0 var(--fill, 0%),
    rgba(20, 22, 28, 0.1) var(--fill, 0%) 100%
  );
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid rgba(20, 22, 28, 0.12);
  box-shadow: 0 1px 2px rgba(20, 22, 28, 0.18), 0 6px 14px -6px rgba(20, 22, 28, 0.5);
  transition: transform 0.15s var(--ease);
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid rgba(20, 22, 28, 0.12);
  box-shadow: 0 1px 2px rgba(20, 22, 28, 0.18), 0 6px 14px -6px rgba(20, 22, 28, 0.5);
}

.slider:active::-webkit-slider-thumb {
  transform: scale(0.94);
}

.slider:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 999px;
}

.plan__scale {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
}

/* Итог и кнопка оплаты */
/* Почта для доступа: единственное поле формы заказа */
.field {
  margin-top: 20px;
}

.field__label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}

.field__input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.field__input::placeholder {
  color: var(--ink-3);
  opacity: 0.65;
}

.field__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.field__input.is-invalid {
  border-color: #c8452f;
}

.field__note {
  margin-top: 7px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-3);
}

.field__note.is-error {
  color: #c8452f;
}

/*
 * Галка автопродления.
 *
 * Родной квадратик браузера здесь выглядит чужим: у формы свои радиусы, свой
 * цвет и своя толщина линии. Настоящий input остаётся — на нём держатся
 * клавиатура, чтение с экрана и клик по подписи, — но прячется, а рисуем мы.
 */
.renew {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background 0.16s ease;
}

.renew:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.renew input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.renew__box {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  position: relative;
  transition:
    border-color 0.16s ease,
    background 0.16s ease;
}

/* Галочка рисуется двумя сторонами повёрнутого прямоугольника: одна фигура
   вместо картинки, и она масштабируется вместе с коробкой. */
.renew__box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0.6);
  opacity: 0;
  transition:
    opacity 0.16s ease,
    transform 0.16s var(--ease);
}

.renew input:checked + .renew__box {
  background: var(--accent);
  border-color: var(--accent);
}

.renew input:checked + .renew__box::after {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.renew input:focus-visible + .renew__box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.renew__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.renew__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.renew__note {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-3);
}

.sheet__pay {
  margin-top: 18px;
}

.pay-btn {
  justify-content: space-between;
  gap: 16px;
  padding: 0 22px;
}

.pay-btn__price {
  font-variant-numeric: tabular-nums;
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease);
}

.pay-btn__price.is-changing {
  opacity: 0;
  transform: translateY(-5px);
}

.sheet__assure {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.sheet__assure span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sheet__assure span::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-3);
  opacity: 0.6;
}

/* Успешная оплата */
.done {
  text-align: center;
  padding: 8px 0 4px;
}

.done__badge {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
}

.done__badge svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--white);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: draw 0.5s 0.15s var(--ease) forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.done__title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.done__text {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--ink-2);
}

.done__steps {
  margin: 20px 0 0;
  text-align: left;
  border-top: 1px solid var(--line-soft);
}

.done__steps li {
  display: flex;
  gap: 11px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  color: var(--ink-2);
}

.done__steps b {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  padding-top: 3px;
  font-weight: 400;
}

.done__support {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-3);
}

.done__support a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- Адаптив -------------------------------------------------------------- */
@media (max-width: 1040px) {
  /* Колонке с текстом отдаём больше места, чтобы заголовок остался в две строки */
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.58fr);
  }

  .hero__title {
    font-size: clamp(28px, 4.6vw, 46px);
  }

  .perks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .perk__body b,
  .perk__body em {
    white-space: normal;
  }
}

@media (max-width: 860px) {
  .hero {
    padding-top: var(--gap-block);
    padding-bottom: 56px;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* В одну колонку заголовок переносится сам.
     Размер привязан к ширине окна так, чтобы «Единственная правильная»
     всегда влезало в строку и заголовок оставался в двух строках. */
  .hero__break {
    display: none;
  }

  .hero__title {
    font-size: clamp(22px, calc(8.2vw - 4px), 46px);
  }

  .hero__lead {
    margin-top: 14px;
    font-size: 16px;
  }

  .hero__buy {
    gap: 8px 20px;
  }

  .hero__buy .btn {
    flex: 0 0 auto;
    min-width: 248px;
  }

  .hero__title {
    max-width: none;
  }

  /* Преимущества в один столбец: подписи выравниваются по левому краю иконок */
  .perks {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* На мобильном телефон компактнее: список локаций поднимается ближе к первому экрану */
  .phone {
    width: min(100%, 286px);
  }

  .phone {
    padding: 8px;
    border-radius: 46px;
  }

  .phone__body {
    padding: 10px 10px 11px;
    border-radius: 38px;
  }

  .phone__island {
    top: 8px;
    width: 84px;
    height: 23px;
  }

  .phone__status {
    height: 23px;
    font-size: 10.5px;
  }

  .phone__home {
    width: 92px;
  }

  .phone__keys {
    top: 88px;
    height: 128px;
    background-size: 100% 20px, 100% 39px, 100% 39px;
    background-position: 0 0, 0 39px, 0 89px;
  }

  .phone__power {
    top: 126px;
    height: 62px;
  }

  .phone__dial {
    width: 84px;
    height: 84px;
    margin-top: 13px;
  }

  .phone__btn {
    width: 60px;
    height: 60px;
  }

  .phone__btn svg {
    width: 18px;
    height: 18px;
  }

  .phone__state {
    margin-top: 12px;
  }

  .phone__rows li {
    padding: 6px 11px;
    font-size: 12px;
  }

  .phone__sub em {
    font-size: 9px;
    letter-spacing: -0.01em;
  }

  .steps__rail {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .steps__item {
    padding: 0 0 26px 26px;
  }

  .steps__item::before {
    top: 16px;
    bottom: 0;
    left: 4.5px;
    right: auto;
    width: 1px;
    height: auto;
  }

  .steps__item:last-child {
    padding-bottom: 0;
  }

  .steps__dot {
    top: 5px;
  }

  .devices__grid,
  .faq__grid {
    grid-template-columns: 1fr;
  }

  /* Высоту не задаём: сцена держит пропорцию сама, а внутри всё считается
     от её ширины — ограничить достаточно ширину. */
  .devices__art {
    max-width: 420px;
  }

  .facts {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .faq .section__title {
    position: static;
  }

  .faq__list {
    margin-top: 22px;
  }

  /* Место под липкую кнопку */
  .footer {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 600px) {
  .backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .sheet {
    width: 100%;
    max-height: 92svh;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    border-bottom: 0;
    padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform 0.36s var(--ease);
  }

  .backdrop.is-open .sheet {
    transform: translateY(0);
  }

  .sheet__grab {
    display: block;
    width: 38px;
    height: 4px;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: rgba(20, 22, 28, 0.16);
  }

  .sheet__close {
    top: 12px;
    right: 12px;
  }

  .sheet__title {
    font-size: 20px;
  }

  /* На узком окне четыре плашки срока встают теснее, а не переносятся:
     перенос порвал бы переключатель на две строки. */
  .term {
    padding: 8px 2px;
  }

  .term__label {
    font-size: 13px;
  }
}

@media (max-width: 560px) {
  :root {
    /* На телефоне шаг между блоками чуть меньше — экран короче */
    --gap-block: 24px;
  }

  /* Порядок на телефоне: цена и кнопка идут сразу за фактами, преимущества — под ними.
     В разметке порядок прежний, меняется только визуальный, поэтому расстояния
     задаёт gap контейнера: отступы соседей при перестановке не работают. */
  .hero__copy {
    display: flex;
    flex-direction: column;
    gap: var(--gap-block);
  }

  .hero__title,
  .perks,
  .hero__line,
  .hero__buy,
  .hero__meta {
    margin-top: 0;
  }

  .hero__title {
    order: 1;
  }

  /* Отметка и подпись под кнопкой ближе к своим блокам, чем общий шаг:
     разница добирается отрицательным отступом, числа остаются в токенах */
  .status {
    order: 2;
    margin-top: calc(var(--gap-pair) - var(--gap-block));
  }

  .hero__line {
    order: 3;
  }

  .hero__buy {
    order: 4;
  }

  .hero__meta {
    order: 5;
    margin-top: calc(var(--gap-note) - var(--gap-block));
  }

  .perks {
    order: 6;
  }

  /* Цена по центру над кнопкой во всю ширину экрана */
  .hero__buy .btn {
    width: 100%;
    min-width: 0;
  }

  .price {
    width: 100%;
    justify-content: center;
  }

  /* Способы оплаты — одной строкой сразу под кнопкой, через точку.
     Иконки здесь убраны: с ними строка на 320 px требует шрифт 9–10 px,
     а разделитель между фразами читается и без них. */
  .hero__meta {
    align-items: baseline;
    gap: 4px 6px;
    /* Размер подобран так, чтобы обе фразы с разделителем помещались в строку:
       при 13.5 px им нужно 369 px, а на 320 px колонка шириной 280.
       nowrap здесь не ставить — он растягивает колонку шире оболочки;
       если на каком-то устройстве шрифт шире, строка просто перенесётся. */
    font-size: clamp(10px, 3.15vw, 13.5px);
  }

  /* Отступы вокруг точки фиксированные, шрифт — нет: на 320 px эти 6 px решают,
     встанет строка в один ряд или перенесётся */
  .hero__meta li:not(:last-child)::after {
    margin-left: 2px;
  }

  .hero__meta .pay-marks,
  .hero__meta svg {
    display: none;
  }

  /* Факты: трафик и устройства в одну строку через точку, платформы — строкой ниже */
  .hero__line {
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 9px;
  }

  .hero__line > span:last-child {
    flex-basis: 100%;
  }

  /* Разделитель нужен только между первыми двумя: после второго он повис бы в конце строки */
  .hero__line > span:nth-child(2)::after {
    content: none;
  }

  /* Преимущества: локации и Gemini делят строку, маршрутизация идёт под ними
     во всю ширину — у неё самая длинная подпись */
  .perks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 10px;
  }

  .perk:last-child {
    grid-column: 1 / -1;
  }

  /* Отметка держится в одну строку: дата здесь короткая (см. availability.compactBelow),
     а размер привязан к ширине окна — на 320 px иначе не помещается */
  .status {
    white-space: nowrap;
    font-size: clamp(11px, 3.6vw, 13.5px);
  }

  .places__list {
    font-size: clamp(17px, 5.2vw, 21px);
  }
}

@media (max-width: 359px) {
  /* В двух колонках на 320 px под текст остаётся 86 px, а «для нейросетей» просит 103.
     Уменьшаем значок и подпись — обе колонки встают в одну строку каждая */
  .perk {
    gap: 8px;
  }

  .perk__icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }

  .perk__icon svg {
    width: 17px;
    height: 17px;
  }

  .perk__body em {
    font-size: 12px;
  }
}

@media (max-width: 400px) {
  .phone__word {
    display: none;
  }
}

/*
 * Низкий экран: форма оплаты обязана помещаться целиком.
 *
 * Прокрутка внутри листа стоит дороже, чем кажется: главное действие уезжает за
 * край, человек его не видит и не знает, что оно там есть — лист выглядит
 * законченным и без кнопки. На телефонах нынешнего размера (844 px и выше)
 * форма помещается и так; порог ниже ловит SE-класс, где не хватает примерно
 * девяноста пикселей.
 *
 * Берём их из того, что не нужно для покупки. «Безопасная оплата · Доступ сразу
 * после оплаты · Поможем подключить» — те же слова, что стоят под кнопкой на
 * самой странице, откуда человек и пришёл; на узком экране они занимают две
 * строки и ничего не добавляют к решению, которое уже принято. Остальное
 * набирается уплотнением отступов, а не удалением содержимого: ни одного поля,
 * ни одной цены и ни одного условия платежа здесь не прячется.
 */
@media (max-height: 720px) {
  .sheet__assure {
    display: none;
  }

  .plan {
    margin-top: 14px;
  }

  .field {
    margin-top: 14px;
  }

  .sheet__pay {
    margin-top: 14px;
  }

  .renew {
    margin-top: 8px;
    padding: 11px 12px;
  }
}

/* Невысокое окно: макет телефона не помещается в первый экран.
   Запас считается так: над телефоном ~100 px (шапка и верхний отступ героя),
   под ним оставляем ~24 px воздуха, значит масштаб ≤ (высота окна − 124) / 676.
   Пороги ниже держат это с запасом; 0.72 — нижняя граница, дальше подписи
   в списке локаций становятся нечитаемыми, и телефон лучше подрезать.
   Только на десктопе: ниже 861 px герой раскладывается в столбец, телефон
   уходит под кнопку и в первый экран не метит. */
@media (min-width: 861px) and (max-height: 800px) {
  :root {
    --phone-zoom: 0.88;
  }
}

@media (min-width: 861px) and (max-height: 720px) {
  :root {
    --phone-zoom: 0.79;
  }
}

@media (min-width: 861px) and (max-height: 660px) {
  :root {
    --phone-zoom: 0.72;
  }
}

/* --- Motion --------------------------------------------------------------- */
/* Прячем до появления только там, где скрипт жив и сможет их показать.
   Класс js ставит инлайновый скрипт в <head>. Без этой развязки любая
   осечка в модулях — не загрузился файл, отвалился импорт — гасила
   всю страницу: оставалась одна шапка, потому что она вне анимаций. */
.js .anim {
  opacity: 0;
  transform: translateY(12px);
}

.is-ready .anim {
  animation: rise 0.66s var(--ease) forwards;
  animation-delay: calc(var(--d, 0) * 70ms);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .anim,
  .reveal {
    opacity: 1;
    transform: none;
  }

  .sticky {
    transition: none;
  }
}

/* --- Итог выбора в чекауте ------------------------------------------------ */
.summary {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.72);
}

.summary__name {
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.summary__per {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.summary__price {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.summary__price span {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--ink-3);
  margin-left: 3px;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   БЛОГ
   Отдельная ветка страниц: список статей, категория, сама статья. Живёт на
   тех же токенах, что лендинг, — своих цветов и размеров здесь нет.

   Колонка статьи уже оболочки: 68ch — предел, после которого строка перестаёт
   читаться, и глаз теряет начало следующей. Оболочка .shell шире намеренно,
   она держит шапку и списки.
   ========================================================================== */

.page-head {
  padding: clamp(30px, 5vh, 56px) 0 clamp(20px, 3vh, 32px);
}

.page-head__title {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.06;
  letter-spacing: -0.032em;
  font-weight: 600;
}

.page-head__lead {
  margin-top: 14px;
  max-width: 52ch;
  font-size: clamp(15px, 1.5vw, 17px);
  color: var(--ink-2);
}

/* --- Хлебные крошки ------------------------------------------------------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-3);
}

.crumbs a:hover {
  color: var(--ink-2);
}

.crumbs__sep {
  opacity: 0.5;
}

/* --- Категории списком ---------------------------------------------------- */
.cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: clamp(22px, 3vw, 32px);
}

.cats__item {
  padding: 7px 14px;
  font-size: 14px;
  color: var(--ink-2);
  background: var(--glass);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.cats__item:hover {
  color: var(--ink);
  border-color: var(--line);
}

.cats__item.is-current {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}

/* --- Список статей -------------------------------------------------------- */
.posts {
  list-style: none;
  padding: 0;
  margin-top: clamp(26px, 4vw, 40px);
  display: grid;
  gap: 14px;
}

@media (min-width: 720px) {
  .posts {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

.post-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(18px, 2.4vw, 26px);
  background: var(--glass-strong);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.post-card__cat {
  color: var(--accent);
}

.post-card__title {
  font-size: clamp(17px, 1.9vw, 21px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.post-card__lead {
  font-size: 14.5px;
  color: var(--ink-2);
  margin-top: auto;
}

/* --- Статья --------------------------------------------------------------- */
.article {
  padding: clamp(24px, 4vh, 44px) 0 clamp(48px, 8vh, 88px);
}

.article__wrap {
  width: min(68ch, 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.article__title {
  margin-top: 16px;
  font-size: clamp(27px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.article__meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-3);
}

.article__body {
  margin-top: clamp(26px, 4vw, 38px);
  font-size: 17px;
  line-height: 1.7;
}

.article__body h2 {
  margin-top: clamp(30px, 4vw, 44px);
  font-size: clamp(21px, 2.4vw, 27px);
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 600;
}

.article__body h3 {
  margin-top: 26px;
  font-size: 18px;
  letter-spacing: -0.015em;
  font-weight: 600;
}

.article__body p,
.article__body ul,
.article__body ol {
  margin-top: 14px;
}

.article__body ul,
.article__body ol {
  padding-left: 22px;
}

.article__body > ul > li,
.article__body > ol > li {
  margin-top: 7px;
}

/*
 * Таблицы в статьях. Появились вместе с контент-фабрикой: сравнения платформ
 * и вариантов сборок она размечает таблицей, а оформления для них не было —
 * разметка вываливалась на страницу палками.
 *
 * Сетка видимая, а не намёком: первая версия использовала --line-soft (5,5%
 * непрозрачности), и на светлом фоне таблица читалась как случайные колонки
 * текста. Здесь линии полной силы, шапка с заливкой, чётные строки подсвечены.
 *
 * Обёртка со своей прокруткой обязательна — таблица из трёх колонок занимает
 * 467 px и в 320 px не помещается; без обёртки она растянула бы страницу.
 */
.article__body .table-wrap {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;

  /*
   * Тень у края — единственный намёк, что таблица прокручивается. Без неё
   * на телефоне она просто обрывается, и человек не догадывается потянуть.
   *
   * Приём держится на background-attachment: белые «затычки» прибиты к
   * содержимому (local) и уезжают вместе с ним, а тени прибиты к рамке
   * (scroll) — поэтому тень видно ровно с той стороны, куда ещё можно
   * прокрутить, и она сама пропадает у края.
   */
  background:
    linear-gradient(to right, #fff 40%, rgba(255, 255, 255, 0)) left center,
    linear-gradient(to left, #fff 40%, rgba(255, 255, 255, 0)) right center,
    linear-gradient(to right, rgba(20, 22, 28, 0.14), rgba(20, 22, 28, 0)) left center,
    linear-gradient(to left, rgba(20, 22, 28, 0.14), rgba(20, 22, 28, 0)) right center,
    #fff;
  background-repeat: no-repeat;
  background-size: 36px 100%, 36px 100%, 14px 100%, 14px 100%, auto;
  background-attachment: local, local, scroll, scroll, local;
}

.article__body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
  line-height: 1.45;
}

.article__body thead th {
  padding: 11px 14px;
  text-align: left;
  vertical-align: bottom;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  background: rgba(20, 22, 28, 0.045);
  border-bottom: 1px solid var(--line);
}

.article__body tbody td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--line);
}

.article__body tbody tr:first-child td {
  border-top: 0;
}

/* Вертикальные разделители — на всех колонках, кроме последней. */
.article__body th:not(:last-child),
.article__body td:not(:last-child) {
  border-right: 1px solid var(--line);
}

.article__body tbody tr:nth-child(even) td {
  background: rgba(20, 22, 28, 0.022);
}

/*
 * Переносить внутри ячеек нечего: колонки короткие, а ссылки на файлы длинные
 * и рвать их посреди имени нельзя. Поэтому узкий экран прокручивает таблицу,
 * а не ломает её; последняя колонка со ссылками переносится.
 */
.article__body th,
.article__body td {
  white-space: nowrap;
}

.article__body td:last-child {
  white-space: normal;
  min-width: 15ch;
}

/*
 * Место под изображение. Контент-фабрика оставляет в тексте плейсхолдеры
 * вида ![подпись](/images/blog/...), а самих файлов нет и рисовать их некому.
 * Битая картинка на странице хуже, чем честная рамка с подписью: видно,
 * что здесь задумано, и не выглядит как поломка.
 */
.article__body .article-figure {
  margin-top: 18px;
}

.article__body .article-figure__slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 128px;
  padding: 20px 24px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.45);
  color: var(--ink-3);
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}

.article__body .article-figure figcaption {
  margin-top: 8px;
  font-size: 13px;
  opacity: 0.6;
}

.article__body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(74, 63, 240, 0.35);
}

.article__body a:hover {
  text-decoration-color: currentColor;
}

/* Врезка-призыв. Именно <div>, а не заголовок: заголовочный CTA рвёт иерархию
   H1→H2→H3 и путает робота и читателя со скринридером. */
.cta-box {
  margin-top: clamp(26px, 4vw, 36px);
  padding: clamp(18px, 2.4vw, 24px);
  background: var(--accent-soft);
  border: 1px solid rgba(74, 63, 240, 0.16);
  border-radius: var(--r-lg);
}

.cta-box__title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.cta-box__text {
  margin-top: 6px;
  font-size: 14.5px;
  color: var(--ink-2);
}

.cta-box .btn {
  margin-top: 14px;
}

/* --- FAQ в статье --------------------------------------------------------- */
.faq-list {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.faq-item {
  padding: 16px 18px;
  background: var(--glass);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
}

.faq-item__q {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.faq-item__a {
  margin-top: 6px;
  font-size: 15px;
  color: var(--ink-2);
}

/* --- Пометка «заглушка» --------------------------------------------------- */
.stub-note {
  margin-top: 18px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--ink-2);
  background: rgba(217, 45, 32, 0.06);
  border: 1px dashed rgba(217, 45, 32, 0.35);
  border-radius: var(--r-md);
}

/* Узкий экран: ячейки плотнее, чтобы в видимую часть попадало больше колонок. */
@media (max-width: 560px) {
  .article__body table {
    font-size: 14.5px;
  }

  .article__body thead th,
  .article__body tbody td {
    padding: 9px 11px;
  }

  .article__body td:last-child {
    min-width: 12ch;
  }
}

@media (max-width: 560px) {
  .article__body {
    font-size: 16.5px;
  }
}
