/* ============================================================
   PRO-Решение — дизайн-система маркетплейса
   ============================================================ */

:root {
  --ink: #0b0d1e;
  --ink-2: #12152e;
  --ink-3: #1b2046;
  --paper: #f5f6fb;
  --card: #ffffff;
  --text: #10132b;
  --muted: #5d6180;
  --line: #e5e7f2;
  --brand: #5b5bf7;
  --brand-2: #8b5cf6;
  --brand-dark: #4f46e5;
  --grad: linear-gradient(100deg, #4f46e5 0%, #7c3aed 55%, #c026d3 125%);
  --grad-soft: linear-gradient(100deg, #eef0ff 0%, #f6efff 100%);
  --gold: #f6a821;
  --ok: #10b981;
  --err: #ef4444;
  --r-lg: 20px;
  --r-md: 14px;
  --shadow: 0 1px 2px rgb(11 13 30 / .05), 0 10px 30px -12px rgb(11 13 30 / .14);
  --shadow-hover: 0 2px 4px rgb(11 13 30 / .06), 0 24px 48px -16px rgb(79 70 229 / .30);
  --font-display: "Unbounded", "Manrope", system-ui, sans-serif;
  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
/* overflow-wrap — страховка от длинного слова: на 280px
   «возвращением» в заголовке входа вылезало за край и давало
   горизонтальную прокрутку всей странице. Срабатывает только
   когда слово действительно не помещается. */
h1, h2, h3, h4 { margin: 0; line-height: 1.15; overflow-wrap: break-word; }
p { margin: 0; }
::selection { background: rgb(91 91 247 / .22); }

* { scrollbar-width: thin; scrollbar-color: rgb(11 13 30 / .25) transparent; }

.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 20px; }

main { min-height: 60vh; }

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

.h-display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.01em;
}

.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }

/* flex-wrap обязателен: без него кнопка «Все шаблоны» не уходит под
   заголовок и вылезает за правый край на телефонах */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head > div { min-width: 0; flex: 1 1 340px; }
.section-head h2 { font-family: var(--font-display); font-size: clamp(24px, 3.4vw, 36px); font-weight: 600; }
.section-head p { color: var(--muted); margin-top: 10px; max-width: 560px; }
.section-head .btn { flex-shrink: 0; }
@media (max-width: 620px) {
  .section-head { gap: 18px; }
  .section-head .btn { width: 100%; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand-dark);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--grad); border-radius: 2px; }

.text-gradient {
  background: linear-gradient(100deg, #818cf8 0%, #c4b5fd 50%, #f0abfc 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border-radius: 999px;
  font-weight: 700; font-size: 15px; line-height: 1;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  white-space: nowrap; user-select: none;
}
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.btn:active { transform: translateY(1px) scale(.99); }

.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px -8px rgb(124 58 237 / .55); }
.btn--primary:hover { box-shadow: 0 12px 32px -8px rgb(124 58 237 / .70); transform: translateY(-1px); }

.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--ink-3); transform: translateY(-1px); }

.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { transform: translateY(-1px); box-shadow: 0 10px 28px -10px rgb(255 255 255 / .45); }

.btn--ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn--ghost.is-done { border-color: rgb(16 185 129 / .4); color: #0a8f6c; background: rgb(16 185 129 / .06); }

.btn--outline-light { background: transparent; color: #fff; border: 1.5px solid rgb(255 255 255 / .3); }
.btn--outline-light:hover { border-color: #fff; background: rgb(255 255 255 / .08); }

.btn--sm { padding: 10px 18px; font-size: 13.5px; }
.btn--lg { padding: 17px 34px; font-size: 16px; }
/* Кнопка во всю ширину — единственная, которой можно переносить
   подпись: «Сообщить, когда откроем продажи» в одну строку не влезает
   и на телефоне растягивала всю колонку за край экрана */
.btn--block { width: 100%; white-space: normal; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ---------- Бейджи ---------- */

.badge {
  display: inline-flex; align-items: center;
  padding: 5px 11px; border-radius: 999px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .03em;
  color: #fff;
}
.badge--hit { background: var(--grad); }
.badge--new { background: #0ea5e9; }
.badge--sale { background: var(--ink); }
.badge--free { background: var(--ok); }
.badge--ui { background: linear-gradient(100deg, #0891b2, #2563eb); }

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

.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 700; color: var(--text); }
.field .hint { font-size: 12.5px; color: var(--muted); }

.input, select.input, textarea.input {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: #fff; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgb(91 91 247 / .12); }
.input::placeholder { color: #9ba0bd; }

.form-error {
  display: none; padding: 12px 16px; border-radius: var(--r-md);
  background: rgb(239 68 68 / .08); border: 1px solid rgb(239 68 68 / .25);
  color: #b91c1c; font-size: 14px; font-weight: 600;
}
.form-error.is-visible { display: block; }

/* ---------- Хедер ---------- */

.site-header {
  position: sticky; top: 0; z-index: 90;
  background: rgb(11 13 30 / .85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgb(255 255 255 / .07);
}
.site-header__in { display: flex; align-items: center; gap: 28px; height: 68px; }

.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo__mark { width: 34px; height: 34px; border-radius: 10px; object-fit: contain; flex-shrink: 0; }
/* Свой логотип с надписью (PRO_DATA.brand.logoWide): высоту держим,
   ширину отдаём картинке — подойдёт любая пропорция */
.logo__wide { height: 30px; width: auto; max-width: 210px; object-fit: contain; flex-shrink: 0; }
.logo__text { font-family: var(--font-display); font-size: 16.5px; font-weight: 600; color: #fff; letter-spacing: .01em; }
.logo__text i { font-style: normal; color: #8b8df9; }
.site-footer .logo__text { color: #fff; }

.site-nav { display: flex; gap: 4px; margin-inline: auto; }
.site-nav a {
  padding: 9px 15px; border-radius: 999px;
  color: rgb(255 255 255 / .72); font-weight: 600; font-size: 14.5px;
  transition: color .15s ease, background .15s ease;
}
.site-nav a:hover { color: #fff; background: rgb(255 255 255 / .08); }
.site-nav a.is-active { color: #fff; background: rgb(255 255 255 / .12); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px;
  color: rgb(255 255 255 / .8);
  transition: background .15s ease, color .15s ease;
}
.icon-btn:hover { background: rgb(255 255 255 / .1); color: #fff; }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn__count {
  position: absolute; top: 3px; right: 2px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--grad);
  color: #fff; font-size: 10.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

.user-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 5px 14px 5px 5px; border-radius: 999px;
  background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .12);
  color: #fff; font-weight: 700; font-size: 14px;
  transition: background .15s ease;
}
.user-chip:hover { background: rgb(255 255 255 / .14); }
.user-chip__avatar {
  width: 30px; height: 30px; border-radius: 999px;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13.5px; font-weight: 800;
  flex-shrink: 0;
}
/* Имя человек вводит сам: «Александра» или «Константин» шире, чем
   кажется, и на телефоне такая плашка выдавливает шапку за экран.
   Поэтому ширина ограничена, а остаток обрезается многоточием. */
.user-chip__name {
  max-width: 110px; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.burger { display: none; width: 42px; height: 42px; border-radius: 12px; color: #fff; }
.burger svg { width: 24px; height: 24px; margin: auto; }
.burger:hover { background: rgb(255 255 255 / .1); }

/* Шапка на узких телефонах: полный набор иконок не помещается
   рядом с логотипом, поэтому ужимаем всё */
@media (max-width: 400px) {
  .site-header__in { gap: 10px; height: 62px; }
  .logo__mark { width: 30px; height: 30px; }
  .logo__text { font-size: 15px; }
  .header-actions { gap: 4px; }
  .icon-btn, .burger { width: 36px; height: 36px; border-radius: 10px; }
  .icon-btn svg, .burger svg { width: 19px; height: 19px; }
  .user-chip { padding: 5px 10px 5px 5px; font-size: 13px; }
  .user-chip__avatar { width: 26px; height: 26px; font-size: 12px; }
}
/* Шапка вошедшего человека шире гостевой: у гостя кнопка «Войти»
   на телефоне скрыта совсем, а плашку аккаунта убрать нельзя —
   это единственный вход в кабинет. Поэтому ужимаем её саму.

   Порог 940px, а не 860px (где меню сворачивается в бургер): в полосе
   861–940 меню уже стоит в строку, и вместе с именем оно вылезало за
   край. Ниже 940 от плашки остаётся кружок с буквой — этого хватает,
   чтобы попасть в кабинет. */
@media (max-width: 940px) {
  .user-chip__name { display: none; }
  .user-chip { padding: 4px; }
}
/* На узком телефоне даже кружка хватает, чтобы вытолкнуть бургер за
   край. Убираем «Избранное»: у вошедшего оно всё равно лежит в
   кабинете, куда ведёт соседний кружок. У гостя иконка остаётся —
   ему нужнее, и места без плашки хватает. */
@media (max-width: 480px) {
  .header-actions--user .fav-link { display: none; }
}
@media (max-width: 340px) {
  .logo__text { font-size: 14px; }
}
/* Ниже 310px даже ужатая шапка выталкивала бургер за край экрана
   (проверено: 305px содержимого на 280px окна). Оставляем один знак —
   он и так ведёт на главную, а подпись рядом с ним дублирует
   название, которое человек только что видел. */
@media (max-width: 310px) {
  .logo__text { display: none; }
}

/* ---------- Футер ---------- */

/* padding, а не margin у внутреннего блока: соседние margin схлопываются,
   и полоса со скидкой прилипала к верхней границе футера */
.site-footer { background: var(--ink); color: rgb(255 255 255 / .75); margin-top: 90px; padding-top: 52px; }
.site-footer__grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px;
  padding: 52px 20px 44px;
}
.site-footer__brand p { margin-top: 18px; font-size: 14.5px; line-height: 1.65; max-width: 340px; }
.site-footer__social { display: flex; gap: 10px; margin-top: 22px; }
.site-footer__social a {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 11px;
  background: rgb(255 255 255 / .08); color: #fff;
  transition: background .15s ease, transform .15s ease;
}
.site-footer__social a:hover { background: var(--brand); transform: translateY(-2px); }
.site-footer__social svg { width: 18px; height: 18px; }

.site-footer__col { display: flex; flex-direction: column; gap: 11px; font-size: 14.5px; }
.site-footer__col b { color: #fff; font-size: 15px; margin-bottom: 7px; font-weight: 800; }
/* :not([class]) — рядом лежит .site-footer__more, тоже ссылка. Правило
   по голому тегу (0,1,1) перебивало его собственное (0,1,0), и раньше
   это лечилось !important. Исключение честнее: оно убирает причину,
   а не забивает следствие. */
.site-footer__col a:not([class]) { color: rgb(255 255 255 / .65); transition: color .15s ease; }
.site-footer__col a:not([class]):hover { color: #fff; }
.site-footer__more { font-weight: 700; color: #a5b4fc; transition: color .15s ease; }
.site-footer__more:hover { color: #c7d2fe; }
.site-footer__note { font-size: 13px; color: rgb(255 255 255 / .45); }

.site-footer__bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-top: 22px; padding-bottom: 26px;
  border-top: 1px solid rgb(255 255 255 / .09);
  font-size: 13px; color: rgb(255 255 255 / .45);
}
.site-footer__legal { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer__legal a { color: rgb(255 255 255 / .45); }
.site-footer__legal a:hover { color: #fff; }

/* Полоса со скидкой над колонками */
.site-footer__cta {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 22px 26px; margin: 0 0 6px; border-radius: 18px;
  background: linear-gradient(120deg, rgb(34 158 217 / .22), rgb(34 158 217 / .06));
  border: 1px solid rgb(34 158 217 / .35);
}
.site-footer__cta .ic {
  width: 44px; height: 44px; border-radius: 13px; background: #229ED9; color: #fff;
  display: grid; place-items: center; flex-shrink: 0;
}
.site-footer__cta .ic svg { width: 22px; height: 22px; }
.site-footer__cta b { display: block; color: #fff; font-size: 16px; }
.site-footer__cta span { display: block; font-size: 13.5px; color: rgb(255 255 255 / .7); }
.site-footer__cta .btn { margin-left: auto; flex-shrink: 0; }

@media (max-width: 760px) {
  .site-footer__cta { padding: 18px; }
  .site-footer__cta .btn { margin-left: 0; width: 100%; }
}

/* ---------- Живые превью ---------- */

.live-thumb {
  position: relative; display: block; overflow: hidden;
  background: #eceef6;
}
.live-thumb::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, #e8eaf5 25%, #f3f4fb 45%, #e8eaf5 65%);
  background-size: 200% 100%;
  animation: thumb-shimmer 1.4s linear infinite;
}
@keyframes thumb-shimmer { to { background-position: -200% 0; } }
.live-thumb iframe {
  position: absolute; top: 0; left: 0; border: 0;
  transform-origin: 0 0; pointer-events: none;
  background: #fff;
}

/* ---------- Карточка шаблона ---------- */

.t-card {
  display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--r-lg);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease;
}
.t-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

.t-card__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.t-card__media .live-thumb { position: absolute; inset: 0; }

.t-card__badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; z-index: 3; }

.t-card__hover {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  background: rgb(11 13 30 / .38); opacity: 0;
  transition: opacity .2s ease;
}
.t-card__hover span {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px;
  background: #fff; color: var(--ink); font-weight: 700; font-size: 14px;
  transform: translateY(6px); transition: transform .2s ease;
}
.t-card__hover svg { width: 17px; height: 17px; }
.t-card:hover .t-card__hover { opacity: 1; }
.t-card:hover .t-card__hover span { transform: translateY(0); }

.t-card__body { display: flex; flex-direction: column; gap: 7px; padding: 18px 20px 20px; }
.t-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.t-card__title { font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--ink); }
.t-card__title:hover { color: var(--brand-dark); }
.t-card__niche { font-size: 13.5px; color: var(--muted); }

.fav-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  color: #aab; transition: color .15s ease, background .15s ease, transform .15s ease;
}
.fav-btn svg { width: 19px; height: 19px; }
.fav-btn:hover { background: rgb(239 68 68 / .08); color: var(--err); transform: scale(1.08); }
.fav-btn.is-active { color: var(--err); }

.t-card__meta { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); font-weight: 600; }
.t-card__meta i { color: var(--line); font-style: normal; }

.stars { display: inline-flex; gap: 1.5px; }
.stars i { color: #dadcef; }
.stars i.is-on { color: var(--gold); }
.stars svg { width: 14px; height: 14px; }

.t-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 9px; }
.price { display: flex; flex-direction: column; line-height: 1.2; }
.price s { font-size: 12.5px; color: #a0a4c0; font-weight: 600; }
.price b { font-size: 18px; font-weight: 800; color: var(--ink); }

.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
/* Две колонки — для сеток внутри узких колонок (избранное в кабинете).
   Объявлено СРАЗУ после базового правила, до медиазапросов: иначе
   модификатор перебил бы и мобильное схлопывание в одну колонку.
   Раньше это делалось встроенным стилем — и на телефоне карточки
   оставались в две колонки шириной по 140px. Встроенный стиль
   перебивает вообще всё, никакой медиазапрос его не достанет. */
.cards-grid--half { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Одна колонка ВСЕГДА — «похожие шаблоны» в узкой боковой колонке.
   Здесь класс удвоен намеренно: (0,2,0) перебивает медиазапросы по
   .cards-grid (0,1,0) независимо от порядка в файле. У --half всё
   наоборот: он обязан проигрывать мобильному правилу, поэтому
   объявлен обычным классом и стоит выше медиазапросов. */
.cards-grid.cards-grid--one { grid-template-columns: minmax(0, 1fr); }

/* ---------- Появление при скролле ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__shot, .marquee__track { animation: none; }
}

/* ---------- Hero (главная) ---------- */

.hero {
  position: relative; overflow: hidden;
  background: var(--ink); color: #fff;
  padding: 92px 0 110px;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgb(255 255 255 / .04) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(255 255 255 / .04) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, #000 35%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, #000 35%, transparent 75%);
}
.hero__orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; pointer-events: none; }
.hero__orb--1 { width: 480px; height: 480px; background: #4f46e5; top: -180px; left: -120px; }
.hero__orb--2 { width: 420px; height: 420px; background: #a21caf; bottom: -200px; right: 6%; opacity: .35; }

.hero__in { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; }

.hero__badge {
  display: inline-flex; align-items: flex-start; gap: 9px;
  padding: 8px 17px 8px 15px; border-radius: 999px;
  background: rgb(255 255 255 / .06); border: 1px solid rgb(255 255 255 / .16);
  font-size: 13px; font-weight: 700; color: rgb(255 255 255 / .92);
  line-height: 1.45; white-space: nowrap;
}
/* Точка и текст — два флекс-элемента, и текст обязан быть ОДНИМ.
   Раньше внутри лежали голые текстовые узлы вперемешку со span'ами
   счётчика: каждый становился самостоятельным элементом, и на узком
   экране вторая строка уезжала под точку вместо выравнивания по
   тексту. Отступ сверху ставит точку по центру первой строки —
   align-items:center сместил бы её к середине двух строк. */
.hero__badge__t { min-width: 0; }
/* Плашка всегда в одну строку (white-space: nowrap), поэтому текста
   два: полный и короткий. Порог 560px взят с запасом — формально
   полный вариант (383px) влезает уже с 415px, но там остаётся восемь
   пикселей, и любой чуть более широкий запасной шрифт вытолкнул бы
   строку за край экрана. На 561px запаса уже 146px.
   Оба текста лежат в разметке: подменять его средствами CSS нельзя —
   не попадёт ни в поиск, ни в озвучку. Счётчик один на оба варианта,
   поэтому id остаются уникальными. */
.hero__badge__slim { display: none; }
@media (max-width: 560px) {
  .hero__badge { padding: 7px 15px 7px 13px; }
  .hero__badge__full { display: none; }
  .hero__badge__slim { display: inline; }
}
.hero__badge i {
  width: 7px; height: 7px; border-radius: 999px; background: #34d399;
  font-style: normal; flex-shrink: 0; margin-top: 6px;
  box-shadow: 0 0 10px #34d399, 0 0 0 3px rgb(52 211 153 / .15);
}

.hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(30px, 4.6vw, 52px); letter-spacing: -.01em;
  margin: 22px 0 18px;
}
.hero__sub { font-size: 17.5px; line-height: 1.65; color: rgb(255 255 255 / .72); max-width: 520px; }

.hero__cta { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

.hero__stats { display: flex; gap: 44px; margin-top: 46px; }
/* tabular-nums: у цифр одинаковая ширина, поэтому при пересчёте число
   не «дышит» и не дёргает соседей */
.hero__stat b { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hero__stat span { font-size: 13.5px; color: rgb(255 255 255 / .6); }

/* Коллаж из живых превью */
.hero__collage { position: relative; height: 480px; }
.hero__shot {
  position: absolute; border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 60px -18px rgb(0 0 0 / .55), 0 0 0 1px rgb(255 255 255 / .09);
  transition: transform .35s ease;
}
.hero__shot .live-thumb { position: absolute; inset: 0; }
.hero__shot--1 { width: 62%; aspect-ratio: 4/3; top: 4%; left: 0; z-index: 2; animation: float 8s ease-in-out infinite; }
.hero__shot--2 { width: 54%; aspect-ratio: 4/3; top: 34%; right: 0; z-index: 3; animation: float 9s ease-in-out 1.2s infinite; }
.hero__shot--3 { width: 44%; aspect-ratio: 4/3; bottom: 0; left: 8%; z-index: 1; opacity: .85; animation: float 10s ease-in-out .6s infinite; }
.hero__shot:hover { transform: scale(1.03); z-index: 5; }

@keyframes float { 0%,100% { translate: 0 0; } 50% { translate: 0 -12px; } }

/* Бегущая строка */
.marquee {
  position: relative; overflow: hidden;
  background: var(--grad); color: #fff;
  padding: 13px 0;
}
.marquee__track { display: flex; gap: 0; width: max-content; animation: marquee 28s linear infinite; }
.marquee span { display: inline-flex; align-items: center; gap: 26px; padding-right: 26px; font-size: 13.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.marquee i { font-style: normal; opacity: .6; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Категории ---------- */

.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.cat-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 22px; border-radius: var(--r-md);
  background: var(--card); box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative; overflow: hidden;
}
.cat-card::after {
  content: "→"; position: absolute; right: 18px; bottom: 14px;
  font-size: 18px; color: var(--brand); opacity: 0;
  transition: opacity .2s ease, transform .2s ease; transform: translateX(-6px);
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.cat-card:hover::after { opacity: 1; transform: none; }
.cat-card b { font-size: 15.5px; font-weight: 800; }
.cat-card span { font-size: 13px; color: var(--muted); }
.cat-card .cat-card__count {
  display: inline-flex; align-self: flex-start;
  padding: 3px 10px; margin-bottom: 6px;
  background: var(--grad-soft); color: var(--brand-dark);
  border-radius: 999px; font-size: 12px; font-weight: 800;
}

/* ---------- Как это работает ---------- */

.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; counter-reset: step; }
.how-card {
  position: relative; padding: 30px 28px;
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.how-card::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-display); font-size: 44px; font-weight: 700;
  background: linear-gradient(120deg, #c7cafd, #e3d5ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  display: block; margin-bottom: 14px;
}
.how-card h3 { font-size: 18px; font-weight: 800; margin-bottom: 9px; }
.how-card p { font-size: 14.5px; color: var(--muted); }

/* ---------- Преимущества ---------- */

.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.feat-card { padding: 28px; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.feat-card__icon {
  display: flex; align-items: center; justify-content: center;
  width: 50px; height: 50px; border-radius: 14px;
  background: var(--grad-soft); color: var(--brand-dark);
  margin-bottom: 18px;
}
.feat-card__icon svg { width: 24px; height: 24px; }
.feat-card h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.feat-card p { font-size: 14.5px; color: var(--muted); }

/* ---------- Отзывы ---------- */

.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.review-card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.review-card p { font-size: 14.5px; line-height: 1.65; color: var(--text); flex: 1; }
.review-card footer { display: flex; align-items: center; gap: 12px; }
.review-card footer .user-chip__avatar { width: 42px; height: 42px; font-size: 16px; }
.review-card footer b { display: block; font-size: 14.5px; }
.review-card footer span { font-size: 13px; color: var(--muted); }

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

.faq-list { max-width: 800px; margin-inline: auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow); overflow: hidden; }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 19px 24px; cursor: pointer; list-style: none;
  font-weight: 800; font-size: 15.5px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 22px; font-weight: 400; color: var(--brand);
  transition: transform .2s ease; line-height: 1; flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-item__body { padding: 0 24px 20px; color: var(--muted); font-size: 14.5px; line-height: 1.65; }

/* ---------- CTA-полоса ---------- */

.cta {
  position: relative; overflow: hidden;
  background: var(--ink); color: #fff;
  border-radius: 26px; padding: 64px 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
}
.cta::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 85% 20%, rgb(124 58 237 / .5), transparent 70%),
              radial-gradient(500px 280px at 10% 100%, rgb(79 70 229 / .4), transparent 70%);
}
.cta > * { position: relative; }
.cta h2 { font-family: var(--font-display); font-size: clamp(22px, 3vw, 32px); font-weight: 600; margin-bottom: 12px; }
.cta p { color: rgb(255 255 255 / .7); max-width: 540px; }

/* ---------- Хлебные крошки ---------- */

.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--muted); padding: 26px 0 0; }
.breadcrumbs a:hover { color: var(--brand-dark); }
.breadcrumbs i { font-style: normal; color: #c3c6dd; }

/* ---------- Каталог ---------- */

.catalog-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 36px; align-items: start; padding-top: 36px; }

.filters { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 26px; }
.filters__group { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 22px; }
.filters__group > b { display: block; font-size: 14px; font-weight: 800; margin-bottom: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-size: 12px; }

.search-box { position: relative; }
.search-box svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: #9ba0bd; }
.search-box .input { padding-left: 42px; }

.filter-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 9px 13px; border-radius: 10px;
  font-size: 14.5px; font-weight: 600; color: var(--text);
  transition: background .14s ease, color .14s ease;
  text-align: left;
}
.filter-link:hover { background: var(--paper); }
.filter-link.is-active { background: var(--grad-soft); color: var(--brand-dark); font-weight: 800; }
.filter-link span { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.filter-link.is-active span { color: var(--brand-dark); }

.catalog-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.catalog-top__found { font-size: 14.5px; color: var(--muted); font-weight: 600; }
.catalog-top__found b { color: var(--text); }
.catalog-sort { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.catalog-sort select { padding: 10px 14px; border-radius: 11px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; outline: none; cursor: pointer; }
.catalog-sort select:focus { border-color: var(--brand); }
/* Ниже 340px «Найдено: 59 решений» и выпадающий список рядом не
   помещаются: flex-wrap их уже переносит, но сам список шире
   оставшейся строки. Отдаём каждому свою строку целиком. */
@media (max-width: 340px) {
  .catalog-top { gap: 12px; }
  .catalog-sort { width: 100%; }
  .catalog-sort select { flex: 1; min-width: 0; }
}

.filters-toggle { display: none; }

/* Вкладки типа товара: сайты / компоненты */
.kind-tabs { display: inline-flex; gap: 4px; background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 4px; }
.kind-tabs button {
  padding: 10px 22px; border-radius: 999px;
  font-weight: 800; font-size: 14px; color: var(--muted);
  transition: background .18s ease, color .18s ease;
}
.kind-tabs button:hover { color: var(--text); }
.kind-tabs button.is-active { background: var(--ink); color: #fff; }
.kind-tabs button span { font-size: 11.5px; opacity: .6; margin-left: 5px; }
/* Подписи: на широком экране полная, на узком короткая.
   Класс, а не голый тег: рядом лежит span со счётчиком, и правило
   по тегу накрыло бы и его. */
.kind-tabs__full { font-style: normal; }
.kind-tabs__short { display: none; font-style: normal; }
@media (max-width: 640px) {
  .kind-tabs { width: 100%; }
  /* nowrap обязателен: без него длинная подпись рвётся на две строки
     и кнопки становятся разной высоты */
  .kind-tabs button { flex: 1; padding: 10px 6px; font-size: 13px; white-space: nowrap; }
  .kind-tabs__full { display: none; }
  .kind-tabs__short { display: inline; }
}

.empty-state { text-align: center; padding: 70px 20px; }
.empty-state__icon { display: flex; align-items: center; justify-content: center; width: 74px; height: 74px; margin: 0 auto 20px; border-radius: 22px; background: var(--grad-soft); color: var(--brand-dark); }
.empty-state__icon svg { width: 34px; height: 34px; }
.empty-state h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.empty-state p { color: var(--muted); margin-bottom: 22px; }

/* ---------- Страница шаблона ---------- */

.tpl-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 40px; align-items: start; padding-top: 28px; }

.tpl-preview { position: relative; }
.tpl-preview .browser-chrome { box-shadow: var(--shadow); }
.tpl-preview .live-thumb { aspect-ratio: 16 / 11; }

/* Обложка остаётся горизонтальной и на телефоне. Вертикальный вариант
   (рендер в телефонной ширине) пробовали — текст читался, но рамка
   занимала 510px из 812, то есть больше половины экрана: человек
   долистывал до цены только со второго движения. Здесь обложка, а не
   читальный зал — прочитать шаблон целиком зовёт кнопка «Открыть живое
   демо» поверх неё. */
.tpl-preview__open {
  position: absolute; right: 18px; bottom: 18px; z-index: 4;
}

.browser-chrome { border-radius: 16px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; background: #eef0f6; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 9px; height: 9px; border-radius: 999px; font-style: normal; }
.browser-bar i:nth-child(1) { background: #fca5a5; }
.browser-bar i:nth-child(2) { background: #fcd34d; }
.browser-bar i:nth-child(3) { background: #86efac; }
.browser-bar span {
  margin-left: 12px; flex: 1; max-width: 420px;
  padding: 4px 12px; border-radius: 7px;
  background: #fff; font-size: 11.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.buy-box { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 0; min-width: 0; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 28px; }
/* Названия вроде «Прелоадеры» — одно длинное слово: на узком экране оно
   не переносится и распирает карточку. Уменьшаем кегль, а break-word
   оставляем страховкой на случай ещё более длинного названия. */
.buy-box h1 { font-family: var(--font-display); font-size: clamp(21px, 5.6vw, 26px); font-weight: 600; overflow-wrap: break-word; }
.buy-box__niche { color: var(--muted); font-size: 14.5px; margin-top: 6px; }
.buy-box__rating { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 14px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
/* Оценка и скачивания — два неразрывных блока (ratingLine в template.js):
   не хватает ширины — второй целиком уходит на новую строку, а не рвёт
   фразу посередине, как было на телефоне. */
.buy-box__score, .buy-box__dl { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.buy-box__score-v { color: var(--text); font-weight: 800; }
.buy-box__dl svg { width: 15px; height: 15px; flex-shrink: 0; }
.buy-box__price { display: flex; align-items: baseline; gap: 12px; margin: 20px 0 6px; }
.buy-box__price b { font-family: var(--font-display); font-size: 32px; font-weight: 700; }
.buy-box__price s { color: #a0a4c0; font-size: 16px; }
.buy-box__price .badge { translate: 0 -4px; }
.buy-box__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.buy-box__actions-row { display: grid; grid-template-columns: minmax(0, 1fr) 52px; gap: 10px; }
.buy-box__actions-row .fav-btn { width: 100%; height: 100%; border: 1.5px solid var(--line); border-radius: 999px; }
/* «Живое демо» делит строку с «в избранное», поэтому ей достаётся
   около половины ширины, и на узком телефоне подпись ломалась на две
   строки. Правило проекта разрешает перенос только кнопке во всю
   ширину — эта таковой не является, хотя и носит класс btn--block.
   Ужимаем поля и запрещаем перенос: подписи хватает места вплоть
   до 280px. */
@media (max-width: 430px) {
  .buy-box__actions-row { grid-template-columns: minmax(0, 1fr) 46px; gap: 8px; }
  .buy-box__actions-row .btn { padding-left: 14px; padding-right: 14px; white-space: nowrap; }
}
.buy-box__compare { margin-top: 10px; }
.compare-action { color: var(--muted); }
.compare-action.is-active { color: var(--brand-dark); border-color: rgb(91 91 247 / .4); background: var(--grad-soft); }
.buy-box__includes { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.buy-box__includes b { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 800; }
.buy-box__includes div { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.buy-box__includes svg { width: 16px; height: 16px; color: var(--ok); flex-shrink: 0; }
.buy-box__palette { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 13px; color: var(--muted); }
.buy-box__palette i { width: 22px; height: 22px; border-radius: 7px; border: 1px solid rgb(0 0 0 / .08); }

.tpl-info { margin-top: 64px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 40px; align-items: start; }
.tpl-info__main { display: flex; flex-direction: column; gap: 40px; }
.tpl-block h2 { font-family: var(--font-display); font-size: 22px; font-weight: 600; margin-bottom: 18px; }
/* Только собственные абзацы блока: иначе правило красит «нишу»
   в карточках похожих шаблонов и подписи внутри вложенных блоков.
   :not([class]) обязателен: правило по голому тегу (0,1,1) перебивало
   собственное правило .digital-pack__note (0,1,0), и тому
   приходилось защищаться тремя !important */
.tpl-block > p:not([class]) { color: var(--text); line-height: 1.7; margin-bottom: 12px; }

/* Жёсткие две колонки требовали ширины сразу двух самых длинных пунктов:
   у «Кадра» это растягивало страницу на телефоне. auto-fit сам схлопывает
   список в одну колонку, min(200px,100%) — чтобы колонка не оказалась
   шире контейнера на совсем узких экранах. */
.feature-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 12px 24px; }
.feature-list div { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; font-weight: 600; }
.feature-list svg { width: 18px; height: 18px; color: var(--ok); flex-shrink: 0; margin-top: 1px; }

.section-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.section-chips span { padding: 8px 15px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); font-size: 13.5px; font-weight: 700; }

.digital-pack { display: grid; gap: 10px; }
.digital-pack > div {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); font-size: 14px; font-weight: 700;
}
.digital-pack svg { width: 18px; height: 18px; color: var(--brand-dark); flex-shrink: 0; }
.digital-pack__note {
  margin-top: 14px; padding: 14px 16px; border-radius: 12px;
  background: var(--grad-soft); color: var(--muted); font-size: 13.5px;
}
.digital-pack__note code { color: var(--brand-dark); font-weight: 800; }

/* ---------- Отзывы на странице шаблона ---------- */

.tpl-reviews__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; margin-bottom: 20px;
}
.tpl-reviews__intro { min-width: 0; flex: 1 1 320px; }
.tpl-reviews__head h2 { margin-bottom: 7px; }
.tpl-reviews__head p { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin-bottom: 0; max-width: 440px; }

/* Средняя оценка вынесена в шапку блока: видно до того, как начнёшь читать */
.tpl-reviews__score {
  display: flex; align-items: center; gap: 11px; flex-shrink: 0;
  padding: 11px 17px; border-radius: 15px;
  background: var(--grad-soft); border: 1px solid var(--line);
}
.tpl-reviews__score b {
  font-family: var(--font-display); font-size: 25px; font-weight: 600; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tpl-reviews__score span { font-size: 12.5px; color: var(--muted); white-space: nowrap; }

.tpl-reviews__list { display: grid; gap: 14px; }

.tpl-review {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 22px 24px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
/* Фирменная полоса слева: карточка с единственным отзывом перестаёт
   выглядеть пустым прямоугольником, а на длинном отзыве ведёт глаз */
.tpl-review::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--grad); opacity: .5; transition: opacity .2s;
}
.tpl-review:hover { border-color: rgb(91 91 247 / .45); box-shadow: var(--shadow); transform: translateY(-2px); }
.tpl-review:hover::before { opacity: 1; }

.tpl-review__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 13px; }
.tpl-review__ok {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px; background: rgb(16 185 129 / .11);
  font-size: 11.5px; font-weight: 800; color: var(--ok);
}
.tpl-review__ok svg { width: 12px; height: 12px; }
.tpl-review__date { margin-left: auto; font-size: 12.5px; color: var(--muted); white-space: nowrap; }

.tpl-review p { position: relative; z-index: 1; font-size: 15px; line-height: 1.7; color: var(--text); margin-bottom: 0; }
.tpl-review footer {
  display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
}
.tpl-review footer b { font-size: 14.5px; }
.tpl-review footer span { font-size: 13px; color: var(--muted); }

/* Приглашение оценить видит только тот, кто купил, — форма живёт в кабинете */
.tpl-reviews__cta {
  display: block; margin-top: 14px; padding: 17px 20px; border-radius: 16px;
  border: 1px dashed rgb(91 91 247 / .38); background: var(--paper);
  transition: border-color .2s, background .2s;
}
.tpl-reviews__cta:hover { border-color: var(--brand); background: var(--grad-soft); }
.tpl-reviews__cta b { display: block; font-size: 14.5px; margin-bottom: 3px; }
.tpl-reviews__cta span { font-size: 13px; color: var(--muted); }

.tpl-reviews__empty {
  padding: 22px 24px; border: 1px dashed var(--line); border-radius: 18px;
  font-size: 14px; color: var(--muted); margin-bottom: 0;
}

@media (max-width: 560px) {
  .tpl-review { padding: 19px 18px; }
  .tpl-review__date { margin-left: 0; }
  .tpl-reviews__score { width: 100%; }
}

/* ---------- Превью-страница ---------- */

body.preview-page { background: #181b2e; }
.preview-bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 0 20px; height: 62px;
  background: var(--ink); color: #fff;
  border-bottom: 1px solid rgb(255 255 255 / .08);
}
.preview-bar__back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: rgb(255 255 255 / .75); }
.preview-bar__back:hover { color: #fff; }
.preview-bar__back svg { width: 18px; height: 18px; transform: rotate(180deg); }
.preview-bar__title { font-weight: 800; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-bar__title span { color: rgb(255 255 255 / .55); font-weight: 600; font-size: 13px; margin-left: 8px; }

/* Панель не переносится, поэтому сжимать можно только название:
   ссылка «К шаблону» и кнопка покупки должны остаться целыми */
.preview-bar__back, #previewBuy { flex-shrink: 0; }

/* На планшете полные подписи переключателя уже не помещаются рядом
   с названием и кнопкой — оставляем иконки */
@media (max-width: 1080px) {
  .device-switch button { padding: 8px 12px; }
  .device-switch button span { display: none; }
}
@media (max-width: 560px) {
  .preview-bar { gap: 12px; padding: 0 14px; }
  .preview-bar__title { display: none; }
}

.device-switch { display: flex; gap: 4px; margin-inline: auto; background: rgb(255 255 255 / .08); padding: 4px; border-radius: 11px; }
.device-switch button {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 700; color: rgb(255 255 255 / .65);
  transition: background .15s ease, color .15s ease;
}
.device-switch button:hover { color: #fff; }
.device-switch button.is-active { background: #fff; color: var(--ink); }
.device-switch svg { width: 15px; height: 15px; }

.preview-stage { height: calc(100vh - 62px); padding: 24px; display: flex; justify-content: center; }
.preview-stage iframe {
  width: 100%; max-width: 100%; height: 100%; border: 0; border-radius: 12px;
  background: #fff; box-shadow: 0 24px 70px -20px rgb(0 0 0 / .6);
  transition: max-width .3s ease;
}
.preview-stage.is-tablet iframe { max-width: 768px; }
.preview-stage.is-mobile iframe { max-width: 390px; }

/* ---------- Корзина ---------- */

.page-title { font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 36px); font-weight: 600; padding: 44px 0 10px; }
.page-sub { color: var(--muted); margin-bottom: 36px; }

/* minmax(0, …) обязателен: без него колонка не может стать уже
   содержимого — длинная подпись на кнопке или название товара
   раздвигали страницу за край экрана */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 36px; align-items: start; }

.cart-item {
  /* minmax(0, 1fr) вместо 1fr: иначе колонка не может стать уже
     самого длинного слова в названии и растягивает карточку
     за край экрана на телефоне */
  display: grid; grid-template-columns: 150px minmax(0, 1fr) auto auto; gap: 20px; align-items: center;
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 14px;
}
.cart-item__thumb { border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; position: relative; }
.cart-item__thumb .live-thumb { position: absolute; inset: 0; }
.cart-item__info { min-width: 0; }
.cart-item__info b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.cart-item__info span { font-size: 13.5px; color: var(--muted); }
.cart-item__price { font-weight: 800; font-size: 17px; white-space: nowrap; }
.cart-item__price s { display: block; font-size: 12.5px; color: #a0a4c0; font-weight: 600; text-align: right; }
.cart-item__remove { width: 38px; height: 38px; border-radius: 10px; color: #a0a4c0; display: flex; align-items: center; justify-content: center; }
.cart-item__remove:hover { background: rgb(239 68 68 / .08); color: var(--err); }
.cart-item__remove svg { width: 18px; height: 18px; }

.summary { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 26px; position: sticky; top: 92px; }
.summary h3 { font-size: 17px; font-weight: 800; margin-bottom: 18px; }
/* gap обязателен: на узком экране подпись «Подписчик @PRO_Reshen (−10%)»
   занимает всю строку, space-between схлопывается в ноль, и сумма
   прилипает к тексту вплотную. Сумму не переносим — nowrap. */
.summary__row { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; padding: 7px 0; color: var(--muted); font-weight: 600; }
.summary__row b { color: var(--text); white-space: nowrap; }
.summary__row--discount { color: var(--ok); }
.summary__row--discount b { color: var(--ok); }
.summary__total { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 16px; font-weight: 800; }
.summary__total b { font-family: var(--font-display); font-size: 24px; }
.summary .btn--block { margin-top: 18px; }

.promo-hint { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.promo-hint code { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; font-weight: 700; }

/* ---------- Скидка за подписку на Telegram ---------- */

.btn--tg { background: #229ED9; color: #fff; }
.btn--tg:hover { background: #1b87ba; color: #fff; }

.tg-offer {
  margin-top: 18px; padding: 16px; border-radius: 14px;
  background: linear-gradient(135deg, rgb(34 158 217 / .1), rgb(34 158 217 / .03));
  border: 1px dashed rgb(34 158 217 / .45);
}
.tg-offer--slim { margin-top: 14px; }
.tg-offer__top { display: flex; gap: 12px; align-items: flex-start; }
.tg-offer__ic {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 11px; background: #229ED9; color: #fff;
  display: grid; place-items: center;
}
.tg-offer__ic svg { width: 19px; height: 19px; }
.tg-offer__top b { display: block; font-size: 15px; color: var(--ink); }
/* :not([class]) обязателен: рядом в этом же блоке лежит span с классом
   .tg-offer__ic, и правило по голому тегу (0,2,1) перебивало его
   собственное (0,1,0) — значок терял белый цвет и выравнивание */
.tg-offer__top span:not([class]) { display: block; font-size: 12.8px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.tg-offer__acts { display: flex; gap: 8px; margin-top: 13px; flex-wrap: wrap; }
.tg-offer__acts .btn { flex: 1; min-width: 132px; }
.tg-offer__login:not(:empty) { margin-top: 12px; display: flex; justify-content: center; }

/* Ожидание ответа бота. Один и тот же блок живёт и в светлой корзине,
   и в тёмной плашке на главной, поэтому цвет наследуется от родителя,
   а не задаётся жёстко. Кнопка «ещё раз» — по классу, а не по голому
   тегу: правило .tg-wait button (0,1,1) перебило бы .btn. */
.tg-wait { margin: 0; font-size: 12.6px; line-height: 1.5; color: inherit; opacity: .84; text-align: center; }
.tg-wait__pulse {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; margin-right: 7px; vertical-align: middle;
  animation: tgPulse 1.1s ease-in-out infinite;
}
@keyframes tgPulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.tg-again { color: inherit; text-decoration: underline; font-size: 12.6px; }
.tg-again:hover { opacity: .68; }
@media (prefers-reduced-motion: reduce) { .tg-wait__pulse { animation: none; opacity: .7; } }

/* «Бот молчит»: код, который можно прислать боту руками. Живёт и на
   тёмной панели главной, и в светлой корзине, поэтому все цвета — от
   currentColor и полупрозрачного серого, а не свои. */
.tg-waitbox { width: 100%; }
.tg-help { margin-top: 12px; text-align: left; }
.tg-help__t { margin: 0 0 8px; font-size: 12.4px; line-height: 1.5; opacity: .88; }
.tg-help__row { display: flex; gap: 8px; align-items: stretch; }
.tg-help__code {
  flex: 1 1 auto; min-width: 0;
  font: 600 12.5px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .02em; word-break: break-all;
  padding: 8px 10px; border-radius: 10px;
  background: rgb(127 127 127 / .13); border: 1px dashed rgb(127 127 127 / .5);
  -webkit-user-select: all; user-select: all;
}
.tg-help__copy {
  flex: 0 0 auto; padding: 0 12px; border-radius: 10px;
  border: 1px solid currentColor; font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.tg-help__copy:hover { opacity: .75; }
.tg-help__bot { display: inline-block; margin-top: 9px; font-size: 12.4px; color: inherit; text-decoration: underline; }

.tg-applied {
  display: flex; align-items: center; gap: 11px;
  margin-top: 18px; padding: 13px 15px; border-radius: 14px;
  background: rgb(16 185 129 / .08); border: 1px solid rgb(16 185 129 / .35);
}
.tg-applied__ic {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; background: #0a8f6c; color: #fff;
  display: grid; place-items: center;
}
.tg-applied__ic svg { width: 17px; height: 17px; }
.tg-applied b { display: block; font-size: 14px; color: #0a8f6c; }
/* :not([class]) обязателен: значок рядом — тоже span, с классом
   .tg-applied__ic. Правило по голому тегу (0,1,1) перебивало его
   собственное (0,1,0), и самолётик получал серый цвет вместо белого
   и display:block вместо grid — то есть уезжал в угол зелёного
   квадрата. Ровно та же ловушка, что и в .tg-offer__top выше. */
.tg-applied span:not([class]) { display: block; font-size: 12.2px; color: var(--muted); line-height: 1.4; }
.tg-applied button { margin-left: auto; flex-shrink: 0; color: var(--muted); font-size: 12px; text-decoration: underline; }
.tg-applied button:hover { color: var(--ink); }
.tg-applied__who { min-width: 0; }

/* Подпись «скидка привязана к аккаунту». Живёт и под .tg-applied, и
   внутри .tg-offer, поэтому отступ сверху одинаковый, а не от соседа. */
.tg-scope { margin: 9px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
/* На телефоне «отключить» сбоку отжимал заголовок в две строки, а
   подпись — в три. Уводим его под текст: 43px — ширина значка плюс
   отступ, чтобы всё стояло по одной линии. То же решение, что и в
   .lp-tg__state на главной. */
@media (max-width: 430px) {
  .tg-applied { flex-wrap: wrap; row-gap: 4px; }
  .tg-applied .tg-applied__who { flex: 1 1 calc(100% - 43px); }
  .tg-applied button { margin-left: 43px; }
}

/* ---------- Оценка и отзыв покупателя ---------- */

.rate-box {
  padding: 18px; border-radius: 16px;
  background: var(--paper); border: 1px solid var(--line);
}
/* .purchase-item — грид 160px / 1fr / auto. Без явного span форма
   оценки попадает в первую колонку и сжимается до 160px. */
.purchase-item .rate-box { grid-column: 1 / -1; }
.rate-box__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.rate-box__head b { font-size: 14.5px; }
.rate-box__done {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--ok);
}
.rate-box__done svg { width: 14px; height: 14px; }

/* Звёзды: radio-кнопки, поэтому оценка ставится и с клавиатуры */
.rate-stars { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.rate-stars input { position: absolute; opacity: 0; width: 0; height: 0; }
.rate-stars label {
  cursor: pointer; font-size: 26px; line-height: 1; color: var(--line); transition: color .15s, transform .15s;
}
.rate-stars label:hover, .rate-stars label:hover ~ label,
.rate-stars input:checked ~ label { color: var(--gold); }
.rate-stars label:hover { transform: scale(1.12); }
.rate-stars input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

.rate-box textarea {
  width: 100%; min-height: 92px; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: 12px; font: inherit; resize: vertical; outline: none; background: var(--card);
  transition: border-color .2s;
}
.rate-box textarea:focus { border-color: var(--brand); }
.rate-box__foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.rate-box__hint { font-size: 12.5px; color: var(--muted); }

/* ---------- Оплата ----------
   Отдельной страницы оформления нет: платят прямо из корзины, а способ
   оплаты предлагает страница ЮKassa. Согласие с лицензией и политикой —
   строкой под кнопкой «Оплатить», без галочки. */
.rating-none { font-size: 13px; color: var(--muted); font-weight: 600; }
.pay-legal { margin: 9px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); text-align: center; }
.pay-legal a:not([class]) { color: inherit; text-decoration: underline; }

.demo-note {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 18px; border-radius: var(--r-md);
  background: rgb(14 165 233 / .07); border: 1px solid rgb(14 165 233 / .25);
  font-size: 13.5px; color: #0c6c96; font-weight: 600; line-height: 1.55;
}
.demo-note svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }

.panel { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 28px; }
.panel + .panel { margin-top: 22px; }
.panel > h3 { font-size: 16px; font-weight: 800; margin-bottom: 18px; }
.panel .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.order-mini { display: flex; flex-direction: column; gap: 12px; }
.order-mini__item { display: flex; justify-content: space-between; gap: 14px; font-size: 14px; font-weight: 600; }
.order-mini__item span { color: var(--muted); }

.checkbox-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--muted); }
.checkbox-row input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--brand); }
.checkbox-row a { color: var(--brand-dark); font-weight: 700; }

/* ---------- Успех заказа ---------- */

.success-wrap { max-width: 620px; margin: 0 auto; text-align: center; padding: 80px 20px; }
.success-icon {
  width: 86px; height: 86px; margin: 0 auto 26px;
  border-radius: 999px; background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  color: #fff; box-shadow: 0 18px 44px -10px rgb(124 58 237 / .55);
  animation: pop .5s cubic-bezier(.16,1,.3,1);
}
.success-icon svg { width: 40px; height: 40px; }
.success-icon--wait { background: rgb(246 168 33 / .14); color: var(--gold); }
.success-icon--wait svg { animation: spin 1.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .success-icon--wait svg { animation: none; } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.success-wrap h1 { font-family: var(--font-display); font-size: 30px; font-weight: 600; margin-bottom: 14px; }
.success-wrap p:not([class]) { color: var(--muted); margin-bottom: 8px; }
.success-wrap .btn { margin-top: 26px; }

/* ---------- Авторизация ---------- */

/* ---------- Вход и регистрация ---------- */

.auth-page { padding: 52px 0 84px; }
.auth-grid { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 56px; align-items: start; }

.auth-card { background: var(--card); border-radius: 24px; box-shadow: var(--shadow); padding: 36px 34px 32px; }
.auth-card h1 { font-family: var(--font-display); font-size: 26px; font-weight: 600; margin-bottom: 8px; }
.auth-card .auth-sub { color: var(--muted); font-size: 14.5px; margin-bottom: 22px; }
.auth-card form { display: flex; flex-direction: column; gap: 15px; }

/* Кнопка провайдера */
.auth-oauth { margin-bottom: 4px; }
.oauth-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 11px;
  padding: 14px 20px; border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: var(--card); cursor: pointer; font: 700 15px var(--font-sans); color: var(--text);
  transition: border-color .2s, box-shadow .2s, transform .16s;
}
.oauth-btn:hover { border-color: #111; box-shadow: var(--shadow); }
.oauth-btn:active { transform: translateY(1px); }
.oauth-btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.oauth-btn[disabled] { opacity: .5; cursor: not-allowed; }
.oauth-btn[disabled]:hover { border-color: var(--line); box-shadow: none; }
/* Короткая подпись только на телефоне: полная ломалась на две строки.
   Обе нарисованы в разметке, потому что подменять текст средствами
   CSS нельзя — он не попадёт ни в поиск, ни в озвучку. */
.oauth-btn__short { display: none; }
@media (max-width: 430px) {
  .oauth-btn__full { display: none; }
  .oauth-btn__short { display: inline; }
}
.oauth-note { margin-top: 10px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.oauth-note--off { padding: 10px 13px; border-radius: 12px; background: rgb(246 168 33 / .1); color: #8a5a00; }
.oauth-note code { font-family: ui-monospace, monospace; font-size: 12px; background: rgb(0 0 0 / .06); padding: 1px 5px; border-radius: 5px; }
.oauth-or { display: flex; align-items: center; gap: 14px; margin: 20px 0 4px; color: var(--muted); font-size: 13px; }
.oauth-or::before, .oauth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Поля */
.field__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.field__link { font-size: 12.5px; font-weight: 700; color: var(--brand-dark); }
.field__link:hover { text-decoration: underline; }
.field__hint { font-size: 12.5px; color: var(--muted); }
.field__err { display: none; font-size: 12.5px; font-weight: 600; color: var(--err); }
.field__err:not(:empty) { display: block; }
.field__caps { font-size: 12.5px; font-weight: 600; color: #8a5a00; }
.input.is-bad { border-color: var(--err); }
.input.is-bad:focus { box-shadow: 0 0 0 4px rgb(239 68 68 / .12); }

.field__pass { position: relative; }
.field__pass .input { padding-right: 48px; }
.pass-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 9px; background: none; cursor: pointer; color: var(--muted);
  transition: background .18s, color .18s;
}
.pass-eye:hover { background: var(--paper); color: var(--text); }
.pass-eye svg { width: 19px; height: 19px; }

/* Надёжность пароля */
.pass-meter { display: flex; align-items: center; gap: 12px; }
.pass-meter__bar { display: flex; gap: 4px; flex: 1; }
.pass-meter__bar i { flex: 1; height: 4px; border-radius: 999px; background: var(--line); transition: background .25s; }
.pass-meter__bar i.w1 { background: #ef4444; }
.pass-meter__bar i.w2 { background: #f6a821; }
.pass-meter__bar i.w3 { background: #84cc16; }
.pass-meter__bar i.w4 { background: var(--ok); }
/* Полоски красятся ФОНОМ, подпись — цветом текста (её правила ниже,
   рядом с .auth-local-note). Раньше и то и другое стояло в одном
   селекторе, подпись получала цветной фон, и это гасили через
   background:none !important — лишняя подпорка вместо разделения. */
.pass-meter__txt { font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }

/* Оговорка о том, что аккаунт пока живёт в браузере */
.auth-local-note {
  margin-top: 16px; padding: 11px 13px; border-radius: 11px;
  background: var(--paper); border: 1px solid var(--line);
  font-size: 12.5px; line-height: 1.5; color: var(--muted);
}
.pass-meter__txt.w1 { color: #ef4444; }
.pass-meter__txt.w2 { color: #b97500; }
.pass-meter__txt.w3 { color: #4d7c0f; }
.pass-meter__txt.w4 { color: var(--ok); }

/* Согласие */
.checkbox { display: flex; gap: 11px; align-items: flex-start; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.checkbox input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--brand); cursor: pointer; }
.checkbox a { color: var(--brand-dark); font-weight: 700; }
.checkbox a:hover { text-decoration: underline; }

.auth-switch { text-align: center; margin-top: 20px; font-size: 14.5px; color: var(--muted); }
.auth-switch a { color: var(--brand-dark); font-weight: 800; }

/* Состояния возврата от провайдера */
.auth-state { text-align: center; padding: 18px 0 6px; }
.auth-state__ic {
  width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700;
}
.auth-state--wait .auth-state__ic { background: var(--grad-soft); }
.auth-state--ok .auth-state__ic { background: rgb(16 185 129 / .12); color: var(--ok); }
.auth-state--bad .auth-state__ic { background: rgb(239 68 68 / .1); color: var(--err); }
.auth-state h1 { font-family: var(--font-display); font-size: 22px; font-weight: 600; margin-bottom: 10px; }
.auth-state p { color: var(--muted); font-size: 14.5px; margin-bottom: 20px; }
.auth-state code { font-family: ui-monospace, monospace; font-size: 12.5px; background: var(--paper); padding: 1px 6px; border-radius: 5px; }
/* Кнопки под текстом состояния (восстановление пароля, auth.js) */
.auth-state__actions { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.auth-state__link { background: none; border: 0; padding: 4px 6px; font: 800 14.5px var(--font-sans); color: var(--brand-dark); cursor: pointer; text-decoration: none; }
.auth-state__link:hover { text-decoration: underline; }
.auth-hint { margin-top: 16px; font-size: 13px; line-height: 1.5; color: var(--muted); text-align: center; }
.spin { width: 24px; height: 24px; border-radius: 999px; border: 2.5px solid rgb(91 91 247 / .25); border-top-color: var(--brand); animation: prSpin .8s linear infinite; }
@keyframes prSpin { to { transform: rotate(360deg); } }

/* Боковая колонка */
.auth-aside { padding-top: 14px; }
.auth-aside h2 { font-family: var(--font-display); font-size: clamp(26px, 3vw, 36px); font-weight: 600; margin: 14px 0 26px; }
.auth-perks { list-style: none; display: grid; gap: 16px; margin-bottom: 30px; }
.auth-perks li { display: grid; gap: 3px; padding-left: 30px; position: relative; }
.auth-perks li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 999px;
  background: var(--grad-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E") center/12px no-repeat;
}
.auth-perks b { font-size: 15px; }
.auth-perks span { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.auth-quote { padding: 24px 26px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.auth-quote p { font-size: 14.5px; color: var(--text); }
.auth-quote footer { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.auth-quote b { display: block; font-size: 14px; }
.auth-quote span { font-size: 12.5px; color: var(--muted); }

@media (max-width: 920px) {
  .auth-grid { grid-template-columns: minmax(0, 1fr); gap: 34px; max-width: 520px; }
  .auth-aside { padding-top: 0; }
}
@media (max-width: 520px) {
  .auth-page { padding: 32px 0 64px; }
  .auth-card { padding: 28px 22px 26px; }
}

/* ---------- Личный кабинет ---------- */

.account-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 36px; align-items: start; padding: 44px 0 20px; }

.account-side { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 26px; position: sticky; top: 92px; }
.account-side__user { display: flex; align-items: center; gap: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.account-side__avatar {
  width: 52px; height: 52px; border-radius: 16px; flex-shrink: 0;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; font-weight: 800; font-family: var(--font-display);
}
.account-side__id { min-width: 0; }
.account-side__id b { display: block; font-size: 15.5px; overflow-wrap: anywhere; }
/* Правило именно для почты: `.account-side__user span` цеплялось и за
   аватар — буква становилась 13px и серой поверх градиента */
.account-side__mail { display: block; font-size: 13px; color: var(--muted); word-break: break-all; }

.account-nav { display: flex; flex-direction: column; gap: 4px; }
.account-nav button {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  font-size: 14.5px; font-weight: 700; color: var(--text);
  transition: background .14s ease, color .14s ease;
  text-align: left; width: 100%;
}
.account-nav button svg { width: 19px; height: 19px; color: var(--muted); flex-shrink: 0; }
.account-nav button:hover { background: var(--paper); }
.account-nav button.is-active { background: var(--grad-soft); color: var(--brand-dark); }
.account-nav button.is-active svg { color: var(--brand-dark); }
.account-nav button.is-logout { color: var(--err); }
.account-nav button.is-logout svg { color: var(--err); }
.account-nav button.is-logout:hover { background: rgb(239 68 68 / .07); }

.account-tab { display: none; }
.account-tab.is-active { display: block; animation: tab-in .3s ease; }
@keyframes tab-in { from { opacity: 0; transform: translateY(8px); } }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 30px; }
.stat-card { background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 22px; }
.stat-card b { display: block; font-family: var(--font-display); font-size: 28px; font-weight: 700; }
.stat-card span { font-size: 13px; color: var(--muted); font-weight: 600; }

.purchase-item {
  display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; gap: 20px; align-items: center;
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 14px;
}
/* Без превью — на странице «спасибо за заказ». Тоже до медиазапросов,
   чтобы на телефоне строка схлопывалась в одну колонку. */
.purchase-item--slim { grid-template-columns: minmax(0, 1fr) auto; }
.purchase-item__thumb { border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; position: relative; }
.purchase-item__thumb .live-thumb { position: absolute; inset: 0; }
.purchase-item__info b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 16.5px; margin-bottom: 4px; }
.purchase-item__info span { font-size: 13.5px; color: var(--muted); display: block; }
.purchase-item__actions { display: flex; flex-direction: column; gap: 9px; }

.order-card { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 24px; margin-bottom: 16px; }
.order-card__head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.order-card__head b { font-size: 15.5px; }
.order-card__head time { font-size: 13.5px; color: var(--muted); }
.order-status { margin-left: auto; padding: 5px 13px; border-radius: 999px; font-size: 12px; font-weight: 800; background: rgb(16 185 129 / .1); color: #0a8f6c; }
/* Заказ без подтверждённого платежа: цвет другой, чтобы его нельзя
   было спутать с оплаченным даже боковым зрением. */
.order-status--wait { background: rgb(246 168 33 / .14); color: #8a5a00; }
.order-card__items { border-top: 1px dashed var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.order-card__row { display: flex; justify-content: space-between; gap: 14px; font-size: 14px; font-weight: 600; }
.order-card__row span { color: var(--muted); }
.order-card__total { display: flex; justify-content: space-between; border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 12px; font-weight: 800; }

/* ---------- Тосты ---------- */

#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--ink); color: #fff;
  border-radius: 14px; padding: 14px 18px 14px 14px;
  font-size: 14px; font-weight: 600; line-height: 1.45;
  box-shadow: 0 18px 40px -12px rgb(0 0 0 / .45);
  opacity: 0; transform: translateY(12px) scale(.97);
  transition: opacity .3s ease, transform .3s ease;
}
.toast.is-in { opacity: 1; transform: none; }
.toast a { color: #a5b4fc; font-weight: 800; }
.toast__icon { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; }
.toast__icon svg { width: 15px; height: 15px; }
.toast--ok .toast__icon { background: rgb(16 185 129 / .25); color: #34d399; }
.toast--err .toast__icon { background: rgb(239 68 68 / .25); color: #f87171; }
.toast--info .toast__icon { background: rgb(99 102 241 / .3); color: #a5b4fc; }

/* ---------- Текстовые страницы ---------- */

/* Длинные русские слова («конфиденциальности») в заголовке не влезали
   на телефон и растягивали страницу: переносим по слогам, а если словарь
   недоступен — рвём слово, но не ломаем вёрстку */
.prose { max-width: 760px; margin: 0 auto; padding-bottom: 40px; overflow-wrap: break-word; hyphens: auto; }
.prose h1 { font-family: var(--font-display); font-size: clamp(19px, 5.2vw, 30px); font-weight: 600; padding: 50px 0 24px; }
.prose h2 { font-size: 19px; font-weight: 800; margin: 30px 0 12px; }
/* :not([class]) по соглашению проекта: правило по голому тегу (0,1,1)
   перебило бы любой классовый блок, вложенный в .prose */
.prose p:not([class]), .prose li:not([class]) { color: var(--text); line-height: 1.7; font-size: 15px; margin-bottom: 10px; }
.prose ul { padding-left: 22px; }
.prose h3 { font-size: 15.5px; font-weight: 800; margin: 20px 0 6px; }
.prose__lead { font-size: 16px; line-height: 1.7; color: var(--muted); margin-bottom: 6px; }
.prose__meta { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.prose__note {
  margin: 18px 0; padding: 14px 16px; border-radius: 13px;
  background: var(--grad-soft); border: 1px solid rgb(91 91 247 / .18);
  font-size: 14px; line-height: 1.65; color: var(--text);
}
.prose__note--warn { background: rgb(246 168 33 / .1); border-color: rgb(246 168 33 / .3); }
.prose__note b { color: var(--brand-dark); }
.prose__note--warn b { color: #8a5a00; }
.prose__where { display: block; font-size: 13.5px; color: var(--muted); margin: 2px 0 12px; }
.prose__where b { color: var(--text); }
.prose a:not([class]) { color: var(--brand-dark); font-weight: 700; }

/* ---------- Сравнение шаблонов ---------- */

.t-card__tools { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.compare-btn, .fav-btn {
  width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #a0a4c0; transition: background .15s ease, color .15s ease, transform .15s ease;
}
.compare-btn svg { width: 18px; height: 18px; }
.compare-btn:hover { background: var(--grad-soft); color: var(--brand-dark); transform: scale(1.08); }
.compare-btn.is-active { color: var(--brand-dark); background: rgb(91 91 247 / .1); }

.compare-page { padding: 48px 20px 0; }
.compare-page__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.compare-page__head h1 { margin-top: 12px; font-family: var(--font-display); font-size: clamp(28px, 3.7vw, 40px); font-weight: 600; }
.compare-page__head p { max-width: 620px; margin-top: 12px; color: var(--muted); }
.compare-page__head .btn { flex-shrink: 0; }
.compare-empty { padding: 80px 20px; }

.compare-note { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 14px 18px; border-radius: 14px; background: var(--grad-soft); color: var(--muted); font-size: 14px; }
.compare-note svg { width: 20px; height: 20px; color: var(--brand-dark); flex-shrink: 0; }
.compare-note b { color: var(--text); }
.compare-note button { margin-left: auto; color: var(--brand-dark); font-size: 13px; font-weight: 800; text-decoration: underline; white-space: nowrap; }
.compare-scroll { overflow-x: auto; padding-bottom: 10px; }
.compare-table { display: grid; grid-template-columns: 170px repeat(var(--compare-count), minmax(250px, 1fr)); min-width: 680px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow); }
.compare-table > * { min-width: 0; padding: 17px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.compare-table--1 > :nth-child(2n), .compare-table--2 > :nth-child(3n), .compare-table--3 > :nth-child(4n) { border-right: 0; }
.compare-table--1 > :nth-last-child(-n + 2), .compare-table--2 > :nth-last-child(-n + 3), .compare-table--3 > :nth-last-child(-n + 4) { border-bottom: 0; }
.compare-row__label { display: flex; align-items: center; background: #fafbff; color: var(--muted); font-size: 13px; font-weight: 800; }
.compare-row__label--top { align-items: flex-start; padding-top: 24px; }

/* На телефоне колонка с названиями строк съедала 170px из 320,
   и первый товар обрезался на полуслове. Ужимаем подписи и сами
   колонки: тогда в экран целиком помещается один товар и виден
   край следующего — сразу понятно, что таблицу можно листать вбок.
   min-width снимаем, иначе он держит таблицу шире, чем нужно. */
@media (max-width: 640px) {
  .compare-table {
    grid-template-columns: 104px repeat(var(--compare-count), minmax(190px, 1fr));
    min-width: 0;
  }
  .compare-table > * { padding: 13px 12px; }
  .compare-row__label { font-size: 12px; line-height: 1.3; }
  .compare-row__label--top { padding-top: 18px; }
}
.compare-product { position: relative; padding: 16px !important; }
.compare-product__remove { position: absolute; z-index: 2; top: 24px; right: 24px; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; background: rgb(11 13 30 / .68); color: #fff; }
.compare-product__remove:hover { background: var(--err); }
.compare-product__remove svg { width: 16px; height: 16px; }
.compare-product__thumb { display: block; overflow: hidden; border-radius: 10px; aspect-ratio: 16 / 8; background: var(--paper); }
.compare-product__thumb .live-thumb { width: 100%; height: 100%; }
.compare-product__name { display: block; margin-top: 14px; font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.compare-product__niche { display: block; min-height: 40px; margin: 4px 0 13px; color: var(--muted); font-size: 13px; }
.compare-cell { display: flex; align-items: center; gap: 7px; color: var(--text); font-size: 14px; font-weight: 600; }
.compare-cell s { color: #a0a4c0; font-size: 12.5px; font-weight: 600; }
.compare-price { font-family: var(--font-display); font-size: 17px; }
.compare-rating { color: var(--muted); font-size: 13px; }
.compare-features { display: flex; flex-direction: column; gap: 8px; width: 100%; margin: 0; padding: 0; list-style: none; }
.compare-features li { display: flex; align-items: flex-start; gap: 7px; color: var(--text); font-size: 13px; font-weight: 600; line-height: 1.4; }
.compare-features svg { width: 15px; height: 15px; margin-top: 1px; color: var(--ok); flex-shrink: 0; }

/* ---------- Помощь и запуск ---------- */

.help-hero { padding: 86px 0 68px; background: var(--ink); color: #fff; }
.help-hero .eyebrow { color: #a5b4fc; }
.help-hero h1 { max-width: 750px; margin-top: 16px; font-family: var(--font-display); font-size: clamp(30px, 4vw, 46px); font-weight: 600; }
.help-hero p { max-width: 650px; margin: 18px 0 28px; color: rgb(255 255 255 / .72); font-size: 16px; line-height: 1.7; }

.help-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.help-step { min-height: 245px; padding: 26px; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow); }
.help-step > span { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 11px; background: var(--grad-soft); color: var(--brand-dark); font-size: 13px; font-weight: 800; }
.help-step h2 { margin: 24px 0 10px; font-size: 17px; font-weight: 800; }
.help-step p, .help-grid .panel p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.help-step code, .help-grid code { color: var(--brand-dark); font-weight: 800; }

.help-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.help-grid .panel { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.help-grid .panel h2 { font-size: 18px; font-weight: 800; }
.help-grid .panel .btn { margin-top: auto; }

/* ---------- Адаптив ---------- */

@media (max-width: 1100px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* minmax(0, 1fr), а не 1fr: у 1fr минимум равен min-content, и
     адресная строка в рамке браузера с white-space:nowrap растягивала
     колонку за край экрана (на 280px — на 18px). */
  .tpl-layout, .tpl-info { grid-template-columns: minmax(0, 1fr); }
  .buy-box { position: static; }
  .hero__in { grid-template-columns: 1fr; }
  .hero__collage { height: 420px; max-width: 640px; }
  .account-layout { grid-template-columns: minmax(0, 1fr); }
  .account-side { position: static; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-steps { grid-template-columns: repeat(2, 1fr); }
  .help-grid { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  /* minmax(0, 1fr): у голого 1fr минимум равен min-content, и
     выпадающий список сортировки растягивал колонку за край
     экрана — на 280px это давало 303px содержимого. */
  .catalog-layout { grid-template-columns: minmax(0, 1fr); }
  .filters { position: static; display: none; }
  .filters.is-open { display: flex; }
  .filters-toggle { display: inline-flex; }
  .cart-layout { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 860px) {
  .site-nav {
    position: fixed; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 6px;
    background: var(--ink); padding: 18px 20px 24px;
    border-bottom: 1px solid rgb(255 255 255 / .08);
    display: none; z-index: 89;
  }
  body.nav-open .site-nav { display: flex; }
  .site-nav a { padding: 13px 16px; font-size: 16px; }
  .burger { display: flex; align-items: center; justify-content: center; }
  .header-login { display: none; }
  body.nav-open { overflow: hidden; }
  .hero { padding: 64px 0 80px; }
  .hero__stats { gap: 28px; flex-wrap: wrap; }
  .how-grid, .feat-grid, .review-grid { grid-template-columns: 1fr; }
  .cta { flex-direction: column; align-items: flex-start; padding: 44px 30px; }
  .panel .grid-2 { grid-template-columns: 1fr; }
  .compare-page__head { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 640px) {
  .cards-grid { grid-template-columns: minmax(0, 1fr); }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 60px 0; }
  .hero h1 { font-size: 30px; }
  .hero__collage { height: 300px; }
  .hero__cta .btn { width: 100%; }
  /* Крестик уходит в угол карточки, поэтому справа оставляем ему
     место — иначе название заезжает под кнопку */
  .cart-item {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 14px; position: relative; padding-right: 56px;
  }
  .cart-item__price { grid-column: 2; justify-self: start; }
  .cart-item__remove { position: absolute; top: 12px; right: 12px; }
  .purchase-item { grid-template-columns: 1fr; }
  .purchase-item__thumb { aspect-ratio: 16/9; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview-stage { padding: 12px; }
  .device-switch { display: none; }
  #previewBuy { margin-left: auto; }
  .preview-bar__title span { display: none; }
  .compare-link { display: none; }
  .compare-page { padding-top: 34px; }
  .compare-note { align-items: flex-start; flex-wrap: wrap; }
  .compare-note button { width: 100%; margin-left: 32px; text-align: left; }
  .help-hero { padding: 64px 0 52px; }
  .help-steps { grid-template-columns: 1fr; }
}

/* ============================================================
   ЛЕНДИНГ (главная) — блоки с префиксом .lp-
   ============================================================ */

/* ---------- Первый экран ----------
   Высота считается с учётом залипающей шапки (68px), чтобы первый
   экран помещался целиком и не «выпирал» за границу окна. */

.hero {
  isolation: isolate;
  background: #070914;           /* база темнее общего --ink: свет читается ярче */
  padding: 44px 0 54px;
  /* 68px — высота залипающей шапки: первый экран должен помещаться
     целиком вместе с ней, а не выталкивать себя за границу окна */
  min-height: calc(100vh - 68px);
  display: flex; align-items: center;
}
/* Свет собран в три компактных пятна: одно за заголовком, одно
   у верхнего правого угла и холодная подсветка под окном браузера.
   Размытая «клякса» на весь экран читается как заглушка, а это —
   направленный свет. */
.hero__aurora {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(46% 38% at 16% 6%, rgb(99 102 241 / .42), transparent 68%),
    radial-gradient(34% 30% at 86% -4%, rgb(168 85 247 / .34), transparent 70%),
    radial-gradient(44% 40% at 74% 88%, rgb(56 189 248 / .16), transparent 72%),
    radial-gradient(70% 60% at 50% 4%, rgb(30 27 75 / .55), transparent 70%);
  animation: lpAurora 26s ease-in-out infinite alternate;
}
@keyframes lpAurora {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(1.5%, -1.5%, 0) scale(1.06); }
}

/* Тонкая сетка — только вверху, чтобы задать «технологичность»
   и не спорить с текстом */
.hero__mesh {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .55;
  background-image:
    linear-gradient(rgb(255 255 255 / .045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / .045) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(120% 78% at 50% 0%, #000 12%, transparent 72%);
  mask-image: radial-gradient(120% 78% at 50% 0%, #000 12%, transparent 72%);
}

/* Зерно поверх градиента: убирает «пластиковость» полос и делает
   фон похожим на напечатанный, а не сгенерированный */
.hero__grain {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: .16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Светящаяся линия по верхней кромке и мягкий уход в тень внизу —
   первый экран перестаёт «обрываться» в бегущую строку */
.hero::after {
  content: ""; position: absolute; inset: auto 0 0; height: 180px; z-index: 0; pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgb(7 9 20 / .75));
}
.hero__edge {
  position: absolute; inset: 0 0 auto; height: 1px; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgb(165 180 252 / .45) 30%, rgb(216 180 254 / .45) 70%, transparent);
}

.hero__in {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center; gap: 52px; width: 100%;
}

.hero h1 { margin: 16px 0 18px; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08; }
/* Три строки: «Готовый сайт для» / направление / «за один вечер».
   Направление стоит отдельной строкой, поэтому ничего не переносится
   и не прыгает при смене слова. */
.hero h1 .ln { display: block; white-space: nowrap; }
.hero__sub { font-size: 16.5px; max-width: 490px; }
.hero__cta { margin-top: 26px; align-items: center; gap: 22px; }
/* Вторая цель — ссылкой, а не кнопкой: два одинаковых прямоугольника
   рядом спорят друг с другом и размывают главное действие */
.hero__link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700; color: rgb(255 255 255 / .82);
  border-bottom: 1px solid rgb(255 255 255 / .28); padding-bottom: 2px; transition: .2s;
}
.hero__link:hover { color: #fff; border-bottom-color: #fff; }
.hero__link span { transition: transform .2s; }
.hero__link:hover span { transform: translateX(4px); }

/* Меняющееся слово */
.hero__rotate {
  display: inline-grid; vertical-align: baseline; overflow: hidden;
  height: 1.1em; position: relative;
}
.hero__rotate span {
  grid-area: 1 / 1; opacity: 0; transform: translateY(70%) scale(.96); filter: blur(4px);
  background: linear-gradient(100deg, #a5b4fc, #f0abfc 60%, #67e8f9);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  white-space: nowrap; pointer-events: none; text-align: left;
  /* уходящее слово гаснет быстрее, чем появляется новое, — иначе на
     полпути видно оба сразу и заголовок «двоится» */
  transition: opacity .22s ease, transform .45s cubic-bezier(.16,1,.3,1), filter .3s ease;
}
.hero__rotate span.is-in  { opacity: 1; transform: none; filter: none; transition-delay: .1s, 0s, .1s; }
.hero__rotate span.is-out { opacity: 0; transform: translateY(-70%) scale(.96); filter: blur(4px); }

/* Плашка скидки */
.hero__tg {
  display: inline-flex; align-items: center; gap: 11px; margin-top: 22px;
  padding: 8px 8px 8px 15px; border-radius: 999px;
  background: rgb(255 255 255 / .07); border: 1px solid rgb(255 255 255 / .16);
  backdrop-filter: blur(8px); color: #fff; font-size: 13.5px; font-weight: 600;
  transition: border-color .2s, background .2s;
}
.hero__tg:hover { background: rgb(255 255 255 / .12); border-color: rgb(34 158 217 / .7); }
.hero__tg b { color: #7dd3fc; }
.hero__tg .go {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px;
  background: #229ED9; color: #fff; font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.hero__tg .go svg { width: 14px; height: 14px; }

.hero__trust { display: flex; align-items: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.hero__faces { display: flex; }
.hero__faces i {
  width: 32px; height: 32px; border-radius: 999px; margin-left: -10px; font-style: normal;
  border: 2px solid var(--ink); background-size: cover; background-position: center;
}
.hero__faces i:first-child { margin-left: 0; }
.hero__trust p { font-size: 13px; color: rgb(255 255 255 / .7); }
.hero__trust p b { color: #fff; }

.hero__stats { gap: 30px; margin-top: 24px; }
.hero__stat b { font-size: 23px; }
.hero__stat span { font-size: 12.5px; }

/* ---------- Первый экран: живое окно с шаблоном ---------- */

.hero__stage { position: relative; perspective: 1500px; }
/* Ореол под окном: окно перестаёт «висеть» на плоском фоне */
.hero__stage::before {
  content: ""; position: absolute; inset: 6% -6% -10% -6%; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 55% at 50% 60%, rgb(99 102 241 / .28), transparent 72%);
  filter: blur(36px);
}
.hero__stage > * { position: relative; z-index: 1; }
.hero__device {
  position: relative; display: block; border-radius: 16px; overflow: hidden;
  background: #0f1124; box-shadow: 0 40px 90px -30px rgb(0 0 0 / .75), 0 0 0 1px rgb(255 255 255 / .1);
  transform-style: preserve-3d; transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s;
}
.hero__device:hover { box-shadow: 0 48px 110px -30px rgb(0 0 0 / .8), 0 0 0 1px rgb(165 180 252 / .45); }
/* Подсказка, что окно кликабельно */
.hero__device-open {
  position: absolute; left: 50%; bottom: 18px; z-index: 4; transform: translate(-50%, 12px);
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px;
  background: rgb(11 13 30 / .82); border: 1px solid rgb(255 255 255 / .22); backdrop-filter: blur(10px);
  color: #fff; font-size: 13.5px; font-weight: 700; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .28s ease, transform .28s cubic-bezier(.16,1,.3,1);
}
.hero__device:hover .hero__device-open, .hero__device:focus-visible .hero__device-open { opacity: 1; transform: translate(-50%, 0); }
.hero__device-open span { transition: transform .2s; }
.hero__device:hover .hero__device-open span { transform: translateX(4px); }
.hero__device-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: rgb(255 255 255 / .05); border-bottom: 1px solid rgb(255 255 255 / .09); }
.hero__device-bar i { width: 10px; height: 10px; border-radius: 999px; font-style: normal; }
.hero__device-bar i:nth-child(1) { background: #ff5f57; }
.hero__device-bar i:nth-child(2) { background: #febc2e; }
.hero__device-bar i:nth-child(3) { background: #28c840; }
.hero__device-bar span {
  margin-left: 10px; flex: 1; padding: 4px 12px; border-radius: 999px;
  background: rgb(255 255 255 / .06); font-size: 11.5px; color: rgb(255 255 255 / .55);
  font-family: ui-monospace, monospace; text-align: center;
}
.hero__device-view { position: relative; aspect-ratio: 16/10; background: #fff; overflow: hidden; }
/* Два слоя: следующий шаблон грузится в скрытый и проявляется только
   когда готов — поэтому в окне не мелькает белый экран загрузки */
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.hero__slide.is-on { opacity: 1; }
.hero__slide .live-thumb { position: absolute; inset: 0; }

/* Точки-индикаторы: единственный элемент управления слайд-шоу */
.hero__dots { display: flex; justify-content: center; gap: 7px; margin-top: 20px; }
.hero__dots button {
  width: 7px; height: 7px; padding: 0; border-radius: 999px;
  background: rgb(255 255 255 / .25); transition: width .35s cubic-bezier(.16,1,.3,1), background .3s;
}
.hero__dots button:hover { background: rgb(255 255 255 / .5); }
.hero__dots button.is-on { width: 26px; background: #fff; }

.hero__float {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 11px;
  padding: 11px 15px; border-radius: 14px; background: rgb(17 19 42 / .82);
  border: 1px solid rgb(255 255 255 / .14); backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px -20px rgb(0 0 0 / .7);
}
.hero__float i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-style: normal; font-size: 16px; flex-shrink: 0; }
.hero__float b { display: block; font-size: 13.5px; color: #fff; white-space: nowrap; }
.hero__float span { display: block; font-size: 11.5px; color: rgb(255 255 255 / .58); white-space: nowrap; }
.hero__float--a { left: -34px; top: 16%; animation: lpFloat 6.5s ease-in-out infinite; }
@keyframes lpFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* ---------- Что внутри архива ---------- */

.lp-zip { display: grid; grid-template-columns: .9fr 1.1fr; gap: 46px; align-items: center; }
.lp-zip__files { background: var(--ink); border-radius: 22px; padding: 26px; box-shadow: var(--shadow); }
.lp-zip__name { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 14.5px; margin-bottom: 18px; }
.lp-zip__name svg { width: 18px; height: 18px; color: #a5b4fc; }
.lp-zip__row {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 12px;
  background: rgb(255 255 255 / .05); border: 1px solid rgb(255 255 255 / .08); margin-bottom: 9px;
  opacity: 0; transform: translateX(-12px); transition: .5s cubic-bezier(.16,1,.3,1);
}
.is-visible .lp-zip__row { opacity: 1; transform: none; }
.is-visible .lp-zip__row:nth-child(2) { transition-delay: .08s; }
.is-visible .lp-zip__row:nth-child(3) { transition-delay: .16s; }
.is-visible .lp-zip__row:nth-child(4) { transition-delay: .24s; }
.lp-zip__row i {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center;
  font-style: normal; font-size: 12px; font-weight: 800; letter-spacing: .02em;
}
.lp-zip__row b { display: block; color: #fff; font-size: 14px; }
.lp-zip__row span { display: block; color: rgb(255 255 255 / .5); font-size: 12.5px; }
.lp-zip__row u { margin-left: auto; text-decoration: none; color: rgb(255 255 255 / .35); font-size: 12px; white-space: nowrap; }
.lp-zip__note { margin-top: 16px; font-size: 12.5px; color: rgb(255 255 255 / .45); }
.lp-feats { display: grid; gap: 9px; margin: 22px 0; }
.lp-feats div { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.lp-feats div::before {
  content: "✓"; width: 20px; height: 20px; flex-shrink: 0; border-radius: 999px;
  background: rgb(91 91 247 / .12); color: var(--brand); display: grid; place-items: center;
  font-size: 11px; font-weight: 800; margin-top: 2px;
}

/* ---------- Как это работает: путь ---------- */

.lp-path { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.lp-path::before {
  content: ""; position: absolute; left: 12%; right: 12%; top: 46px; height: 2px;
  background: repeating-linear-gradient(90deg, rgb(91 91 247 / .35) 0 8px, transparent 8px 18px);
}
.lp-node { position: relative; text-align: center; }
.lp-node__dot {
  position: relative; z-index: 2; width: 92px; height: 92px; margin: 0 auto 22px;
  border-radius: 28px; display: grid; place-items: center; font-size: 34px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: .3s;
}
.lp-node:hover .lp-node__dot { transform: translateY(-6px) rotate(-4deg); border-color: rgb(91 91 247 / .5); box-shadow: var(--shadow-hover); }
.lp-node__dot em {
  position: absolute; top: -9px; right: -9px; width: 30px; height: 30px; border-radius: 999px;
  background: var(--grad); color: #fff; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 13px; font-weight: 600; font-style: normal;
  box-shadow: 0 8px 18px -8px rgb(79 70 229 / .9);
}
.lp-node h3 { font-size: 19px; margin-bottom: 9px; }
.lp-node p { font-size: 14.5px; color: var(--muted); max-width: 320px; margin: 0 auto; }
.lp-node__tag {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 15px; padding: 6px 13px;
  border-radius: 999px; background: var(--paper); border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 800; color: var(--brand);
}

/* ---------- Telegram ---------- */

.lp-tg {
  position: relative; overflow: hidden; border-radius: 28px; padding: 52px;
  background: linear-gradient(130deg, #1c7fb3 0%, #229ED9 45%, #38bdf8 110%);
  color: #fff; display: grid; grid-template-columns: 1.12fr .88fr; gap: 44px; align-items: center;
}
.lp-tg::before, .lp-tg::after { content: ""; position: absolute; border-radius: 999px; background: rgb(255 255 255 / .1); }
.lp-tg::before { width: 340px; height: 340px; left: -100px; bottom: -150px; }
.lp-tg::after { width: 220px; height: 220px; right: 8%; top: -110px; }
.lp-tg > * { position: relative; z-index: 2; }
.lp-tg__badge {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 15px; border-radius: 999px;
  background: rgb(255 255 255 / .18); font-size: 13px; font-weight: 700; backdrop-filter: blur(6px);
}
.lp-tg h2 { font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 40px); font-weight: 600; margin: 18px 0 0; letter-spacing: -.02em; }
.lp-tg h2 em { font-style: normal; text-decoration: underline; text-decoration-color: rgb(255 255 255 / .45); text-underline-offset: 6px; }
/* :not([class]) — чтобы правило не перебивало .lp-tg__note рядом */
.lp-tg > div > p:not([class]) { margin-top: 15px; color: rgb(255 255 255 / .85); max-width: 470px; font-size: 15.5px; }
.lp-tg__perks { display: grid; gap: 10px; margin-top: 20px; }
.lp-tg__perks div { display: flex; gap: 11px; align-items: flex-start; font-size: 14.5px; color: rgb(255 255 255 / .94); }
.lp-tg__perks div i { font-style: normal; flex-shrink: 0; }

.lp-tg__card {
  background: rgb(255 255 255 / .14); border: 1px solid rgb(255 255 255 / .28); border-radius: 22px;
  padding: 26px; backdrop-filter: blur(10px); text-align: center;
}
.lp-tg__card .pct { font-family: var(--font-display); font-size: 62px; font-weight: 700; line-height: 1; }
.lp-tg__card .pct sup { font-size: 27px; vertical-align: super; }
.lp-tg__card > span { display: block; font-size: 13.5px; color: rgb(255 255 255 / .82); margin-top: 7px; }
.lp-tg__box { margin-top: 20px; padding-top: 18px; border-top: 1px solid rgb(255 255 255 / .25); text-align: left; }
.lp-tg__box label { display: flex; justify-content: space-between; font-size: 13px; color: rgb(255 255 255 / .82); margin-bottom: 8px; }
.lp-tg__box label b { color: #fff; font-weight: 800; }
.lp-tg__box input[type="range"] { width: 100%; accent-color: #fff; height: 24px; cursor: pointer; }
.lp-tg__out { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; font-size: 13.5px; color: rgb(255 255 255 / .82); }
.lp-tg__out b { font-family: var(--font-display); font-size: 23px; font-weight: 600; color: #fff; }

/* Панель входа/статуса */
.lp-tg__auth { margin-top: 22px; }
.lp-tg__login { min-height: 46px; display: flex; justify-content: center; }
.btn--tg-light { background: #fff; color: #10659a; font-weight: 800; }
.btn--tg-light:hover { background: #eaf6fd; color: #0d5482; transform: translateY(-2px); }
.lp-tg__acts { display: flex; gap: 11px; flex-wrap: wrap; }
/* На телефоне кнопка во всю ширину и с переносом: на 320 px название
   канала в одну строку не помещается, а переносить подпись по
   правилам проекта можно только кнопке во всю ширину. */
@media (max-width: 560px) { .lp-tg__acts .btn { width: 100%; white-space: normal; text-align: center; } }
.lp-tg__state {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 15px;
  background: rgb(255 255 255 / .16); border: 1px solid rgb(255 255 255 / .3);
}
.lp-tg__state img, .lp-tg__state .ava {
  width: 40px; height: 40px; border-radius: 999px; flex-shrink: 0; object-fit: cover;
  background: rgb(255 255 255 / .25); display: grid; place-items: center; font-weight: 800; color: #fff;
}
.lp-tg__state b { display: block; font-size: 14.5px; }
/* :not([class]) — рядом лежит .ava, тоже span. Здесь его спасает
   лишний класс в селекторе, но полагаться на это не стоит. */
.lp-tg__state span:not([class]) { display: block; font-size: 12.5px; color: rgb(255 255 255 / .8); }
.lp-tg__state button { margin-left: auto; font-size: 12.5px; color: rgb(255 255 255 / .8); text-decoration: underline; flex-shrink: 0; }
.lp-tg__state button:hover { color: #fff; }
.lp-tg__who { min-width: 0; }
/* На телефоне «отключить» сбоку отжимал имя в три строки. Пускаем его
   на вторую строку: 52px — ширина аватарки плюс отступ, чтобы подпись
   и кнопка стояли по одной линии. */
@media (max-width: 430px) {
  .lp-tg__state { flex-wrap: wrap; row-gap: 4px; }
  .lp-tg__state .lp-tg__who { flex: 1 1 calc(100% - 52px); }
  .lp-tg__state button { margin-left: 52px; }
}
.lp-tg__note { margin-top: 12px; font-size: 12.5px; color: rgb(255 255 255 / .72); line-height: 1.5; }
.lp-tg__note.is-warn { color: #fde68a; }

/* ---------- Сравнение ---------- */

.lp-compare-wrap { position: relative; }
.lp-compare { overflow-x: auto; border-radius: 24px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
/* 660px, а не 720: сразу над порогом скрытия (760px) под таблицу
   остаётся около 716px, и при 720 она начинала листаться на
   четыре пикселя. Теперь горизонтальной прокрутки нет нигде —
   там, где таблица не помещается, её просто не показываем. */
.lp-compare table { width: 100%; border-collapse: collapse; min-width: 660px; }
.lp-compare th, .lp-compare td { padding: 16px 20px; text-align: center; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.lp-compare thead th { font-family: var(--font-display); font-size: 16px; font-weight: 600; vertical-align: bottom; }
.lp-compare thead th small { display: block; font-family: var(--font-sans); font-size: 12.5px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.lp-compare tbody th, .lp-compare thead th:first-child, .lp-compare tfoot th {
  position: sticky; left: 0; z-index: 2; background: var(--card); text-align: left; font-weight: 700; color: var(--text);
  box-shadow: 1px 0 0 var(--line);
}
.lp-compare .us { background: rgb(91 91 247 / .06); position: relative; }
.lp-compare thead .us { padding-top: 38px; border-radius: 16px 16px 0 0; }
.lp-compare thead .us::before {
  content: "Наш вариант"; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: #fff; font-family: var(--font-sans); font-size: 11px; font-weight: 800;
  padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
.lp-compare .us b { color: var(--brand-dark); }
.lp-compare .y { color: var(--ok); font-weight: 800; }
.lp-compare .n { color: #c3c6d6; }
.lp-compare tfoot td, .lp-compare tfoot th { border-bottom: 0; padding-top: 20px; padding-bottom: 22px; font-size: 15px; }
.lp-compare tfoot .us { border-radius: 0 0 16px 16px; }
.lp-compare tfoot b { font-family: var(--font-display); font-size: 19px; font-weight: 600; }

/* ---------- Отзывы: две встречные ленты ---------- */

.lp-revs { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.lp-revs + .lp-revs { margin-top: 18px; }
.lp-revs__track { display: flex; gap: 18px; width: max-content; animation: lpRun 52s linear infinite; }
.lp-revs--back .lp-revs__track { animation-direction: reverse; animation-duration: 64s; }
.lp-revs:hover .lp-revs__track { animation-play-state: paused; }
@keyframes lpRun { to { transform: translateX(-50%); } }
.lp-rev {
  width: 360px; flex-shrink: 0; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 24px; transition: .25s;
}
.lp-rev:hover { border-color: rgb(91 91 247 / .4); box-shadow: var(--shadow-hover); }
.lp-rev p { font-size: 14.5px; margin: 11px 0 0; }
/* Подпись без аватара: имя слева, шаблон справа */
.lp-rev footer { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.lp-rev footer > div { min-width: 0; }
.lp-rev footer b { position: relative; padding-left: 12px; }
.lp-rev footer b::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 15px; border-radius: 2px; background: var(--grad);
}
.lp-rev footer span:not([class]) { padding-left: 12px; }
.lp-rev__top { display: flex; align-items: center; gap: 10px; }
.lp-rev__src {
  margin-left: auto; display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; color: var(--ok); white-space: nowrap;
}
.lp-rev__src svg { width: 13px; height: 13px; }
.lp-rev__date { display: block; font-size: 11.5px; color: var(--muted); margin-top: 9px; }
.lp-rev footer b { display: block; font-size: 14.5px; }
.lp-rev footer span:not([class]) { font-size: 12.5px; color: var(--muted); }
.lp-rev__tag { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--muted); background: var(--paper); padding: 4px 9px; border-radius: 7px; white-space: nowrap; }

/* Сводка по оценкам над лентами отзывов */

.lp-rating {
  display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  padding: 30px 36px; margin-bottom: 28px; box-shadow: var(--shadow);
}
.lp-rating__score { text-align: center; padding-right: 36px; border-right: 1px solid var(--line); }
.lp-rating__score b {
  display: block; font-family: var(--font-display); font-size: 56px; font-weight: 600; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lp-rating__stars { color: var(--gold); letter-spacing: 3px; font-size: 16px; margin-top: 10px; }
.lp-rating__score span { display: block; font-size: 13px; color: var(--muted); margin-top: 7px; white-space: nowrap; }

.lp-rating__bars { display: grid; gap: 8px; }
.lp-rating__row { display: flex; align-items: center; gap: 13px; font-size: 13.5px; }
.lp-rating__row > span { min-width: 34px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.lp-rating__track { flex: 1; height: 8px; border-radius: 999px; background: var(--paper); overflow: hidden; }
.lp-rating__track i {
  display: block; height: 100%; border-radius: 999px; background: var(--grad);
  width: 0; animation: lpFill 1s cubic-bezier(.16,1,.3,1) forwards;
}
@keyframes lpFill { to { width: var(--w, 0%); } }
.lp-rating__row > b { min-width: 42px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }

.lp-rating__note {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 9px;
  padding-top: 20px; margin-top: 4px; border-top: 1px solid var(--line);
  font-size: 13.5px; font-weight: 700; color: var(--ok);
}
.lp-rating__note svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ---------- FAQ: две колонки ---------- */

.lp-faq { display: grid; grid-template-columns: .82fr 1.18fr; gap: 44px; align-items: start; }
.lp-faq__aside { position: sticky; top: 96px; }
.lp-faq__aside h2 { font-family: var(--font-display); font-size: clamp(26px, 3.2vw, 38px); font-weight: 600; margin: 14px 0 14px; letter-spacing: -.02em; }
.lp-faq__aside p { color: var(--muted); font-size: 15px; }
.lp-faq__help {
  margin-top: 26px; background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 24px; box-shadow: var(--shadow);
}
.lp-faq__help b { display: block; font-size: 15.5px; margin-bottom: 6px; }
.lp-faq__help p { font-size: 13.5px; color: var(--muted); margin-bottom: 16px; }
.lp-faq__list { display: grid; gap: 11px; counter-reset: lpq; }
.lp-q {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  transition: border-color .25s, box-shadow .25s;
}
.lp-q[open] { border-color: rgb(91 91 247 / .45); box-shadow: var(--shadow); }
.lp-q summary {
  list-style: none; cursor: pointer; padding: 21px 24px; display: flex; align-items: flex-start; gap: 15px;
  font-weight: 700; font-size: 16.5px; color: var(--text);
}
.lp-q summary::-webkit-details-marker { display: none; }
.lp-q summary::before {
  counter-increment: lpq; content: "0" counter(lpq);
  font-family: var(--font-display); font-size: 12.5px; font-weight: 600; color: var(--brand);
  background: rgb(91 91 247 / .1); border-radius: 8px; padding: 4px 8px; flex-shrink: 0; margin-top: 1px;
}
.lp-q summary::after {
  content: ""; margin-left: auto; flex-shrink: 0; width: 22px; height: 22px; margin-top: 2px;
  background:
    linear-gradient(var(--brand), var(--brand)) center / 12px 2px no-repeat,
    linear-gradient(var(--brand), var(--brand)) center / 2px 12px no-repeat;
  transition: transform .3s, background-size .3s;
}
.lp-q[open] summary::after { transform: rotate(90deg); background-size: 12px 2px, 0 12px; }
.lp-q__body { padding: 0 24px 22px 62px; font-size: 15px; color: var(--muted); }

/* ---------- Цифры ---------- */

.lp-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.lp-num { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 24px; text-align: center; transition: .25s; }
.lp-num:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.lp-num b { display: block; font-family: var(--font-display); font-size: 40px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-num span { display: block; font-size: 13.5px; color: var(--muted); margin-top: 9px; }

/* ---------- Финальный экран ---------- */

.lp-final {
  position: relative; overflow: hidden; border-radius: 30px; padding: 62px 54px; text-align: center;
  background: var(--ink); color: #fff;
}
.lp-final::before {
  content: ""; position: absolute; inset: -40% -10% auto -10%; height: 160%; pointer-events: none;
  background:
    radial-gradient(34% 44% at 22% 30%, rgb(79 70 229 / .6), transparent 64%),
    radial-gradient(32% 40% at 80% 26%, rgb(192 38 211 / .45), transparent 66%);
  animation: lpAurora 20s ease-in-out infinite alternate;
}
.lp-final > * { position: relative; z-index: 2; }
.lp-final h2 { font-family: var(--font-display); font-size: clamp(27px, 3.8vw, 44px); font-weight: 600; letter-spacing: -.025em; }
.lp-final p:not([class]) { margin: 17px auto 28px; max-width: 540px; color: rgb(255 255 255 / .72); font-size: 16.5px; }
.lp-final__acts { display: flex; gap: 13px; justify-content: center; flex-wrap: wrap; }
.lp-final__note { margin-top: 19px; font-size: 13px; color: rgb(255 255 255 / .5); }

@media (prefers-reduced-motion: reduce) {
  .hero__aurora, .lp-final::before, .lp-revs__track,
  .hero__float { animation: none; }
  .lp-rating__track i { width: var(--w, 0%); animation: none; }
  .hero__grain { display: none; }
  .hero__rotate span, .hero__device, .hero__device-view, .lp-zip__row { transition: none; }
}

@media (max-width: 1100px) {
  .hero__float--a { left: -14px; }
}
@media (max-width: 980px) {
  .hero { min-height: 0; padding: 40px 0 56px; }
  .hero__in { grid-template-columns: 1fr; gap: 34px; }
  .hero h1 .ln { white-space: normal; }
  .hero h1 .ln { white-space: normal; }
  .hero__stage { max-width: 560px; }
  /* minmax(0, 1fr), а не 1fr: у 1fr минимум равен min-content, и
     кнопка «Подписаться на @канал» без переноса (318 px) раздувала
     колонку шире панели — всё содержимое уезжало за левый край. */
  .lp-zip, .lp-tg, .lp-faq { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .lp-faq__aside { position: static; }
  .lp-path { grid-template-columns: 1fr; gap: 30px; }
  .lp-path::before { display: none; }
  .lp-nums { grid-template-columns: 1fr 1fr; }
  .lp-tg { padding: 36px 26px; }
  .lp-rating { grid-template-columns: 1fr; gap: 24px; padding: 26px 22px; }
  .lp-rating__score { padding-right: 0; border-right: 0; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
  .lp-rating__score span { white-space: normal; }
}
@media (max-width: 760px) {
  /* Сравнение на телефоне не показываем вовсе. Четыре колонки туда
     не помещаются ни при каких ужиманиях, а листать таблицу вбок
     никто не станет — читаться будет только первый столбец. Порог
     760px выбран не наугад: выше него таблица влезает целиком, и
     горизонтальная прокрутка не нужна вообще нигде. */
  .section--compare { display: none; }
}
@media (max-width: 620px) {
  .lp-nums { grid-template-columns: 1fr; }
  .lp-final { padding: 42px 22px; border-radius: 24px; }
  .lp-rev { width: 290px; }
  .hero__tg { flex-wrap: wrap; border-radius: 20px; }
  .lp-tg__card .pct { font-size: 52px; }
  .lp-q summary { font-size: 15.5px; padding: 18px 18px; }
  .lp-q__body { padding: 0 18px 20px 55px; font-size: 14.5px; }
  .hero__float { display: none; }
}

/* ============================================================
   НИЗКИЕ ЭКРАНЫ (ноутбуки 1280×720 и подобные)
   Первый экран должен помещаться целиком вместе с шапкой,
   поэтому на невысоких окнах ужимаем отступы и типографику.
   ============================================================ */

@media (min-width: 981px) and (max-height: 800px) {
  .hero { padding: 26px 0 32px; min-height: 0; }
  .hero h1 { font-size: clamp(26px, 2.9vw, 38px); margin: 12px 0 14px; }
  .hero__sub { font-size: 15.5px; }
  .hero__cta { margin-top: 20px; }
  .hero__tg { margin-top: 16px; padding: 7px 7px 7px 13px; font-size: 13px; }
  .hero__trust { margin-top: 16px; }
  .hero__stats { margin-top: 18px; }
  .hero__stat b { font-size: 21px; }
  .hero__dots { margin-top: 14px; }
  .hero__device-bar { padding: 9px 12px; }
}

/* ============================================================
   САМЫЕ УЗКИЕ ЭКРАНЫ (320–400px)
   Блок идёт последним, чтобы перебивать более ранние правила.
   ============================================================ */

@media (max-width: 400px) {
  /* Две колонки ссылок не помещаются в 320px и дают горизонтальную прокрутку */
  .site-footer__grid { grid-template-columns: 1fr; gap: 28px; padding: 44px 16px 36px; }
  .site-footer__bottom { padding-inline: 16px; }
  .container { padding-inline: 16px; }
}

/* У .hero__rotate стоит overflow:hidden, поэтому слишком длинное слово не
   переносится, а обрезается. Самое длинное в списке ниш — «салона красоты»:
   при 30px оно не помещается в строку уже на 360px. Сбавляем кегль
   заголовка двумя ступенями, с запасом на разное отрисовывание шрифта. */
@media (max-width: 430px) {
  .hero h1 { font-size: 28px; }
}
@media (max-width: 359px) {
  .hero h1 { font-size: 26px; }
}

/* ---------- Панель владельца (вкладка «Админ» в кабинете) ----------
   Внутри компонентов — только классы: правило по голому тегу (0,1,1)
   перебило бы классовое (0,1,0), на чём проект уже обжигался.
   Исключение одно: .adm code — классовых <code> здесь нет. */

/* Панель живёт внутри вкладки кабинета, свой отступ сверху ей не
   нужен — его уже дал .account-tab */
.adm { padding-bottom: 10px; }
.adm code { font-family: ui-monospace, monospace; font-size: 12.5px; background: rgb(0 0 0 / .06); padding: 1px 6px; border-radius: 6px; }

.adm-load { padding: 80px 0; text-align: center; color: var(--muted); font-weight: 600; }

/* Экран входа */
.adm-gate {
  max-width: 420px; margin: 40px auto; padding: 28px 24px 26px;
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.adm-gate h1 { font-family: var(--font-display); font-size: 23px; font-weight: 600; margin-bottom: 8px; }
.adm-gate__sub { font-size: 14px; line-height: 1.6; color: var(--muted); margin-bottom: 18px; }
.adm-gate__err {
  font-size: 13.5px; line-height: 1.5; color: var(--err); font-weight: 700;
  background: rgb(239 68 68 / .08); border-radius: 11px; padding: 10px 13px; margin-bottom: 14px;
}
.adm-gate .btn { margin-top: 14px; }
.adm-gate__hint { font-size: 12.5px; line-height: 1.6; color: var(--muted); margin-top: 16px; }

/* Шапка */
.adm-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.adm-head h1 { font-family: var(--font-display); font-size: clamp(22px, 5vw, 30px); font-weight: 600; }
.adm-head__sub { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.adm-head__acts { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }

.adm-note {
  padding: 15px 17px; border-radius: 14px; margin-bottom: 22px;
  background: rgb(246 168 33 / .1); border: 1px solid rgb(246 168 33 / .3);
  font-size: 14px; line-height: 1.65;
}
.adm-note b { color: #8a5a00; }

/* Карточки с числами */
.adm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 14px; margin-bottom: 26px; }
.adm-card {
  min-width: 0; padding: 17px 18px; border-radius: 16px;
  background: var(--card); box-shadow: var(--shadow); border: 1px solid var(--line);
}
.adm-card--brand { border-color: rgb(91 91 247 / .3); background: var(--grad-soft); }
.adm-card--ok { border-color: rgb(16 185 129 / .32); }
.adm-card--off { opacity: .72; }
.adm-card__t { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.adm-card__v { display: block; font-family: var(--font-display); font-size: 27px; font-weight: 600; margin: 7px 0 3px; overflow-wrap: break-word; }
.adm-card__s { display: block; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.adm-card__s .up { font-style: normal; color: var(--ok); font-weight: 800; }
.adm-card__s .down { font-style: normal; color: var(--err); font-weight: 800; }

/* Панели */
.adm-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.adm-panel {
  min-width: 0; padding: 20px; border-radius: 18px; margin-bottom: 16px;
  background: var(--card); box-shadow: var(--shadow); border: 1px solid var(--line);
}
.adm-panel h2 { font-size: 16px; font-weight: 800; }
.adm-panel__sub { font-size: 12.5px; color: var(--muted); margin: 4px 0 14px; }
.adm-empty { font-size: 13.5px; color: var(--muted); padding: 18px 0; text-align: center; }

/* График: svg тянется по ширине, поэтому на 320px ничего не вылезает */
.adm-chart svg { display: block; width: 100%; height: 108px; }
.adm-chart__ax { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; font-size: 11.5px; color: var(--muted); }

/* Топ шаблонов */
.adm-top__row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.adm-top__row:last-child { border-bottom: 0; }
.adm-top__n { min-width: 0; font-size: 14px; font-weight: 700; overflow-wrap: break-word; }
.adm-top__v { margin-left: auto; flex-shrink: 0; font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--brand-dark); }

/* Люди — карточками, а не таблицей: таблица на телефоне требует
   горизонтальной прокрутки, а её на сайте нет нигде */
.adm-users { display: flex; flex-direction: column; gap: 10px; }
.adm-user {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 11px 13px; border-radius: 13px; background: var(--paper);
}
.adm-user__ava {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 999px;
  background: var(--grad); color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 14px;
}
.adm-user__info { min-width: 0; flex: 1 1 140px; }
.adm-user__name { display: block; font-size: 14px; font-weight: 700; overflow-wrap: break-word; }
.adm-user__mail { display: block; font-size: 12.5px; color: var(--brand-dark); overflow-wrap: anywhere; }
.adm-user__meta { margin-left: auto; text-align: right; flex-shrink: 0; }
.adm-user__when { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.adm-user__via { display: block; font-size: 11.5px; color: var(--muted); }

.adm-foot { margin-top: 22px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }

@media (max-width: 480px) {
  .adm-head__acts { margin-left: 0; width: 100%; }
  .adm-head__acts .btn { flex: 1; }
  .adm-user__meta { margin-left: 46px; text-align: left; }
}

/* На телефоне блок скидки занимал три экрана: бейдж повторял заголовок,
   абзац — список выгод, а карточка «10%» с ползунком говорила про ту же
   скидку в третий раз. Оставляем заголовок, две главные выгоды и кнопки —
   этого достаточно, чтобы понять и подписаться. */
@media (max-width: 560px) {
  .lp-tg { padding: 28px 20px 26px; gap: 0; }
  .lp-tg__badge,
  .lp-tg > div > p:not([class]),
  .lp-tg__perks > div:nth-child(n+3),
  .lp-tg__card { display: none; }
  .lp-tg h2 { margin-top: 0; font-size: 25px; }
  .lp-tg__perks { margin-top: 16px; gap: 8px; }
  .lp-tg__perks > div { font-size: 14px; }
  .lp-tg__auth { margin-top: 18px; }
  .lp-tg__note { font-size: 12px; }
}

/* Узкие телефоны (до 400 px). Нашлось аудитом в состоянии вошедшего:
   - цифры кабинета: «10 780 ₽» шрифтом 28px не влезало в полэкрана;
   - почта в настройках — одно длинное слово без пробелов;
   - панель живого демо: «К шаблону» + переключатель + кнопка покупки
     на 320 px занимали 339 px. Подпись «К шаблону» прячем, стрелка
     остаётся, имя ссылки — в aria-label. */
@media (max-width: 400px) {
  .stat-card { padding: 16px 14px; }
  .stat-card b { font-size: 22px; overflow-wrap: anywhere; }
  .account-tab .hint { overflow-wrap: anywhere; }
  .preview-bar { gap: 8px; padding: 0 10px; }
  .preview-bar__back span { display: none; }
  .device-switch button { padding: 8px 9px; }
}


/* ---- Текст страницы шаблона для поисковиков ----
   deploy/build.py выпекает его в template/<slug>.html, скрипт страницы
   сразу заменяет его оформленной карточкой. Виден только без JS
   или долю секунды до запуска скрипта — пусть и тогда читается. */
.seo-static { max-width: 760px; padding: 40px 0 72px; color: var(--text); line-height: 1.65; }
.seo-static h1 { font-family: var(--font-display); font-size: clamp(26px, 4vw, 38px); line-height: 1.2; margin: 14px 0 12px; }
.seo-static h2 { font-family: var(--font-display); font-size: 20px; margin: 30px 0 10px; }
.seo-static p:not([class]), .seo-static li:not([class]) { color: var(--muted); margin: 0 0 10px; }
.seo-static ul:not([class]) { padding-left: 20px; margin: 0; }
.seo-static a:not([class]) { color: var(--brand); }

/* ---- Уведомление о Метрике (ui.js, cookieNotice) ----
   Светлая карточка слева внизу: тосты живут справа и её не закрывают. */
.cookie-note {
  position: fixed; left: 20px; bottom: 20px; z-index: 190;
  max-width: 440px; padding: 16px 18px;
  background: #fff; color: var(--text);
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 18px 44px -14px rgb(11 13 30 / .35);
  animation: cookie-in .35s ease both;
}
.cookie-note__text { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.cookie-note__text a { color: var(--brand); font-weight: 700; }
.cookie-note__btns { display: flex; gap: 10px; flex-wrap: wrap; }
@keyframes cookie-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cookie-note { animation: none; } }
@media (max-width: 560px) {
  .cookie-note { left: 12px; right: 12px; bottom: 12px; max-width: none; padding: 14px; }
  .cookie-note__btns .btn { flex: 1 1 0; }
  /* на телефоне тосты поднимаются над плашкой, а не ложатся на неё */
  body:has(.cookie-note) #toasts { bottom: 150px; }
}
#ymChoice { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
