/* Self-hosted fonts (Prata, Manrope) — см. static/fonts/. Цветовые и
   размерные токены вынесены в tokens.css, здесь их быть не должно. */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/manrope-400-cyrillic-ext.4cdf0bed0838.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/manrope-400-cyrillic.e58febde317b.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/manrope-400-latin-ext.6d36d5bdedfa.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/manrope-400-latin.938c6e8019b6.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/manrope-500-cyrillic-ext.4cdf0bed0838.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/manrope-500-cyrillic.e58febde317b.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/manrope-500-latin-ext.6d36d5bdedfa.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/manrope-500-latin.938c6e8019b6.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/manrope-600-cyrillic-ext.4cdf0bed0838.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/manrope-600-cyrillic.e58febde317b.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/manrope-600-latin-ext.6d36d5bdedfa.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/manrope-600-latin.938c6e8019b6.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/manrope-700-cyrillic-ext.4cdf0bed0838.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/manrope-700-cyrillic.e58febde317b.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/manrope-700-latin-ext.6d36d5bdedfa.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/manrope-700-latin.938c6e8019b6.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/manrope-800-cyrillic-ext.4cdf0bed0838.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/manrope-800-cyrillic.e58febde317b.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/manrope-800-latin-ext.6d36d5bdedfa.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/manrope-800-latin.938c6e8019b6.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Prata';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/prata-400-cyrillic-ext.ba19618b10aa.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Prata';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/prata-400-cyrillic.f7630c81807d.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Prata';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/prata-400-latin.362177e0cdab.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== RESET & GLOBALS =====
   Цветов и размеров здесь нет — только токены из tokens.css. */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-functional);
  font-size: var(--type-body-medium-size);
  line-height: var(--type-body-medium-lh);
  background: var(--surface-page);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; }
ul { list-style: none; }

/* Контент-контейнер. Поле — токен layout contract, на 390 px даёт
   ровно 350 px контента и не допускает горизонтального скролла. */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--layout-gutter);
}
/* Широкий вьюпорт: мера и поле с макетов V2 (кадр 1440 → 72 + 1296 + 72). */
@media (min-width: 901px) {
  .container {
    max-width: calc(var(--layout-content-wide) + 2 * var(--layout-gutter-wide));
    padding: 0 var(--layout-gutter-wide);
  }
}

/* ============================================================
   ТИПОГРАФИКА — Шаг 4
   ============================================================ */

/* Prata существует ровно в одном начертании. Если задать ей 600/700,
   браузер синтезирует жирность и шрифт разваливается. Правило ниже —
   страховка от этого: любой editorial-элемент принудительно 400. */
.t-display-hero,
.t-display-screen,
.t-display-price,
.t-display-card {
  font-family: var(--font-editorial);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.t-display-hero   { font-size: var(--type-display-hero-size);   line-height: var(--type-display-hero-lh); }
.t-display-screen { font-size: var(--type-display-screen-size); line-height: var(--type-display-screen-lh); }
.t-display-price  { font-size: var(--type-display-price-size);  line-height: var(--type-display-price-lh); }
.t-display-card   { font-size: var(--type-display-card-size);   line-height: var(--type-display-card-lh); }

.t-heading-h1,
.t-heading-h2,
.t-title-large,
.t-body-large,
.t-body-medium,
.t-body-small,
.t-label-large,
.t-label-small,
.t-caption { font-family: var(--font-functional); }

.t-heading-h1  { font-size: var(--type-heading-h1-size);  line-height: var(--type-heading-h1-lh);  font-weight: var(--type-heading-h1-weight); }
.t-heading-h2  { font-size: var(--type-heading-h2-size);  line-height: var(--type-heading-h2-lh);  font-weight: var(--type-heading-h2-weight); }
.t-title-large { font-size: var(--type-title-large-size); line-height: var(--type-title-large-lh); font-weight: var(--type-title-large-weight); }
.t-body-large  { font-size: var(--type-body-large-size);  line-height: var(--type-body-large-lh);  font-weight: var(--type-body-large-weight); }
.t-body-medium { font-size: var(--type-body-medium-size); line-height: var(--type-body-medium-lh); font-weight: var(--type-body-medium-weight); }
.t-body-small  { font-size: var(--type-body-small-size);  line-height: var(--type-body-small-lh);  font-weight: var(--type-body-small-weight); }
.t-label-large { font-size: var(--type-label-large-size); line-height: var(--type-label-large-lh); font-weight: var(--type-label-large-weight); }
.t-label-small { font-size: var(--type-label-small-size); line-height: var(--type-label-small-lh); font-weight: var(--type-label-small-weight); }
.t-caption     { font-size: var(--type-caption-size);     line-height: var(--type-caption-lh);     font-weight: var(--type-caption-weight); }

/* ============================================================
   МАТЕРИАЛЫ — Шаг 3
   ============================================================
   Четыре материала, промежуточных не бывает. Каждый — фон + бордер +
   внутреннее свечение. Значения сняты с экспорта Figma (Color.svg,
   фрейм Material hierarchy): заливка, толщина и цвет обводки, радиус 26.

   Материал усиливается только вместе с важностью слоя. В одной
   вертикальной зоне экрана — ОДИН доминирующий материал: если
   raised-glass висит на всех карточках подряд, интерфейс снова
   становится плоским.

   gold-selected — состояние, а не декор: максимум один элемент
   на экран в один момент времени.

   Смешивать два материала на одном элементе нельзя. Компоненты
   подключаются к материалу через групповой селектор ниже, чтобы
   значение жило в одном месте, а разметка не менялась. */
.m-low-glass,
.m-raised-glass,
.m-gold-selected,
.m-plum-atmosphere {
  border-radius: var(--radius-card);
  border-style: solid;
}

/* Вложенные вкладки и тихие поверхности */
.m-low-glass {
  background: var(--color-alpha-bone-04);
  border-width: 1px;
  border-color: var(--text-secondary);
  box-shadow: inset 0 1px 0 var(--color-alpha-bone-08);
}

/* Основные карточки и тарифы */
.m-raised-glass {
  background: var(--color-alpha-bone-08);
  border-width: 1px;
  border-color: var(--text-secondary);
  box-shadow: inset 0 1px 0 var(--color-alpha-bone-12);
}

/* Только выбранное и активное */
.m-gold-selected {
  background: var(--color-alpha-gold-12);
  border-width: 2px;
  border-color: var(--accent-selected);
  box-shadow: inset 0 1px 0 var(--color-alpha-gold-24);
}

/* Эмоциональная глубина, без CTA */
.m-plum-atmosphere {
  background: var(--color-alpha-plum-18);
  border-width: 1px;
  border-color: var(--accent-atmosphere);
  box-shadow: inset 0 1px 0 var(--color-alpha-bone-08);
}


/* ===== ATMOSPHERE BG ===== */
/* Атмосфера — plum, единственная роль которого «эмоциональная глубина».
   Не свечение и не яркость: глубина строится материалом.
   Зерно поверх — против полос: растяжка plum-18 в прозрачность на пол-экрана
   проходит считанные ступени 8-битной шкалы, и без дизеринга они видны
   дугами (см. --dither).
   Слой вынесен в переменную: тот же ::before занимает сцена страницы
   (см. «СЦЕНА СТРАНИЦЫ»), и там, где сцены нет, атмосферу нужно вернуть. */
:root {
  --atmosphere-layer:
    var(--dither),
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--color-alpha-plum-18) 0%, transparent 62%);
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: var(--atmosphere-layer);
  pointer-events: none;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

/* ===== HEADER ===== */
.header-wrap {
  position: sticky; top: 0; z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
}
.header-wrap.scrolled {
  background: var(--scrim);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--text-secondary);
}
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  max-width: 1280px; margin: 0 auto;
}
/* Словесный знак, а не иконка с подписью: в макетах V2 бренд набран
   Prata капителью и держит левое поле шапки, подвала и воронки. */
.header-logo {
  display: flex; align-items: flex-end;
  gap: 10px;
  font-family: var(--font-editorial);
  font-weight: 400;
  font-size: var(--type-title-large-size);
  letter-spacing: 0.14em;
  color: var(--accent-selected);
  white-space: nowrap;
}
/* Знак ростом со строку вордмарка: 26 px — интерлиньяж title-large. */
.header-logo img { display: block; width: auto; height: 26px; }
.header-logo:hover { color: var(--accent-selected-hover); }
.header-nav { display: flex; gap: 28px; }
.header-nav a {
  font-size: var(--type-label-large-size); color: var(--text-secondary);
  font-weight: 400;
  transition: color 0.2s;
}
.header-nav a:hover { color: var(--text-primary); }
.header-nav a.is-active { color: var(--accent-selected); }
.header-actions { display: flex; gap: 12px; align-items: center; }
/* «Регистрация» в макете — обводка, а не заливка: заливка золотом на
   этом экране принадлежит одной кнопке в герое, и две одинаковые
   плашки спорили бы за главное действие. */
.btn-register {
  padding: 8px 20px; border-radius: var(--radius-pill);
  border: 1px solid var(--accent-selected);
  background: none; color: var(--accent-selected);
  font-size: var(--type-label-large-size); font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
}
.btn-register:hover { background: var(--accent-selected); color: var(--text-on-selected); }
.btn-login {
  padding: 8px 16px; font-size: var(--type-label-large-size);
  font-weight: 400;
  color: var(--text-secondary); background: none;
  transition: color 0.2s;
}
.btn-login:hover { color: var(--text-primary); }

/* Десктоп: шапка встаёт на меру контента — левая линия знака совпадает
   с левым краем секций, навигация садится в центр кадра. */
@media (min-width: 901px) {
  .header {
    max-width: calc(var(--layout-content-wide) + 2 * var(--layout-gutter-wide));
    padding: 22px var(--layout-gutter-wide);
  }
  .header-nav { gap: 56px; }
}

/* ===== BUTTONS =====
   Единая геометрия для всех кнопок: высоты и радиусы из layout contract,
   размеры только из шкалы. Раньше каждая кнопка задавала своё —
   отсюда были высоты 40..56 и радиусы 8/20/28 вперемешку.

   Цветовые роли:
     btn-primary  — продуктовое действие, GOLD, тёмный текст
     btn-outline  — тихая альтернатива, только бордер
     purchase-CTA — BERRY, живёт отдельно (см. .cta-btn / .btn-pay) */
.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--control-default);
  padding: 0 28px;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  font-family: var(--font-functional);
  font-size: var(--type-title-large-size);
  line-height: var(--type-title-large-lh);
  font-weight: var(--type-title-large-weight);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn-primary {
  background: var(--accent-selected);
  color: var(--text-on-selected);
  border-color: var(--accent-selected);
}
.btn-primary:hover {
  background: var(--accent-selected-hover);
  border-color: var(--accent-selected-hover);
}
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--accent-selected); background: var(--color-alpha-bone-04); }

.section-title {
  font-family: var(--font-editorial);
  font-size: var(--type-display-screen-size); font-weight: 400;
  letter-spacing: -0.01em; line-height: var(--type-display-screen-lh);
  text-align: center; margin-bottom: clamp(32px, 4vw, 52px);
}

/* ===== SPREAD CARDS ===== */
.spread-card {
  position: relative;
  background: var(--color-alpha-bone-08);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex; flex-direction: column;
  transition: transform 0.22s ease-out, border-color 0.22s ease-out, box-shadow 0.22s ease-out, background 0.22s ease-out;
  will-change: transform;
}
.spread-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-alpha-gold-24);
  box-shadow: 0 16px 40px var(--color-alpha-black-36);
}
.card-tags {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: flex; gap: 6px; margin: 0; flex-wrap: wrap;
  max-width: calc(100% - 24px);
}
.tag {
  padding: 4px 10px; border-radius: var(--radius-control);
  font-size: var(--type-caption-size); font-weight: 600;
  background: var(--color-alpha-plum-18);
  color: var(--accent-selected);
  border: 1px solid var(--border-strong);
}
.tag.new { background: var(--color-alpha-plum-18); color: var(--text-primary); }
.tag.free {
  background: var(--status-success-bg);
  color: var(--status-success-text);
  border-color: var(--status-success-border);
}

.messages-container { padding: 16px 0 0; }
.message {
  padding: 12px 16px;
  border-radius: var(--radius-control);
  margin-bottom: 8px;
  font-size: var(--type-label-large-size);
  background: var(--color-alpha-plum-18);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
}
.message-error {
  background: var(--status-error-bg);
  border-color: var(--status-error-border);
  color: var(--status-error-text);
}
.message-success {
  background: var(--status-success-bg);
  border-color: var(--status-success-border);
  color: var(--status-success-text);
}
.card-image {
  position: relative;
  width: calc(100% + 32px);
  margin: -16px -16px 14px;
  aspect-ratio: 3 / 2;
  background: linear-gradient(135deg, var(--color-alpha-plum-18), var(--color-alpha-plum-18));
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.card-image img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
  transition: transform 0.4s ease-out;
}
.spread-card:hover .card-image img { transform: scale(1.05); }
/* Unify tone across mixed jpg/png previews so nothing clashes with the palette */
.card-image::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--scrim-soft) 0%, var(--scrim-soft) 28%, var(--scrim-soft) 55%, var(--scrim) 100%),
              var(--color-alpha-plum-18);
  mix-blend-mode: multiply;
  pointer-events: none;
}
.card-image .cards-icon { font-size: var(--type-heading-h1-size); opacity: 0.4; }
.card-image svg.cards-icon {
  width: 48px; height: 48px;
  color: var(--accent-selected);
  opacity: 0.55;
}
.spread-card h3 { font-size: var(--type-body-large-size); font-weight: 700; margin-bottom: 6px; letter-spacing: -0.01em; }
.spread-card p { font-size: var(--type-body-small-size); color: var(--text-secondary); line-height: 1.55; flex: 1; margin-bottom: 12px; }
.card-meta { font-size: var(--type-label-small-size); color: var(--text-secondary); margin-bottom: 14px; }
.btn-card {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--radius-control);
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--accent-selected); font-size: var(--type-label-large-size); font-weight: var(--type-label-large-weight);
  transition: background 0.2s ease-out, color 0.2s ease-out, border-color 0.2s ease-out;
  align-self: flex-start;
}
.btn-card:hover { background: var(--accent-selected); border-color: var(--accent-selected); color: var(--text-on-selected); }
.btn-card svg { width: 14px; height: 14px; }

/* ===== SPREADS GRID (step1) ===== */
.spreads-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.category-filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 32px;
}
/* Category landing (/spreads/<slug>/) */
.breadcrumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: var(--type-body-small-size); color: var(--text-secondary); margin-bottom: 18px;
}
.breadcrumbs a { color: var(--text-secondary); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent-selected); }
.breadcrumbs [aria-current="page"] { color: var(--text-secondary); }
.category-intro {
  max-width: 720px; margin: 0 auto 36px; text-align: center;
  color: var(--text-secondary); font-size: var(--type-body-large-size); line-height: 1.7;
}
.category-intro p { margin: 0 0 12px; }
.category-intro a { color: var(--accent-selected); }
.category-lead {
  max-width: 720px; margin: 0 auto 28px; text-align: center;
  color: var(--text-secondary); font-size: var(--type-body-large-size); line-height: 1.7;
}
a.filter-btn { text-decoration: none; }
.filter-btn {
  padding: 8px 16px; border-radius: var(--radius-control);
  background: var(--color-alpha-bone-04);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary); font-size: var(--type-body-small-size); font-weight: 600;
  transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.filter-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px;
  color: var(--accent-selected);
}
.filter-icon svg { width: 14px; height: 14px; display: block; }
.filter-icon .cat-svg-mask { width: 14px; height: 14px; }
.filter-btn.active .filter-icon,
.filter-btn:hover .filter-icon { color: currentColor; }
.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-selected);
  border-color: var(--accent-selected);
  color: var(--text-on-selected);
}

/* ===== FORM STYLES (step2) ===== */
.form-card {
  background: var(--color-alpha-bone-08);
  border-radius: var(--radius-card);
  padding: 32px;
  max-width: 640px;
  margin: 0 auto 30px;
  -webkit-box-shadow: 0px 0px 13px 6px var(--color-alpha-black-36);
  -moz-box-shadow: 0px 0px 13px 6px var(--color-alpha-black-36);
  box-shadow: 0px 0px 13px 6px var(--color-alpha-black-36);
}
.form-card--with-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.card-backs-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 8px 0 24px;
}
.card-back {
  width: 54px;
  aspect-ratio: 6 / 11;
  border-radius: var(--radius-control);
  box-shadow: 0 4px 14px var(--scrim-soft);
  transition: transform 0.25s ease;
}
.card-back:hover { transform: translateY(-3px); }
.card-back svg { width: 100%; height: 100%; display: block; }
@media (max-width: 600px) {
  .card-back { width: 44px; }
  .card-backs-row { gap: 6px; }
}
.form-card h2 {
  font-size: var(--type-heading-h2-size); font-weight: 700;
  margin-bottom: 24px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: var(--type-label-large-size); font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-control);
  background: var(--color-alpha-bone-04);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--type-body-medium-size);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-selected);
}
.form-group textarea {
  min-height: 120px;
  resize: none;
}
.form-error {
  color: var(--status-error-text);
  font-size: var(--type-body-small-size);
  margin-top: 6px;
}
.form-errors-list {
  background: var(--status-error-bg);
  border: 1px solid var(--status-error-border);
  border-radius: var(--radius-control);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.form-errors-list li {
  color: var(--status-error-text);
  font-size: var(--type-body-small-size);
  list-style: disc;
  margin-left: 16px;
  margin-bottom: 4px;
}
.form-errors-sublist {
  margin-top: 4px;
  margin-bottom: 4px;
}
.form-errors-sublist li {
  list-style: circle;
  margin-left: 18px;
  margin-bottom: 2px;
}
.field-hint {
  display: block;
  margin-top: 6px;
  font-size: var(--type-body-small-size);
  color: var(--text-secondary);
  line-height: 1.4;
}
.form-hint {
  background: var(--color-alpha-plum-18);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  padding: 12px 16px;
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: var(--type-body-small-size);
  line-height: 1.5;
}
.form-hint-title {
  color: var(--accent-selected);
  font-weight: 600;
  margin-bottom: 6px;
  font-size: var(--type-body-small-size);
}
.form-hint ul { margin-left: 16px; }
.form-hint li { list-style: disc; margin-bottom: 2px; }

.form-consent {
  margin: 4px 0 16px;
  font-size: var(--type-body-small-size);
  line-height: 1.5;
  color: var(--text-secondary);
}
.form-consent label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.form-consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--accent-selected);
  cursor: pointer;
}
.form-consent a { color: var(--accent-selected); text-decoration: underline; }
.form-consent a:hover { color: var(--accent-selected); }

.spread-detailed-description {
  background: var(--color-alpha-plum-18);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  padding: 14px 18px;
  margin-bottom: 24px;
  color: var(--text-secondary);
  font-size: var(--type-label-large-size);
  line-height: 1.55;
}
.spread-detailed-description p { margin: 0 0 8px; }
.spread-detailed-description p:last-child { margin-bottom: 0; }

.example-questions {
  margin-top: 10px;
  font-size: var(--type-body-small-size);
}
.example-questions > summary {
  cursor: pointer;
  color: var(--accent-selected);
  user-select: none;
  padding: 4px 0;
}
.example-questions > summary:hover { color: var(--text-primary); }
.example-questions ul {
  list-style: none;
  margin: 8px 0 4px;
  padding: 0;
}
.example-questions li {
  cursor: pointer;
  padding: 6px 10px;
  margin-bottom: 4px;
  background: var(--color-alpha-bone-04);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  color: var(--text-secondary);
  transition: background .15s, color .15s, border-color .15s;
}
.example-questions li:hover {
  background: var(--color-alpha-bone-08);
  border-color: var(--accent-selected);
  color: var(--text-primary);
}

/* ===== PAYMENT (step3) ===== */
.payment-card {
  background: var(--color-alpha-bone-08);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  padding: 32px;
  max-width: 480px;
  margin: 0 auto 24px;
  text-align: center;
}
.payment-card h2 {
  font-size: var(--type-heading-h2-size); font-weight: 700;
  margin-bottom: 12px;
}
.payment-amount {
  font-size: var(--type-heading-h1-size); font-weight: 700;
  color: var(--accent-selected);
  margin-bottom: 8px;
}
.payment-desc {
  font-size: var(--type-label-large-size); color: var(--text-secondary);
  margin-bottom: 28px;
}
.btn-pay {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--control-large);
  padding: 0 40px; border-radius: var(--radius-control);
  background: var(--accent-purchase); color: var(--text-on-purchase);
  font-size: var(--type-title-large-size);
  line-height: var(--type-title-large-lh);
  font-weight: var(--type-title-large-weight);
  transition: background-color 0.2s ease;
}
.btn-pay:hover { background: var(--accent-purchase-hover); }

/* ===== RESULT (step4) ===== */
.result-section {
  margin: 0 auto;
  margin-bottom: 24px;
}
.result-header {
  text-align: center;
  margin-bottom: 32px;
  margin-top: 32px;
}
.result-header h1 {
  font-size: var(--type-heading-h1-size); font-weight: 700;
  margin-bottom: 8px;
}
.result-header p {
  font-size: var(--type-label-large-size); color: var(--text-secondary);
}
.cards-row {
  display: flex; gap: 40px; justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.tarot-card-drawn {
  width: 148px;
  text-align: center;
}
.tarot-card-drawn.reversed { opacity: 0.92; }
.tarot-card-drawn .card-image-wrap {
  width: 100%;
  aspect-ratio: 6 / 11;
  margin: 0 0 16px;
  border-radius: var(--radius-control);
  overflow: hidden;
  background: var(--color-alpha-plum-18);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 18px 40px var(--scrim), 0 0 0 1px var(--color-alpha-bone-04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tarot-card-drawn:hover .card-image-wrap {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px var(--color-alpha-black-36), 0 18px 40px var(--scrim), 0 0 0 1px var(--color-alpha-bone-08);
}
.tarot-card-drawn .card-image-wrap img,
.tarot-card-drawn .card-image-wrap svg {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.tarot-card-drawn.reversed .card-image-wrap img,
.tarot-card-drawn.reversed .card-image-wrap svg {
  transform: rotate(180deg);
}
.tarot-card-drawn .card-position {
  font-size: var(--type-label-small-size); color: var(--text-secondary);
  font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 14px;
}
.tarot-card-drawn .card-name {
  font-size: var(--type-body-medium-size); font-weight: 600;
  margin-bottom: 2px;
}
.tarot-card-drawn .card-direction {
  font-size: var(--type-body-small-size); color: var(--text-secondary);
}
.interpretation-block {
  background: var(--color-alpha-bone-08);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  padding: 32px;
}
.interpretation-block h2 {
  font-size: var(--type-heading-h2-size); font-weight: 700;
  margin-bottom: 16px;
}
.interpretation-block .text {
  font-size: var(--type-body-medium-size); color: var(--text-secondary);
  line-height: 1.8;
  white-space: pre-line;
}
.interpretation-cta {
  display: inline-block;
  margin-top: 20px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== UPSELL (step4) ===== */
.upsell-section { margin: 32px 0 32px; }
.upsell-header { text-align: center; margin-bottom: 28px; }
.upsell-header h2 {
  font-size: var(--type-heading-h2-size); font-weight: 700;
  margin-bottom: 8px;
}
.upsell-header p {
  font-size: var(--type-body-medium-size); color: var(--text-secondary);
}
.upsell-single {
  display: flex; justify-content: center;
}
.upsell-single .spread-card { max-width: 320px; }
.upsell-single .poster-card { flex: 0 0 320px; max-width: 320px; width: 100%; }
/* On desktop the upsell carousel renders as a static grid (no slider). */
@media (min-width: 901px) {
  .upsell-carousel-wrapper { padding: 0; }
  .upsell-carousel-wrapper .carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    overflow: visible;
    scroll-snap-type: none;
    padding: 0;
  }
  .upsell-carousel-wrapper .carousel .spread-card {
    flex: initial;
    scroll-snap-align: none;
  }
  .upsell-carousel-wrapper .carousel-arrow { display: none; }
}

/* ===== WAITING / PROCESSING ===== */
.waiting-card {
  background: var(--color-alpha-bone-08);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  padding: 48px 32px;
  max-width: 480px;
  margin: 0 auto 24px;
  text-align: center;
}
.waiting-card h2 {
  font-size: var(--type-heading-h2-size); font-weight: 700;
  margin-bottom: 12px;
}
.waiting-card p {
  font-size: var(--type-label-large-size); color: var(--text-secondary);
  margin-bottom: 24px;
}
.spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--border-strong);
  border-top-color: var(--accent-selected);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 24px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== AUTH FORMS (login/register) ===== */
.auth-card {
  background: var(--color-alpha-bone-08);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  padding: 40px 32px;
  max-width: 420px;
  margin: 60px auto;
}
.auth-card h1 {
  font-size: var(--type-heading-h2-size); font-weight: 700;
  text-align: center;
  margin-bottom: 28px;
}
.auth-card .btn-primary {
  width: 100%;
  text-align: center;
  margin-top: 8px;
}
.auth-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: var(--type-label-large-size);
  color: var(--text-secondary);
}
.auth-link a { color: var(--accent-selected); text-decoration: underline; }

/* --- Social auth buttons --- */
.social-auth { margin-top: 20px; }
.social-auth-top { margin-bottom: 20px;}
.social-auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 14px 0 14px;
  font-size: var(--type-body-small-size); color: var(--text-secondary);
}
.social-auth-divider::before,
.social-auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border-strong);
}
.social-auth-buttons {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.social-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-strong);
  font-weight: 600; font-size: var(--type-label-large-size);
  text-decoration: none;
  transition: filter .15s, border-color .15s;
}
.social-btn:hover { filter: brightness(1.08); }
.social-btn--vk { background: var(--brand-vk); color: var(--brand-vk-text); border-color: var(--brand-vk); }
.social-btn--yandex { background: var(--brand-yandex); color: var(--brand-yandex-text); border-color: var(--color-bone-1000); }
@media (max-width: 420px) {
  .social-auth-buttons { grid-template-columns: 1fr; }
}

.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-secondary); font-size: var(--type-body-medium-size);
}

/* ===== FOOTER ===== */
/* Подвал — полоса край в край: без меры контента, без скругления и
   без поля под собой, чтобы страница заканчивалась ровно на нём. */
.footer {
  border-top: 1px solid var(--border-strong);
  padding: 48px 0 24px;
  z-index: inherit;
}
.footer-inner {
  width: 100%;
  padding: 0 var(--layout-gutter);
}
@media (min-width: 901px) {
  .footer {
    border-top: 1px solid var(--border-hairline);
    padding: 0;
  }
  .footer-inner {
    padding: 56px var(--layout-gutter-wide);
    background: var(--surface-card);
  }
  .footer-grid { margin-bottom: 32px; }
  .footer-bottom { text-align: left; }
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand h3 {
  display: flex; align-items: center;
  font-family: var(--font-editorial);
  font-size: var(--type-display-card-size);
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--accent-selected);
  margin-bottom: 14px;
}
.footer-brand p { font-size: var(--type-body-small-size); color: var(--text-secondary); line-height: 1.5; }
.footer-col h4 {
  font-size: var(--type-label-large-size); font-weight: 500;
  color: var(--accent-selected);
  margin-bottom: 18px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: var(--type-body-small-size); color: var(--text-secondary); transition: color 0.2s; }
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border-strong);
  font-size: var(--type-label-small-size); color: var(--text-secondary);
}
.footer-disclaimer {
  margin-top: 8px;
  font-size: var(--type-label-small-size);
  color: var(--text-secondary);
}

/* ===== MOBILE BOTTOM NAV ===== */
.mobile-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--surface-page);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-strong);
  padding: 5px 0 calc(5px + env(safe-area-inset-bottom));
}
.mobile-bottom-nav-inner {
  display: flex; align-items: stretch;
  max-width: 480px; margin: 0 auto;
}
/* Равные доли, а не space-around: подписи разной длины (Главная —
   Расклады — Авторизация) раздували крайние пункты и разъезжались
   несимметричными просветами. */
.bottom-nav-item {
  flex: 1 1 0;
  min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  background: none; color: var(--text-secondary);
  font-size: var(--type-caption-size); font-weight: 600;
  line-height: var(--type-caption-lh);
  padding: 4px 6px;
  white-space: nowrap;
  transition: color 0.2s;
  text-decoration: none;
}
.bottom-nav-item svg { width: 20px; height: 20px; }
.bottom-nav-item.active,
.bottom-nav-item:hover { color: var(--accent-selected); }

/* ===== BURGER & MOBILE MENU ===== */
.burger-btn {
  display: none;
  flex-direction: column; justify-content: center; gap: 4px;
  width: 28px; height: 28px;
  background: none; padding: 11px;
}
.burger-btn span {
  display: block; width: 100%; height: 1px;
  background: var(--text-primary); border-radius: var(--radius-control);
  transition: all 0.3s;
}
.mobile-menu {
  position: fixed; inset: 0;
  background: var(--surface-page);
  z-index: 1000;
  display: flex; flex-direction: column;
  padding: 16px 24px 32px;
  transform: translateX(100%);
  /* visibility снимает закрытую панель с обхода Tab — страховка на случай,
     если браузер не знает атрибута inert. Смена отложена на время выезда,
     иначе панель пропадёт мгновенно и анимации закрытия не будет видно. */
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0.35s;
}
.mobile-menu.open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
}
/* Фон не должен прокручиваться под открытой панелью. */
body.menu-open { overflow: hidden; }
.mobile-menu-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 40px;
}
.mobile-close {
  background: none; color: var(--text-primary);
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
}
.mobile-nav {
  display: flex; flex-direction: column; gap: 0;
  flex: 1;
}
.mobile-nav a {
  display: block;
  padding: 16px 0;
  font-size: var(--type-title-large-size); font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-strong);
  transition: color 0.2s;
}
.mobile-nav a:hover { color: var(--accent-selected); }
.mobile-actions {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: auto;
  padding-top: 24px;
}

/* ===== ERROR PAGES ===== */
.error-page {
  text-align: center;
  padding: 120px 24px;
}
.error-page h1 {
  font-size: var(--type-heading-h1-size); font-weight: 700;
  color: var(--accent-selected);
  margin-bottom: 16px;
}
.error-page p {
  font-size: var(--type-body-large-size); color: var(--text-secondary);
  margin-bottom: 32px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .header-nav { display: none; }
  .header-actions .btn-register,
  .header-actions .btn-login { display: none; }
  .burger-btn { display: flex; }
  .mobile-bottom-nav { display: block; }
  body { padding-bottom: 72px; }
  .spreads-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 600px) {
  .spreads-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section-title { font-size: var(--type-display-card-size); }
  .form-card,
  .payment-card,
  .auth-card { margin: 30px 12px; padding: 24px 16px; }
  .cards-row { gap: 10px; }
  .tarot-card-drawn { width: 31%; min-width: 0; }
  .tarot-card-drawn .card-position { font-size: var(--type-caption-size); margin-bottom: 8px; }
}

/* ===== LEGAL PAGES ===== */
.legal-page { max-width: 820px; margin: 40px auto 80px; padding: 0 24px; color: var(--text-secondary); }
.legal-page h1 { color: var(--text-primary); font-size: var(--type-heading-h1-size); margin-bottom: 8px; }
.legal-page .legal-meta { color: var(--text-secondary); font-size: var(--type-body-small-size); margin-bottom: 32px; }
.legal-page h2 { color: var(--text-primary); font-size: var(--type-heading-h2-size); margin: 32px 0 12px; }
.legal-page h3 { color: var(--text-primary); font-size: var(--type-body-large-size); margin: 20px 0 8px; }
.legal-page p, .legal-page li { line-height: 1.7; margin-bottom: 10px; }
.legal-page ul, .legal-page ol { padding-left: 24px; margin-bottom: 16px; }
.legal-page ul li { list-style: disc; }
.legal-page ol li { list-style: decimal; }
.legal-page a { color: var(--accent-selected); text-decoration: underline; }
.legal-page .contacts-grid {
  display: grid; grid-template-columns: 160px 1fr; gap: 12px 24px;
  background: var(--color-alpha-bone-04); border: 1px solid var(--border-strong);
  border-radius: var(--radius-control); padding: 24px; margin-top: 16px;
}
.legal-page .contacts-grid dt { color: var(--text-secondary); }
.legal-page .contacts-grid dd { color: var(--text-primary); }
@media (max-width: 600px) {
  .legal-page .contacts-grid { grid-template-columns: 1fr; gap: 4px 0; }
  .legal-page .contacts-grid dt { margin-top: 8px; }
}
.payment-terms {
  margin-top: 20px; font-size: var(--type-label-small-size); color: var(--text-secondary); line-height: 1.6;
}
.payment-terms a { color: var(--accent-selected); text-decoration: underline; }

/* ===== LANDING: HERO ===== */
.hero {
  --hero-pad-top: clamp(56px, 8vw, 104px);
  padding: 0 24px clamp(40px, 6vw, 72px);
}
/* Герой одноколоночный: визуал несёт фоновый кадр (сцена deck-right —
   колода справа, слева чистое поле), поэтому вторая колонка под
   иллюстрацию больше не нужна. */
.hero-inner {
  max-width: 1200px; margin: 0 auto;
}
.hero-text { max-width: 620px; }

/* Надзаголовок — та же капитель, что у меток секций. */
.hero-eyebrow {
  margin: 0 0 18px;
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-lh);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-selected);
}
.hero h1 {
  font-family: var(--font-editorial);
  /* Prata существует только в Regular: font-weight: 700 заставлял браузер
     синтезировать жирность, и на крупном кегле это видно как расплывание. */
  font-size: var(--type-display-hero-size); font-weight: 400;
  line-height: var(--type-display-hero-lh); margin-bottom: 24px;
  letter-spacing: -0.015em;
}
.hero p {
  font-size: var(--type-body-large-size); color: var(--text-secondary);
  max-width: 520px; margin: 0;
  line-height: 1.65; font-weight: 400;
}
.hero .link-inline {
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.link-inline { color: var(--accent-selected); }
.link-inline:hover { color: var(--text-primary); }
.hero-buttons {
  display: flex; gap: 16px;
  flex-wrap: wrap;
  margin-top: 36px;
}
.hero .btn-primary,
.hero .btn-outline { display: inline-flex; align-items: center; text-decoration: none; }

/* ===== LANDING: TRUST STATS BAND ===== */
/* Полоса идёт без .container: строка показателей во всю ширину экрана.
   Сверху отбивки нет — полоса примыкает к герою. */
.stats-band { padding: 0 0 clamp(24px, 4vw, 48px); }
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 3vw, 40px);
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  padding: clamp(22px, 3vw, 34px) 0;
}
.stat { text-align: center; position: relative; }
.stat + .stat::before {
  content: ''; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  height: 56%; width: 1px; background: var(--border-strong);
}
.stat-num {
  font-family: var(--font-editorial);
  font-weight: 400;
  font-size: var(--type-display-screen-size);
  line-height: 1;
  color: var(--accent-selected);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  margin-top: 8px;
  font-size: var(--type-label-small-size);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
@media (max-width: 600px) {
  /* Показатели остаются в одну строку — ужимаем кегль, а не ломаем сетку. */
  .stats-row { gap: 10px; padding: 18px 0; }
  .stat-num { font-size: var(--type-display-card-size); }
  .stat-label {
    margin-top: 6px;
    font-size: var(--type-caption-size);
    letter-spacing: 0.03em;
  }
}

/* ===== LANDING: POPULAR CAROUSEL ===== */
.popular-section { padding: clamp(16px, 3vw, 32px) 0 clamp(36px, 5vw, 56px); }
.popular-section .section-label {
  font-size: var(--type-label-small-size); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--accent-selected);
  margin: 0 0 6px;
}
.popular-lede {
  margin: 10px 0 0;
  max-width: 34em;
  color: var(--text-secondary);
  font-size: var(--type-body-large-size);
  line-height: var(--type-body-large-lh);
}

/* ---------- Карточки «Выберите точку фокуса» (макет D01 / M-home) ----------
   Не карусель: три расклада показаны сразу. На мобиле первый крупный во всю
   ширину, два следующих парой; на широком экране — три равные колонки.
   Классы свои: постеры каталога (.poster-card) устроены иначе — там текст
   лежит поверх картинки, здесь под ней. */
.focus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 22px;
}
.focus-grid .poster-card { flex: initial; scroll-snap-align: none; }
/* В блоке «Популярные расклады» метка «Популярный» — тавтология, а в узкой
   парной карточке она же уводит теги на вторую строку. */
.focus-grid .tag-popular { display: none; }
.focus-grid .poster-card:first-child { grid-column: 1 / -1; }
/* Ведущая карточка шире — и кадр под неё площе, иначе 4/5 растягивает
   её на пол-экрана. */
.focus-grid .poster-card:first-child { aspect-ratio: 4 / 3; }

/* Парная карточка узкая: описание в ней не помещается поверх кадра. */
@media (max-width: 600px) {
  .focus-grid { gap: 12px; }
  .focus-grid .poster-card:not(:first-child) .poster-overlay p { display: none; }
}
.carousel-wrapper {
  position: relative;
  max-width: 1280px; margin: 0 auto;
  --carousel-gutter: 48px;
  padding: 0 var(--carousel-gutter);
}
.carousel {
  display: flex; gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 20px 0;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel .spread-card {
  flex: 0 0 240px;
  scroll-snap-align: center;
}
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--color-alpha-bone-04);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  z-index: 5;
}
.carousel-arrow:hover { background: var(--color-alpha-bone-12); }
.carousel-arrow.left { left: 4px; }
.carousel-arrow.right { right: 4px; }
.carousel-nav { display: none; }
.carousel-dots {
  display: flex; gap: 8px; flex-wrap: wrap;
  align-items: center; justify-content: center;
  flex: 1; min-width: 0; padding: 0 8px;
}
.carousel-dot {
  /* Точка — индикатор, а не тач-цель: общее правило кнопок
     (min-height: --control-compact) растягивало её на 44 px и
     ломало ряд. Прокрутку ведут стрелки и сам свайп. */
  min-height: 0;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--color-alpha-bone-12);
  border: 0; padding: 0; cursor: pointer;
  transition: background 0.2s, transform 0.2s, width 0.2s;
}
.carousel-dot.active {
  background: var(--accent-selected);
  width: 20px; border-radius: var(--radius-control);
}

/* ===== LANDING: CHOOSE SPREAD BTN ===== */
.choose-spread { text-align: center; padding: 10px 0 var(--space-section); }
.btn-choose {
  display: inline-block;
  padding: 14px 32px; border-radius: var(--radius-card);
  background: transparent;
  border: 2px solid var(--border-strong);
  color: var(--text-primary); font-size: var(--type-body-large-size); font-weight: 700;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-choose:hover { border-color: var(--accent-selected); background: var(--color-alpha-bone-08); }

/* ===== LANDING: HOW IT WORKS ===== */
.how-section {
  position: relative;
  padding: var(--space-section) 0;
}
.how-section .container { position: relative; }
.section-title.center { text-align: center; margin-bottom: 36px; }

.steps-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}
.step {
  background: transparent;
  border: none;
  border-top: 1px solid var(--border-strong);
  border-radius: 0;
  padding: 22px 0 0;
}
.steps-row .step-connector { display: none; }
.step-num {
  display: block;
  font-size: var(--type-caption-size);
  color: var(--text-secondary);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}
.step-num b {
  display: block;
  font-family: var(--font-editorial);
  font-size: var(--type-display-screen-size);
  font-weight: 400;
  line-height: 1;
  color: var(--accent-selected);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  background: none;
  border: none;
  padding: 0;
}
.step h4 {
  font-weight: 700;
  font-size: var(--type-body-large-size);
  margin-top: 12px;
  margin-bottom: 6px;
}
.step p {
  color: var(--text-secondary);
  font-size: var(--type-body-small-size);
  line-height: 1.55;
}

/* ===== LANDING: CATEGORIES ===== */
.categories-section { padding: var(--space-section) 0; }
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.cat-card {
  background: var(--color-alpha-bone-08);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  padding: 20px 16px;
  display: flex; align-items: center; gap: 12px;
  transition: transform 0.2s ease-out, border-color 0.2s ease-out, background 0.2s ease-out;
  text-decoration: none;
  color: inherit;
}
.cat-card:hover {
  background: var(--color-alpha-bone-12);
  border-color: var(--color-alpha-gold-24);
  transform: translateY(-2px);
}
.cat-icon {
  width: 40px; height: 40px; border-radius: var(--radius-control);
  background: var(--color-alpha-plum-18);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--accent-selected);
}
.cat-icon svg { width: 20px; height: 20px; display: block; }
.cat-svg-mask {
  display: inline-block;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.cat-icon .cat-svg-mask { width: 20px; height: 20px; }
.cat-info h4 { font-size: var(--type-body-medium-size); font-weight: 700; margin-bottom: 2px; }
.cat-info p { font-size: var(--type-label-small-size); color: var(--text-secondary); line-height: 1.4; }
.btn-all-categories {
  background: var(--color-alpha-bone-04);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  padding: 20px 16px;
  color: var(--text-primary); font-size: var(--type-label-large-size); font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-all-categories:hover { background: var(--color-alpha-bone-12); border-color: var(--accent-selected); }

/* ===== LANDING: FAQ ===== */
.faq-section { padding: var(--space-section) 0; }
.faq-header {
  display: flex; justify-content: center; align-items: center;
  text-align: center;
  max-width: 820px; margin: 0 auto 32px;
  padding: 0 24px;
}
.faq-header h2 {
  font-family: var(--font-editorial); font-weight: 400;
  font-size: var(--type-display-screen-size); letter-spacing: -0.01em;
  line-height: var(--type-display-screen-lh);
}
.faq-list {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 820px; margin: 0 auto;
}
.faq-item {
  background: var(--color-alpha-bone-04);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: border-color 0.2s ease-out, background 0.2s ease-out;
}
.faq-item:hover { border-color: var(--color-alpha-gold-24); }
.faq-item.open { background: var(--color-alpha-bone-08); border-color: var(--text-secondary); }
.faq-question {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 22px; min-height: 44px;
  background: transparent; color: var(--text-primary);
  font-size: var(--type-body-large-size); font-weight: 600; text-align: left;
  line-height: 1.4;
}
.faq-question svg {
  width: 20px; height: 20px; flex-shrink: 0;
  color: var(--text-secondary);
  transition: transform 0.3s;
}
.faq-item.open .faq-question svg { transform: rotate(45deg); }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-answer-inner {
  padding: 0 22px 20px;
  font-size: var(--type-body-small-size); color: var(--text-secondary);
  line-height: 1.65;
}

/* ===== LANDING: CTA ===== */
.cta-section {
  padding: var(--space-section) 24px;
  text-align: center;
}
.cta-section h2 {
  font-family: var(--font-editorial); font-weight: 400;
  font-size: var(--type-display-screen-size); letter-spacing: -0.01em;
  line-height: var(--type-display-screen-lh);
  margin-bottom: 14px;
}
.cta-section p {
  font-size: var(--type-body-large-size); color: var(--text-secondary);
  margin-bottom: 28px;
}
.btn-cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--control-large);
  padding: 0 40px; border-radius: var(--radius-control);
  background: var(--accent-selected); color: var(--text-on-selected);
  font-size: var(--type-title-large-size);
  line-height: var(--type-title-large-lh);
  font-weight: var(--type-title-large-weight);
  transition: background-color 0.2s ease;
  text-decoration: none;
}
.btn-cta:hover { background: var(--accent-selected-hover); transform: translateY(-2px); }

/* ===== ENCYCLOPEDIA ===== */
.enc-hero {
  --hero-pad-top: clamp(40px, 8vw, 96px);
  padding: 0 0 clamp(32px, 5vw, 56px);
}
.enc-hero h1 {
  font-family: var(--font-editorial);
  font-size: var(--type-display-screen-size); font-weight: 400;
  line-height: var(--type-display-screen-lh);
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}
.enc-hero-sub {
  max-width: 34em; margin: 0;
  color: var(--text-secondary);
  font-size: var(--type-body-large-size); line-height: var(--type-body-large-lh);
}
.enc-section { padding: 24px 0 60px; }
.enc-group-title {
  text-align: left;
  font-family: var(--font-editorial);
  font-size: var(--type-display-screen-size); font-weight: 400;
  line-height: var(--type-display-screen-lh);
  margin: 8px 0 24px;
}
.enc-group-title:first-child { margin-top: 0; }
.enc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}
.enc-card {
  background: var(--color-alpha-bone-08);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  padding: 12px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  transition: all 0.2s;
  display: flex; flex-direction: column; gap: 10px;
}
.enc-card:hover {
  background: var(--color-alpha-bone-08);
  border-color: var(--accent-selected);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--color-alpha-black-36);
}
.enc-card-image {
  aspect-ratio: 6 / 11;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-alpha-bone-04);
  border-radius: var(--radius-control);
  overflow: hidden;
  color: var(--accent-selected);
}
.enc-card-image img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.enc-card-image svg { width: 42px; height: 42px; opacity: 0.6; }
/* Номер и название в строку, ключевые слова — строкой ниже (макет D03).
   flex-wrap обязателен: без него flex-basis:100% у ключей не переносит. */
.enc-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
  font-size: var(--type-body-small-size);
  text-align: left;
}
.enc-card-num {
  margin-right: 6px;
  color: var(--accent-selected);
  font-weight: 700;
}
.enc-card-name {
  flex: 1 1 0;
  min-width: 0;
  /* Номер лежит внутри названия, одним текстовым потоком. «Справедливость»
     шире колонки в 110 px — переносим по словарю, иначе слово вылезает за
     край карточки. */
  hyphens: auto;
  overflow-wrap: break-word;
  font-weight: 600; line-height: 1.3;
}
/* Ключевые слова под названием — тихая строка, как в макете D03. */
.enc-card-keys {
  flex-basis: 100%;
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-lh);
  color: var(--text-secondary);
}

/* ===== CARD MODAL ===== */
.card-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.card-modal[hidden] { display: none; }
.card-modal-backdrop {
  position: absolute; inset: 0;
  background: var(--scrim);
  backdrop-filter: blur(4px);
}
.card-modal-dialog {
  position: relative;
  width: 100%; max-width: 640px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--surface-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: 0 24px 64px var(--scrim);
}
.card-modal-close {
  position: absolute; top: 14px; right: 14px;
  background: transparent; border: none;
  color: var(--text-secondary); cursor: pointer;
  padding: 6px; border-radius: var(--radius-control);
  transition: all 0.15s;
}
.card-modal-close:hover { background: var(--color-alpha-bone-04); color: var(--text-primary); }
.card-modal-header {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}
.card-modal-image {
  aspect-ratio: 6 / 11;
  border-radius: var(--radius-control);
  overflow: hidden;
  background: var(--color-alpha-bone-04);
  display: flex; align-items: center; justify-content: center;
}
.card-modal-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-modal-image-placeholder { color: var(--accent-selected); opacity: 0.6; }
.card-modal-image-placeholder svg { width: 56px; height: 56px; }
.card-modal-title-block h3 {
  font-size: var(--type-heading-h2-size); font-weight: 700; margin: 4px 0 6px;
}
.card-modal-arcana {
  font-size: var(--type-caption-size); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent-selected); font-weight: 700;
}
.card-modal-en {
  font-size: var(--type-body-small-size); color: var(--text-secondary); font-style: italic;
  margin-bottom: 8px;
}
.card-modal-keywords {
  font-size: var(--type-body-small-size); color: var(--text-secondary);
  background: var(--color-alpha-plum-18);
  border: 1px solid var(--border-strong);
  padding: 8px 12px; border-radius: var(--radius-control);
  margin-top: 10px;
}
.card-modal-meanings {
  display: flex; flex-direction: column; gap: 16px;
}
.card-meaning-label {
  font-size: var(--type-caption-size); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent-selected); font-weight: 700;
  margin-bottom: 6px;
}
.card-meaning p {
  font-size: var(--type-label-large-size); color: var(--text-secondary); line-height: 1.65;
  margin: 0;
}

/* Секции расширенного описания карты */
.card-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-strong);
}
.card-section-title {
  font-size: var(--type-body-medium-size); font-weight: 700;
  color: var(--text-primary); margin: 0 0 12px;
  letter-spacing: 0.01em;
}
/* На странице карты — sticky-заголовок текущей секции при скролле.
   top = высота шапки (header-wrap sticky). Прилипает в пределах своего .card-section. */
.card-detail-page .card-section-title {
  position: sticky;
  top: 56px;
  z-index: 5;
  margin: 0 -8px 12px;
  padding: 10px 8px;
  background: var(--scrim);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-control);
}
.card-section-body p {
  font-size: var(--type-label-large-size); color: var(--text-secondary); line-height: 1.65;
  margin: 0 0 8px;
}
.card-section-body p:last-child { margin-bottom: 0; }

/* В модалке энциклопедии — превью описания: ~5 строк + fade.
   Полное описание открывается по кнопке «Полное описание карты». */
.card-modal-dialog .card-section-body {
  max-height: calc(1.65em * 5);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, black 65%, transparent);
          mask-image: linear-gradient(to bottom, black 65%, transparent);
}


/* FAQ по карте — аккордеон */
.card-faq { display: flex; flex-direction: column; gap: 8px; }
.card-faq-item {
  background: var(--color-alpha-bone-04);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  overflow: hidden;
}
.card-faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 16px;
  font-size: var(--type-label-large-size); font-weight: 600;
  color: var(--text-primary);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.card-faq-item summary::-webkit-details-marker { display: none; }
.card-faq-item summary::after {
  content: '+';
  font-size: var(--type-heading-h2-size); font-weight: 400;
  color: var(--accent-selected);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.card-faq-item[open] summary::after { content: '−'; }
.card-faq-item summary:hover { background: var(--color-alpha-bone-04); }
.card-faq-answer {
  padding: 0 16px 14px;
  font-size: var(--type-label-large-size); color: var(--text-secondary); line-height: 1.65;
}

/* Кнопка «Полное описание карты» в модалке */
.card-modal-actions {
  margin-top: 20px;
  display: flex; justify-content: center;
}
.card-detail-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  font-weight: 700;
  text-decoration: none;
}
.card-detail-link svg { transition: transform 0.15s; }
.card-detail-link:hover svg { transform: translateX(3px); }


/* ===== LANDING RESPONSIVE ===== */
@media (max-width: 900px) {
  /* Текст героя прижат к левому полю, как в макете M-home: раньше он
     центрировался под иллюстрацию, которой на этом экране больше нет. */
  .hero { --hero-pad-top: 48px; padding: 0 24px 40px; }
  .hero-text { max-width: none; }
  .steps-row { grid-template-columns: 1fr 1fr; gap: 24px; }
  .steps-row .step-connector { display: none; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .carousel-wrapper { padding: 0 var(--carousel-gutter); }
  .carousel-nav {
    display: flex; align-items: center; justify-content: center;
    padding: 12px 8px 0;
    max-width: 520px; margin: 0 auto;
  }
}
@media (max-width: 600px) {
  .hero-buttons { flex-direction: column; align-items: stretch; }
  .hero-buttons .btn-primary,
  .hero-buttons .btn-outline { width: 100%; text-align: center; justify-content: center; }

  /* Шаги по мобильному макету V2.1: вертикальный список, номер в кружке
     слева, заголовок и пояснение справа. Ни рамок сверху, ни подписи
     «ШАГ», ни двух колонок — они остаются на широких экранах. */
  .steps-row { grid-template-columns: 1fr; gap: 26px; }
  .step {
    display: grid;
    grid-template-columns: 40px 1fr;
    column-gap: 14px;
    row-gap: 2px;
    border-top: 0;
    padding: 0;
  }
  .step-num {
    align-self: center;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-alpha-gold-24);
    border-radius: var(--radius-pill);
    grid-row: 1 / span 2;
  }
  .step-num-label { display: none; }
  .step-num b {
    margin: 0;
    font-family: var(--font-functional);
    font-size: var(--type-label-large-size);
    font-weight: 500;
    letter-spacing: 0;
  }
  .step h4 { margin: 0; }
  .step p { font-size: var(--type-body-small-size); }
  .categories-grid { grid-template-columns: 1fr; }
  .carousel-wrapper { --carousel-gutter: 40px; padding: 0 var(--carousel-gutter); }
  .carousel .spread-card { flex: 0 0 210px; }
  .enc-hero h1 { font-size: var(--type-heading-h1-size); }
  .enc-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
  .enc-card { padding: 8px; }
  .card-modal-dialog { padding: 20px; }
  .card-modal-header { grid-template-columns: 100px 1fr; gap: 14px; }
  .card-modal-title-block h3 { font-size: var(--type-heading-h2-size); }
  .carousel-arrow {
    top: calc(50% - 10px);
    width: 32px;
    height: calc(100% - 60px);
    border-radius: var(--radius-control);
  }
}

/* Notice banner: temporarily-disabled features (registration, new orders) */
.notice-banner {
  background: var(--status-success-bg);
  border: 1px solid var(--status-success-border);
  border-radius: var(--radius-control);
  padding: 16px 20px;
  margin: 16px 0;
  color: var(--status-success-text);
}
.notice-banner strong { display: block; margin-bottom: 4px; font-size: var(--type-body-medium-size); }
.notice-banner p { margin: 0; font-size: var(--type-body-small-size); color: var(--status-success-text); }
.notice-banner a { color: var(--status-success-text); text-decoration: underline; }

.hidden { display: none !important; }

.card-of-day-timer {
  margin-top: 8px;
  padding: 18px 20px;
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, var(--color-alpha-plum-18), var(--color-alpha-plum-18));
  border: 1px solid var(--border-strong);
  text-align: center;
  color: var(--text-primary);
}
.card-of-day-timer-label {
  font-size: var(--type-body-small-size);
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.card-of-day-timer-clock {
  font-size: var(--type-heading-h1-size);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  color: var(--accent-selected);
  line-height: 1.1;
}
.card-of-day-timer-hint {
  margin-top: 8px;
  font-size: var(--type-label-small-size);
  color: var(--text-secondary);
}

.price-old {
  color: var(--text-secondary);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  margin-right: 4px;
}
.price-new {
  color: var(--accent-selected);
  font-weight: 600;
  font-size: var(--type-display-card-size);
}

/* ============================================================
   STEP 2 — redesigned page (scoped under .step2-page)
   Centred composition, hero-card row with active hint slot,
   floating email tooltip, gradient CTA. Не трогает другие формы.
   ============================================================ */
.step2-page { padding: 4px 24px 60px; }

.step2-wrap {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

/* Eyebrow */
.step2-page .spread-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 14px;
  font-size: var(--type-caption-size);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-selected);
}
.step2-page .spread-eyebrow-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent-selected);
  box-shadow: 0 0 10px var(--accent-selected);
  animation: step2-dot-pulse 2.4s ease-in-out infinite;
}
@keyframes step2-dot-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.85); }
  50%      { opacity: 1; transform: scale(1); }
}

/* Title + tagline */
.step2-page .spread-title,
.result-header .spread-title,
#step2-details-modal .card-modal-title {
  position: relative;
  font-family: var(--font-editorial);
  font-size: var(--type-display-screen-size);
  line-height: var(--type-display-screen-lh);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 4px 0 16px;
  /*color: var(--accent-selected);*/
  text-shadow: 0 0 32px var(--color-alpha-black-36);
}
.step2-page h1.spread-title::after,
.result-header h1.spread-title::after,
#step2-details-modal .card-modal-title::after {
  content: attr(data-text);
  color: var(--accent-selected);
  transform: translateX(-100%);
  position: absolute;
}
.step2-page .spread-tagline,
#step2-details-modal .spread-tagline {
  max-width: 540px;
  margin: 0 auto;
  font-size: var(--type-label-large-size);
  line-height: 1.55;
  color: var(--accent-selected);
  text-transform: uppercase;
}
.step2-page .step2-price-note {
  max-width: 540px;
  margin: 14px auto 30px;
  font-size: var(--type-body-medium-size);
  line-height: 1.5;
  color: var(--text-secondary);
  text-transform: uppercase;
}
.step2-page .step2-price-note b { color: var(--accent-selected); font-weight: 700; }

/* Card row */
.step2-page .card-row {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0 auto 40px;
  max-width: 620px;
}
.step2-page .card-row-tooltip {
  position: absolute;
  top: calc(50% + 10px);
  left: 50%;
  transform: translateX(-50%);
  max-width: 215px;
  width: 100%;
  padding: 8px 14px;
  background: var(--surface-card);
  color: var(--text-primary);
  font-size: var(--type-body-small-size);
  line-height: 1.4;
  text-align: left;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  box-shadow: 0 8px 24px var(--scrim);
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
  z-index: 5;
}
.step2-page .card-row-tooltip.is-visible { opacity: 1; }
.step2-page .card-figure { cursor: pointer; }
.step2-page .card-figure {
  position: relative;
  flex: 0 0 auto;
  width: 108px;
/*  aspect-ratio: 2 / 3;*/
  aspect-ratio: 6 / 11;
  border-radius: var(--radius-control);
  background-color: var(--surface-card);
  background-image: url("../img/card-back.a6752d9810b0.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  transition: transform .3s, box-shadow .3s, filter .3s;
  animation: step2-card-rise .65s cubic-bezier(.22,.61,.36,1) both;
  animation-delay: calc(120ms + var(--i, 0) * 80ms);
  box-shadow: 0 14px 28px -12px var(--scrim);
}
.step2-page .card-figure:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 38px -14px var(--color-alpha-black-36);
  filter: brightness(1.08);
}
.step2-page .card-figure.is-active {
  /* gold-selected: состояние выбора. Обводка вместо свечения. */
  box-shadow:
    0 0 0 2px var(--accent-selected),
    0 22px 40px -14px var(--scrim);
}
.step2-page .card-figure.is-active::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--scrim) 0%, var(--scrim) 100%);
  pointer-events: none;
}
.step2-page .card-hint {
  position: absolute;
  z-index: 1;
  left: 10px; right: 10px;
  top: 50%; transform: translateY(-50%);
  margin: 0;
  font-size: var(--type-caption-size);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  text-align: center;
  text-shadow: 0 1px 8px var(--scrim);
  pointer-events: none;
}
@keyframes step2-card-rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Detailed description */
.step2-page .step2-detailed {
  max-width: 620px;
  margin: -8px auto 28px;
  padding: 14px 18px;
  text-align: left;
  background: var(--color-alpha-bone-04);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  font-size: var(--type-body-small-size);
  color: var(--text-secondary);
  line-height: 1.55;
}
.step2-page .step2-detailed p { margin: 0 0 8px; }
.step2-page .step2-detailed p:last-child { margin-bottom: 0; }

/* Кнопка «Подробнее о раскладе» — открывает модалку с detailed_description */
.step2-details-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 18px;
    border: 0;
    border-radius: var(--radius-control);
    min-height: var(--control-compact);
    background: var(--color-alpha-bone-04);
    border: 1px solid var(--border-strong);
    font-family: var(--font-functional);
    font-size: var(--type-label-large-size);
    line-height: var(--type-label-large-lh);
    font-weight: var(--type-label-large-weight);
    letter-spacing: 0.01em;
    color: var(--text-primary);
    cursor: pointer;
    overflow: hidden;
    box-shadow: inset 0 1px 0 var(--color-alpha-bone-12), inset 0 -2px 0 var(--scrim-soft), 0 18px 36px -14px var(--color-alpha-black-36), 0 0 0 1px var(--color-alpha-bone-04);
    transition: transform .15s, filter .25s, box-shadow .25s;
    margin: 15px auto;
}
.step2-details-btn:hover {
    transform: translateY(-1px);
    background: var(--color-alpha-bone-04);
    box-shadow: inset 0 1px 0 var(--color-alpha-bone-12), inset 0 -2px 0 var(--scrim-soft), 0 26px 48px -16px var(--color-alpha-black-36);
}

/* Заголовок и тело в модалке step2 (переиспользует .card-modal-*) */
#step2-details-modal .card-modal-title {
  margin: 0 0 16px;
  max-width: calc(100% - 40px);
  color: var(--text-primary);
}
#step2-details-modal .card-section-body {
  max-height: none;
  overflow: visible;
  -webkit-mask-image: none;
          mask-image: none;
  color: var(--text-secondary);
  font-size: var(--type-label-large-size);
  line-height: 1.65;
}
#step2-details-modal .step2-details-btn { margin: 20px 0 0; }
#step2-details-modal .card-section-body p { margin: 0 0 10px; }
#step2-details-modal .card-section-body p:last-child { margin-bottom: 0; }
#step2-details-modal .card-section-body h2,
#step2-details-modal .card-section-body h3,
#step2-details-modal .card-section-body h4 {
  color: var(--text-primary);
  margin: 18px 0 8px;
  font-weight: 700;
}
#step2-details-modal .card-section-body h2 { font-size: var(--type-body-large-size); }
#step2-details-modal .card-section-body h3 { font-size: var(--type-body-medium-size); }
#step2-details-modal .card-section-body h4 { font-size: var(--type-label-large-size); }
#step2-details-modal .card-section-body ul,
#step2-details-modal .card-section-body ol {
  margin: 0 0 24px;
  padding-left: 22px;
}
#step2-details-modal .card-section-body ul li { list-style: disc; margin-bottom: 4px; }
#step2-details-modal .card-section-body ol li { list-style: decimal; margin-bottom: 4px; }
#step2-details-modal .card-section-body a {
  color: var(--accent-selected);
  text-decoration: underline;
}
#step2-details-modal .card-section-body a:hover { color: var(--text-primary); }
#step2-details-modal .card-section-body strong { color: var(--text-primary); font-weight: 700; }
#step2-details-modal .card-section-body em { font-style: italic; }
#step2-details-modal .card-section-body blockquote {
  margin: 10px 0;
  padding: 10px 14px;
  border-left: 3px solid var(--accent-selected);
  background: var(--color-alpha-plum-18);
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  color: var(--text-secondary);
}

/* Form */
.step2-page .step2-form {
  max-width: 620px;
  margin: 0 auto;
  text-align: left;
}
.step2-page .field { margin-bottom: 18px; }
.step2-page .field-label {
  display: flex; align-items: center;
  font-size: var(--type-body-small-size);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}
.step2-page .field-label .req { color: var(--accent-selected); margin-left: 2px; }

/* Question textarea */
.step2-page .question-area {
  position: relative;
  border-radius: var(--radius-control);
  background: var(--scrim);
  border: 1px solid var(--border-strong);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.step2-page .question-area:focus-within {
  border-color: var(--accent-selected);
  background: var(--scrim);
  box-shadow: 0 0 0 3px var(--color-alpha-black-36);
}
.step2-page .question-area textarea {
  display: block;
  width: 100%;
  min-height: 0;
  /* Starts at one line and grows with content (JS) up to this cap, then scrolls. */
  max-height: 150px;
  padding: 16px 18px 36px;
  background: var(--color-alpha-bone-04);
  border: 0;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--type-body-medium-size);
  line-height: 1.55;
  resize: none;
  overflow-y: auto;
  border-radius: var(--radius-control);
}
.step2-page .question-area textarea::placeholder { color: var(--text-secondary); }
/* Note shown when the spread ships a prefilled question */
.step2-page .question-prefill-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 10px;
  padding: 10px 13px;
  border-radius: var(--radius-control);
  background: var(--color-alpha-bone-04);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  font-size: var(--type-body-small-size);
  line-height: 1.5;
  font-weight: 400;
}
.step2-page .question-prefill-note svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}
.step2-page .question-area .counter {
  position: absolute;
  right: 14px; bottom: 10px;
  font-size: var(--type-label-small-size); font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

/* Example questions */
.step2-page .example-questions { margin-top: 10px; }
.step2-page .example-questions summary {
  cursor: pointer;
  font-size: var(--type-body-small-size);
  font-weight: 600;
  color: var(--accent-selected);
  padding: 4px 0;
}
.step2-page .example-questions ul { list-style: none; padding: 0; margin: 8px 0 0; }
.step2-page .example-questions li {
  padding: 8px 12px;
  margin-bottom: 4px;
  border-radius: var(--radius-control);
  background: var(--color-alpha-bone-04);
  font-size: var(--type-body-small-size);
  color: var(--text-primary);
  cursor: pointer;
  transition: background .15s;
}
.step2-page .example-questions li:hover { background: var(--color-alpha-bone-08); }
.step2-page .example-questions .field-hint { display: block; margin-top: 6px; color: var(--text-secondary); }

/* Email row + tooltip */
.step2-page .email-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--scrim);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  padding: 3px 14px 3px 3px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.step2-page .email-row:focus-within {
  border-color: var(--accent-selected);
  background: var(--scrim);
  box-shadow: 0 0 0 3px var(--color-alpha-black-36);
}
.step2-page .email-row input {
  flex: 1; min-width: 0;
  padding: 13px 14px;
  background: transparent;
  border: 0; outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--type-body-medium-size);
}
.step2-page .email-row input::placeholder { color: var(--text-secondary); }
.step2-page .email-row input:disabled { color: var(--text-secondary); cursor: not-allowed; }
.step2-page .email-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 6px 8px;
  border-radius: var(--radius-control);
  font-size: var(--type-body-small-size);
  color: var(--text-secondary);
  cursor: help;
  transition: color .2s, background .2s;
  background: none;
  border: 0;
  font-family: inherit;
}
.step2-page .email-tooltip:hover,
.step2-page .email-tooltip:focus-visible { color: var(--text-primary); background: var(--color-alpha-bone-04); }
.step2-page .email-tooltip .ti {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border: 1.4px solid currentColor;
  border-radius: 50%;
  font-size: var(--type-caption-size); font-weight: 700;
  font-style: italic;
  opacity: 0.85;
}
.step2-page .email-tooltip-label { white-space: nowrap; }
.step2-page .email-tooltip-text {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 300px;
  max-width: 80vw;
  padding: 12px 14px;
  background: var(--surface-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  box-shadow: 0 18px 40px -12px var(--scrim);
  font-size: var(--type-label-small-size);
  line-height: 1.55;
  color: var(--text-primary);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .18s, transform .18s, visibility .18s;
  z-index: 20;
  text-align: left;
  cursor: default;
}
.step2-page .email-tooltip-text strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: var(--type-body-small-size);
}
.step2-page .email-tooltip:hover .email-tooltip-text,
.step2-page .email-tooltip:focus-within .email-tooltip-text,
.step2-page .email-tooltip.is-open .email-tooltip-text {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.step2-page .email-account-hint {
  display: block;
  margin-top: 8px;
  font-size: var(--type-label-small-size);
  color: var(--text-secondary);
}

/* Price */
.step2-page .price-line {
  text-align: center;
  font-size: var(--type-label-large-size);
  color: var(--text-secondary);
  margin: 24px 0 14px;
  font-weight: 500;
}
.step2-page .price-line .price-current {
  color: var(--text-primary);
  font-weight: 700;
}

/* CTA */
.step2-page .cta-wrap {
  position: relative;
  margin: 18px auto 0;
  text-align: center;
}
.cta-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 43px;
  border: 0;
  border-radius: var(--radius-control);
  min-height: var(--control-large);
  background: var(--accent-selected);
  font-family: var(--font-functional);
  font-size: var(--type-title-large-size);
  line-height: var(--type-title-large-lh);
  font-weight: var(--type-title-large-weight);
  letter-spacing: 0.01em;
  color: var(--text-on-selected);
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 var(--color-alpha-bone-12),
    0 18px 36px -14px var(--scrim);
  transition: transform .15s, filter .25s, box-shadow .25s;
}
.cta-btn:hover {
  background: var(--accent-selected-hover);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 var(--color-alpha-bone-12),
    0 26px 48px -16px var(--scrim);
}
.cta-btn:active { transform: translateY(0); }
.cta-price {
  font-size: var(--type-heading-h2-size);
  font-weight: 700;
}

/* SmartCaptcha wrapper */
.step2-page .captcha-wrap {
  display: flex;
  justify-content: center;
  margin: 18px 0 4px;
}

/* Consent */
.step2-page .form-consent { margin-top: 26px; }
.step2-page .consent-row {
  display: flex;
  align-items: center;
  gap: 22px;
  border-radius: var(--radius-control);
  font-size: var(--type-caption-size);
  line-height: 1.55;
  color: var(--text-secondary);
  cursor: pointer;
}
.step2-page .consent-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  position: relative;
  width: 22px; height: 22px;
  margin-top: 1px;
  background: transparent;
  border: 2px solid var(--text-secondary);
  border-radius: var(--radius-control);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.step2-page .consent-row input[type="checkbox"]:hover { border-color: var(--accent-selected); }
.step2-page .consent-row input[type="checkbox"]:checked {
  background: var(--accent-selected);
  border-color: var(--accent-selected);
}
.step2-page .consent-row input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px; left: 7px;
  width: 6px; height: 13px;
  border: solid var(--text-on-selected);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.step2-page .consent-row a {
  color: var(--accent-selected);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.step2-page .consent-row a:hover { color: var(--text-primary); }

.bottom-warning {
  margin: 22px auto 0;
  text-align: center;
  font-size: var(--type-label-small-size);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Card-of-day timer */
.step2-page .card-of-day-timer {
  max-width: 440px;
  margin: 22px auto 0;
  padding: 22px 24px;
  text-align: center;
  background: linear-gradient(180deg, var(--color-alpha-plum-18), var(--color-alpha-plum-18));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  box-shadow: inset 0 1px 0 var(--color-alpha-bone-04);
}
.step2-page .card-of-day-timer-label {
  font-size: var(--type-label-small-size);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 12px;
}
.step2-page .card-of-day-timer-clock {
  font-size: var(--type-heading-h1-size);
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 30px var(--color-alpha-black-36);
  margin-bottom: 8px;
}
.step2-page .card-of-day-timer-hint {
  font-size: var(--type-label-small-size);
  color: var(--text-secondary);
}

/* Errors + notice scoped to new layout */
.step2-page .form-errors-list {
  max-width: 620px;
  margin: 0 auto 20px;
  padding: 12px 16px;
  list-style: none;
  border: 1px solid var(--status-error-border);
  border-radius: var(--radius-control);
  background: var(--status-error-bg);
  font-size: var(--type-body-small-size);
  color: var(--status-error-text);
  text-align: left;
}
.step2-page .form-errors-list li { padding: 3px 0; }
.step2-page .step2-notice {
  max-width: 620px;
  margin: 0 auto 24px;
  padding: 14px 18px;
  background: var(--color-alpha-bone-04);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  text-align: left;
  font-size: var(--type-body-small-size);
  color: var(--text-secondary);
}
.step2-page .step2-notice strong { display: block; margin-bottom: 4px; color: var(--text-primary); }
.step2-page .step2-notice p { margin: 0; }

/* Responsive */
@media (max-width: 720px) {
  .step2-page .card-row { gap: 12px; max-width: 100%; }
  .step2-page .card-figure { width: 78px; }
  .step2-page .card-moon { top: 10px; width: 14px; height: 14px; }
  .step2-page .card-hint { font-size: var(--type-caption-size); left: 6px; right: 6px; }
  .step2-page .email-row { flex-wrap: wrap; padding: 3px; }
  .step2-page .email-row input { padding: 12px 14px; width: 100%; }
  .step2-page .email-tooltip {
    justify-content: flex-end;
    padding: 4px 12px 8px;
    color: var(--text-secondary);
  }
  .step2-page .email-tooltip-text { width: calc(100vw - 56px); }
  .cta-btn { padding: 18px 22px; font-size: var(--type-body-medium-size); gap: 10px; flex-wrap: wrap; }
  .cta-price { font-size: var(--type-title-large-size); }
  .cta-badge { right: 14px; bottom: -12px; font-size: var(--type-label-small-size); padding: 5px 11px; }
  .step2-details-btn { padding: 8px 12px; font-size: var(--type-body-medium-size); gap: 10px; flex-wrap: wrap; }
  .upsell-section { margin: 16px 0 16px; }
}
@media (max-width: 420px) {
  .step2-page .spread-title, .result-header .spread-title, #step2-details-modal .card-modal-title { font-size: var(--type-heading-h1-size); }
  .step2-page .card-figure { width: 62px; }
  .step2-page .card-hint { font-size: var(--type-caption-size); }
}

@media (prefers-reduced-motion: reduce) {
  .step2-page .card-figure,
  .step2-page .spread-eyebrow-dot { animation: none !important; }
}

.cta-badge {
  position: absolute;
  bottom: -14px;
  right: 22px;
  padding: 6px 14px;
  background: var(--color-alpha-plum-18);
  border: 1px solid var(--accent-atmosphere);
  color: var(--text-primary);
  font-size: var(--type-body-small-size);
  font-weight: 700;
  border-radius: var(--radius-control);
  letter-spacing: 0.02em;
  box-shadow:
    0 8px 20px -8px var(--scrim),
    inset 0 1px 0 var(--color-alpha-bone-12);
  transform: rotate(-2deg);
}

/* ===== Тизер-флоу: step2 / step4 ===== */
.preview-note { font-size: var(--type-label-large-size); opacity: 0.85; margin: 8px 0 4px; }

/* ----- Прогресс «Открыто X из Y частей» ----- */
.reading-progress {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: var(--text-secondary);
  font-size: var(--type-body-small-size);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 8px 0 28px;
  font-weight: 500;
}
.reading-progress svg { width: 20px; height: 20px; color: var(--accent-selected); flex: 0 0 auto; }
.reading-progress b { color: var(--accent-selected); font-weight: 700; }

/* ----- Открытые блоки расклада ----- */
.reading-panel {
  background: var(--color-alpha-bone-08);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  padding: 28px 32px;
  margin-bottom: 20px;
}
.reading-panel-head {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 14px;
}
.reading-panel-num {
  color: var(--accent-selected);
  font-size: var(--type-heading-h1-size); font-weight: 700; line-height: 1;
  min-width: 24px;
}
.reading-panel-title { color: var(--text-primary); font-size: var(--type-title-large-size); font-weight: 700; }
.reading-panel-body { font-size: var(--type-body-medium-size); color: var(--text-secondary); line-height: 1.8; }
.reading-panel-body p { margin: 0 0 14px; }
.reading-panel-body p:last-child { margin-bottom: 0; }

/* ----- Структурная схема: действия + список «что откроется» ----- */
.reading-actions { margin: 0; padding-left: 22px; }
.reading-actions li { margin: 0 0 10px; }
.reading-actions li:last-child { margin-bottom: 0; }

/* Типизированные блоки v3.0: карты, сценарии, признаки */
.reading-card-item { margin: 0 0 16px; }
.reading-card-item:last-child { margin-bottom: 0; }
.reading-card-head { margin: 0 0 6px; color: var(--text-primary); font-weight: 700; font-size: var(--type-body-medium-size); }
.reading-scenario { margin: 0 0 16px; padding-left: 14px; border-left: 2px solid var(--border-strong); }
.reading-scenario:last-child { margin-bottom: 0; }
.reading-scenario-head { margin: 0 0 6px; color: var(--text-primary); font-weight: 700; font-size: var(--type-body-medium-size); }
.reading-signs { margin: 0; padding-left: 20px; }
.reading-signs li { margin: 0 0 10px; line-height: 1.55; }
.reading-signs li:last-child { margin-bottom: 0; }
.reading-sign-tag {
  display: inline-block; margin: 0 2px; padding: 1px 8px; border-radius: var(--radius-pill);
  background: var(--surface-card); color: var(--accent-selected);
  font-size: var(--type-body-small-size); font-weight: 600; white-space: nowrap;
}
.reading-cta-reminder {
  margin: -6px 0 4px; color: var(--text-secondary); font-size: var(--type-body-medium-size); line-height: 1.5;
}

/* ----- Лестница тарифов (макет step2_tariffs.png) -----
   Один компонент на два экрана: воронка до оплаты (step2_tariffs) и paywall
   под превью (locked step4). Ступень читается цветом материала:
   базовая — нейтральный bone, «хит» — золото выбора, верхняя — плам-глубина.
   Берри остаётся только кнопке оплаты, поэтому «Хит продаж» — плашка на
   просвет, а не заливка. */
.tariff-ladder { max-width: 1000px; margin: 0 auto 8px; }
.tariff-ladder-lead {
  text-align: center; margin: 0 0 22px; color: var(--text-primary);
  font-size: var(--type-title-large-size); font-weight: 700;
}
.tariff-ladder-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch;
}
.tariff-col {
  position: relative; display: flex; flex-direction: column;
  background: var(--color-alpha-bone-08); border: 1px solid var(--border-strong);
  border-radius: var(--radius-card); padding: 20px;
}
.tariff-col.is-popular {
  /* gold-selected: на экране тарифов это единственный элемент в материале выбора */
  background: var(--color-alpha-gold-12);
  border-color: var(--accent-selected);
  box-shadow: inset 0 1px 0 var(--color-alpha-gold-24), 0 12px 40px var(--color-alpha-black-36);
}
.tariff-col.is-top:not(.is-popular) {
  background: var(--color-alpha-plum-18);
  border-color: var(--color-plum-400);
}

/* Плашки ступени: «Включает «…»» и «Хит продаж». */
/* align-items — чтобы одинокая плашка не растягивалась на всю высоту ряда,
   когда у соседней ступени их две (ряд общий, см. subgrid ниже). */
.tariff-flags {
  display: flex; flex-wrap: wrap; align-items: flex-start; align-content: flex-start;
  gap: 8px; margin: 0 0 16px;
}
/* Стопкой (мобила) пустой ряд плашек — просто дыра; в три колонки он
   держит строку сетки (см. subgrid ниже). */
.tariff-flags:empty { display: none; }
.tariff-flag {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 13px; border-radius: var(--radius-pill); white-space: nowrap;
  border: 1px solid var(--color-alpha-gold-24); background: var(--color-alpha-gold-12);
  color: var(--text-primary); font-size: var(--type-label-small-size); font-weight: 500;
}
/* Точка-маркер — как на макете; сам кружок цвет берёт у плашки. */
.tariff-flag::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-selected); flex: none;
}
.tariff-col.is-top .tariff-flag {
  border-color: var(--color-plum-400); background: var(--color-alpha-plum-18);
}
.tariff-col.is-top .tariff-flag::before { background: var(--color-plum-400); }
.tariff-flag--popular {
  border-color: var(--color-berry-600); background: var(--color-alpha-berry-18);
}
.tariff-flag--popular::before,
.tariff-col.is-top .tariff-flag--popular::before { background: var(--color-berry-400); }
/* Верхняя ступень названа своей плашкой («ГЛУБОКИЙ», макет F05): без неё
   карточка отличается от соседей только рамкой. */
.tariff-flag--deep,
.tariff-col.is-top .tariff-flag--deep {
  border-color: var(--color-alpha-gold-24); background: var(--color-alpha-gold-12);
}
.tariff-col.is-top .tariff-flag--deep::before { background: var(--accent-selected); }

/* Иконка держится верха: названия тарифов приходят из админки и в узкой
   колонке занимают до трёх строк — по центру иконка уезжает к цене. */
.tariff-head { display: flex; align-items: flex-start; gap: 16px; margin: 0 0 14px; }
.tariff-icon {
  flex: none; display: grid; place-items: center;
  width: 64px; height: 64px; border-radius: var(--radius-control);
  background: var(--color-ink-1000); border: 1px solid var(--border-strong);
}
.tariff-icon img { width: 44px; height: 44px; object-fit: contain; display: block; }
.tariff-titles { min-width: 0; }
.tariff-name {
  margin: 0; color: var(--text-primary);
  font-family: var(--font-editorial); font-weight: 400;
  font-size: var(--type-display-card-size); line-height: var(--type-display-card-lh);
}
.tariff-price { margin: 2px 0 0; }
.tariff-price-now {
  color: var(--accent-selected-hover);
  font-family: var(--font-editorial); font-weight: 400;
  font-size: var(--type-display-price-size); line-height: var(--type-display-price-lh);
}
.tariff-price .price-old {
  color: var(--text-secondary); text-decoration: line-through; font-size: var(--type-body-large-size); margin-right: 6px;
}

.tariff-meta {
  margin: 0 0 14px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border-hairline);
  color: var(--text-secondary); font-size: var(--type-body-small-size); line-height: var(--type-body-small-lh);
}
.tariff-bullets-label {
  margin: 0 0 10px;
  font-size: var(--type-caption-size); line-height: var(--type-caption-lh);
  font-weight: 600; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--color-gold-400);
}
.tariff-bullets { flex: 1 1 auto; margin: 0 0 18px; padding: 0; list-style: none; }
.tariff-bullets li {
  position: relative; padding-left: 18px; margin-bottom: 9px;
  color: var(--text-primary); font-size: var(--type-body-medium-size); line-height: var(--type-body-medium-lh);
}
.tariff-bullets li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent-selected);
}
.tariff-bullets li:last-child { margin-bottom: 0; }

/* Фолбэк: разметку тарифа правили в админке и разобрать её не вышло —
   показываем описание как есть (см. views._ladder_card_parts). */
.tariff-body { flex: 1 1 auto; margin: 0 0 18px; color: var(--text-secondary); font-size: var(--type-body-medium-size); line-height: 1.55; }
.tariff-body .ladder-meta { margin: 0 0 12px; color: var(--accent-selected); font-weight: 600; font-size: var(--type-body-small-size); }
.tariff-body p { margin: 0 0 8px; }
.tariff-body ul { margin: 0; padding-left: 18px; }
.tariff-body li { margin: 0 0 7px; }
.tariff-body li:last-child { margin-bottom: 0; }
/* Кнопка прижата к низу карточки: колонки разной длины, действия должны
   встать в одну линию. */
.tariff-select-form { margin: auto 0 0; }
/* Контурная кнопка: на прозрачном фоне текст должен быть золотым.
   text-on-selected — тёмные чернила для ЗАЛИВКИ (см. .is-primary ниже),
   на просвет они сливаются с фоном карточки. */
.tariff-select-btn {
  width: 100%; padding: 13px 16px; border-radius: var(--radius-control);
  border: 1px solid var(--accent-selected); background: transparent; color: var(--accent-selected);
  font-size: var(--type-body-medium-size); font-weight: 700; cursor: pointer; transition: background .15s, color .15s;
}
.tariff-select-btn:hover { background: var(--color-alpha-bone-08); }
/* Заливка у главной ступени — берри: кнопка ведёт на оплату, а берри в
   системе отвечает именно за покупку (золото — за выбор). */
.tariff-select-btn.is-primary {
  background: var(--accent-purchase); border-color: var(--accent-purchase); color: var(--text-on-purchase);
}
.tariff-select-btn.is-primary:hover { background: var(--accent-purchase-hover); border-color: var(--accent-purchase-hover); }
.tariff-ladder-fine {
  margin: 18px 0 0; text-align: center; color: var(--text-secondary);
  font-size: var(--type-body-small-size); line-height: 1.55;
}
.tariff-ladder-fine a { color: var(--accent-selected); }
@media (max-width: 760px) {
  /* Ступени идут по возрастанию цены — так на макете: «хит» стоит в
     середине лестницы, а не выдёргивается наверх. */
  .tariff-ladder-grid { grid-template-columns: 1fr; gap: 22px; }
}
@media (min-width: 761px) {
  /* Три колонки: имя тарифа встаёт на ступень ниже по шкале, иначе
     заголовок в 26px рвётся на три строки. */
  .tariff-name {
    font-size: var(--type-heading-h2-size);
    line-height: var(--type-heading-h2-lh);
  }

  /* Ступени выровнены по строкам: плашки, название с ценой, мета, список
     и кнопка встают на одни линии во всех колонках. Иначе ряд плашек
     разной высоты (у базовой ступени его нет вовсе) уводит цену и буллеты
     соседей вниз — лестница читается рваной.

     Строки размечены явно, а не автопотоком: мета и плашки приходят из
     админки и у части тарифов их может не быть — с автопотоком такая
     карточка съехала бы на строку вверх.

     Только пока все карточки разобраны: у фолбэка (сырой HTML описания,
     .tariff-body) строк не шесть, и раскладка не сошлась бы. */
  @supports (grid-template-rows: subgrid) {
    .tariff-ladder-grid:not(:has(.tariff-body)) {
      grid-template-rows: auto auto auto auto 1fr auto;
      /* Промежутки внутри карточки держат поля блоков, а не сетка. */
      row-gap: 0;
    }
    .tariff-ladder-grid:not(:has(.tariff-body)) .tariff-col {
      display: grid;
      grid-row: span 6;
      grid-template-rows: subgrid;
    }
    /* Пустой ряд плашек у базовой ступени места не занимает, но строку
       сетки держат соседи — карточка всё равно начинается с названия. */
    .tariff-ladder-grid:not(:has(.tariff-body)) .tariff-flags { grid-row: 1; }
    .tariff-ladder-grid:not(:has(.tariff-body)) .tariff-head { grid-row: 2; }
    .tariff-ladder-grid:not(:has(.tariff-body)) .tariff-meta { grid-row: 3; }
    .tariff-ladder-grid:not(:has(.tariff-body)) .tariff-bullets-label { grid-row: 4; }
    .tariff-ladder-grid:not(:has(.tariff-body)) .tariff-bullets { grid-row: 5; }
    .tariff-ladder-grid:not(:has(.tariff-body)) .tariff-select-form { grid-row: 6; }
  }
}
.unlock-list {
  max-width: 620px; margin: 0 auto 28px;
  background: var(--color-alpha-bone-04); border: 1px solid var(--border-strong);
  border-radius: var(--radius-card); padding: 22px 24px;
}
.unlock-list-lead { margin: 0 0 12px; color: var(--text-primary); font-weight: 700; font-size: var(--type-body-large-size); }
.unlock-list ul { margin: 0; padding-left: 20px; }
.unlock-list li { margin: 0 0 9px; color: var(--text-secondary); font-size: var(--type-body-medium-size); line-height: 1.55; }
.unlock-list li:last-child { margin-bottom: 0; }
.question-hint-note {
  margin: 8px 0 0; color: var(--text-secondary); font-size: var(--type-body-small-size); line-height: 1.5;
}

/* ----- Разделитель перед закрытыми блоками ----- */
.reading-interlude {
  display: flex; align-items: center; justify-content: center; gap: 26px;
  text-align: center;
  margin: 36px 0 28px;
}
.reading-interlude p {
  margin: 0; max-width: 480px;
  color: var(--text-secondary); font-size: var(--type-body-medium-size); line-height: 1.55;
}
.reading-interlude .dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent-selected);
  box-shadow: 0 0 14px var(--color-alpha-black-36);
  flex: 0 0 auto;
}

/* ----- Закрытые (платные) блоки ----- */
.locked-rows { display: grid; gap: 16px; }
.locked-row {
  display: flex; align-items: center; gap: 20px;
  background: var(--color-alpha-bone-04);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  padding: 22px 26px;
  cursor: pointer; text-decoration: none; color: inherit;
  transition: border-color 0.2s, background 0.2s;
}
.locked-row-num {
  color: var(--accent-selected);
  font-size: var(--type-heading-h1-size); font-weight: 700; line-height: 1;
  min-width: 22px;
}
.locked-row-info { flex: 1; }
.locked-row-title { color: var(--accent-selected); font-size: var(--type-body-large-size); font-weight: 600; }
.locked-row-hook { color: var(--text-secondary); font-size: var(--type-label-large-size); margin-top: 3px; }
.locked-row-lock {
  width: 46px; height: 46px; border-radius: var(--radius-card);
  background: var(--color-alpha-bone-04);
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto; color: var(--text-secondary);
  cursor: pointer; text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
a.locked-row:hover {
  border-color: var(--accent-selected);
  background: var(--color-alpha-bone-08);
}
a.locked-row:hover .locked-row-lock {
  border-color: var(--accent-selected);
  background: var(--color-alpha-bone-08);
}
.reading-cta { scroll-margin-top: 24px; }
.locked-row-lock svg { 
  width: 23px; 
  height: 23px;
  stroke: var(--accent-selected);
}

/* ----- CTA-блок с фоновой картинкой ----- */
.reading-cta {
  position: relative;
  margin-top: 40px;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--surface-card) var(--cta-bg) center center / cover no-repeat;
  text-align: center;
}
.reading-cta::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(70% 120% at 50% 50%, var(--scrim) 0%, var(--scrim-soft) 60%, transparent 100%);
}
.reading-cta-inner {
  position: relative;
  padding: 36px 24px 34px;
  margin: 0 auto;
}
.reading-cta-lead {
  color: var(--text-primary);
  font-size: var(--type-body-large-size); font-weight: 600;
  margin: 0 0 22px;
}
.reading-cta .cta-wrap { position: relative; display: inline-block; width: auto; margin: 0 auto; }
.reading-cta-btn { width: auto; min-width: 280px; }
.reading-cta-fine {
  margin: 22px 0 0;
  color: var(--text-secondary); font-size: var(--type-body-small-size); line-height: 1.5;
}
.reading-cta-terms {
  margin: 10px 0 0;
  color: var(--text-secondary); font-size: var(--type-label-small-size); line-height: 1.5;
}
.reading-cta-terms a { color: var(--accent-selected); text-decoration: underline; }

@media (max-width: 600px) {
  .reading-panel { padding: 24px 20px; }
  .locked-row { padding: 18px 16px; gap: 14px; }
  .locked-row-title { font-size: var(--type-body-medium-size); }
  .reading-interlude { flex-direction: column; gap: 14px; }
  .reading-interlude .dot { display: none; }
  .reading-cta .cta-wrap { display: block; width: 100%; }
  .reading-cta-btn { width: 100%; min-width: 0; }
}
.highlight {
  color: var(--accent-selected);
}

/* ============================================================
   EDITORIAL POLISH LAYER (homepage redesign)
   ============================================================ */

/* --- Доступность: видимый фокус на всех интерактивных элементах ---
   Кольцо — gold/400: 10.16:1 на фоне страницы, различимо на любом
   материале. Отдельный токен, а не акцент, чтобы смена акцента
   не утащила за собой видимость фокуса. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-control);
}

/* --- Тач-цели: минимум 44 px по высоте (layout contract, compact) ---
   Раньше высоты кнопок гуляли от 40 до 56 px. Задаём нижнюю границу
   один раз, вместо того чтобы чинить каждую кнопку отдельно. */
button,
summary,
select,
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.btn-primary, .btn-outline, .btn-cta, .btn-pay, .btn-register, .btn-login,
.btn-card, .btn-choose, .btn-all-categories, .filter-btn, .tariff-select-btn,
.social-btn, .poster-cta, .carousel-arrow, .reading-cta-btn {
  min-height: var(--control-compact);
}
/* Кнопки-иконки: цель по обеим осям */
.burger-btn, .mobile-close, .card-modal-close, .carousel-arrow {
  min-width: var(--control-compact);
}

/* --- Micro-motion: subtle press/hover on primary CTAs (0.2s ease-out) --- */
.btn-primary, .btn-cta, .btn-outline, .btn-choose, .btn-register {
  transition: background 0.2s ease-out, border-color 0.2s ease-out,
              transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.btn-primary:hover, .btn-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px var(--color-alpha-black-36); }
.btn-primary:active, .btn-cta:active, .btn-outline:active, .btn-choose:active { transform: translateY(0) scale(0.99); }

/* --- Editorial hairline above the CTA section for rhythm/separation --- */
.cta-section {
  border-top: 1px solid var(--border-strong);
}

/* --- Steps: gentle lift on hover, on-style --- */
.step { transition: transform 0.2s ease-out, border-color 0.2s ease-out; }
.step:hover { transform: translateY(-2px); border-color: var(--color-alpha-gold-24); }

/* --- Carousel: comfortable snap padding so first/last cards breathe --- */
.carousel { scroll-padding: 0 24px; }

/* --- Respect reduced-motion: strip transforms/animations --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .spread-card:hover, .cat-card:hover, .step:hover,
  .btn-primary:hover, .btn-cta:hover { transform: none; }
}

/* ============================================================
   MOTION LAYER — scroll reveals + cinematic hero (GSAP-driven)
   ============================================================ */

/* Reveal gate: elements start hidden ONLY when JS is present (.js on <html>).
   No-JS users never get this rule, so content is always visible for them.
   GSAP animates each element to full opacity via fromTo(). */
.js [data-reveal],
.js [data-reveal-stagger] > *,
.js [data-hero] {
  opacity: 0;
}

/* If motion is reduced, reveal everything instantly (no fade/slide). */
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal],
  .js [data-reveal-stagger] > *,
  .js [data-hero] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* --- Cinematic hero: tall, vertically centred, with a scroll cue --- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* Якоря секций главной: смещение под липкую шапку. */
.how-section,
.reviews-section,
.faq-section { scroll-margin-top: calc(var(--header-height) + 16px); }

.hero-scroll-cue {
  position: absolute;
  left: 50%; bottom: clamp(16px, 3vh, 32px);
  transform: translateX(-50%);
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: color 0.2s ease-out;
  animation: cueBob 2.4s ease-in-out infinite;
}
.hero-scroll-cue:hover { color: var(--text-primary); }
.hero-scroll-cue svg { width: 26px; height: 26px; }
@keyframes cueBob {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 7px); }
}
@media (max-width: 900px) {
  .hero { min-height: auto; }
  .hero-scroll-cue { display: none; }
}

/* ============================================================
   GALLERY SPOTLIGHT — full-bleed hero + poster film-strip
   ============================================================ */

/* --- Full-bleed cinematic hero --- */
.hero--spotlight {
  position: relative;
  min-height: min(92vh, 940px);
  display: flex;
  flex-direction: row;
  align-items: flex-end;      /* content sits in the lower third */
  justify-content: initial;
  overflow: hidden;
  padding: 0;
}
@supports (min-height: 100svh) {
  .hero--spotlight { min-height: min(92svh, 940px); }
}
/* Отдельный слой-кадр под полноэкранный герой. Сейчас в разметке не
   используется — герой берёт сцену на себя (.hero.ritual-bg.bg-deck-right);
   правила оставлены под композицию макета D01, где герой во всю высоту.
   Кадр — из класса сцены на родителе, поэтому здесь только переменные. */
.hero-bg {
  position: absolute;
  inset: -12% 0;
  z-index: 0;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: var(--bg-position, 50% 50%);
  background-image: var(--scene-src);
  background-image: var(--scene);
  transform-origin: center;
}
@media (min-width: 901px) {
  .hero-bg {
    background-image: var(--scene-wide-src);
    background-image: var(--scene-wide);
  }
}
.hero-bg::after {   /* legibility scrim (WCAG) + blend into page bottom */
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--scrim) 0%, transparent 28%,
                            var(--scrim) 76%, var(--surface-page) 100%),
    radial-gradient(ellipse 90% 70% at 28% 70%, var(--scrim-soft), transparent 62%);
}
.hero--spotlight .hero-inner {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px clamp(48px, 9vh, 112px);
}
.hero--spotlight .hero-text { max-width: 720px; }
.hero--spotlight h1 {
  font-size: var(--type-display-hero-size);
  text-shadow: 0 2px 30px var(--scrim-soft);
}
.hero--spotlight p {
  color: var(--text-primary);
  text-shadow: 0 1px 16px var(--scrim-soft);
}
@media (max-width: 900px) {
  .hero--spotlight { min-height: 76vh; }
}

.poster-card {
  position: relative;
  flex: 0 0 240px;
  aspect-ratio: 4 / 5;
  scroll-snap-align: center;
  display: block;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.28s ease-out, border-color 0.28s ease-out, box-shadow 0.28s ease-out;
}
.poster-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-alpha-gold-24);
  box-shadow: 0 18px 44px var(--color-alpha-black-36);
}
.poster-media {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--color-alpha-plum-18), var(--color-alpha-plum-18));
}
.poster-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
  transition: transform 0.5s ease-out;
}
.poster-card:hover .poster-media img { transform: scale(1.06); }
.poster-media .cards-icon { width: 46px; height: 46px; color: var(--accent-selected); opacity: 0.5; }
.poster-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex; flex-direction: column; justify-content: flex-end;
  gap: 7px;
  padding: 16px;
  background: linear-gradient(180deg, var(--scrim-soft) 32%, var(--scrim) 66%, var(--surface-page) 100%);
}
.poster-overlay h3 {
  font-size: var(--type-body-large-size); font-weight: 700; margin: 0; line-height: 1.2;
  letter-spacing: -0.01em;
}
.poster-overlay p {
  font-size: var(--type-body-small-size); color: var(--text-primary); margin: 0; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.poster-cta {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 2px;
  font-size: var(--type-body-small-size); font-weight: 700; color: var(--accent-selected);
}
.poster-cta svg { width: 15px; height: 15px; transition: transform 0.2s ease-out; }
.poster-card:hover .poster-cta svg { transform: translateX(3px); }
/* Coming-soon poster */
.poster-card.is-soon { pointer-events: none; }
.poster-card.is-soon .poster-media img { filter: grayscale(0.4) brightness(0.68); }
.poster-cta--soon { color: var(--text-secondary); }

@media (max-width: 600px) {
  .poster-card { flex-basis: 200px; }
}

/* ===== ОТЗЫВЫ (главная) ===== */
.reviews-section { padding: var(--space-section) 0; border-top: 1px solid var(--border-strong); }
.reviews-head { text-align: center; margin-bottom: 4px; }
.reviews-section .section-label {
  font-size: var(--type-label-small-size); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--accent-selected); margin-bottom: 8px;
}
.reviews-summary {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
  justify-content: center; margin-top: 14px;
}
.review-stars { display: inline-flex; gap: 2px; line-height: 0; }
.review-stars .star { width: 18px; height: 18px; color: var(--text-secondary); }
.review-stars .star.is-on { color: var(--accent-selected); }
.reviews-summary .reviews-avg { font-weight: 700; font-size: var(--type-title-large-size); color: var(--text-primary); }
.reviews-summary .reviews-count { font-size: var(--type-label-large-size); color: var(--text-secondary); }

/* Карточка отзыва — ребёнок общей карусели (.carousel-wrapper авто-инициализируется
   в main.js: стрелки на десктопе, точки на мобиле, центрирование). */
.carousel .review-card {
  flex: 0 0 360px; max-width: 360px;
  scroll-snap-align: center;
  display: flex; flex-direction: column; gap: 14px; margin: 0;
  background: var(--color-alpha-bone-08); border: 1px solid var(--border-strong);
  border-radius: var(--radius-card); padding: 26px;
  transition: transform 0.28s ease-out, border-color 0.28s ease-out, box-shadow 0.28s ease-out;
}
.carousel .review-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-alpha-gold-24);
  box-shadow: 0 18px 40px -24px var(--scrim);
}
.review-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.review-quote { width: 30px; height: 30px; color: var(--accent-selected); opacity: 0.5; flex-shrink: 0; }
.review-card-head .review-stars .star { width: 15px; height: 15px; }
.review-card .review-text {
  margin: 0; flex: 1;
  color: var(--text-primary); line-height: 1.65; font-size: var(--type-body-medium-size);
}
.review-foot {
  display: flex; align-items: center; gap: 12px;
  margin-top: 4px; padding-top: 16px;
  border-top: 1px solid var(--border-strong);
}
.review-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  font-weight: 700; font-size: var(--type-body-medium-size); color: var(--text-primary);
  background: linear-gradient(135deg, var(--accent-selected), var(--accent-selected));
}
.review-id { display: flex; flex-direction: column; min-width: 0; }
.review-name { font-weight: 600; color: var(--text-primary); }
.review-role { font-size: var(--type-body-small-size); color: var(--text-secondary); }

@media (max-width: 600px) {
  .carousel .review-card { flex-basis: 82vw; max-width: 82vw; padding: 22px; }
}

/* ===================== BLOG ===================== */
.blog-index-page { padding: 32px 0 80px; }
.blog-index-container { max-width: 1140px; }
.blog-index-head { max-width: 720px; margin: 0 0 32px; }
.blog-index-head h1 { font-family: var(--font-editorial); font-size: var(--type-display-screen-size); font-weight: 400; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 12px; }
.blog-index-lead { color: var(--text-secondary); font-size: var(--type-body-large-size); line-height: 1.7; margin: 0; }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.blog-card {
  background: var(--color-alpha-bone-08); border: 1px solid var(--border-strong);
  border-radius: var(--radius-card); overflow: hidden;
  transition: transform .22s ease-out, border-color .22s ease-out, box-shadow .22s ease-out;
}
.blog-card:hover { transform: translateY(-6px); border-color: var(--color-alpha-gold-24); box-shadow: 0 16px 40px var(--color-alpha-black-36); }
.blog-card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.blog-card-cover {
  position: relative; aspect-ratio: 1200 / 630; overflow: hidden;
  background: linear-gradient(135deg, var(--color-alpha-plum-18), var(--color-alpha-plum-18));
}
.blog-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease-out; }
.blog-card:hover .blog-card-cover img { transform: scale(1.05); }
.blog-card-type {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  padding: 4px 10px; border-radius: var(--radius-control); font-size: var(--type-caption-size); font-weight: 600;
  background: var(--scrim); color: var(--accent-selected);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.blog-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.blog-card-title { font-size: var(--type-title-large-size); font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; margin: 0 0 8px; }
.blog-card-excerpt { font-size: var(--type-body-small-size); color: var(--text-secondary); line-height: 1.6; margin: 0 0 14px; flex: 1; }
.blog-card-more { font-size: var(--type-body-small-size); font-weight: 600; color: var(--accent-selected); }
.blog-card:hover .blog-card-more { color: var(--text-primary); }
.blog-index-empty { color: var(--text-secondary); font-size: var(--type-body-medium-size); }

/* ---- article ---- */
.blog-detail-page { padding: 32px 0 80px; }
.blog-detail-container { max-width: 1200px; }
/* У героя колонка не центрируется: кадр открыт справа, и текст должен
   держаться левого края поля, а не уезжать к середине на широком экране. */
.blog-article-hero .blog-detail-container { margin-left: 0; margin-right: auto; }
.blog-draft-notice {
  margin: 0 0 20px; padding: 10px 14px; border-radius: var(--radius-control);
  background: var(--status-success-bg); border: 1px solid var(--status-success-border);
  color: var(--status-success-text); font-size: var(--type-label-large-size);
}
.blog-article-type {
  display: inline-block; margin-bottom: 12px;
  padding: 4px 12px; border-radius: var(--radius-control); font-size: var(--type-caption-size); font-weight: 600;
  background: var(--color-alpha-plum-18); color: var(--text-primary); border: 1px solid var(--accent-atmosphere);
}

/* Герой статьи: обложка держит кадр секции, крошки и заголовок — поверх.
   Приём тот же, что у каталога и страницы карты (.catalog-hero / .card-hero),
   но кадр приходит не из сцены, а из <img> с обложкой статьи: у неё есть
   alt, и поисковик видит картинку в разметке. Слои внутри .ritual-band:
   -2 снимок, -1 ровная тонировка (::before утилиты) и градиент к низу,
   выше — .container со своим position: relative. */
.blog-article-hero {
  --hero-pad-top: clamp(32px, 6vw, 72px);
  padding: 0 0 clamp(28px, 5vw, 52px);
  display: flex;
  align-items: flex-end;
  min-height: clamp(300px, 46vw, 440px);
  overflow: hidden;
}
.blog-hero-img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 45%;
}
/* Второй слой поверх ровной тонировки: у обложек светлое пятно приходится
   то на угол, то на середину, и одного --photo-tint под крупным Prata мало.
   Внизу градиент доходит до цвета страницы — стык героя с текстом перестаёт
   быть линией среза. */
.blog-article-hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to top,
    rgb(var(--rgb-surface-page) / 0.94) 0%,
    rgb(var(--rgb-surface-page) / 0.62) 38%,
    transparent 82%);
}
.blog-article-hero .breadcrumbs { margin-bottom: 14px; }
.blog-hero-title {
  font-family: var(--font-editorial); font-weight: 400;
  font-size: var(--type-display-screen-size); line-height: var(--type-display-screen-lh);
  letter-spacing: -0.02em; margin: 0;
}
.blog-hero-lede {
  max-width: 34em; margin: 14px 0 0;
  font-size: var(--type-body-large-size); line-height: var(--type-body-large-lh);
  color: var(--text-secondary);
}

/* prose */
.blog-article-body { font-size: var(--type-body-large-size); line-height: 1.75; color: var(--text-secondary); }
.blog-article-body h2 { font-size: var(--type-heading-h2-size); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; color: var(--text-primary); margin: 1.9em 0 .6em; }
.blog-article-body h3 { font-size: var(--type-title-large-size); font-weight: 700; color: var(--text-primary); margin: 1.6em 0 .5em; }
.blog-article-body p { margin: 0 0 1.1em; }
.blog-article-body ul { margin: 0 0 1.1em; padding-left: 1.3em; }
.blog-article-body li { margin: 0 0 .5em; }
.blog-article-body li::marker { color: var(--accent-selected); }
.blog-article-body a { color: var(--accent-selected); text-decoration: underline; text-decoration-color: var(--color-alpha-plum-18); text-underline-offset: 2px; }
.blog-article-body a:hover { text-decoration-color: var(--accent-selected); }
.blog-article-body strong { color: var(--text-primary); font-weight: 700; }
.blog-article-body em { color: var(--text-secondary); }
.blog-article-body figure.blog-figure { margin: 1.6em 0; }
.blog-article-body .blog-figure img { width: 100%; max-width: 340px; border-radius: var(--radius-card); border: 1px solid var(--border-strong); display: block; margin: 0 auto; }
.blog-article-body .blog-figure figcaption { text-align: center; font-size: var(--type-body-small-size); color: var(--text-secondary); margin-top: 8px; }
.blog-article-body .blog-disclaimer {
  margin-top: 2em; padding-top: 1.2em; border-top: 1px solid var(--border-strong);
  font-size: var(--type-body-small-size); color: var(--text-secondary); font-style: italic;
}

/* FAQ */
.blog-article-faq { margin-top: 2.5em; }
.blog-article-faq > h2 { font-size: var(--type-heading-h2-size); font-weight: 700; color: var(--text-primary); margin: 0 0 1em; }
.blog-faq-item {
  border: 1px solid var(--border-strong); border-radius: var(--radius-control);
  background: var(--color-alpha-bone-04); margin-bottom: 10px; padding: 0 16px;
}
.blog-faq-item summary {
  cursor: pointer; list-style: none; padding: 14px 28px 14px 0; position: relative;
  font-weight: 600; color: var(--text-primary); font-size: var(--type-body-medium-size);
}
.blog-faq-item summary::-webkit-details-marker { display: none; }
.blog-faq-item summary::after { content: '+'; position: absolute; right: 2px; top: 11px; font-size: var(--type-heading-h2-size); color: var(--accent-selected); transition: transform .2s; }
.blog-faq-item[open] summary::after { content: '\2212'; }
.blog-faq-item p { margin: 0 0 16px; color: var(--text-secondary); line-height: 1.65; font-size: var(--type-body-medium-size); }

.blog-article-foot { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border-strong); display: flex; justify-content: center; }

@media (max-width: 900px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  /* На узком экране заголовок и лид перекрывают почти весь кадр,
     а вертикальный кроп подводит под текст светлые куски снимка. */
  .blog-article-hero::after {
    background: linear-gradient(to top,
      rgb(var(--rgb-surface-page) / 0.96) 0%,
      rgb(var(--rgb-surface-page) / 0.74) 52%,
      rgb(var(--rgb-surface-page) / 0.32) 100%);
  }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-article-body { font-size: var(--type-body-medium-size); }
}

/* ============================================================
   ФОНОВЫЕ СЦЕНЫ V2
   ============================================================
   Шесть кадров из Figma-пакета (figma-export/figma/bg). Назначение
   сцен по экранам и точка кадра — из asset-map.json, менять их
   вслед за макетом, а не на глаз.

   Каждая сцена — это класс `.bg-*`, который задаёт только
   переменные. Рисует их либо утилита `.ritual-bg` (на самом
   элементе), либо псевдослой (`body::before` в воронке) —
   переменные наследуются от body, поэтому одна сцена работает
   в обоих случаях.

   Пар кадров две:
     --scene       вертикальный 1080x1920 — мобильные экраны и
                   узкая правая панель воронки (.funnel-art);
     --scene-wide  горизонтальный 1920x1080 — полноширинные
                   десктопные полосы.
   Вертикальный кадр на полосе 16:9 обрезался бы на три четверти,
   поэтому горизонтальный вырезан из мастера отдельно
   (scripts/build_bg_assets.py), а не получен через cover.

   Затемнение в файлы не запечено намеренно: тонировку и скрим
   кладёт каждый экран своим слоем (--photo-tint / --scrim),
   иначе один и тот же кадр нельзя было бы использовать и под
   длинным текстом, и под крупным заголовком. */

.bg-smoke {
  --bg-position: 50% 50%;
  --scene-src: url("../img/bg/smoke.10f3366635ce.jpg");
  --scene: image-set(url("../img/bg/smoke.e09f5f12d37e.webp") type('image/webp'), url("../img/bg/smoke.10f3366635ce.jpg") type('image/jpeg'));
  --scene-wide-src: url("../img/bg/smoke-wide.c63e722a7dee.jpg");
  --scene-wide: image-set(url("../img/bg/smoke-wide.c6123ca158e3.webp") type('image/webp'), url("../img/bg/smoke-wide.c63e722a7dee.jpg") type('image/jpeg'));
}
.bg-celestial {
  --bg-position: 50% 18%;
  --scene-src: url("../img/bg/celestial.74f0ff058135.jpg");
  --scene: image-set(url("../img/bg/celestial.baef14786330.webp") type('image/webp'), url("../img/bg/celestial.74f0ff058135.jpg") type('image/jpeg'));
  --scene-wide-src: url("../img/bg/celestial-wide.41d75a5b3b9b.jpg");
  --scene-wide: image-set(url("../img/bg/celestial-wide.c2d80fcca1a4.webp") type('image/webp'), url("../img/bg/celestial-wide.41d75a5b3b9b.jpg") type('image/jpeg'));
}
.bg-deck-center {
  --bg-position: 50% 32%;
  --scene-src: url("../img/bg/deck-center.7898d19242cc.jpg");
  --scene: image-set(url("../img/bg/deck-center.f778a5660a97.webp") type('image/webp'), url("../img/bg/deck-center.7898d19242cc.jpg") type('image/jpeg'));
  --scene-wide-src: url("../img/bg/deck-center-wide.53f1528a35ee.jpg");
  --scene-wide: image-set(url("../img/bg/deck-center-wide.38f9f23ad249.webp") type('image/webp'), url("../img/bg/deck-center-wide.53f1528a35ee.jpg") type('image/jpeg'));
}
/* Колода справа, слева чистое поле под заголовок и CTA.
   Кадр не центрировать: 82% по горизонтали держит эту зону. */
.bg-deck-right {
  --bg-position: 82% 44%;
  --scene-src: url("../img/bg/deck-right.9852ecaa4737.jpg");
  --scene: image-set(url("../img/bg/deck-right.071d5bb3c192.webp") type('image/webp'), url("../img/bg/deck-right.9852ecaa4737.jpg") type('image/jpeg'));
  --scene-wide-src: url("../img/bg/deck-right-wide.a1fad6dac34a.jpg");
  --scene-wide: image-set(url("../img/bg/deck-right-wide.2cc97991722f.webp") type('image/webp'), url("../img/bg/deck-right-wide.a1fad6dac34a.jpg") type('image/jpeg'));
}
.bg-one-card {
  --bg-position: 50% 38%;
  --scene-src: url("../img/bg/one-card.f30aaa7fded5.jpg");
  --scene: image-set(url("../img/bg/one-card.005999fc5f78.webp") type('image/webp'), url("../img/bg/one-card.f30aaa7fded5.jpg") type('image/jpeg'));
  --scene-wide-src: url("../img/bg/one-card-wide.97a697dd6c0d.jpg");
  --scene-wide: image-set(url("../img/bg/one-card-wide.292b3a2fbaaa.webp") type('image/webp'), url("../img/bg/one-card-wide.97a697dd6c0d.jpg") type('image/jpeg'));
}
.bg-three-cards {
  --bg-position: 50% 40%;
  --scene-src: url("../img/bg/three-cards.bf768cbdaf5f.jpg");
  --scene: image-set(url("../img/bg/three-cards.ad3a8b6f6579.webp") type('image/webp'), url("../img/bg/three-cards.bf768cbdaf5f.jpg") type('image/jpeg'));
  --scene-wide-src: url("../img/bg/three-cards-wide.347c7f34e677.jpg");
  --scene-wide: image-set(url("../img/bg/three-cards-wide.6d151b899d99.webp") type('image/webp'), url("../img/bg/three-cards-wide.347c7f34e677.jpg") type('image/jpeg'));
}

/* Утилита: кадр на самом элементе. Тонировку не ставит —
   у каждого экрана свой слой поверх (см. комментарий выше). */
.ritual-bg {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: var(--bg-position, 50% 50%);
  background-image: var(--scene-src);
  background-image: var(--scene);
}
@media (min-width: 901px) {
  .ritual-bg {
    background-image: var(--scene-wide-src);
    background-image: var(--scene-wide);
  }
}

/* Полоса-секция: кадр на самой секции, тонировка отдельным слоем.
   Контент секции лежит в .container, у которого уже есть
   position: relative, — он рисуется поверх тонировки. */
.ritual-band {
  position: relative;
  isolation: isolate;
  /* Тень по контуру полосы: стык двух кадров подряд перестаёт быть
     линией, а сама полоса садится на фон страницы. */
  box-shadow: var(--shadow-band);
}
.ritual-band::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: var(--radius-card);
  background-color: var(--photo-tint);
}

/* Сцена страницы: кадр под всем скроллом, а не полосой под секцией.
   В части макетов V2 снимок держит весь экран — мобильные главная,
   каталог и страница карты, архив на обоих вьюпортах; полосы-акценты
   (.ritual-band) рисуются поверх него.

   Механика — как у воронки: фиксированные слои на body (кадр + ровная
   тонировка), содержимое выше по z-index за счёт `body > * { z-index: 1 }`.
   z-index: -1, а не 0: у футера z-index: inherit -> auto, и при равном
   уровне тонировка закрасила бы его целиком.

   ::before перекрывает штатную plum-атмосферу — на снимке она не нужна.
   Класс сцены (.bg-smoke и т.д.) висит на <body> рядом с .page-scene;
   секции со своим bg-* перекрывают его локально. */
body.page-scene::before,
body.page-scene::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body.page-scene::before {
  background-color: var(--surface-page);
  background-image: var(--scene-src);
  background-image: var(--scene);
  background-repeat: no-repeat;
  background-position: var(--bg-position, 50% 50%);
  background-size: cover;
}
body.page-scene::after {
  background-color: var(--photo-tint);
}
@media (min-width: 901px) {
  body.page-scene::before {
    background-image: var(--scene-wide-src);
    background-image: var(--scene-wide);
  }
  /* По умолчанию сцена страницы — приём мобильных макетов: на кадре
     1440 (D01–D04) между полосами лежит чистый чёрный. Пускают её на
     десктоп только те экраны, где так в макете (архив, I02).
     ::before возвращается к штатной атмосфере, а не гасится: этот же
     псевдослой рисует plum-глубину на всех остальных страницах. */
  body.page-scene:not(.page-scene--wide)::before {
    background-color: transparent;
    background-image: var(--atmosphere-layer);
  }
  body.page-scene:not(.page-scene--wide)::after { display: none; }
}

/* ============================================================
   ФОН СТРАНИЦЫ step2
   ============================================================
   Атмосферный снимок вместо плоского фона.

   Слои живут на body, а НЕ на .step2-page. Причина: у .step2-page
   z-index: 1, поэтому весь его поддерев (включая фиксированные
   псевдослои во весь вьюпорт) рисуется поверх футера, у которого
   z-index: inherit -> auto. Футер оставался в DOM, но закрашивался.
   На body слои попадают в тот же ярус, что и штатная атмосфера,
   а всё содержимое body > * (z-index: 1) гарантированно выше.

   Страница выбирается через :has() — чтобы не менять разметку
   и не заводить body-класс ради одного экрана.

   Композиция снимка смещена вправо: слева пустое поле, справа
   колода и шёлк. Отсюда разное кадрирование по вьюпортам —
   на мобиле это верхний акцент (cover вырезал бы из кадра одну
   колоду), на десктопе полный кадр.

   Читаемость держит тонировка (::after): без неё текст ложится
   на светлые складки шёлка и проваливает контраст. */
body:has(.step2-page)::before,
body:has(.step2-page)::after {
  content: '';
  position: fixed;
  inset: 0;
  /* Именно -1, а не 0. У футера z-index: inherit -> auto, и при равном
     уровне побеждает порядок в DOM: ::after — последний узел body,
     поэтому со значением 0 скрим закрашивал футер целиком. */
  z-index: -1;
  pointer-events: none;
}

/* Слой изображения — перекрывает штатную plum-атмосферу.
   Сам кадр приходит из класса сцены на <body> (см. «ФОНОВЫЕ СЦЕНЫ V2»):
   у каждого экрана воронки он свой, поэтому здесь только переменные. */
body:has(.step2-page)::before {
  background-color: var(--surface-page);
  background-image: var(--scene-src);
  background-image: var(--scene);
  background-repeat: no-repeat;
  background-position: var(--bg-position, 50% 50%);
  background-size: cover;
}

/* Затенение вместо растяжки: ровный слой чёрного поверх всего кадра.
   Градиент «верх в скрим, низ в цвет страницы» съедал нижнюю половину
   снимка — от кадра оставалась одна полоса. Здесь снимок виден целиком,
   а текст держит единая тонировка (см. --photo-tint).
   Зерна нет намеренно: полосить нечему — уровень один на всю высоту. */
body:has(.step2-page)::after {
  background-color: var(--photo-tint);
}

/* На десктопе полноширинные экраны воронки (тарифы, результат) берут
   горизонтальный кадр: вертикальный на полосе 16:9 обрезался бы почти
   целиком. У split-экранов фон body на этой ширине выключен вовсе —
   композицию несёт правая панель .funnel-art (funnel.css). */
@media (min-width: 901px) {
  body:has(.step2-page)::before {
    background-image: var(--scene-wide-src);
    background-image: var(--scene-wide);
  }
}


/* ============================================================
   ДЕСКТОПНЫЙ СЛОЙ ПУБЛИЧНЫХ СТРАНИЦ (макеты V2, кадр 1440)
   ============================================================
   Единый блок, а не правки вразнобой по файлу: у публичных страниц
   до сих пор не было десктопной композиции — только «схлопывающие»
   max-width правила. Здесь собрана раскладка широкого вьюпорта,
   мобильная шкала остаётся отправной точкой.

   Воронки и экранов результата это не касается: у них свои файлы
   (funnel.css / result.css) и свои тиры. */
@media (min-width: 901px) {

  /* ---------- Герой (D01) ----------
     Первый экран целиком: кадр во всю высоту, текст в левой чистой
     зоне сцены, между заголовком и низом — воздух. */
  .hero {
    min-height: min(88vh, 900px);
    --hero-pad-top: clamp(120px, 16vh, 190px);
    padding-bottom: clamp(72px, 10vh, 120px);
    justify-content: center;
  }
  /* width: 100% обязателен: .hero — флекс-колонка, а `margin: 0 auto`
     на флекс-элементе отменяет растяжку по поперечной оси, и блок
     сжимался бы по содержимому, уезжая в центр кадра. */
  .hero-inner {
    width: 100%;
    max-width: calc(var(--layout-content-wide) + 2 * var(--layout-gutter-wide));
    padding: 0 var(--layout-gutter-wide);
  }
  /* Мера заголовка с макета: перенос на «карты помогут» приходится
     туда же, где в Figma, и правая половина кадра остаётся снимку. */
  .hero-text { max-width: 760px; }
  .hero p { max-width: 33em; }

  /* ---------- Подвал ----------
     Правило ниже базового `.footer-bottom { text-align: center }`,
     иначе центрирование побеждает по порядку в файле. */
  .footer-bottom { text-align: left; }
}

@media (min-width: 901px) {

  /* ---------- Заголовки секций ----------
     В макетах V2 заголовок и метка над ним стоят по левому краю меры,
     а не по центру: колонка текста читается как одна вертикаль
     с контентом секции ниже. */
  .section-title,
  .section-title.center { text-align: left; }
  .popular-section .section-label,
  .section-label { text-align: left; }

  /* ---------- Лента отзывов ----------
     Отзывы остаются лентой: их дюжина, и сеткой они превращаются
     в стену текста. Прятать часть тоже нельзя — разметка отзывов
     (schema.org) должна соответствовать видимому содержимому. */
  .reviews-section .carousel-wrapper {
    max-width: calc(var(--layout-content-wide) + 2 * var(--layout-gutter-wide));
    padding: 0 var(--layout-gutter-wide);
  }
  .reviews-section .review-card { flex: 0 0 calc((100% - 48px) / 3); }

  /* Название расклада на постере каталога — Prata, как в макетах V2:
     карточка читается как обложка, а не как строка интерфейса. */
  .focus-grid .poster-overlay h3,
  .spreads-grid .poster-overlay h3 {
    font-family: var(--font-editorial);
    font-size: var(--type-display-card-size);
    font-weight: 400;
    line-height: var(--type-display-card-lh);
  }

  /* Три расклада в ряд — как в макете D01. */
  .focus-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: 28px;
  }
  .focus-grid .poster-card:first-child {
    grid-column: auto;
    aspect-ratio: 4 / 5;
  }

  /* Ссылка на каталог идёт под сеткой по центру колонки. */
  .choose-spread {
    max-width: calc(var(--layout-content-wide) + 2 * var(--layout-gutter-wide));
    margin: 0 auto;
    padding: 0 var(--layout-gutter-wide) var(--space-section);
    text-align: center;
  }
}

@media (min-width: 901px) {
  /* ---------- FAQ и финальный CTA ----------
     Заголовок и список по левому краю меры, как остальные секции;
     раньше оба блока центрировались в колонке 820 px и выпадали
     из общей вертикали страницы. */
  .faq-header {
    justify-content: flex-start;
    text-align: left;
    max-width: none;
    padding: 0;
  }
  .faq-list { max-width: 780px; margin-inline: auto; }

  /* Содержимое переехало в .container (как у остальных секций) —
     здесь остаётся только выравнивание. */
  .cta-section { text-align: left; padding-inline: 0; }
  .cta-section p { max-width: 46em; }
}


/* ============================================================
   КАТАЛОГ РАСКЛАДОВ (макет D02)
   ============================================================ */
.catalog-hero {
  --hero-pad-top: clamp(40px, 8vw, 96px);
  padding: 0 0 clamp(32px, 5vw, 56px);
}
.catalog-hero h1 {
  font-family: var(--font-editorial);
  font-weight: 400;
  font-size: var(--type-display-screen-size);
  line-height: var(--type-display-screen-lh);
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}
.catalog-hero-lede {
  max-width: 34em;
  margin: 0 0 28px;
  font-size: var(--type-body-large-size);
  line-height: var(--type-body-large-lh);
  color: var(--text-secondary);
}
.catalog-hero .category-filters { margin-bottom: 0; }

.catalog-grid-section { padding: clamp(28px, 5vw, 56px) 0 var(--space-section); }
.catalog-grid-section .section-title { text-align: left; margin-bottom: 36px; }
/* Две ступени постеров (макет D02): рекомендованная тройка выше остальных.
   На мобиле сетка в одну колонку — там ступени нет, разница в высоте
   читалась бы как сбой ритма, а не как акцент. */
@media (min-width: 901px) {
  .spreads-grid .poster-card { aspect-ratio: 1 / 1; }
  .spreads-grid .poster-card--featured { aspect-ratio: 3 / 4; }
}

/* Мета карточки: время разбора и формат. Строка идёт под описанием
   и перед действием — так и в макете каталога. */
.poster-meta {
  margin: 0;
  font-size: var(--type-body-small-size);
  line-height: var(--type-body-small-lh);
  color: var(--accent-selected);
}

/* ---------- «Как выбрать» ---------- */
/* Полоса «как выбрать» отделена от соседей полем страницы: без него
   дымный кадр переходил прямо в кадр бесплатной карты и низ каталога
   читался одной сплошной фотографией (в макете D02 между полосами —
   чистый чёрный). У полосы бесплатного входа своего поля нет: она
   закрывает страницу и садится вплотную к подвалу. */
.catalog-guide { margin: 16px 0; }
@media (min-width: 901px) {
  .catalog-guide { margin: 24px 0; }
}

.catalog-guide { padding: var(--space-section) 0; }
.catalog-guide .section-title { text-align: left; margin-bottom: 36px; }
.guide-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.guide-card {
  padding: 22px 24px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  background: var(--color-alpha-bone-04);
}
.guide-num {
  display: block;
  margin-bottom: 10px;
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-lh);
  letter-spacing: 0.16em;
  color: var(--accent-selected);
}
.guide-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-editorial);
  font-weight: 400;
  font-size: var(--type-display-card-size);
  line-height: var(--type-display-card-lh);
}
.guide-card p {
  margin: 0;
  font-size: var(--type-body-medium-size);
  line-height: var(--type-body-medium-lh);
  color: var(--text-secondary);
}

/* ---------- Полоса «начните бесплатно» ---------- */
.catalog-free-cta { padding: var(--space-section) 0; }
.catalog-free-cta-inner {
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: flex-start;
}
.catalog-free-cta h2 {
  margin: 0 0 8px;
  font-family: var(--font-editorial);
  font-weight: 400;
  font-size: var(--type-display-screen-size);
  line-height: var(--type-display-screen-lh);
  letter-spacing: -0.01em;
}
.catalog-free-cta p {
  margin: 0;
  font-size: var(--type-body-large-size);
  color: var(--text-secondary);
}
/* Состояние «уже получено»: вместо кнопки — счётчик до сброса и ссылка
   на сам расклад. Правая часть остаётся одной колонкой, поэтому полоса
   держит ту же композицию, что и с кнопкой. */
.catalog-free-cta-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.catalog-free-cta-clock {
  margin: 0;
  font-family: var(--font-editorial);
  font-size: var(--type-display-price-size);
  line-height: var(--type-display-price-lh);
  font-variant-numeric: tabular-nums;
  color: var(--accent-selected);
}

@media (min-width: 901px) {
  .catalog-hero { --hero-pad-top: clamp(72px, 10vh, 128px); padding: 0 0 clamp(56px, 7vh, 88px); }
  .blog-article-hero { --hero-pad-top: clamp(64px, 9vh, 112px); padding: 0 0 clamp(44px, 6vh, 72px); min-height: clamp(380px, 34vw, 520px); }
  .blog-hero-title { font-size: var(--type-display-hero-size); line-height: var(--type-display-hero-lh); }
  .catalog-hero h1 { font-size: var(--type-display-hero-size); line-height: var(--type-display-hero-lh); max-width: 14em; }
  .catalog-hero .category-filters { justify-content: flex-start; }
  .guide-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  /* Заголовок и кнопка в одну строку — как в макете. */
  .catalog-free-cta-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
  }
  .catalog-free-cta-side { align-items: flex-end; text-align: right; }
}


/* ============================================================
   ЭНЦИКЛОПЕДИЯ — герой, разделы, масти (макет D03)
   ============================================================ */
.enc-hero-row {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 28px;
}
.enc-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--control-large);
  padding: 0 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--color-alpha-bone-04);
  transition: border-color 0.2s ease-out;
}
.enc-search:focus-within { border-color: var(--accent-selected); }
.enc-search svg { flex: none; width: 18px; height: 18px; color: var(--text-secondary); }
.enc-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--text-primary);
  font-family: var(--font-functional);
  font-size: var(--type-body-medium-size);
}
.enc-search input:focus { outline: none; }
.enc-search input::placeholder { color: var(--text-secondary); }
/* Крестик очистки в Chrome — белый квадрат на тёмном фоне. */
.enc-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

.enc-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 16px;
  margin: 0;
}
.enc-stats div { text-align: left; }
.enc-stats dt {
  font-family: var(--font-editorial);
  font-size: var(--type-display-price-size);
  line-height: var(--type-display-price-lh);
  color: var(--accent-selected);
}
.enc-stats dd {
  margin: 2px 0 0;
  font-size: var(--type-body-small-size);
  line-height: var(--type-body-small-lh);
  color: var(--text-secondary);
}

.enc-filter-row {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-hairline);
}
.enc-filter-title { margin: 0; text-align: left; }
.enc-filters { margin: 0; }
.enc-filter-note {
  margin: 14px 0 0;
  font-size: var(--type-body-small-size);
  color: var(--text-secondary);
}
.enc-group { margin-top: var(--space-section); }
.enc-group[hidden] { display: none; }
.enc-group-lede {
  max-width: 40em;
  margin: -12px 0 28px;
  color: var(--text-secondary);
  font-size: var(--type-body-medium-size);
  line-height: var(--type-body-medium-lh);
}
.enc-card[hidden] { display: none; }
.enc-empty {
  margin: 40px 0 0;
  color: var(--text-secondary);
  font-size: var(--type-body-large-size);
}

/* ---------- Полоса «как читать каталог» ---------- */
.enc-method {
  margin-top: var(--space-section);
  padding: 32px 24px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}
.enc-method[hidden] { display: none; }
.enc-method h2 {
  margin: 0 0 12px;
  font-family: var(--font-editorial);
  font-weight: 400;
  font-size: var(--type-display-card-size);
  line-height: var(--type-display-card-lh);
}
.enc-method p {
  margin: 0;
  max-width: 44em;
  color: var(--text-secondary);
  font-size: var(--type-body-medium-size);
  line-height: var(--type-body-medium-lh);
}

/* ---------- Масти ---------- */
.enc-suits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.enc-suit-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  background: var(--color-alpha-bone-04);
  color: inherit;
  transition: border-color 0.2s ease-out, background 0.2s ease-out;
}
.enc-suit-card:hover {
  border-color: var(--color-alpha-gold-24);
  background: var(--color-alpha-bone-08);
}
.enc-suit-count {
  font-size: var(--type-caption-size);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.enc-suit-name {
  font-family: var(--font-editorial);
  font-size: var(--type-display-card-size);
  line-height: var(--type-display-card-lh);
}
.enc-suit-tagline {
  font-size: var(--type-body-small-size);
  color: var(--text-secondary);
}
.enc-suit-cta {
  margin-top: 12px;
  font-size: var(--type-body-small-size);
  font-weight: 600;
  color: var(--accent-selected);
}

/* ---------- Финальная полоса ---------- */
.enc-closing { padding: var(--space-section) 0; }
.enc-closing-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}
.enc-closing h2 {
  margin: 0 0 12px;
  font-family: var(--font-editorial);
  font-weight: 400;
  font-size: var(--type-display-screen-size);
  line-height: var(--type-display-screen-lh);
  letter-spacing: -0.01em;
}
.enc-closing p {
  margin: 0;
  max-width: 40em;
  color: var(--text-secondary);
  font-size: var(--type-body-large-size);
  line-height: var(--type-body-large-lh);
}

/* ---------- Длинный редакторский текст ---------- */
.prose { max-width: 46em; }
.prose h2 {
  margin: 40px 0 12px;
  font-family: var(--font-editorial);
  font-weight: 400;
  font-size: var(--type-display-card-size);
  line-height: var(--type-display-card-lh);
}
.prose h2:first-child { margin-top: 0; }
.prose p,
.prose li {
  font-size: var(--type-body-large-size);
  line-height: var(--type-body-large-lh);
  color: var(--text-secondary);
}
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--accent-selected); text-decoration: underline; }

@media (min-width: 901px) {
  .enc-hero h1 {
    font-size: var(--type-display-hero-size);
    line-height: var(--type-display-hero-lh);
    max-width: 13em;
  }
  /* Поиск слева, счётчики справа — как в макете. */
  .enc-hero-row {
    flex-direction: row;
    align-items: center;
    gap: 56px;
    margin-top: 40px;
  }
  .enc-search { flex: 1 1 46%; }
  .enc-stats { flex: 1 1 54%; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .enc-stats div { text-align: center; }

  .enc-filter-row {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
  }
  .enc-filters { justify-content: flex-end; }

  /* Старшие Арканы — семь в ряд, как в макете D03. */
  .enc-group[data-enc-group="major"] .enc-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
  .enc-method {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    padding: 40px;
  }
  .enc-method .btn-primary { flex: none; }
  .enc-suits { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .enc-closing-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
  }
  .enc-closing .btn-primary { flex: none; }
}


/* ============================================================
   СТРАНИЦА КАРТЫ (макет D04 / M04)
   ============================================================ */
.card-hero { --hero-pad-top: clamp(32px, 6vw, 72px); padding: 0 0 clamp(32px, 5vw, 64px); }
.card-hero-inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 20px;
}
.card-hero h1 {
  margin: 0 0 6px;
  font-family: var(--font-editorial);
  font-weight: 400;
  font-size: var(--type-display-hero-size);
  line-height: var(--type-display-hero-lh);
  letter-spacing: -0.015em;
}
.card-hero-en {
  margin: 0 0 20px;
  font-size: var(--type-caption-size);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.card-hero-lede {
  margin: 0 0 22px;
  max-width: 32em;
  font-size: var(--type-body-large-size);
  line-height: var(--type-body-large-lh);
  color: var(--text-secondary);
}
.card-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
.card-keys li {
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  font-size: var(--type-body-small-size);
  color: var(--text-secondary);
}
/* Карта светится — единственный «объект» на экране, ореол отделяет её
   от кадра, чтобы рамка иллюстрации не сливалась с фоном. */
/* Свечение figure выходит за колонку на 18% ширины: на узком экране это
   выносило страницу за край и давала горизонтальная прокрутка. Режем по
   полосе героя — `clip`, а не `hidden`: он не заводит контекст прокрутки
   и оставляет вторую ось видимой. */
.card-hero { overflow-x: clip; }
.card-hero-figure { position: relative; align-self: flex-start; }
.card-hero-figure::before {
  content: '';
  position: absolute;
  inset: -14% -18%;
  background: radial-gradient(ellipse at 50% 50%, var(--color-alpha-gold-24), transparent 68%);
  filter: blur(10px);
  pointer-events: none;
}
.card-hero-figure img {
  position: relative;
  display: block;
  width: min(300px, 72%);
  height: auto;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-strong);
}

.card-detail-page { padding: 0 0 var(--space-section); }

.card-lead-block {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: var(--space-section) 0 0;
}
.card-lead-block .section-title { text-align: left; margin: 0; }
.card-lead-text p {
  margin: 0;
  max-width: 40em;
  font-size: var(--type-body-large-size);
  line-height: var(--type-body-large-lh);
  color: var(--text-secondary);
}

/* ---------- Прямое / перевёрнутое рядом ---------- */
.position-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 40px;
}
.position-card {
  padding: 24px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  background: var(--color-alpha-bone-04);
}
/* Прямое положение — золотая обводка: это «основное» прочтение карты. */
.position-card--upright { border-color: var(--color-alpha-gold-24); }
.position-body {
  font-size: var(--type-body-medium-size);
  line-height: var(--type-body-medium-lh);
  color: var(--text-secondary);
}

/* ---------- Темы ---------- */
.card-themes { margin-top: var(--space-section); }
.card-themes .section-title { text-align: left; margin-bottom: 32px; }
/* Вкладки тем. Визуально — те же чипы, что фильтры каталога
   (.filter-btn), но это ссылки-якоря: без JS они ведут к теме в стопке,
   со скриптом переключают панель на месте (js/card.js). */
.theme-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.theme-tab {
  padding: 10px 18px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-strong);
  background: var(--color-alpha-bone-04);
  color: var(--text-secondary);
  font-size: var(--type-label-large-size);
  line-height: var(--type-label-large-lh);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.theme-tab:hover { color: var(--text-primary); border-color: var(--color-alpha-gold-24); }
.theme-tab.is-active {
  background: var(--accent-selected);
  border-color: var(--accent-selected);
  color: var(--text-on-selected);
}

/* Без скрипта темы идут стопкой — так же, как блоки полного разбора. */
.theme-panels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.theme-panels[data-tabbed] { display: block; }
.theme-panels[data-tabbed] .theme-card { display: none; }
.theme-panels[data-tabbed] .theme-card.is-active { display: block; }
.theme-card {
  padding: 24px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  background: var(--color-alpha-bone-04);
}
.theme-card h3 {
  margin: 0 0 16px;
  font-family: var(--font-editorial);
  font-weight: 400;
  font-size: var(--type-display-card-size);
  line-height: var(--type-display-card-lh);
}
.theme-card p {
  margin: 0 0 14px;
  font-size: var(--type-body-medium-size);
  line-height: var(--type-body-medium-lh);
  color: var(--text-secondary);
}
.theme-card p:last-child { margin-bottom: 0; }
/* Пара «прямое / перевёрнутое»: на узком экране — стопкой, на широком —
   двумя колонками (см. тир 901px). */
.theme-body { display: grid; grid-template-columns: 1fr; gap: 24px; }
.theme-side p:last-child { margin-bottom: 0; }
.theme-label {
  margin-bottom: 4px !important;
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-lh);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-selected);
}
/* Перевёрнутое — plum: это не покупка и не выбор, а второй слой смысла. */
.theme-label--reversed { color: var(--color-plum-400); }

.card-faq-block { margin-top: var(--space-section); }
.card-faq-block .section-title { text-align: left; margin-bottom: 24px; }

/* ---------- Финальная полоса ---------- */
.card-closing { padding: var(--space-section) 0; }
.card-closing-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}
.card-closing h2 {
  margin: 0 0 12px;
  font-family: var(--font-editorial);
  font-weight: 400;
  font-size: var(--type-display-screen-size);
  line-height: var(--type-display-screen-lh);
  letter-spacing: -0.01em;
}
.card-closing p {
  margin: 0;
  max-width: 40em;
  color: var(--text-secondary);
  font-size: var(--type-body-large-size);
  line-height: var(--type-body-large-lh);
}

@media (min-width: 901px) {
  /* Текст слева, карта справа — как в макете D04. */
  .card-hero-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 64px;
    margin-top: 32px;
  }
  .card-hero-text { flex: 1 1 54%; max-width: 640px; }
  .card-hero-figure { flex: 0 0 auto; align-self: center; }
  .card-hero-figure img { width: 320px; }

  .card-lead-block {
    flex-direction: row;
    gap: 64px;
  }
  .card-lead-block > div:first-child { flex: 0 0 38%; }
  .card-lead-text { flex: 1 1 auto; }

  .position-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  /* Панель одна и во всю меру колонки: 2 200 знаков в столбце 416px
     давали строку в полсотни знаков и высоту в два экрана.
     Внутри панели положения идут парой колонок — тем же приёмом, что
     «Главное значение» выше: панель во всю ширину с текстом в одну
     колонку оставляла полосу пустоты справа. */
  .theme-panels { gap: 24px; }
  .theme-card { padding: 32px 36px; }
  .theme-card p { font-size: var(--type-body-large-size); line-height: var(--type-body-large-lh); }
  .theme-body { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
  .theme-tabs { gap: 10px; margin-bottom: 28px; }

  .card-closing-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
  }
  .card-closing .btn-primary { flex: none; }
}

/* ============================================================
   АРХИВ РАСКЛАДОВ (макет I02)
   ============================================================
   Личное пространство: слева рельс фильтров, справа сетка карточек,
   первая — крупная. Мобильная шкала базовая, десктопная композиция
   собирается в тире 901px, как у остальных публичных страниц.

   Избранное и заметка — формы, а не JS-виджеты: состояние всё равно
   уходит на сервер, и страница остаётся рабочей без скриптов. */
.archive-hero { --hero-pad-top: clamp(32px, 7vw, 88px); padding: 0 0 clamp(24px, 4vw, 48px); }
.archive-hero h1 {
  margin: 0 0 14px;
  font-family: var(--font-editorial);
  font-weight: 400;
  font-size: var(--type-display-hero-size);
  line-height: var(--type-display-hero-lh);
  letter-spacing: -0.015em;
}
.archive-hero-sub {
  margin: 0;
  max-width: 32em;
  color: var(--text-secondary);
  font-size: var(--type-body-large-size);
  line-height: var(--type-body-large-lh);
}

.archive-page { padding: 0 0 var(--space-section); }
.archive-layout { display: flex; flex-direction: column; gap: 20px; }

/* ---------- Рельс фильтров ----------
   На мобиле карточки рельса нет: заголовок и счётчики уходят, а
   фильтры превращаются в строку чипов (макет I02 · Mobile). */
.archive-rail-title,
.archive-counts,
.archive-new { display: none; }
.archive-filters {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.archive-filters::-webkit-scrollbar { display: none; }
.archive-filter {
  flex: none;
  padding: 12px 22px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--color-alpha-bone-04);
  color: var(--text-secondary);
  font-size: var(--type-label-large-size);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s;
}
.archive-filter:hover { color: var(--text-primary); border-color: var(--border-strong); }
/* Выбранный фильтр — золото: это выбор, а не покупка. */
.archive-filter.is-active {
  border-color: var(--accent-selected);
  color: var(--accent-selected);
}
.archive-filter-wide { display: none; }

/* ---------- Поиск и сортировка ---------- */
.archive-searchbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  background: var(--color-alpha-bone-04);
}
.archive-search {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text-muted);
}
.archive-search svg { width: 18px; height: 18px; flex: none; }
.archive-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--text-primary);
  font-family: var(--font-functional);
  font-size: var(--type-body-medium-size);
  padding: 8px 0;
}
.archive-search input::placeholder { color: var(--text-muted); }
.archive-search input:focus { outline: none; }
.archive-sort {
  flex: none;
  padding: 12px 24px;
  border: 1px solid var(--accent-selected);
  border-radius: var(--radius-pill);
  background: none;
  color: var(--accent-selected);
  font-family: var(--font-functional);
  font-size: var(--type-label-large-size);
  cursor: pointer;
}

/* ---------- Карточки ---------- */
.archive-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 20px;
}
.archive-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  background: var(--color-alpha-bone-04);
}
/* Крупная карточка — последний расклад: единственная точка входа,
   с которой человек чаще всего и продолжает. */
.archive-card--featured {
  gap: 14px;
  padding: 26px;
  border-color: var(--color-alpha-gold-24);
}
.archive-card-meta {
  margin: 0;
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-lh);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-selected);
}
/* Заголовок карточки — вопрос пользователя, то есть текст произвольной
   длины. На ступени карточной вытяжки двадцатисловный вопрос разгонял
   карточку на пол-экрана и рвал ритм сетки, поэтому ступень ниже, а высота
   ограничена тремя строками: карточки в ряду остаются одного роста. */
.archive-card-title {
  margin: 0;
  font-family: var(--font-editorial);
  font-weight: 400;
  font-size: var(--type-heading-h2-size);
  line-height: var(--type-heading-h2-lh);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
.archive-card-title a { color: inherit; text-decoration: none; }
.archive-card-title a:hover { color: var(--accent-selected); }
.archive-card-cards,
.archive-card-note {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--type-body-small-size);
  line-height: var(--type-body-small-lh);
}
.archive-card-note { color: var(--text-muted); }

.archive-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.archive-star {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: none;
  color: var(--text-muted);
  font-family: var(--font-functional);
  font-size: var(--type-body-small-size);
  cursor: pointer;
}
.archive-star svg { width: 15px; height: 15px; }
.archive-star.is-on { color: var(--accent-selected); border-color: var(--color-alpha-gold-24); }
.archive-card-link {
  color: var(--accent-selected);
  font-size: var(--type-label-large-size);
  text-decoration: none;
}
.archive-card-hint {
  color: var(--text-muted);
  font-size: var(--type-body-small-size);
}

/* ---------- Заметка ---------- */
.archive-note-editor summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: var(--type-body-small-size);
  list-style: none;
}
.archive-note-editor summary::-webkit-details-marker { display: none; }
.archive-note-editor summary::before { content: '✎  '; }
.archive-note-editor[open] summary { color: var(--accent-selected); }
.archive-note-editor textarea {
  width: 100%;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--surface-nested);
  color: var(--text-primary);
  font-family: var(--font-functional);
  font-size: var(--type-body-small-size);
  line-height: var(--type-body-small-lh);
  resize: vertical;
}
.archive-note-editor textarea:focus {
  outline: none;
  border-color: var(--accent-selected);
}
.archive-note-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: var(--type-caption-size);
}
.archive-note-foot .btn-outline { padding: 8px 18px; font-size: var(--type-label-large-size); }

.archive-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
  color: var(--text-muted);
  font-size: var(--type-body-small-size);
}
.archive-pagination .btn-outline { padding: 8px 18px; }

.archive-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  margin-top: 20px;
  padding: 32px 24px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  background: var(--color-alpha-bone-04);
  color: var(--text-secondary);
}
.archive-empty p { margin: 0; max-width: 34em; }

.archive-new-mobile {
  display: block;
  margin-top: 28px;
  text-align: center;
}

@media (min-width: 901px) {
  /* Рельс становится карточкой слева, сетка — тремя колонками. */
  .archive-layout {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
  }
  .archive-rail {
    padding: 28px 24px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-card);
    background: var(--color-alpha-bone-04);
    position: sticky;
    top: 100px;
  }
  .archive-rail-title {
    display: block;
    margin: 0 0 18px;
    font-size: var(--type-caption-size);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .archive-filters {
    flex-direction: column;
    overflow: visible;
    gap: 12px;
  }
  .archive-filter { text-align: left; }
  .archive-filter-wide { display: inline; }
  .archive-filter-narrow { display: none; }
  .archive-counts {
    display: block;
    margin: 24px 0 0;
    color: var(--text-muted);
    font-size: var(--type-body-small-size);
  }
  .archive-new {
    display: block;
    margin-top: 20px;
    text-align: center;
    width: 100%;
  }
  /* Кнопка внизу — мобильный паттерн: на десктопе её роль играет
     «Новый расклад» в рельсе. */
  .archive-new-mobile { display: none; }

  .archive-searchbar { padding: 12px 16px; }
  .archive-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
  }
  /* Первая карточка занимает две колонки — как в макете. Крупный кегль
     заголовка включается только здесь: на 390px он давал три строки
     и выталкивал карточки списка за первый экран. */
  .archive-card--featured { grid-column: span 2; padding: 32px; }
  .archive-card--featured .archive-card-title {
    font-size: var(--type-display-card-size);
    line-height: var(--type-display-card-lh);
  }
  .archive-card { padding: 26px; }
}


/* ============================================================
   ГЕРОЙ ПОД ШАПКОЙ
   ============================================================
   В макетах V2 (D01–D04, I02, мобильные) кадр героя начинается у
   верхнего края экрана, а шапка стоит прямо на снимке — отдельной
   чёрной полосы над кадром нет. Секция поднимается на высоту шапки
   и на неё же добирает верхнее поле, поэтому текст остаётся там же,
   где был, а картинка уходит под шапку.

   Блок стоит в конце файла намеренно: у героев верхнее поле задано
   сокращением `padding` в нескольких тирах, и правило с равной
   специфичностью работает только ниже них. Само значение поля
   каждый герой отдаёт через --hero-pad-top.

   Шапка остаётся sticky: её статическая позиция и так наверху
   страницы, а z-index: 100 держит её над кадром. */
.hero,
.catalog-hero,
.enc-hero,
.card-hero,
.archive-hero,
.blog-article-hero {
  margin-top: calc(-1 * var(--header-height));
  padding-top: calc(var(--header-height) + var(--hero-pad-top, 0px));
}

/* Системные сообщения идут между шапкой и героем: подъём отменяем,
   иначе кадр наехал бы на них. Верхнее поле остаётся увеличенным —
   на этих страницах оно читается как воздух под сообщением. */
body:has(.messages-container) .hero,
body:has(.messages-container) .catalog-hero,
body:has(.messages-container) .enc-hero,
body:has(.messages-container) .card-hero,
body:has(.messages-container) .archive-hero,
body:has(.messages-container) .blog-article-hero {
  margin-top: 0;
}
