:root {
  /* ---------- Colours ---------- */
  --c-text: #282227;
  --c-text-muted: rgba(40, 34, 39, 0.6);
  --c-text-on-dark: #ffffff;
  --c-text-on-dark-muted: rgba(255, 255, 255, 0.6);
  --c-magenta: #aa2692;
  --c-magenta-border: #dd35ff;
  --c-purple-deep: #160131;
  --c-violet: #b43ac7;
  --c-banner: #667df2;
  --c-pink-soft: #f7eaf5;
  --c-pink-softer: #fbf3fa;
  --c-divider-soft: #ecebf9;
  --c-card-divider: rgba(170, 38, 146, 0.1);
  /* Tints — повторно используемые полупрозрачные оттенки.
     -tint-N — N процентов alpha поверх белого фона. */
  --c-text-tint-5: rgba(40, 34, 39, 0.05);
  /* фон input/балансовой плашки в модалках */
  --c-text-tint-10: rgba(40, 34, 39, 0.1);
  /* серый фон icon-btn, view-toggle, balance, secondary btn */
  --c-text-tint-18: rgba(40, 34, 39, 0.18);
  /* hover-state для tint-10 элементов */
  --c-text-tint-20: rgba(40, 34, 39, 0.2);
  /* secondary hover, border на tertiary btn */
  --c-text-tint-40: rgba(40, 34, 39, 0.4);
  /* placeholder в input'ах */
  --c-overlay-40: rgba(0, 0, 0, 0.4);
  /* затемнение поверх изображений и backdrop модалок */
  --c-online: #08b866;
  --c-danger: #e23434;
  /* destructive (logout, delete и т.п.) */
  --c-danger-tint-10: rgba(226, 52, 52, 0.1);
  /* hover-фон для danger-действий */
  --c-magenta-tint-5: rgba(170, 38, 146, 0.05);
  /* очень светлый magenta fill */
  --c-magenta-tint-10: rgba(170, 38, 146, 0.1);
  /* gift-pill, badge-tint */
  --c-magenta-tint-20: rgba(170, 38, 146, 0.2);
  /* active pill tab */
  --c-status-day: #51b4ed;
  /* badge «Эксперт дня» */
  --c-status-new: #2dbd64;
  /* badge «New» — отличный оттенок от --c-online */
  --c-star: #e4a538;
  --c-gold: #cfa544;
  --c-hero-bg: #c67070;
  --c-bg: #ffffff;
  --c-surface: #ffffff;
  --c-surface-soft: #faf6fa;

  /* ---------- Gradients ---------- */
  --gradient-primary: linear-gradient(86deg, #160131 21%, #aa2692 99%);
  --gradient-photo-fallback: linear-gradient(135deg, #c084fc 0%, #f0abfc 50%, #fda4af 100%);

  /* Палитра 8 градиент-fallback'ов для обложек статей/SEO-страниц блога.
     Видны, пока реальная картинка не загрузилась (или не указана). */
  --gradient-blog-1: linear-gradient(135deg, #f0abfc 0%, #fda4af 100%);
  --gradient-blog-2: linear-gradient(135deg, #c084fc 0%, #f9a8d4 100%);
  --gradient-blog-3: linear-gradient(135deg, #fb923c 0%, #fbcfe8 100%);
  --gradient-blog-4: linear-gradient(135deg, #a78bfa 0%, #f0abfc 100%);
  --gradient-blog-5: linear-gradient(135deg, #f472b6 0%, #fde68a 100%);
  --gradient-blog-6: linear-gradient(135deg, #818cf8 0%, #f0abfc 100%);
  --gradient-blog-7: linear-gradient(135deg, #fb7185 0%, #fda4af 100%);
  --gradient-blog-8: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);

  /* ---------- Font families ---------- */
  --font-display: 'Philosopher', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* ---------- Font-size scale ----------
     FLUID-typescale. Каждый шрифт плавно скейлится от mobile (430px) до
     desktop (1440px) через clamp(MIN, fluid_formula, MAX). На промежуточных
     ширинах размер всегда между MIN и MAX, без скачков на брейкпоинтах.
     Линейная интерполяция:
       slope     = (MAX_px - MIN_px) / (1440 - 430) * 100   (=vw-фактор)
       intercept = MIN_px - 430 * slope/100                  (px-база)
       clamp(MIN_px, intercept + slope vw, MAX_px)
     Маленькие размеры (2xs/xs/sm/base) оставлены статичными — для читаемости
     и плотности UI на mobile они и так оптимальны. Fluid начинается с lg. */
  --fs-2xs: 10px;
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-base: 16px;
  --fs-md: clamp(16px, 15.15px + 0.198vw, 18px);
  /* 16→18 */
  --fs-lg: clamp(18px, 17.15px + 0.198vw, 20px);
  /* 18→20 */
  --fs-xl: clamp(20px, 18.30px + 0.396vw, 24px);
  /* 20→24 */
  --fs-2xl: clamp(24px, 20.59px + 0.792vw, 32px);
  /* 24→32 */
  --fs-3xl: clamp(32px, 25.19px + 1.584vw, 48px);
  /* 32→48 */
  --fs-4xl: clamp(24px, 10.38px + 3.168vw, 56px);
  /* 24→56 — hero title (mobile 24 = Figma 315:28234) */

  /* ---------- Line-height scale (парные к --fs-*) ----------
     Для крупных fluid-шрифтов lh тоже fluid. Маленькие — статичны. */
  --lh-2xs: 14px;
  --lh-xs: 16px;
  --lh-snug: 18px;
  --lh-sm: 20px;
  --lh-base: 24px;
  --lh-md: 20px;
  --lh-lg: clamp(22px, 19.32px + 0.624vw, 28px);
  /* 22→28 (под --fs-md/lg) */
  --lh-xl: clamp(24px, 18.91px + 1.188vw, 36px);
  /* 24→36 (под --fs-xl/2xl) */
  --lh-2xl: clamp(28px, 19.51px + 1.980vw, 48px);
  /* 28→48 */
  --lh-3xl: clamp(40px, 33.19px + 1.584vw, 56px);
  /* 40→56 (под --fs-3xl) */
  --lh-4xl: clamp(32px, 20.08px + 2.772vw, 60px);
  /* 32→60 (под --fs-4xl 24→56) */

  /* ---------- Font weight scale ---------- */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* ---------- Spacing scale (4-px база) ----------
     Использование: gap, padding, margin. Для сетки/контейнера —
     отдельно --container / --gutter / --section-padding-y.    */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 56px;
  --s-9: 64px;

  /* ---------- Radii ---------- */
  --r-xs: 12px;
  /* checkbox, btn-icon--sm, view-toggle, slot */
  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 36px;
  --r-2xl: 48px;
  --r-pill: 100px;

  /* ---------- Effects ---------- */
  --shadow-btn: 0 4px 8px rgba(0, 0, 0, 0.15);
  --shadow-card: 0 16px 38px 4px rgba(59, 11, 52, 0.28);
  --inset-glow: inset 0 0 8px 0 #fff;

  /* ---------- Layout ---------- */
  --container: 1328px;
  --gutter: 56px;
  --gap: 24px;
  --section-padding-y: clamp(32px, 5vw, 96px);
  /* mobile 32 → desktop 96 */
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

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

/* Резервируем место под scrollbar всегда — чтобы при открытии модалки
   (body{overflow:hidden}) страница не «прыгала» на ширину скроллбара.
   Поддержка: Chrome 94+, Safari 17+, Firefox 97+ (на старых — старое поведение). */
html {
  scrollbar-gutter: stable;
}

/* Декоры (фото в spheres / таро-карты в how-it-works) выезжают за пределы
   секций через translateX/-X. Глобальный clip по горизонтали гарантирует, что
   за viewport ничего не торчит, без блокировки sticky (overflow:clip vs hidden). */
html,
body {
  overflow-x: clip;
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--c-text);
  background: var(--c-bg);
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--c-magenta);
  outline-offset: 2px;
  border-radius: 4px;
  /* off-scale 4 — focus ring */
}

/* ============================================================
   VISUALLY HIDDEN
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ============================================================
   TYPOGRAPHY — текстовая система проекта.

   Содержит:
   1) Глобальные текстовые классы (.page-title, .section-title,
      .section-subtitle, .breadcrumbs) — применяются в HTML напрямую.
   2) Композитные токены --t-* — font-shorthand из существующей
      шкалы tokens.css. Применяются в CSS-компонентах:
        .my-component { font: var(--t-body-sm); }
      Это заменяет повторяющиеся блоки из 4 строк
      (font-family/font-weight/font-size/line-height).

   ============================================================
   СХЕМА ИМЁН ТОКЕНОВ:
     --t-{family}-{size}[-{weight}][-on-{lh}]

   {family}  body (Inter) | display (Philosopher)
   {size}    ключ из --fs-* в tokens.css:
             2xs=10  xs=12  sm=14  base=16  md=18  lg=20
             xl=24   2xl=32 3xl=48 4xl=56
   {weight}  опц.: medium | strong (semibold) | bold
             (если опущено — Regular 400)
   -on-{lh}  опц. override line-height (ключ из --lh-*):
             2xs=14  xs=16  snug=18  sm=20  base=24
             lg=28   xl=32  2xl=40
             По умолчанию = lh-{size} (или lh-base если такой нет).

   Примеры:
     --t-body-sm                 → Inter Regular 14/20 (default sm/sm)
     --t-body-sm-strong          → Inter Semibold 14/20
     --t-body-sm-on-snug         → Inter Regular 14/18
     --t-body-sm-medium-on-base  → Inter Medium 14/24
     --t-display-xl-bold         → Philosopher Bold 24/32
     --t-display-xl-bold-on-base → Philosopher Bold 24/24

   Семантические токены (--t-tag, --t-hero-title, --t-modal-amount,
   --t-article-title и т.д.) — для конкретных мест проекта, имя
   отражает назначение, а не размер/вес.

   Что НЕ здесь:
   — переменные шкалы (--font-*, --fs-*, --lh-*, --fw-*) → tokens.css;
   — локальные one-off шрифты (clamp на конкретной секции, off-scale
     значения из Figma) → остаются рядом с компонентом.

   Каскад: typography.css подключается после base.css, до layout.css.
   ============================================================ */

:root {

  /* ============================================================
     BODY (Inter) — для основного текста.
     Дефолтный lh для размера = --lh-{same-key}, или lh-base если такой
     ключ в шкале --lh-* отсутствует (md, 3xl).
     ============================================================ */

  /* xs = 12 / lh-xs = 16 */
  --t-body-xs: var(--fw-regular) var(--fs-xs)/var(--lh-xs) var(--font-body);
  --t-body-xs-medium: var(--fw-medium) var(--fs-xs)/var(--lh-xs) var(--font-body);
  --t-body-xs-strong: var(--fw-semibold) var(--fs-xs)/var(--lh-xs) var(--font-body);
  --t-body-xs-on-snug: var(--fw-regular) var(--fs-xs)/var(--lh-snug) var(--font-body);
  /* 12/18 — caption tight */
  --t-body-xs-on-base: var(--fw-regular) var(--fs-xs)/var(--lh-base) var(--font-body);
  /* 12/24 — meta под карточкой */
  --t-body-xs-medium-on-sm: var(--fw-medium) var(--fs-xs)/var(--lh-sm) var(--font-body);
  /* 12/20 — booking «Рекомендуют» */

  /* sm = 14 / lh-sm = 20 (самый ходовой размер, ~70 случаев) */
  --t-body-sm: var(--fw-regular) var(--fs-sm)/var(--lh-sm) var(--font-body);
  --t-body-sm-medium: var(--fw-medium) var(--fs-sm)/var(--lh-sm) var(--font-body);
  --t-body-sm-strong: var(--fw-semibold) var(--fs-sm)/var(--lh-sm) var(--font-body);
  --t-body-sm-bold: var(--fw-bold) var(--fs-sm)/var(--lh-sm) var(--font-body);
  /* rating-score */
  --t-body-sm-on-snug: var(--fw-regular) var(--fs-sm)/var(--lh-snug) var(--font-body);
  /* 14/18 */
  --t-body-sm-medium-on-snug: var(--fw-medium) var(--fs-sm)/var(--lh-snug) var(--font-body);
  /* 14/18 Medium */
  --t-body-sm-on-base: var(--fw-regular) var(--fs-sm)/var(--lh-base) var(--font-body);
  /* 14/24 — текст карточек */
  --t-body-sm-medium-on-base: var(--fw-medium) var(--fs-sm)/var(--lh-base) var(--font-body);
  /* 14/24 Medium */
  --t-body-sm-strong-on-base: var(--fw-semibold) var(--fs-sm)/var(--lh-base) var(--font-body);
  /* 14/24 Semibold */

  /* base = 16 / lh-base = 24 */
  --t-body-base: var(--fw-regular) var(--fs-base)/var(--lh-base) var(--font-body);
  --t-body-base-medium: var(--fw-medium) var(--fs-base)/var(--lh-base) var(--font-body);
  --t-body-base-strong: var(--fw-semibold) var(--fs-base)/var(--lh-base) var(--font-body);
  --t-body-base-on-xl: var(--fw-regular) var(--fs-base)/var(--lh-xl) var(--font-body);
  /* 16/32 — открытый lh */

  /* md = 18 / нет lh-md → default lh-base = 24 */
  --t-body-md-strong-on-xl: var(--fw-semibold) var(--fs-md)/var(--lh-xl) var(--font-body);
  /* 18/32 — stories quote */

  /* lg = 20 / lh-lg = 28 */
  --t-body-lg: var(--fw-regular) var(--fs-lg)/28px var(--font-body);
  /* лидерское описание (subscribe) */

  /* xl = 24 / lh-xl = 32 */
  --t-body-xl: var(--fw-regular) var(--fs-xl)/var(--lh-xl) var(--font-body);
  /* 24/32 */


  /* ============================================================
     DISPLAY (Philosopher) — для заголовков.
     ============================================================ */

  /* base = 16 */
  --t-display-base-on-sm: var(--fw-regular) var(--fs-base)/var(--lh-sm) var(--font-display);
  /* 16/20 — имя автора в карточке статьи */
  --t-display-base-bold-on-sm: var(--fw-bold) var(--fs-base)/var(--lh-sm) var(--font-display);
  /* 16/20 Bold — FAQ question */

  /* lg = 20 / lh-lg = 28 */
  --t-display-lg-on-xl: var(--fw-regular) var(--fs-lg)/var(--lh-xl) var(--font-display);
  /* 20/32 — spheres tab */
  --t-display-lg-bold-on-base: var(--fw-bold) var(--fs-lg)/var(--lh-base) var(--font-display);
  /* 20/24 Bold */
  --t-display-lg-bold-on-sm: var(--fw-bold) var(--fs-lg)/var(--lh-sm) var(--font-display);
  /* 20/20 Bold — tight (tarot-flow/strict) */

  /* md = 18 — нет lh-md → используем явные lh */
  --t-display-md-bold-on-xl: var(--fw-bold) var(--fs-md)/var(--lh-xl) var(--font-display);
  /* 18/32 Bold — seo heading */

  /* xl = 24 / lh-xl = 32 */
  --t-display-xl: var(--fw-regular) var(--fs-xl)/var(--lh-xl) var(--font-display);
  /* 24/32 */
  --t-display-xl-bold: var(--fw-bold) var(--fs-xl)/var(--lh-xl) var(--font-display);
  /* 24/32 Bold */
  --t-display-xl-bold-on-base: var(--fw-bold) var(--fs-xl)/var(--lh-base) var(--font-display);
  /* 24/24 Bold tight */

  /* 2xl = 32 */
  --t-display-2xl-on-xl: var(--fw-regular) var(--fs-2xl)/var(--lh-xl) var(--font-display);
  /* 32/32 — имя эксперта в hero */

  /* Off-scale display заголовки страниц */
  --t-display-headline: var(--fw-regular) var(--fs-3xl)/56px var(--font-display);
  /* 48/56 — section title (how-it-works/experts-teaser) */
  --t-display-section: var(--fw-regular) 28px/32px var(--font-display);
  /* 28/32 — section title medium (cta-help/subscribe), 28 off-scale */


  /* ============================================================
     SEMANTIC TOKENS — для конкретных мест проекта.
     Имя отражает назначение (не размер). Используются 1-2 раза.
     ============================================================ */

  /* ---------- COMPONENTS ---------- */
  --t-tag: var(--fw-medium) var(--fs-2xs)/var(--lh-2xs) var(--font-body);
  /* 10/14 — pill-бейдж */
  --t-tag-strong: var(--fw-semibold) var(--fs-2xs)/var(--lh-2xs) var(--font-body);
  /* 10/14 Semibold — solid pill в hero */
  --t-footer-brand: var(--fw-bold) var(--fs-xl)/48px var(--font-display);
  /* 24/48 — лого «TAROTO» в футере */
  --t-balance-value: var(--fw-semibold) var(--fs-sm)/var(--lh-xs) var(--font-body);
  /* 14/16 — баланс в header pill */

  /* ---------- SECTION HEADINGS (общие, ≥2 use) ---------- */
  --t-section-heading-md: var(--fw-bold) var(--fs-md)/var(--lh-base) var(--font-display);
  /* 18/24 Bold — cookies title, mobile-menu top group */
  --t-section-heading-sm: var(--fw-bold) var(--fs-base)/var(--lh-base) var(--font-display);
  /* 16/24 Bold — mobile-menu subgroup */

  /* ---------- CATALOG ---------- */
  --t-badge: var(--fw-semibold) var(--fs-2xs)/1 var(--font-body);
  /* 10/1 — числовой бейдж */
  --t-filter-title: var(--fw-semibold) var(--fs-base)/var(--lh-xl) var(--font-body);
  /* 16/32 — заголовок группы фильтров */

  /* ---------- BLOG / ARTICLE ---------- */
  --t-article-title: var(--fw-regular) clamp(28px, 2.6vw, 32px)/1.1 var(--font-display);
  /* fluid 28→32 — H1 статьи */
  --t-article-author: var(--fw-regular) var(--fs-md)/var(--lh-base) var(--font-display);
  /* 18/24 — имя автора статьи */
  --t-article-rating-value: var(--fw-regular) clamp(36px, 3.5vw, 48px)/1 var(--font-display);
  /* fluid 36→48 — оценка статьи */
  --t-blog-subtitle: var(--fw-regular) var(--fs-md)/var(--lh-lg) var(--font-body);
  /* 18/28 — подзаголовок блог-листинга */
  --t-review-author: var(--fw-semibold) var(--fs-sm)/16.8px var(--font-body);
  /* 14/16.8 — автор отзыва (Figma exact) */

  /* ---------- LK ---------- */
  --t-lk-balance-value: var(--fw-regular) clamp(32px, 3.5vw, 48px)/1.16 var(--font-display);
  /* fluid 32→48 — крупная сумма */
  --t-lk-payment-amount: var(--fw-medium) var(--fs-xl)/var(--lh-base) var(--font-body);
  /* 24/24 Medium — сумма платежа */
  --t-lk-bonus-balance: var(--fw-regular) clamp(28px, 2.5vw, 36px)/1.16 var(--font-display);
  /* fluid 28→36 — баланс бонусных минут (compact) */

  /* ---------- SEO PAGE ---------- */
  --t-seo-title: var(--fw-bold) clamp(24px, 2.2vw, 32px)/1.1 var(--font-display);
  /* fluid 24→32 — H1 SEO */

  /* ---------- HERO (главная) ---------- */
  --t-hero-title: var(--fw-regular) var(--fs-4xl)/var(--lh-4xl) var(--font-display);
  /* fluid 24/32 → 56/60 */
  --t-hero-prompt: var(--fw-bold) var(--fs-md)/var(--lh-sm) var(--font-display);
  /* 18/20 mobile */
  --t-hero-meta: var(--fw-medium) 9px/var(--lh-xs) var(--font-body);
  /* 9/16 mobile (9 off-scale) */
  --t-hero-photo-role-desktop: var(--fw-regular) var(--fs-xl)/var(--lh-base) var(--font-body);
  /* 24/24 desktop */
  --t-hero-photo-name-desktop: var(--fw-bold) var(--fs-3xl)/48px var(--font-display);
  /* 48/48 desktop (48 off-scale) */
  --t-hero-feature-title: var(--fw-bold) var(--fs-lg)/var(--lh-lg) var(--font-display);
  /* 20/28 */
  --t-hero-feature-desc: var(--fw-regular) clamp(13px, 12.57px + 0.099vw, 15px)/clamp(18px, 17.57px + 0.099vw, 20px) var(--font-body);
  /* fluid 13→15 / 18→20 */

  /* ---------- MODAL ---------- */
  --t-modal-amount: var(--fw-medium) var(--fs-2xl)/var(--lh-base) var(--font-body);
  /* 32/24 — введённая сумма (top-up) */
  --t-modal-step-title: var(--fw-semibold) var(--fs-md)/var(--lh-base) var(--font-body);
  /* 18/24 — заголовок шага */
  --t-modal-step-num: var(--fw-regular) var(--fs-xs)/1 var(--font-display);
  /* 12/1 — порядковый номер */
  --t-modal-heading: var(--fw-bold) var(--fs-xl)/1 var(--font-display);
  /* 24/1 — крупный заголовок */
  --t-modal-balance-big: var(--fw-bold) var(--fs-3xl)/1 var(--font-display);
  /* 48/1 — большой баланс */
  --t-modal-number: var(--fw-regular) var(--fs-xl)/1 var(--font-body);
  /* 24/1 — крупное число */
  --t-modal-title-lg: var(--fw-regular) var(--fs-2xl)/var(--lh-2xl) var(--font-display);
  /* 32/40 — большой заголовок (welcome) */

  /* ---------- BOOKING ---------- */
  --t-booking-price: var(--fw-semibold) var(--fs-xl)/var(--lh-base) var(--font-body);
  /* 24/24 — цена в booking */
  --t-booking-price-total: var(--fw-semibold) var(--fs-lg)/var(--lh-base) var(--font-body);
  /* 20/24 — итоговая цена */

  /* ---------- STORIES (главная, fluid внутри @container) ---------- */
  --t-stories-stat: var(--fw-regular) clamp(14px, 11.2px + 0.39cqi, 18px)/1.33 var(--font-body);
  /* fluid 14→18 */
  --t-stories-text: var(--fw-regular) clamp(14px, 12px + 0.28cqi, 16px)/1.5 var(--font-body);
  /* fluid 14→16 */
  --t-stories-chunk-title-wide: var(--fw-semibold) clamp(16px, 14px + 0.28cqi, 18px)/var(--lh-xl) var(--font-body);
  /* fluid 16→18 Semibold */

  /* ---------- STRICT-SELECTION (главная) ---------- */
  --t-strict-card-title: var(--fw-bold) clamp(20px, 14px + 0.556cqi, 22px)/1.2 var(--font-display);
  /* fluid 20→22 Bold */

  /* ---------- FREE-THEMES (главная, fluid по vw) ---------- */
  --t-free-themes-num: var(--fw-bold) clamp(48px, 25.14px + 7.143vw, 128px)/1 var(--font-display);
  /* fluid 48→128 */
  --t-free-themes-title: var(--fw-bold) clamp(13px, 11px + 0.625vw, 20px)/1.2 var(--font-display);
  /* fluid 13→20 */
  --t-free-themes-desc: var(--fw-regular) clamp(11px, 10.14px + 0.268vw, 14px)/1.4 var(--font-body);
  /* fluid 11→14 */
}

/* ============================================================
   ГЛОБАЛЬНЫЕ ТЕКСТОВЫЕ КЛАССЫ — применяются прямо в HTML.
   (clamp нельзя засунуть в font shorthand → пишем longhand)
   ============================================================ */

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  font: var(--t-body-sm);
  color: var(--c-text-muted);
  margin-bottom: var(--s-2);
}

.breadcrumbs a {
  color: inherit;
}

.breadcrumbs a:hover {
  color: var(--c-magenta);
}

/* ---------- H1 страницы — fluid 32→56 ---------- */
.page-title {
  font-family: var(--font-display);
  font-weight: var(--fw-regular);
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.1;
  color: var(--c-text);
}

/* ---------- Заголовок секции — fluid 28→48, Philosopher Regular 400 ---------- */
.section-title {
  font-family: var(--font-display);
  font-weight: var(--fw-regular);
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.1;
  color: var(--c-text);
}

/* ---------- Подзаголовок секции ---------- */
.section-subtitle {
  font-size: clamp(14px, 1.4vw, 18px);
  color: var(--c-text-muted);
  max-width: 720px;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  /* Fluid gutter: 16 на 360 → 56 на 1440. Без media-queries.
     Линейная интерполяция: a*x+b где x=vw_px, a=40/1080≈0.0370, b≈2.67. */
  padding-inline: clamp(16px, 3.7vw + 2.67px, 56px);
}

.section {
  padding-block: var(--section-padding-y);
}

.section--tight {
  padding-block: clamp(32px, 4vw, 64px);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  margin-bottom: clamp(24px, 3vw, 48px);
}

/* .section-title / .section-subtitle — в src/css/typography.css */



/* ============================================================
   CSS — COMPONENTS (переиспользуемые: кнопки, теги, карточки, header, footer)
   ============================================================ */
/* ============================================================
   BUTTONS — Figma system
   Типы:   .btn--primary  / .btn--secondary  / .btn--tertiary  / .btn--text
   Размер: .btn (= Desktop default), .btn--lg (Hero CTA 300×72)
   Mobile: автомат через @media (max-width: 430px) — увеличенная тап-зона.
   Hover: на primary/2Line — gradient «сжимается» до 33.7% + border тёмный
   ============================================================ */

/* === BASE === */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  border: 0;
  border-radius: var(--r-pill);
  cursor: pointer;
  font: var(--t-body-base-strong);
  text-align: center;
  white-space: nowrap;
  padding: var(--s-2) var(--s-3);
  min-height: 40px;
  transition:
    background-image .25s ease,
    background-color .18s ease,
    border-color .18s ease,
    color .18s ease,
    box-shadow .18s ease,
    opacity .18s ease;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* HTML-атрибут `hidden` должен скрывать кнопку — но `display:inline-flex` выше
   переопределяет UA `[hidden]{display:none}`. Возвращаем явно. */
.btn[hidden] {
  display: none;
}

.btn>svg,
.btn>img {
  display: block;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

@media (max-width: 430px) {
  .btn {
    font-size: var(--fs-sm);
    line-height: var(--lh-sm);
    min-height: 36px;
  }

  .btn>svg,
  .btn>img {
    width: var(--s-4);
    height: var(--s-4);
  }
}

/* === PRIMARY (gradient) ===
   Плавность hover-а через ::after: дефолтный градиент на самой кнопке,
   поверх — ::after с hover-градиентом и opacity:0. На :hover он плавно
   проявляется (gradient-to-gradient браузеры не интерполируют, поэтому
   используется fade пары слоёв).

   Hover-градиент специально мягкий (0%→60% вместо «сжатого» 21.5%→33.7%),
   чтобы не было резкой полосы перехода. Magenta доминирует, но переход
   идёт плавно по большей части ширины кнопки. */
.btn--primary {
  color: #fff;
  border: 1px solid var(--c-magenta-border);
  background-image: linear-gradient(86deg, var(--c-purple-deep) 21.5%, var(--c-magenta) 99%);
  box-shadow: var(--inset-glow);
  overflow: hidden;
  /* isolation создаёт собственный stacking context — позволяет ::after
     с z-index:-1 «спрятаться» под текстом кнопки, но остаться в её рамках.
     Раньше с дефолтным stacking ::after (positioned) перекрывал текст-ноду
     (которая inline non-positioned и не реагирует на `> * { z-index }`). */
  isolation: isolate;
}

.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  /* под текстом, но внутри isolation */
  border-radius: inherit;
  background-image: linear-gradient(86deg, var(--c-purple-deep) 0%, var(--c-magenta) 60%);
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}

.btn--primary:hover::after {
  opacity: 1;
}

/* === SECONDARY (translucent dark) — bgc анимируется нативно === */
.btn--secondary {
  color: var(--c-text);
  background-color: var(--c-text-tint-10);
  padding: var(--s-3);
  min-height: 48px;
}

.btn--secondary:hover {
  background-color: var(--c-text-tint-20);
}

@media (max-width: 430px) {
  .btn--secondary {
    min-height: 44px;
    padding: var(--s-3);
  }
}

/* === TERTIARY (white pill, border, drop-shadow) — flat bgc для smooth hover === */
.btn--tertiary {
  color: var(--c-text);
  background-color: #fff;
  border: 1px solid var(--c-text-tint-20);
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.15));
  /* shadow-elev-1 */
  padding: var(--s-3);
  min-height: 48px;
}

.btn--tertiary:hover {
  background-color: #f3f1f3;
}

@media (max-width: 430px) {
  .btn--tertiary {
    min-height: 44px;
    padding: var(--s-3);
  }
}

/* === TEXT (no bg, no border) === */
.btn--text {
  color: var(--c-magenta);
  background: none;
  border: 0;
  padding: 0;
  min-height: 24px;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.15));
  /* shadow-elev-1 */
}

.btn--text:hover {
  color: #e954ce;
}

/* === SIZE MODIFIERS === */
/* .btn--lg — Hero CTA (300×72) и кнопки-CTA в секциях */
.btn--lg {
  min-height: 72px;
  padding: var(--s-4) var(--s-3);
  width: 300px;
  max-width: 100%;
}

@media (max-width: 430px) {
  .btn--lg {
    min-height: 56px;
    width: 100%;
    padding: var(--s-4) var(--s-3);
    font-size: var(--fs-base);
    line-height: var(--lh-base);
  }
}

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

/* .btn--md — единая высота главных кнопок действия (56). Высота из компонента,
   а не точечным override в секциях (top-up, каталог/страница услуги и т.п.). */
.btn--md {
  min-height: 56px;
}

/* === ICON-ONLY round button (slider arrows, search, etc.) === */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--r-md);
  background: var(--c-pink-soft);
  color: var(--c-magenta);
  border: 0;
  cursor: pointer;
  transition: background-color .18s ease, transform .12s ease;
}

.btn-icon:hover {
  background-color: #efd4ec;
}

.btn-icon:active {
  transform: scale(0.97);
}

.btn-icon--sm {
  width: 40px;
  height: 40px;
  border-radius: var(--r-xs);
}

.btn-icon svg {
  width: 24px;
  height: 24px;
}

.btn-icon--sm svg {
  width: 18px;
  height: 18px;
}

/* ============================================================
   TAGS — pill 4×8, Inter Medium 10/14, радиус pill
   ============================================================ */
.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--s-1) var(--s-2);
  font: var(--t-tag);
  border-radius: var(--r-pill);
  background: var(--c-violet);
  color: var(--c-text-on-dark);
  white-space: nowrap;
  /* Если .tag — кнопка (открывает «Уровни экспертов»), визуально выглядит
     так же, но получает указатель и hit-area: */
  border: 0;
  cursor: inherit;
}

button.tag {
  cursor: pointer;
}

button.tag:hover {
  filter: brightness(0.92);
}

.tag--gold {
  background: var(--c-gold);
  color: var(--c-text);
}

.tag--exclusive {
  background: var(--c-violet);
  color: #fff;
}

.tag--platinum {
  background: linear-gradient(135deg, #6b7280, #d1d5db);
  color: var(--c-text);
}

.tag--day {
  background: var(--c-status-day);
  color: #fff;
}

.tag--pro {
  background: var(--c-magenta-tint-10);
  color: var(--c-magenta);
}

.tag--new {
  background: var(--c-status-new);
  color: #fff;
}

/* Figma 75:4470 mobile */

/* ============================================================
   PHOTO PLACEHOLDER
   Drops in any <img class="photo">. If src is missing/broken,
   gradient fallback is shown so design doesn't fall apart.
   ============================================================ */
.photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--gradient-photo-fallback);
  border-radius: inherit;
}

.photo-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--gradient-photo-fallback);
}

.photo-frame--circle {
  border-radius: 50%;
}

/* ============================================================
   RATING / STATUS / USER STACK
   ============================================================ */

/* Rating: цифра + 5 звёзд */
.rating {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
}

.rating__score {
  font: var(--t-body-sm-bold);
  color: var(--c-star);
}

.rating__stars {
  display: inline-flex;
  gap: 2px;
  color: var(--c-star);
  /* off-scale — micro-gap */
}

.rating__stars svg {
  width: 12px;
  height: 12px;
}

/* ---------- Rating-star (full / half / empty) ----------
   Реализация через CSS mask: SVG-path задаёт форму звезды, фон контролирует
   состояние. Half — linear-gradient gold→empty в 50%.
   Применяется через JS tplStars(rating). #}
   ICONS.star в icons.js используется отдельно как иконка-декоратор (1 звезда
   возле числа рейтинга в expert-hero) — там цвет через currentColor. */
.rating-star {
  --rating-star-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10.4258 9.98633'><path d='M4.85422 0.911839C4.96946 0.678369 5.02708 0.561634 5.10531 0.524338C5.17337 0.491887 5.25244 0.491887 5.3205 0.524338C5.39872 0.561634 5.45634 0.678369 5.57159 0.911839L6.66492 3.12682C6.69895 3.19575 6.71596 3.23021 6.74082 3.25697C6.76283 3.28066 6.78923 3.29986 6.81855 3.31349C6.85167 3.32889 6.8897 3.33445 6.96576 3.34557L9.41139 3.70303C9.66893 3.74068 9.79769 3.7595 9.85729 3.8224C9.90913 3.87713 9.93352 3.95233 9.92365 4.02707C9.9123 4.11297 9.81908 4.20377 9.63263 4.38537L7.86362 6.10839C7.80847 6.1621 7.7809 6.18896 7.76311 6.22091C7.74736 6.2492 7.73725 6.28029 7.73335 6.31243C7.72895 6.34874 7.73545 6.38668 7.74847 6.46255L8.16587 8.89624C8.2099 9.15293 8.23191 9.28127 8.19054 9.35743C8.15455 9.42369 8.09057 9.47017 8.01643 9.48392C7.93121 9.49971 7.81595 9.4391 7.58545 9.31789L5.39908 8.1681C5.33096 8.13227 5.2969 8.11436 5.26102 8.10732C5.22924 8.10109 5.19656 8.10109 5.16479 8.10732C5.12891 8.11436 5.09484 8.13227 5.02672 8.1681L2.84036 9.31789C2.60985 9.43911 2.4946 9.49971 2.40938 9.48392C2.33524 9.47017 2.27126 9.42369 2.23526 9.35743C2.19389 9.28127 2.21591 9.15292 2.25993 8.89624L2.67734 6.46255C2.69035 6.38668 2.69686 6.34874 2.69245 6.31243C2.68856 6.28029 2.67845 6.2492 2.6627 6.22091C2.64491 6.18896 2.61733 6.1621 2.56219 6.10839L0.793174 4.38537C0.606726 4.20377 0.513502 4.11297 0.502158 4.02707C0.492287 3.95233 0.516671 3.87713 0.56852 3.8224C0.628112 3.7595 0.75688 3.74068 1.01442 3.70303L3.46005 3.34557C3.53611 3.33445 3.57413 3.32889 3.60725 3.31349C3.63658 3.29986 3.66298 3.28066 3.68499 3.25697C3.70985 3.23021 3.72686 3.19575 3.76088 3.12682L4.85422 0.911839Z'/></svg>");
  display: inline-block;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  background: var(--c-star);
  /* full — gold */
  -webkit-mask: var(--rating-star-mask) no-repeat center / contain;
  mask: var(--rating-star-mask) no-repeat center / contain;
}

.rating-star--empty {
  background: var(--c-text-tint-20);
}

.rating-star--half {
  background: linear-gradient(to right, var(--c-star) 50%, var(--c-text-tint-20) 50%);
}

/* ---------- Статус эксперта (3 состояния по Figma) ---------- */
.status {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  font: var(--t-body-sm-medium);
}

.status::before {
  content: "";
  width: 10px;
  /* off-scale — dot-индикатор */
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.status--online {
  color: var(--c-online);
}

/* #08b866 — Сейчас онлайн */
.status--busy {
  color: #b87d08;
}

/* В разговоре — нет токена (busy-amber) */
.status--offline {
  color: rgba(40, 34, 39, 0.5);
}

/* Оффлайн — text @ 50%, нет токена */

/* На mobile/tablet (<960) карточка эксперта использует 12/16 для status —
   per Figma 75:4470. На desktop (≥960) — 14/20 (Figma 64:1126). */
@media (max-width: 959px) {
  .expert-card .status {
    font: var(--t-body-xs-medium);
  }

  /* Figma 75:4470 — 12/16 Medium */
  .expert-card .status::before {
    width: 8px;
    height: 8px;
  }
}

/* ---------- Stack из 5 аватаров «Рекомендуют» ---------- */
.user-stack {
  display: inline-flex;
  align-items: center;
}

.user-stack__avatar {
  width: var(--s-4);
  height: var(--s-4);
  border-radius: 50%;
  border: 1px solid #fff;
  background: var(--gradient-photo-fallback);
  margin-right: -4px;
  /* off-scale — overlap-индентация */
  overflow: hidden;
}

.user-stack__avatar:last-child {
  margin-right: 0;
}

.user-stack__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   HEADER / BANNER / NAV — Figma node 62:417 (Anon/User × Desktop/Mobile)

   Поведение (вариант Б из comments.md — header выходит в десктоп-вид от 768,
   чтобы на iPad/планшете не дублировать кнопки авторизации с tabbar'ом):
   - Phone (<768): скрыты nav, phone, socials. Логотип 18px слева, справа —
     login (anon) ИЛИ balance + plus (user). Поиск — только в user-state.
   - Tablet/Desktop (≥768): полный layout, gap fluid 24-48 от 768→1440.
     Если nav не помещается — overflow-detector (header-overflow.js) ставит
     класс .has-burger, nav прячется в dropdown «бургера» в правом краю.

   Состояние user/anon переключается классом .is-user / .is-anon на <header>.
   ============================================================ */

/* ---------- Top banner (Figma 153:16062) ----------
   Синий бар: «1-я консультация бесплатно» + white pill-CTA «Подобрать таролога».
   На mobile: уменьшаем padding по горизонтали и кнопку. */
.top-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  /* Figma 153:16152 — gap 8 */
  background: var(--c-banner);
  color: #fff;
  /* mobile: 4px 8px — узкий padding, чтобы контент влез в 360 viewport
     одной строкой ("1-я консультация бесплатно" ~170 + gap 8 + button ~164 = 342 ≤ 344). */
  padding: var(--s-1) var(--s-2);
  flex-wrap: nowrap;
  /* одна строка, без wrap */
  text-align: center;
}

.top-banner__text {
  font: var(--t-body-xs-strong);
  color: #fff;
  white-space: nowrap;
}

.top-banner__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  height: 32px;
  padding: 0 var(--s-4);
  border: 1px solid var(--c-text-tint-20);
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--c-text);
  font: var(--t-body-xs-strong);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.15);
  /* shadow-elev-1 */
  transition: background .15s ease, color .15s ease;
}

.top-banner__btn:hover {
  background: var(--c-magenta);
  color: #fff;
}

@media (min-width: 768px) {
  .top-banner {
    padding: var(--s-1) var(--s-8);
  }
}

/* ============================================================
   Header shell — единый flex-row.
   Layout:  [logo] [nav | burger] [phone] [right-cluster: socials | state | search | profile]
   Все блоки flex-shrink: 0 — не сжимаются. Если nav не помещается → JS
   ставит .has-burger, nav скрывается, появляется бургер с dropdown.
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--c-divider-soft);
}

.site-header__row {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  height: var(--s-9);
}

/* ---------- Logo (SVG из assets/icons/header/taroto-logo.svg) ----------
   Уменьшенный размер: 18px mobile / 28px desktop (было 20/32).
   Меньше визуальной массы, больше места под nav на средних viewport. */
.site-logo {
  display: inline-flex;
  align-items: center;
  height: 18px;
  /* mobile */
  flex-shrink: 0;
  color: var(--c-text);
}

.site-logo svg {
  height: 100%;
  width: auto;
  display: block;
}

/* ---------- NAV ---------- */
.nav {
  display: none;
  gap: var(--s-5);
  align-items: center;
  flex-shrink: 0;
}

.nav__item {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  height: 36px;
  padding: var(--s-2) 0;
  /* по Figma — без горизонтального паддинга */
  border-radius: 32px;
  /* off-scale 32 */
  font: var(--t-body-sm-medium);
  color: var(--c-text);
  cursor: pointer;
  white-space: nowrap;
  /* «Доп. услуги», «Сферы жизни» — никаких переносов */
  transition: color .15s ease;
}

.nav__item--active {
  color: var(--c-magenta);
}

.nav__item:hover {
  color: var(--c-magenta);
}

.nav__item .chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  transition: transform .2s ease;
}

.nav__item .chevron svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Шеврон повёрнут, когда дропдаун открыт (открытие по клику, см. header-mega-menu.js) */
.nav__item[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

/* ---------- Phone ---------- */
.site-header__phone {
  display: none;
  font: var(--t-body-sm-medium);
  color: var(--c-text);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---------- Right cluster ---------- */
.site-header__right {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  /* mobile: 8 (по Figma User-Mobile); desktop переопределяет */
  margin-left: auto;
  flex-shrink: 0;
}

/* ---------- Socials ---------- */
.socials {
  display: none;
  align-items: center;
  gap: var(--s-2);
}

.socials__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--c-text);
  flex-shrink: 0;
}

.socials__link:hover {
  color: var(--c-magenta);
}

.socials__link svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* ============================================================
   Anon / User state toggle
   .header-state — обёртка под состояние.
   Используем .site-header .header-state в селекторе (specificity 0,2,0),
   чтобы перекрыть default display у .icon-btn / .btn (specificity 0,1,0)
   независимо от порядка правил в склеенном bundle.
   ============================================================ */
.site-header .header-state {
  display: none;
  align-items: center;
}

.header-state--anon {
  gap: 0;
}

.header-state--user {
  gap: var(--s-2);
}

.site-header.is-anon .header-state--anon,
.site-header.is-user .header-state--user {
  display: inline-flex;
}

/* Default (если класс is-anon/is-user ещё не выставлен JS-ом) — показываем user */
.site-header:not(.is-user):not(.is-anon) .header-state--user {
  display: inline-flex;
}

/* ---------- Login button (anon) ---------- */
.site-header__login {
  /* Базовая кнопка — наследует .btn .btn--primary, но Figma даёт точные размеры */
  padding: var(--s-3) var(--s-5);
  min-height: auto;
  font: var(--t-body-base-strong);
}

/* ---------- Icon buttons (search / profile) — Figma 48×48 ---------- */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: var(--s-3);
  border-radius: var(--r-pill);
  background: var(--c-text-tint-10);
  color: var(--c-text);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--c-text-tint-18);
}

.icon-btn svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* На мобилке поиск виден только в user-state (по Figma) */
.site-header.is-anon .site-header__search {
  display: none;
}

/* На phone-mobile (≤767) скрываем кнопки, которые дублируются в bottom tabbar:
     • profile icon (user-state)  — дубль с tabbar tab «Войти/Профиль» (user.svg)
     • login button (anon-state)  — дубль с тем же tabbar tab
   На tablet/desktop (≥768) header в полном виде, tabbar скрыт (см. tabbar.css). */
@media (max-width: 767px) {

  .site-header__profile,
  .site-header__login {
    display: none !important;
  }
}

/* ============================================================
   BALANCE PILL (user state)
   Desktop: «Баланс / 7 000 ₽» + текстовая «Пополнить»
   Mobile : «7 000 ₽» + кругляш с «+»
   ============================================================ */
.balance {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-1) var(--s-1) var(--s-1) var(--s-3);
  background: var(--c-text-tint-10);
  border: 1px solid var(--c-text-tint-10);
  border-radius: var(--r-pill);
}

.balance__info {
  display: flex;
  flex-direction: column;
  line-height: 1;
  /* layout-tweak: убирает UA-lh контейнера, чтобы дети плотно стекались (вертикальный коллапс) */
}

.balance__label {
  display: none;
  /* mobile — скрыт; desktop включит */
  font: var(--t-body-xs-medium);
  color: var(--c-text-muted);
}

.balance__value {
  font: var(--t-balance-value);
  color: var(--c-text);
  white-space: nowrap;
}

/* — текстовая «Пополнить» (desktop) — */
.balance__top-up--text {
  display: none;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-pill);
  border: 1px solid var(--c-magenta-border);
  background-image: linear-gradient(86deg, var(--c-purple-deep) 21.5%, var(--c-magenta) 99%);
  box-shadow: var(--inset-glow);
  color: #fff;
  font: var(--t-body-sm-strong);
  white-space: nowrap;
  flex-shrink: 0;
}

/* — кругляш «+» (mobile) — */
.balance__top-up--plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: var(--s-2);
  border-radius: 50%;
  border: 1px solid var(--c-magenta-border);
  background-image: linear-gradient(86deg, var(--c-purple-deep) 21.5%, var(--c-magenta) 99%);
  box-shadow: var(--inset-glow);
  color: #fff;
  flex-shrink: 0;
}

.balance__top-up--plus svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* ============================================================
   DESKTOP (≥768px) — full layout (nav + phone + socials + balance label).
   По варианту Б comments.md header выходит в десктоп-вид от 768
   (на 768-1023 nav уплотнён через gap, помещается без переносов).
   ============================================================ */
@media (min-width: 768px) {

  /* Фиксированный gap. JS-overflow-detector сам решает, сжать ли nav в бургер. */
  .site-header__row {
    gap: var(--s-5);
  }

  .site-logo {
    height: 28px;
  }

  /* desktop — было 32, уменьшено для аккуратности */

  .nav {
    display: inline-flex;
  }

  .site-header__phone {
    display: inline-block;
  }

  .socials {
    display: inline-flex;
  }

  .site-header__right {
    gap: var(--s-3);
  }

  /* На десктопе search виден всегда (и в anon, и в user) */
  .site-header.is-anon .site-header__search {
    display: inline-flex;
  }

  /* Balance pill — desktop вид: показать «Баланс» + текстовую «Пополнить»,
     спрятать кругляш «+» */
  .balance {
    padding: var(--s-1) var(--s-1) var(--s-1) var(--s-4);
  }

  .balance__label {
    display: inline-block;
  }

  .balance__value {
    font-size: var(--fs-base);
    line-height: var(--lh-xs);
  }

  .balance__top-up--text {
    display: inline-flex;
  }

  .balance__top-up--plus {
    display: none;
  }
}

/* ============================================================
   MOBILE (<768px) — кнопка «Войти» уже, текст 14
   ============================================================ */
@media (max-width: 767px) {
  .site-header__login {
    padding: 10px var(--s-5);
    font-size: var(--fs-sm);
    line-height: var(--lh-sm);
  }
}

/* ============================================================
   BURGER (overflow-fallback). По умолчанию скрыт; JS добавляет
   .site-header.has-burger когда nav не помещается рядом с другими
   элементами — тогда nav прячется, бургер появляется. Раскрытие
   dropdown — по hover/focus на контейнере (без клика).
   ============================================================ */
.header-burger {
  position: relative;
  display: none;
  /* по умолчанию: nav inline, бургер не нужен */
  align-items: center;
  flex-shrink: 0;
}

.site-header.has-burger .nav,
.site-header.has-burger .site-header__phone {
  display: none;
}

.site-header.has-burger .header-burger {
  display: inline-flex;
}

/* На phone (<768) header в mobile-режиме без nav и без бургера —
   навигация через bottom tabbar. */
@media (max-width: 767px) {
  .site-header.has-burger .header-burger {
    display: none;
  }
}

/* Размер совпадает с .icon-btn (search / profile) — 48×48, padding 12 */
.header-burger__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: var(--s-3);
  border: 0;
  border-radius: var(--r-pill);
  background: var(--c-text-tint-10);
  color: var(--c-text);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.header-burger__btn:hover {
  background: var(--c-text-tint-18);
}

.header-burger__btn svg {
  width: 24px;
  height: 24px;
  display: block;
}

.header-burger__menu {
  position: absolute;
  top: calc(100% + var(--s-2));
  right: 0;
  /* выезжает влево от правой кнопки — не за viewport */
  min-width: 220px;
  padding: var(--s-2);
  background: #fff;
  border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  /* off-elev — dropdown shadow */
  display: flex;
  flex-direction: column;
  gap: 2px;
  /* off-scale — micro-gap */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
  z-index: 100;
}

/* Hover-bridge: невидимая область поверх gap между кнопкой и меню,
   чтобы курсор не «выпадал» при движении вниз. */
.header-burger__menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: var(--s-2);
}

.header-burger:hover .header-burger__menu,
.header-burger:focus-within .header-burger__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity .15s ease, transform .15s ease, visibility 0s;
}

.header-burger__link {
  padding: 10px var(--s-4);
  /* off-scale 10 — chip-style */
  border-radius: var(--r-xs);
  font: var(--t-body-sm-medium);
  color: var(--c-text);
  text-decoration: none;
  white-space: nowrap;
  transition: background .12s ease, color .12s ease;
}

.header-burger__link:hover {
  background: var(--c-pink-soft);
  color: var(--c-magenta);
}

/* Телефон в dropdown — отделён тонкой линией сверху, нумерация bold */
.header-burger__link--phone {
  margin-top: var(--s-1);
  padding-top: 14px;
  /* off-scale 14 */
  border-top: 1px solid var(--c-divider-soft);
  border-radius: 0 0 var(--r-xs) var(--r-xs);
  font: var(--t-body-sm-strong);
  /* Semibold-вариант ссылки телефона */
}

/* ============================================================
   EXPERT CARD — две якорные точки:
     • Mobile  (Figma 75:4470, root w=328) — pixel-perfect на 360.
     • Desktop (Figma 64:1126, root w=1000) — pixel-perfect на 1440.
   Между ними — fluid clamp() (photo, name).

   Структура (TPL.expertCard, FLAT 4 children):
     .expert-card                              — grid с двумя layout'ами
       .expert-card__photo                     — <img> + .tag + .__experience
       .expert-card__info     (header)         — name, title, meta(rating, status)
       .expert-card__about    (p)              — описание
       .expert-card__actions                   — profile-link + booking
                                                 (mobile: stack; desktop: row)

   Layout-переключатель — единственный @media (min-width: 960px).
   В диапазоне 0-959 — mobile-grid (info|photo / about / actions).
   В диапазоне 960+   — desktop-grid (photo | info | actions / photo | about).
   Размеры (photo, name) fluid-скейлятся через clamp() от 360 → 1440.
   ============================================================ */

/* ---------- Local fluid tokens ----------
   Линейная интерполяция 360 → 1440, slope = (MAX-MIN)/(1440-360)*100.
   --photo-size : 128 (mobile) → 174 (desktop)
   --name-size  : 24  (mobile) → 24  (desktop) — стабильно, без clamp.
                   Если позже захочется крупнее на десктопе — поменять MAX.
   --pad-y      : 16 (Figma фикс на обоих якорях). */
.expert-card {
  --photo-size: clamp(128px, 112.67px + 4.26vw, 174px);
}

/* ============================================================
   ROOT — mobile base layout (Figma 75:4470).
   Grid 2 cols (info | photo 128) ×  3 rows (info|photo / about / actions).
   ============================================================ */
.expert-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--photo-size);
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "info    photo"
    "about   about"
    "actions actions";
  column-gap: var(--s-4);
  row-gap: 10px;
  /* off-scale 10 — Figma exact */
  padding-block: var(--s-4);
  border-bottom: 1px solid var(--c-card-divider);
  /* container-type для @container ниже — actions раскладывается row-вариантом
     только когда сама карточка достаточно широкая, без привязки к viewport. */
  container-type: inline-size;
}

.expert-card:last-child {
  border-bottom: 0;
}

/* ============================================================
   PHOTO — квадратная, на mobile 128, на desktop 174 (fluid между).
   ============================================================ */
.expert-card__photo {
  grid-area: photo;
  position: relative;
  width: var(--photo-size);
  height: var(--photo-size);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--gradient-photo-fallback);
  align-self: start;
  /* не растягиваться на высоту row */
  justify-self: end;
  /* mobile — прижато к правому краю инфо-блока */
}

.expert-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.expert-card__photo .tag {
  position: absolute;
  top: var(--s-1);
  left: var(--s-1);
}

.expert-card__experience {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--s-2);
  font: var(--t-body-sm-medium-on-base);
  text-align: center;
  color: #fff;
  background: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

/* ============================================================
   INFO — name, title, meta (rating, status).
   Mobile: gap=8 column. На mobile rating и status — на разных строках
   (через flex-direction:column на .meta), на desktop — в одной (row).
   ============================================================ */
.expert-card__info {
  grid-area: info;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  min-width: 0;
}

.expert-card__name {
  margin: 0;
  font: var(--t-display-xl-bold-on-base);
  color: var(--c-text);
  word-break: break-word;
}

/* Имя — ссылка на профиль. На hover любой части карточки или самой ссылки —
   подсвечиваем magenta-цветом. */
.expert-card__name-link {
  color: inherit;
  transition: color 0.15s ease;
}

.expert-card:hover .expert-card__name-link,
.expert-card__name-link:hover {
  color: var(--c-magenta);
}

/* Кликабельной становится ВСЯ карточка через overlay-link паттерн:
   псевдо ::after растягивается до ближайшего positioned-предка = .expert-card.
   Поэтому .expert-card__name-link сам НЕ должен быть positioned (иначе ::after
   сядет на размер ссылки = только имя). Интерактивные элементы (booking, tag)
   поднимаем через position+z-index — они над overlay. */
.expert-card {
  position: relative;
}

.expert-card__name-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
}

.expert-card .booking,
.expert-card .booking__btn,
.expert-card .tag {
  position: relative;
  z-index: 1;
}

.expert-card__title {
  font: var(--t-body-xs);
  color: var(--c-text-muted);
}

.expert-card__meta {
  display: flex;
  flex-direction: column;
  /* mobile — rating и status на разных строках */
  align-items: flex-start;
  gap: var(--s-2);
}

.expert-card__meta .rating {
  gap: var(--s-1);
  /* Figma 75:4470 — 4 между score и stars */
}

/* ============================================================
   ABOUT — paragraph под top, full container width
   ============================================================ */
.expert-card__about {
  grid-area: about;
  margin: 0;
  font: var(--t-body-sm-on-snug);
  color: var(--c-text);
  /* Ограничиваем описание 3 строками во всех карточках — у Анастасии
     about длиннее, иначе карточка вырастает в высоту по сравнению с соседями. */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  /* стандарт + префикс для совместимости */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   ACTIONS — profile-link + booking.
   Mobile: column stack, full-width.
   Desktop: row, profile-link слева от booking-column.
   ============================================================ */
.expert-card__actions {
  grid-area: actions;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  /* off-scale 10 — Figma exact */
}

.expert-card__profile-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-sm);
  font: var(--t-body-sm-strong);
  color: var(--c-magenta);
  background: transparent;
  text-decoration: none;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.15));
  /* shadow-elev-1 */
  cursor: pointer;
  transition: background .15s ease;
}

.expert-card__profile-link:hover {
  background: rgba(170, 38, 146, 0.06);
  /* magenta @ 6% — нет токена */
}

/* ============================================================
   BOOKING — 2-line button + recommends + free-badge.
   Mobile: button 56h, gap 8, font 14/24, prices 12/16, icon-bubble 40 (svg 16).
   Desktop: button 64h, gap 16, font 16/24, prices 14/24, icon-bubble 48 (svg 24).
   ============================================================ */
.booking {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-1);
  width: 100%;
  container-type: inline-size;
  container-name: booking-wrap;
}

.booking__btn {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-2);
  /* mobile */
  width: 100%;
  height: 56px;
  /* mobile (Figma 75:4490) */
  padding: var(--s-2);
  background-image: linear-gradient(86deg, var(--c-purple-deep) 21.5%, var(--c-magenta) 99%);
  color: #fff;
  border: 1px solid var(--c-magenta-border);
  border-radius: var(--r-pill);
  box-shadow: var(--inset-glow);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.booking__btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background-image: linear-gradient(86deg, var(--c-purple-deep) 0%, var(--c-magenta) 60%);
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}

.booking__btn:hover::after {
  opacity: 1;
}

.booking__icon-bubble {
  width: 40px;
  /* mobile */
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: #831c78;
  /* magenta-deep accent — нет токена */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.booking__icon-bubble svg {
  width: var(--s-4);
  /* mobile */
  height: var(--s-4);
  transition: transform .35s ease;
}

.booking__btn:hover .booking__icon-bubble svg {
  transform: rotate(90deg);
}

/* ============================================================
   Telegram-вариант кнопки записи (см. site.bookingVariant в _data/site.js).
   Перекрывает gradient и border базового .booking__btn.
   Иконка телефона заменяется на telegram-paper-plane в шаблоне.
   ============================================================ */
.booking__btn--telegram {
  background-image: linear-gradient(86deg, #0088C4 21.5%, #00B6EF 99%);
  border-color: #00B6EF;
}

.booking__btn--telegram::after {
  background-image: linear-gradient(86deg, #0088C4 0%, #00B6EF 60%);
}

.booking__btn--telegram:hover .booking__icon-bubble svg {
  transform: none;
}

/* самолётик не вращаем — выглядит странно */

/* Telegram-bubble: иконка в левом цвете градиента кнопки (#0088C4).
   Размер иконки и текста — единый на всех брейкпоинтах. */
.booking__btn--telegram .booking__icon-bubble {
  color: #0088C4;
}

.booking__btn--telegram .booking__icon-bubble svg {
  width: 28px;
  height: 28px;
}

.booking__btn--telegram .booking__text-main {
  font: var(--t-body-sm-strong-on-base);
}

/* 14/24 strong */

/* Ghost-bubble — placeholder для симметрии текста с phone-вариантом.
   На узкой кнопке (<300px контейнера) скрываем, чтобы текст «Написать в
   Telegram» помещался. На широкой (>=300px) — возвращаем для visual balance. */
.booking__btn--telegram .booking__icon-bubble--ghost {
  display: none;
}

/* Container query: возвращаем ghost-bubble на широких контейнерах (≥300px).
   Контейнер задаётся на .booking / .expert-cta-mobile__inner / .expert-hero__booking. */
@container booking-wrap (min-width: 300px) {
  .booking__btn--telegram .booking__icon-bubble--ghost {
    display: inline-flex;
  }
}

.booking__icon-bubble--ghost {
  background: transparent;
  visibility: hidden;
  pointer-events: none;
}

.booking__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  /* layout-tweak: убирает UA-lh контейнера, дети плотно стекаются */
  min-width: 0;
  white-space: nowrap;
}

.booking__text-main {
  font: var(--t-body-sm-strong-on-base);
  white-space: nowrap;
}

.booking__prices {
  display: inline-flex;
  gap: var(--s-2);
  align-items: baseline;
  font: var(--t-body-xs);
  white-space: nowrap;
}

.booking__prices>.new {
  color: #fff;
}

.booking__prices>.old {
  color: var(--c-text-on-dark-muted);
  text-decoration: line-through;
  text-decoration-skip-ink: none;
}

.booking__recommends {
  display: none;
  /* скрыт на mobile (Figma 75:4470) */
  gap: var(--s-2);
  align-items: center;
  font: var(--t-body-xs-medium-on-sm);
  color: var(--c-text);
}

.booking__free {
  display: inline-flex;
  gap: 2px;
  /* off-scale — micro-bullet */
  align-items: center;
  font: var(--t-body-sm-strong);
  color: var(--c-online);
}

.booking__free svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ============================================================
   DESKTOP (≥960) — Figma 64:1126 layout.
   Grid: photo (174) | info | actions(auto)  —  row 1
         photo       | about | about         —  row 2
   actions = row (profile-link слева | booking-column 270 справа), gap=24.
   ============================================================ */
@media (min-width: 960px) {
  .expert-card {
    grid-template-columns: var(--photo-size) minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    grid-template-areas:
      "photo  info    actions"
      "photo  about   about";
    column-gap: 22px;
    /* off-scale 22 — Figma gap */
    row-gap: 10px;
    /* off-scale 10 */
  }

  .expert-card__photo {
    justify-self: start;
    /* desktop — слева, не end */
    align-self: start;
  }

  .expert-card__experience {
    font: var(--t-body-base-medium);
  }

  /* 16/24 Medium — итог mobile+desktop */

  /* .expert-card__name на desktop — те же 24/24 что и mobile (--t-display-bold-lg) */
  .expert-card__title {
    font: var(--t-body-sm-on-snug);
  }

  /* Figma 64:930 — 14/18 Regular */
  .expert-card__meta {
    flex-direction: row;
    /* desktop — rating + status в одной строке */
    align-items: center;
    gap: var(--s-4);
  }

  /* Базовый desktop actions — column-reverse (booking сверху, profile-link под).
     Когда card сама >= ~960px (Figma desktop 1000) — переключаемся на Figma-row
     через @container ниже. */
  .expert-card__actions {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: var(--s-2);
  }

  .expert-card__profile-link {
    width: 100%;
    /* по ширине booking 270 */
    height: var(--s-5);
    /* Figma 64:1004 — 24h */
    padding: 0;
    font: var(--t-body-base-strong);
    /* 16/24 Semibold */
    white-space: nowrap;
    border-radius: var(--r-sm);
  }

  /* CONTAINER QUERY — когда .expert-card достаточно широкая (>=960px),
     actions раскладывается по Figma 64:1126: profile-link слева, booking справа.
     На уже Figma desktop (1000px) — fires; на промежуточных (~880px) — нет,
     остаётся column-reverse. Имя в info-колонке не коллапсируется. */
  @container (min-width: 960px) {
    .expert-card__actions {
      flex-direction: row;
      align-items: flex-start;
      gap: var(--s-5);
    }

    .expert-card__profile-link {
      width: auto;
    }
  }

  .booking {
    width: 270px;
  }

  /* Figma 64:957 — w=270 */
  .booking__btn {
    gap: var(--s-4);
    /* Figma 64:1127 — gap 16 */
    height: var(--s-9);
    padding: var(--s-2);
  }

  .booking__icon-bubble {
    width: var(--s-7);
    height: var(--s-7);
  }

  .booking__icon-bubble svg {
    width: var(--s-5);
    height: var(--s-5);
  }

  .booking__text-main {
    font: var(--t-body-base-strong);
  }

  /* 16/24 Semibold */
  .booking__prices {
    font: var(--t-body-sm-on-base);
  }

  /* 14/24 Regular */
  .booking__recommends {
    display: inline-flex;
    /* desktop — показывается */
  }

  .booking__free {
    font: var(--t-body-xs-strong);
  }

  /* 12/16 Semibold */
}

/* ============================================================
   EXPERT CARD — VERTICAL (Figma 116:17679)

   Карточка-эксперт в портретной ориентации, 328×442.
   Используется на странице каталога (/experts.html, в новом макете)
   и в скроллерах главной — историях/строгом отборе.

   Структура:
     .expert-vcard
       .expert-vcard__photo (img cover, fills card)
       .expert-vcard__overlay (white bottom-fade gradient — для читаемости текста снизу)
       .expert-vcard__inner (content поверх):
         .expert-vcard__head     ─ title (специализация), name, rating, online
         .expert-vcard__bottom   ─ «Об эксперте» → vbooking → «1-я бесплатно»

   Hover-эффект (desktop):
     • lift translateY(-6px)
     • drop-shadow (var(--shadow-card))
     transition .35s ease
   ============================================================ */

.expert-vcard {
  position: relative;
  /* Карточка target 328×442 (Figma 116:17679). Fluid от 280×378 на узком mobile
     до 328×442 на нормальной ширине. width:100% страхует от выпрыгивания за
     контейнер на 360 viewport (gutter 16 + carcd 328 = 344, влезает, но
     грид-контекст может быть уже). Соотношение сторон сохранено через
     aspect-ratio. max-width: 100% защищает от переполнения родителя. */
  width: clamp(280px, 91vw, 328px);
  max-width: 100%;
  aspect-ratio: 328 / 442;
  border-radius: var(--r-lg);
  /* 24 */
  overflow: clip;
  isolation: isolate;
  /* Базовый gradient — фон под фото (1.25% deep purple → 93% green-teal) */
  background: linear-gradient(34.7deg, var(--c-purple-deep) 1.25%, #157560 93.11%);
  transition: transform .35s ease, box-shadow .35s ease;
}

.expert-vcard:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
}

/* ---------- Photo (full-card cover) ---------- */
.expert-vcard__photo {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.expert-vcard__photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Overlay — белый fade снизу (≈154px) ---------- */
.expert-vcard__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 154px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #fff 79.7%);
  pointer-events: none;
  z-index: 1;
}

/* ---------- Inner content ---------- */
.expert-vcard__inner {
  position: absolute;
  inset: var(--s-4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 2;
}

/* ---------- HEAD (top) ---------- */
.expert-vcard__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-2);
  /* 8 */
}

.expert-vcard__title {
  font: var(--t-body-xs);
  color: var(--c-text-on-dark-muted);
  margin: 0;
}

.expert-vcard__name {
  font: var(--t-display-xl-bold);
  color: #fff;
  margin: 0;
  max-width: 205px;
  /* по Figma — для wrap имени */
}

/* Имя — ссылка на профиль. Hover на карточке или на ссылке → magenta. */
.expert-vcard__name-link {
  color: inherit;
  transition: color 0.15s ease;
}

.expert-vcard:hover .expert-vcard__name-link,
.expert-vcard__name-link:hover {
  color: var(--c-magenta);
}

/* Кликабельной становится ВСЯ карточка через overlay-link паттерн.
   .expert-vcard уже position:relative (см. выше). .expert-vcard__name-link
   сам НЕ positioned (иначе ::after сядет на размер ссылки). Интерактивные
   .vbooking и .expert-vcard__about поднимаем через position+z-index. */
.expert-vcard__name-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
}

.expert-vcard .vbooking,
.expert-vcard__about {
  position: relative;
  z-index: 1;
}

.expert-vcard__rating {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  /* 4 */
}

.expert-vcard__rating-num {
  font: var(--t-body-sm-bold);
  /* Figma даёт #ffc765 — warm-gold вариант (не --c-star/--c-gold) */
  color: #ffc765;
}

.expert-vcard__stars {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  /* 4 */
  color: #ffc765;
  /* warm-gold (см. выше) */
}

.expert-vcard__stars svg {
  width: 12px;
  height: 12px;
}

.expert-vcard__online {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  /* 4 */
  color: #44e59a;
  /* online-bright — отличный от --c-online */
  font: var(--t-body-xs-medium);
}

.expert-vcard__dot {
  width: 10px;
  /* off-scale 10 — dot-индикатор */
  height: 10px;
  border-radius: 50%;
  background: #44e59a;
  /* online-bright (см. выше) */
}

/* ---------- BOTTOM block ---------- */
.expert-vcard__bottom {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--s-1);
  /* 4 */
  container-type: inline-size;
  container-name: booking-wrap;
  /* для Telegram-варианта vbooking */
}

/* «Об эксперте» — текст-кнопка поверх фото (читается на тёмной части) */
.expert-vcard__about {
  text-align: center;
  padding: var(--s-1) var(--s-2);
  font: var(--t-body-sm-strong);
  color: #fff;
  text-decoration: none;
  border-radius: var(--r-sm);
  /* 8 */
  transition: background .15s ease;
}

.expert-vcard__about:hover {
  background: rgba(255, 255, 255, 0.12);
  /* white @ 12% — нет токена */
}

/* «1-я консультация бесплатно» — green badge с подарком */
.expert-vcard__free {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  /* off-scale — micro-bullet */
  align-self: center;
  margin-top: 0;
  font: var(--t-body-sm-strong);
  color: var(--c-online);
}

.expert-vcard__free-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--c-online);
}

.expert-vcard__free-icon svg {
  width: 100%;
  height: 100%;
}

/* ============================================================
   VBOOKING — 2-line gradient pill (Figma 64:1127)
   Используется только в .expert-vcard. Phone-bubble слева, текст-колонка
   по центру (label «Записаться» + цены).
   ============================================================ */
.vbooking {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s-4);
  /* 16 */
  padding: var(--s-2);
  height: var(--s-9);
  border: 1px solid var(--c-magenta-border);
  border-radius: var(--r-pill);
  /* pill */
  background: linear-gradient(86.4deg, var(--c-purple-deep) 21.5%, var(--c-magenta) 99%);
  box-shadow: var(--inset-glow);
  text-decoration: none;
  transition: opacity .15s ease, transform .15s ease;
}

.vbooking:hover {
  opacity: 0.95;
}

.vbooking:active {
  transform: scale(0.99);
}

/* Telegram-вариант (см. site.bookingVariant в _data/site.js). */
.vbooking--telegram {
  background: linear-gradient(86.4deg, #0088C4 21.5%, #00B6EF 99%);
  border-color: #00B6EF;
}

.vbooking--telegram .vbooking__icon {
  color: #0088C4;
}

/* был magenta */
.vbooking--telegram .vbooking__icon svg {
  width: 28px;
  height: 28px;
}

/* единый размер 28 */
.vbooking--telegram .vbooking__label {
  font: var(--t-body-sm-strong-on-base);
}

/* 14/24 strong — единый */

/* Ghost-bubble справа — placeholder для visual balance текста.
   Рендерится только в Telegram-варианте. На узких контейнерах (<300) скрыт,
   на широких (>=300) — появляется (через @container ниже). */
.vbooking__icon--ghost {
  visibility: hidden;
  display: none;
}

@container booking-wrap (min-width: 300px) {
  .vbooking--telegram .vbooking__icon--ghost {
    display: inline-flex;
  }
}

.vbooking__icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--c-magenta);
  border-radius: 50%;
  flex-shrink: 0;
}

.vbooking__icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.vbooking__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #fff;
  min-width: 0;
  /* чтобы цены не обрезали flex */
}

.vbooking__label {
  font: var(--t-body-base-strong);
}

.vbooking__prices {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s-2);
  /* 8 */
  font: var(--t-body-sm-on-base);
}

.vbooking__price {
  color: #fff;
}

.vbooking__price-old {
  color: var(--c-text-on-dark-muted);
  text-decoration: line-through;
}

/* ============================================================
   ARTICLE-CARD — карточка статьи в грид-листинге блога.
   Figma 206:78781 (320×409 на desktop).

   Структура (flex column, gap 16):
     .article-card__cover       — обложка с overlay + бейджи (likes/views/rating)
     .article-card__head        — title H3 + meta (дата + время чтения)
     .article-card__author      — аватар + имя
     .article-card__cta         — белая pill-кнопка «Читать» (стретчится на ширину)

   8 градиент-палитр-fallback'ов (.article-card--g1..g8) — на случай когда
   обложка ещё не загружена. При появлении файла в assets/images/blog/
   градиент остаётся под картинкой как фон (можно и удалить — не критично).
   ============================================================ */
.article-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 */
  padding: var(--s-4);
  /* 16 */
  background: #fff;
  border: 1px solid var(--c-text-tint-10);
  border-radius: var(--r-lg);
  /* 24 */
  overflow: hidden;
}

/* ---------- Обложка ---------- */
.article-card__cover {
  position: relative;
  /* Соотношение 288:161 ≈ 1.79 — точное из Figma. Высота тянется от ширины колонки. */
  aspect-ratio: 288 / 161;
  border-radius: var(--r-md);
  /* 16 */
  overflow: hidden;
  background: var(--gradient-photo-fallback);
  /* default-fallback под градиент */
}

.article-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Затемняющий overlay поверх картинки (Figma — bg rgba(0,0,0,0.4)).
   Видим только когда есть картинка — пустую обложку не затемняем. */
.article-card__cover:has(.article-card__image[src]:not([src=""])) .article-card__overlay {
  position: absolute;
  inset: 0;
  background: var(--c-overlay-40);
  pointer-events: none;
}

/* ---------- Бейджи на обложке (likes / views / rating) ---------- */
.article-card__badges {
  position: absolute;
  inset: var(--s-2) var(--s-2) auto var(--s-2);
  /* top-left/right gap 8 */
  display: flex;
  gap: var(--s-2);
  /* 8 */
  flex-wrap: wrap;
}

.article-card__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  /* 4 */
  padding: var(--s-1) var(--s-2);
  /* 4 8 */
  background: #fff;
  border-radius: var(--r-md);
  /* 16 */
  font: var(--t-body-xs);
  color: var(--c-text-muted);
}

.article-card__badge--rating {
  background: var(--c-star);
  /* gold #e4a538 */
  color: #fff;
}

.article-card__badge-icon {
  display: inline-flex;
  width: 12px;
  height: 12px;
  line-height: 1;
  font-size: var(--fs-xs);
}

.article-card__badge-icon--star {
  color: #fff;
}

.article-card__badge-icon--star svg {
  width: 12px;
  height: 12px;
}

/* ---------- Заголовок + дата + время чтения ---------- */
.article-card__head {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  /* 8 */
}

.article-card__title {
  font: var(--t-display-xl-bold-on-base);
  color: var(--c-text);
  margin: 0;
  /* Резервируем место под 2 строки заголовка — карточки на листинге
     выровнены по высоте независимо от длины title. Длиннее 2 строк
     обрезается с ellipsis (line-clamp). */
  min-height: calc(var(--lh-base) * 2);
  /* 48px */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  /* стандарт + префикс для совместимости */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  /* 16 */
  font: var(--t-body-xs-on-base);
  color: var(--c-text-muted);
}

.article-card__read {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
}

.article-card__read-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  color: currentColor;
}

.article-card__read-icon svg {
  width: 16px;
  height: 16px;
}

/* ---------- Автор ---------- */
.article-card__author {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  /* 8 */
}

.article-card__author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0.667px solid var(--c-text);
  overflow: hidden;
  background: var(--gradient-photo-fallback);
  /* fallback на случай битого src */
  flex-shrink: 0;
}

.article-card__author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-card__author-name {
  font: var(--t-display-base-on-sm);
  color: var(--c-text);
}

/* ---------- CTA «Читать» — pill, стретч на ширину ---------- */
.article-card__cta {
  margin-top: auto;
  /* прибивает CTA к низу карточки если карточки разной высоты */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-4);
  /* 16 */
  background: #fff;
  border: 1px solid var(--c-text-tint-20);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-btn);
  font: var(--t-body-base-strong);
  color: var(--c-text);
  transition: background 0.15s ease;
}

.article-card__cta:hover {
  background: var(--c-text-tint-10);
}

/* ---------- Градиент-палитры fallback'ов (.article-card--g1..g8) ----------
   Видны под обложкой, если файл assets/images/blog/article-N.jpg отсутствует.
   Палитра задаётся в tokens.css как --gradient-blog-N — единый источник
   правды и для .article-card--gN, и для .article-figure--gN (внутри статьи). */
.article-card--g1 .article-card__cover {
  background: var(--gradient-blog-1);
}

.article-card--g2 .article-card__cover {
  background: var(--gradient-blog-2);
}

.article-card--g3 .article-card__cover {
  background: var(--gradient-blog-3);
}

.article-card--g4 .article-card__cover {
  background: var(--gradient-blog-4);
}

.article-card--g5 .article-card__cover {
  background: var(--gradient-blog-5);
}

.article-card--g6 .article-card__cover {
  background: var(--gradient-blog-6);
}

.article-card--g7 .article-card__cover {
  background: var(--gradient-blog-7);
}

.article-card--g8 .article-card__cover {
  background: var(--gradient-blog-8);
}

/* ============================================================
   SERVICE CATALOG CARD — карточка услуги в каталоге /services/.
   Фото (16:10) + заголовок (2 строки) + excerpt (2 строки) +
   подвал: цена (old зачёркнут) + кнопка «Заказать».
   ============================================================ */
.service-cat-card {
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  border: 1px solid var(--c-text-tint-10);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease;
}

.service-cat-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-4px);
}

.service-cat-card__cover {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.service-cat-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.service-cat-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-4);
  flex: 1;
}

.service-cat-card__title {
  margin: 0;
  font: var(--t-body-base-strong);
}

.service-cat-card__title a {
  color: var(--c-text);
  text-decoration: none;
  /* clamp 2 строки */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.service-cat-card__title a:hover {
  color: var(--c-magenta);
}

.service-cat-card__excerpt {
  margin: 0;
  font: var(--t-body-sm-medium);
  color: var(--c-text-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.service-cat-card__foot {
  margin-top: auto;
  padding-top: var(--s-3);
}

/* Кнопка-CTA на всю ширину: «Заказать · 875 ₽» (цена через интерпункт). */
.service-cat-card__order {
  width: 100%;
  gap: var(--s-1);
  /* высота — из .btn--md (56) */
}

.service-cat-card__dot {
  opacity: .8;
}

.service-cat-card__order-price {
  font-weight: var(--fw-semibold);
}

.service-cat-card__order-old {
  font-weight: var(--fw-regular);
  text-decoration: line-through;
  opacity: .65;
}

/* ============================================================
   CALLOUT — универсальная magenta-плашка с вертикальной линией слева.
   Figma: 206:77850 / 206:77858 / 206:77861 (цитаты в статье),
          206:77865 (CTA-плашка с заголовком),
          90:4371 / 90:4865 (цитата эксперта).

   Структура:
     .callout
       .callout__bar           (вертикальная линия 4px, magenta, full-height)
       .callout__content       (gap 16; внутри — title опционально, text)
         .callout__title       (Philosopher Regular 24/32, magenta)  ← опционально
         .callout__text        (Inter Medium 16/24, magenta)

   bg rgba(170,38,146,0.1) — magenta tint. padding 16, radius 16.
   Когда есть title — это CTA. Когда нет — обычная цитата.
   ============================================================ */
.callout {
  display: flex;
  align-items: stretch;
  /* линия растягивается по высоте */
  gap: var(--s-4);
  /* 16 */
  margin: 0;
  padding: var(--s-4);
  /* 16 */
  border-radius: var(--r-md);
  /* 16 */
  background: var(--c-card-divider);
  /* magenta tint 10% — общий токен */
}

.callout__bar {
  flex-shrink: 0;
  width: 4px;
  background: var(--c-magenta);
  border-radius: 2px;
  /* pill для линии 4px-ширины */
}

.callout__content {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 — между title и text */
  justify-content: center;
}

.callout__title {
  margin: 0;
  font: var(--t-display-xl);
  color: var(--c-magenta);
}

.callout__text {
  margin: 0;
  font: var(--t-body-sm-medium);
  color: var(--c-magenta);
  white-space: pre-wrap;
  /* сохраняем переносы в длинном CTA-тексте */
}

@media (min-width: 960px) {
  .callout__text {
    font: var(--t-body-base-medium);
  }

  /* Figma 90:4372 — 16/24 Medium */
}

/* ============================================================
   MODAL — универсальный модал (overlay + dialog).
   Figma 284:21866 — пример (modal «Оставить отзыв»).

   Структура:
     .modal              — overlay (position:fixed, заполняет viewport)
       .modal__backdrop  — затемнение, клик закрывает
       .modal__dialog    — белая карточка по центру
         .modal__close   — крестик в правом верхнем углу
         .modal__body    — содержимое (может быть несколько с
                           --user/--anon — переключаются JS-ом)

   data-modal-state="user" / "anon" на .modal — JS-переключатель версии.
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-4);
  /* 16 — отступ дайлога от краёв */
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: var(--c-overlay-40);
}

.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 520px;
  /* единая база; варианты переопределяют только при реальной нужде */
  background: #fff;
  border-radius: var(--r-lg);
  /* 24 */
  padding: var(--s-5) var(--s-4);
  /* 24 16 */
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  /* 32 — между title и блоками */
}

.modal__close {
  position: absolute;
  top: var(--s-4);
  /* 16 */
  right: var(--s-4);
  /* 16 */
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text);
  background: transparent;
  border: 0;
  cursor: pointer;
  z-index: 1;
}

.modal__close svg {
  width: 24px;
  height: 24px;
}

.modal__body {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  /* 32 — между title/звёздами/textarea/кнопкой */
  align-items: center;
}

/* Переключатель версий: показываем body, соответствующий текущему data-state.
   Дефолт (state не выставлен) — показываем USER. */
.modal[data-modal-state="user"] .modal__body--anon,
.modal[data-modal-state="anon"] .modal__body--user,
.modal:not([data-modal-state="anon"]) .modal__body--anon {
  display: none;
}

.modal__title {
  margin: 0;
  font: var(--t-display-xl);
  color: var(--c-text);
  text-align: center;
}

.modal__text {
  margin: 0;
  font: var(--t-body-base);
  color: var(--c-text-muted);
  text-align: center;
}

.modal__cta {
  width: 100%;
  min-height: 56px;
  /* крупнее дефолтного .btn (40) — для модалок */
  padding: var(--s-4);
  /* 16 */
}

/* Стандартный disabled подменяет курсор и opacity — добавляем понятное состояние
   когда оценка ещё не выбрана. */
.modal__cta:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* Сообщение «Спасибо за оценку!» — показывается после успешной отправки. */
.modal__thanks {
  margin: 0;
  padding: var(--s-5) 0;
  /* 24 */
  font: var(--t-display-xl);
  color: var(--c-magenta);
  text-align: center;
}

/* ============================================================
   REVIEW MODAL — специфика формы отзыва.
   ============================================================ */
.review-stars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  /* 5 равных слотов на всю ширину */
  width: 100%;
  color: var(--c-text-tint-20);
  /* по умолчанию все серые */
}

.review-stars__btn {
  width: 100%;
  /* ячейка-fill — клик попадает в любую точку колонки */
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* svg остаётся 48×48 по центру */
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: inherit;
  /* наследует от .review-stars */
}

.review-stars__btn svg {
  width: 48px;
  height: 48px;
}

/* Hover-preview: все звёзды до и включая hover'нутую — золотые. */
.review-stars:hover .review-stars__btn {
  color: var(--c-star);
}

.review-stars:hover .review-stars__btn:hover~.review-stars__btn {
  color: var(--c-text-tint-20);
}

/* После клика — все звёзды от 1-й до выбранной получают .is-filled и горят золотом. */
.review-stars__btn.is-filled {
  color: var(--c-star);
}

.review-textarea-wrap {
  width: 100%;
}

.review-textarea {
  width: 100%;
  height: 152px;
  /* Figma 284:21874 */
  padding: var(--s-3) var(--s-4);
  /* 12 16 */
  border: 1px solid var(--c-text-tint-10);
  border-radius: var(--r-md);
  /* 16 */
  font: var(--t-body-base);
  color: var(--c-text);
  background: #fff;
  resize: none;
  transition: border-color 0.15s ease;
}

.review-textarea::placeholder {
  color: var(--c-text-tint-40);
}

.review-textarea:focus {
  outline: none;
  border-color: var(--c-magenta);
}

/* Блокируем прокрутку страницы пока модалка открыта (выставляет JS).
   Применяется и к html, и к body — в проекте html уже имеет
   `overflow-x: clip`, и одного только body.overflow:hidden не хватает,
   потому что прокрутка идёт через html. */
html:has(body.is-modal-open),
body.is-modal-open {
  overflow: hidden;
}

/* ============================================================
   TOP-UP MODAL — «Пополнение баланса» (Figma 97:17128).
   ============================================================ */
.modal--top-up .modal__dialog {
  padding: var(--s-7) var(--s-7) var(--s-6);
  /* 48 48 32 — низ меньше. Ширина наследуется из базы (520). */
  gap: var(--s-5);
  /* 24 — между секциями */
  align-items: stretch;
}

.modal--top-up .modal__close {
  top: var(--s-5);
  right: var(--s-5);
}

.modal--top-up .modal__title {
  font: var(--t-display-xl);
}

/* ---------- Серая карточка баланса ---------- */
.top-up__balance {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  /* 4 */
  padding: var(--s-4) var(--s-4);
  /* 16 16 — Figma 97:17609 */
  background: var(--c-text-tint-5);
  border-radius: var(--r-md);
  /* 16 */
}

.top-up__balance-label {
  font: var(--t-body-xs-medium);
  color: var(--c-text-muted);
}

.top-up__balance-value {
  font: var(--t-modal-amount);
  color: var(--c-text);
}

/* ---------- Группа полей (label + input/select) ---------- */
.top-up__group {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  /* 8 */
}

.top-up__label {
  display: block;
  font: var(--t-modal-step-title);
  color: var(--c-text);
  padding: 0;
}

/* ---------- Сумма: input + ₽ суффикс ---------- */
.top-up__amount {
  position: relative;
  display: flex;
  align-items: center;
}

.top-up__amount-input {
  width: 100%;
  height: 48px;
  padding: var(--s-3) var(--s-7) var(--s-3) var(--s-4);
  /* 12 48 12 16 — место под ₽ */
  border: 1px solid var(--c-card-divider);
  border-radius: var(--r-md);
  /* 16 */
  background: #fff;
  font: var(--t-body-base);
  color: var(--c-text);
  appearance: textfield;
}

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

.top-up__amount-input::placeholder {
  color: var(--c-text-tint-40);
}

.top-up__amount-input:focus {
  outline: none;
  border-color: var(--c-magenta);
}

.top-up__amount-suffix {
  position: absolute;
  right: var(--s-4);
  color: var(--c-text-muted);
  pointer-events: none;
}

/* ---------- Чипы быстрого выбора ---------- */
.top-up__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  /* 8 */
  margin-top: var(--s-2);
}

.top-up__chip {
  padding: var(--s-2) var(--s-3);
  /* 8 12 */
  background: var(--c-text-tint-10);
  border: 0;
  border-radius: var(--r-pill);
  font: var(--t-body-sm-medium);
  color: var(--c-text);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.top-up__chip:hover {
  background: var(--c-text-tint-18);
}

.top-up__chip.is-active {
  background: var(--c-magenta);
  color: var(--c-text-on-dark);
}

/* ---------- Info-плашка с правилами ---------- */
.top-up__hint {
  display: flex;
  gap: var(--s-2);
  /* 8 */
  margin: var(--s-2) 0 0;
  font: var(--t-body-sm);
  color: var(--c-text-muted);
}

.top-up__hint-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--c-text-muted);
  border-radius: 50%;
  font: var(--t-modal-step-num);
  font-style: italic;
}

/* ---------- Способ пополнения (custom dropdown) ---------- */
.top-up__select-wrap {
  position: relative;
}

.top-up__select {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  /* 8 */
  width: 100%;
  height: 48px;
  padding: var(--s-3) var(--s-4);
  /* 12 16 */
  background: #fff;
  border: 1px solid var(--c-card-divider);
  border-radius: var(--r-md);
  /* 16 */
  font: var(--t-body-base);
  color: var(--c-text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease;
}

.top-up__select:hover,
.top-up__select[aria-expanded="true"] {
  border-color: var(--c-magenta);
}

.top-up__select-icon {
  font-size: var(--fs-md);
  color: var(--c-text-muted);
}

.top-up__select-text {
  flex: 1;
}

.top-up__select-chev {
  display: inline-flex;
  width: 16px;
  height: 16px;
  color: var(--c-text-muted);
  transition: transform 0.2s ease;
}

.top-up__select-chev svg {
  width: 16px;
  height: 16px;
}

.top-up__select[aria-expanded="true"] .top-up__select-chev {
  transform: rotate(180deg);
}

.top-up__select-menu {
  position: absolute;
  top: calc(100% + var(--s-1));
  /* 4 — gap под select */
  left: 0;
  right: 0;
  z-index: 10;
  margin: 0;
  padding: var(--s-1);
  /* 4 */
  list-style: none;
  background: #fff;
  border: 1px solid var(--c-card-divider);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-btn);
  display: flex;
  flex-direction: column;
  gap: 2px;
  /* визуальный разделитель опций, не из spacing-шкалы */
  max-height: 280px;
  overflow-y: auto;
}

.top-up__select-menu[hidden] {
  display: none;
}

.top-up__select-option {
  padding: var(--s-3) var(--s-4);
  /* 12 16 */
  border-radius: var(--r-sm);
  /* 8 */
  font: var(--t-body-base);
  color: var(--c-text);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  outline: none;
}

.top-up__select-option:hover,
.top-up__select-option:focus-visible {
  background: var(--c-text-tint-10);
}

.top-up__select-option.is-selected {
  background: var(--c-pink-soft);
  color: var(--c-magenta);
  font: var(--t-body-base-medium);
  /* Medium-вариант selected */
}

/* ---------- Submit-кнопка двухстрочная ---------- */
.top-up__submit {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  /* 12 */
}

.top-up__submit-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 64px;
  padding: var(--s-2) var(--s-4);
  /* 8 16 */
  line-height: 1.2;
  /* layout-tweak: компенсация UA-lh для двух flex-строк */
}

.top-up__submit-label {
  font: var(--t-body-base-strong);
}

/* 16/24 Semibold (от .btn) */
.top-up__submit-amount {
  font: var(--t-body-sm-strong);
  opacity: 0.85;
}

/* 14/20 Semibold */

/* ---------- Custom checkbox (magenta checked) ---------- */
.top-up__save {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  /* 8 */
  cursor: pointer;
  font: var(--t-body-sm-on-base);
  color: var(--c-text);
}

.top-up__save-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.top-up__save-box {
  width: 20px;
  height: 20px;
  border: 1px solid var(--c-text-tint-20);
  border-radius: 4px;
  /* off-scale — checkbox standard */
  flex-shrink: 0;
  position: relative;
  background: #fff;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.top-up__save-input:checked+.top-up__save-box {
  background: var(--c-magenta);
  border-color: var(--c-magenta);
}

.top-up__save-input:checked+.top-up__save-box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: no-repeat center / 12px 12px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2.5 6.2l2.5 2.5L9.5 3.7' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

.top-up__note {
  margin: 0;
  font: var(--t-body-sm);
  color: var(--c-text-muted);
  text-align: center;
}

.top-up__legal {
  margin: 0;
  font: var(--t-body-xs);
  color: var(--c-text-muted);
  text-align: center;
}

/* ---------- Переключение шагов (data-step="amount|confirm") ---------- */
.top-up__step {
  display: none;
  flex-direction: column;
  gap: var(--s-5);
}

.modal--top-up[data-step="amount"] .top-up__step--amount,
.modal--top-up[data-step="confirm"] .top-up__step--confirm,
.modal--top-up[data-step="success"] .top-up__step--success,
.modal--top-up[data-step="fail"] .top-up__step--fail {
  display: flex;
}

/* Инлайн-ошибка суммы */
.top-up__error {
  margin: calc(-1 * var(--s-3)) 0 0;
  font: var(--t-body-sm-medium);
  color: var(--c-magenta);
}

/* ---------- Экраны результата (success / fail) ---------- */
.top-up-result {
  align-items: center;
  text-align: center;
  gap: var(--s-2);
}

.top-up-result__icon-wrap {
  margin-bottom: var(--s-2);
}

.top-up-result__actions {
  margin-top: var(--s-3);
}

.top-up-result__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  animation: top-up-pop .35s ease both;
}

.top-up-result__icon svg {
  width: 38px;
  height: 38px;
}

/* успех — зелёный, ошибка — мягко-красный (off-scale rgba для tint'ов) */
.top-up-result__icon--ok {
  background: rgba(8, 184, 102, 0.12);
  color: var(--c-online);
}

.top-up-result__icon--fail {
  background: rgba(229, 72, 77, 0.12);
  color: #e5484d;
}

@keyframes top-up-pop {
  from {
    transform: scale(.6);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .top-up-result__icon {
    animation: none;
  }
}

.top-up-result__text {
  margin: 0;
  font: var(--t-body-base);
  color: var(--c-text-muted);
}

/* Вторичное действие — вид как у .auth-trouble: full-width, bold, тёмный текст. */
.top-up-result__link {
  display: block;
  width: 100%;
  padding: var(--s-3);
  border: 0;
  background: transparent;
  border-radius: var(--r-md);
  cursor: pointer;
  font: var(--t-body-base-strong);
  color: var(--c-text);
  text-align: center;
  text-decoration: none;
  transition: background-color .15s ease;
}

.top-up-result__link:hover {
  background: var(--c-text-tint-5);
}

/* Крупная сумма зачисления */
.top-up-result__amount {
  margin: 0;
  font: var(--t-display-2xl-on-xl);
  /* 32 */
  color: var(--c-magenta);
}

/* Кнопки результата — на всю ширину (высота — из .btn--md). */
.top-up-result__actions {
  width: 100%;
}

.top-up-result__actions .btn {
  width: 100%;
  justify-content: center;
}

/* Конфетти на успехе — лёгкий «взрыв» точек вокруг иконки */
.top-up-result__icon-wrap {
  position: relative;
  display: inline-flex;
}

.top-up-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.top-up-confetti i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  opacity: 0;
  animation: top-up-burst .65s ease-out .15s both;
}

.top-up-confetti i:nth-child(1) {
  --tx: -52px;
  --ty: -22px;
  background: var(--c-magenta);
}

.top-up-confetti i:nth-child(2) {
  --tx: 48px;
  --ty: -30px;
  background: var(--c-star);
}

.top-up-confetti i:nth-child(3) {
  --tx: -38px;
  --ty: 34px;
  background: var(--c-online);
}

.top-up-confetti i:nth-child(4) {
  --tx: 44px;
  --ty: 28px;
  background: var(--c-banner);
}

.top-up-confetti i:nth-child(5) {
  --tx: -8px;
  --ty: -54px;
  background: var(--c-magenta-border, #dd35ff);
}

.top-up-confetti i:nth-child(6) {
  --tx: 14px;
  --ty: 52px;
  background: var(--c-magenta);
}

.top-up-confetti i:nth-child(7) {
  --tx: -56px;
  --ty: 8px;
  background: var(--c-star);
}

.top-up-confetti i:nth-child(8) {
  --tx: 56px;
  --ty: -4px;
  background: var(--c-online);
}

@keyframes top-up-burst {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }

  35% {
    opacity: 1;
  }

  100% {
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1) rotate(35deg);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .top-up-confetti i {
    animation: none;
    opacity: 0;
  }
}

/* ============================================================
   STEP 2 — таймер + заказ + кнопка «Банковской картой» (Figma 97:17765)
   ============================================================ */

/* Magenta-плашка с обратным отсчётом (Figma 97:17933).
   Progress-bar заполняет плашку с 0 до 100% за 10 минут:
     --top-up-progress = 0 → width 0 (полоса пустая)
     --top-up-progress = 1 → width 100% (полностью magenta)
   Иконка фиксирована слева; вторая (белая) копия лежит внутри полосы — она
   показывается через overflow:hidden ровно тогда, когда magenta до неё дошла. */
.top-up-timer {
  position: relative;
  display: flex;
  align-items: center;
  padding: var(--s-4);
  /* 16 */
  padding-left: 64px;
  /* место под иконку слева */
  background: var(--c-text-tint-5);
  border-radius: var(--r-md);
  /* 16 */
  overflow: hidden;
  min-height: 56px;
  --top-up-progress: 0;
}

.top-up-timer__progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(100% * var(--top-up-progress, 0));
  background: var(--c-magenta);
  transition: width 1s linear;
  pointer-events: none;
  overflow: hidden;
}

.top-up-timer__icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.top-up-timer__icon svg {
  width: 24px;
  height: 24px;
}

.top-up-timer__icon--dark {
  color: var(--c-text);
  z-index: 1;
}

.top-up-timer__icon--white {
  color: var(--c-text-on-dark);
}

.top-up-timer__text {
  position: relative;
  z-index: 1;
  font: var(--t-body-base-strong);
  color: var(--c-text);
}

/* Карточка «Услуги сервиса» (Figma 97:17767) */
.top-up-order {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  /* 24 */
  padding: var(--s-4);
  /* 16 */
  background: var(--c-text-tint-5);
  border: 1px solid var(--c-card-divider);
  border-radius: var(--r-md);
  /* 16 */
}

.top-up-order__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  /* 8 */
}

.top-up-order__label {
  font: var(--t-body-xs-medium);
  color: var(--c-text-muted);
}

.top-up-order__value {
  font: var(--t-body-xl);
  color: var(--c-text);
}

.top-up-order__brand {
  font: var(--t-modal-heading);
  color: var(--c-text);
  letter-spacing: 0.04em;
}

/* Кнопка «Банковской картой» — стандартный primary, без двух строк */
.top-up-pay-btn {
  width: 100%;
  /* высота — из .btn--md (56) */
}

.top-up__note--left {
  text-align: left;
}

/* ---------- Mobile-адаптация ----------
   padding-top 48: крестик 24×24 в позиции top 16 + 8px зазор до содержимого. */
@media (max-width: 480px) {
  .modal--top-up .modal__dialog {
    padding: var(--s-7) var(--s-4) var(--s-5);
  }

  /* 48 16 24 */
  .modal--top-up .modal__close {
    top: var(--s-4);
    right: var(--s-4);
  }
}

/* ============================================================
   CATALOG MODAL — full-screen вариант для mobile-фильтров и сортировки (≤959).
   Sticky-header (title + Сбросить + ✕) и sticky-footer (Применить N экспертов)
   с прокручиваемой серединой. На ≥960 эти модалки скрыты (триггеры тоже).
   ============================================================ */
.modal--catalog {
  padding: 0;
}

.modal--catalog__dialog {
  max-width: none;
  width: 100%;
  height: 100%;
  border-radius: 0;
  padding: 0;
  gap: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  /* head | body | foot */
  overflow: hidden;
}

.modal--catalog__head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  /* 12 */
  padding: var(--s-4) var(--s-4);
  /* 16 16 */
  border-bottom: 1px solid var(--c-divider-soft);
  flex-shrink: 0;
}

.modal--catalog__head .modal__title {
  text-align: left;
  flex: 1 1 auto;
  /* font наследуется от базового .modal__title (--t-display-xl, 24/32) */
}

/* Reset-кнопка внутри head — текстовая, magenta. */
.modal--catalog__reset {
  flex-shrink: 0;
  padding: 0 var(--s-2);
  border: 0;
  background: transparent;
  font: var(--t-body-sm-medium);
  color: var(--c-magenta);
  cursor: pointer;
}

.modal--catalog__head .modal__close {
  position: static;
  /* не абсолютное в head — flex */
  flex-shrink: 0;
}

.modal--catalog__body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--s-4);
  /* 16 */
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  /* 24 — между filters__group */
}

.modal--catalog__foot {
  flex-shrink: 0;
  padding: var(--s-4);
  /* 16 */
  border-top: 1px solid var(--c-divider-soft);
  background: #fff;
}

.modal--catalog__foot .modal__cta {
  min-height: 56px;
}

/* ============================================================
   EXPERT-LEVELS MODAL — «Уровни экспертов». Список 5 уровней:
   слева — бейдж .tag, справа — описание. У текущего уровня (data-level
   совпадает с триггером) — magenta-bordered подложка.
   ============================================================ */
.modal--expert-levels .modal__dialog {
  padding: var(--s-7) var(--s-5) var(--s-5);
  /* 48 24 24 — место под крестик сверху. Ширина из базы. */
  gap: var(--s-5);
  /* 24 */
  align-items: stretch;
}

.modal--expert-levels .modal__title {
  text-align: left;
}

.expert-levels-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  /* 12 */
}

.expert-level {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* pill компактный, не на всю ширину */
  gap: var(--s-2);
  /* 8 — pill → текст */
  padding: var(--s-3);
  /* 12 */
  border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: border-color .15s ease, background .15s ease;
}

.expert-level.is-current {
  border-color: var(--c-magenta);
  background: var(--c-pink-softer);
}

.expert-level__desc {
  margin: 0;
  font: var(--t-body-sm);
  color: var(--c-text);
}

@media (max-width: 480px) {
  .modal--expert-levels .modal__dialog {
    padding: var(--s-7) var(--s-4) var(--s-4);
  }
}

/* ============================================================
   AUTH MODAL — регистрация / вход (Figma 97:11219 / 91:7651 / 91:8457 / 94:9030)
   4 шага в одном контейнере, активный — по data-step на .modal.
   ============================================================ */
.modal--auth .modal__dialog {
  max-width: 480px;
  /* Figma */
  padding: var(--s-7);
  /* 48 — Figma */
  gap: var(--s-6);
  /* 32 — Figma */
  align-items: stretch;
}

.modal--auth .modal__title {
  font: var(--t-display-xl);
  text-align: center;
}

/* Видим только активный pane. Управляем через CSS-display, без атрибута hidden
   на самих pane'ах — иначе он конфликтует со сменой data-step. */
.auth-step {
  display: none;
  flex-direction: column;
  gap: var(--s-4);
  align-items: stretch;
}

.modal--auth[data-step="contact"] .auth-step--contact,
.modal--auth[data-step="code"] .auth-step--code,
.modal--auth[data-step="trouble"] .auth-step--trouble,
.modal--auth[data-step="profile"] .auth-step--profile,
.modal--auth[data-step="welcome"] .auth-step--welcome {
  display: flex;
}

/* Back-arrow — только на шаге code. На остальных скрыт. */
.modal--auth__back {
  position: absolute;
  top: var(--s-4);
  left: var(--s-4);
  width: 24px;
  height: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--c-text);
  background: transparent;
  border: 0;
  cursor: pointer;
  z-index: 1;
}

.modal--auth[data-step="code"] .modal--auth__back,
.modal--auth[data-step="trouble"] .modal--auth__back {
  display: inline-flex;
}

.modal--auth__back svg {
  width: 24px;
  height: 24px;
}

/* На welcome шагe — крестик может быть один (нет back). */
.modal--auth .modal__close {
  top: var(--s-4);
  right: var(--s-4);
}

/* ---------- Шаг 1: contact ---------- */
.modal--auth__brand {
  font: var(--t-modal-balance-big);
  color: var(--c-text);
  text-align: center;
  letter-spacing: 0.04em;
}

.auth-tabs {
  display: flex;
  gap: var(--s-2);
  /* 8 */
  padding: var(--s-1);
  /* 4 */
  border: 1px solid var(--c-card-divider);
  border-radius: var(--r-md);
  /* 16 */
}

.auth-tab {
  flex: 1 1 0;
  min-height: 38px;
  padding: 10px;
  /* off-scale 10 — Figma */
  border: 0;
  background: #fff;
  border-radius: var(--r-xs);
  /* Figma */
  font: var(--t-body-sm-medium-on-snug);
  color: var(--c-text);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.auth-tab--active {
  background: var(--c-magenta-tint-20);
  color: var(--c-magenta);
}

/* Inline-input (телефон с RU-префиксом или email solo). */
.auth-field {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  /* 8 */
  padding: var(--s-3) var(--s-4);
  /* 12 16 */
  border: 1px solid var(--c-card-divider);
  border-radius: var(--r-md);
  /* 16 */
  background: #fff;
  cursor: text;
  transition: border-color .15s ease;
}

.auth-field:focus-within {
  border-color: var(--c-magenta);
}

.auth-field[hidden] {
  display: none;
}

.auth-field__flag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  width: 24px;
  height: 24px;
  overflow: hidden;
  border-radius: 50%;
}

.auth-field__flag svg {
  width: 24px;
  height: 24px;
  display: block;
}

.auth-field__prefix {
  flex-shrink: 0;
  font: var(--t-body-base);
  color: var(--c-text);
}

.auth-field__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 0;
  background: transparent;
  font: var(--t-body-base);
  color: var(--c-text);
}

.auth-field__input::placeholder {
  color: var(--c-text-tint-40);
}

.modal--auth .modal__cta {
  min-height: 56px;
}

.auth-fine {
  margin: 0;
  font: var(--t-body-sm-on-snug);
  color: var(--c-text-muted);
  text-align: center;
}

.auth-fine--left {
  text-align: left;
}

.auth-fine__link {
  color: var(--c-text);
  text-decoration: underline;
}

.auth-fine__link--btn {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: var(--c-magenta);
  text-decoration: underline;
}

/* ---------- Шаг 2: code (Figma 91:7655 — flex с gap 16, инпуты 64×72) ---------- */
.auth-code {
  display: flex;
  gap: var(--s-4);
  /* 16 — Figma 91:7655 */
  justify-content: center;
}

.auth-code__digit {
  flex: 0 0 64px;
  /* фиксированная ширина 64, без сжатия */
  width: 64px;
  height: 72px;
  padding: 0;
  text-align: center;
  font: var(--t-modal-number);
  color: var(--c-text);
  background: #fff;
  border: 1px solid var(--c-card-divider);
  /* rgba(40,34,39,0.1) */
  border-radius: var(--r-md);
  outline: none;
  transition: background .15s ease, border-color .15s ease;
}

.auth-code__digit:focus {
  border-color: var(--c-magenta);
  background: #fff;
}

/* Заполненное состояние (Figma 91:7659): серый фон + текст обычного цвета. */
.auth-code__digit.is-filled {
  background: var(--c-text-tint-5);
}

/* Focus важнее filled — синяя/магента-рамка при выделении на заполненной. */
.auth-code__digit.is-filled:focus {
  background: #fff;
  border-color: var(--c-magenta);
}

/* «У меня проблемы со входом» — full-width button, тёмный bold-текст без
   подчёркивания. Figma 97:15047 — padding 12 со всех сторон, radius 16. */
.auth-trouble {
  width: 100%;
  padding: var(--s-3);
  /* 12 — Figma */
  border: 0;
  background: transparent;
  border-radius: var(--r-md);
  /* 16 */
  cursor: pointer;
  font: var(--t-body-base-strong);
  color: var(--c-text);
  text-align: center;
  transition: background .15s ease;
}

.auth-trouble:hover {
  background: var(--c-text-tint-5);
}

/* ---------- Шаг 2b: trouble (помощь со входом) ---------- */
.auth-trouble-list {
  margin: 0;
  padding-left: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  font: var(--t-body-sm-medium);
  color: var(--c-text-muted);
}

.auth-trouble-contacts {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  padding-top: var(--s-3);
  border-top: 1px solid var(--c-text-tint-10);
  text-align: center;
}

.auth-trouble-contacts__lead {
  font: var(--t-body-sm-medium);
  color: var(--c-text-muted);
}

.auth-trouble-contacts__link {
  font: var(--t-body-sm-strong);
  color: var(--c-magenta);
  text-decoration: none;
}

.auth-trouble-contacts__link:hover {
  text-decoration: underline;
}

/* ---------- Шаг 3: profile ---------- */
.auth-profile__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  /* 8 */
}

.auth-gift {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* off-scale — micro-gap */
  padding: 2px 12px;
  /* off-scale — pill-tight */
  border-radius: var(--r-pill);
  background: var(--c-card-divider);
  color: var(--c-magenta);
  font: var(--t-body-sm-medium);
}

.auth-gift__icon {
  font-size: var(--fs-base);
  line-height: 1;
}

.auth-form-field {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  /* 8 — label → input */
}

.auth-form-field__label {
  font: var(--t-body-base-medium);
  color: var(--c-text);
}

.auth-form-field__input {
  width: 100%;
  min-height: 48px;
  padding: var(--s-3) var(--s-4);
  /* 12 16 */
  border: 1px solid var(--c-card-divider);
  border-radius: var(--r-md);
  background: #fff;
  font: var(--t-body-base);
  color: var(--c-text);
  outline: none;
  transition: border-color .15s ease;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  /* 8 */
  box-sizing: border-box;
}

.auth-form-field__input:focus,
.auth-form-field__input:focus-within {
  border-color: var(--c-magenta);
}

.auth-form-field__input::placeholder {
  color: var(--c-text-tint-40);
}

/* Phone / date — wrapper-вариант: содержит флаг/префикс/input/suffix. */
.auth-form-field__inner-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 0;
  background: transparent;
  font: inherit;
  /* наследует --t-body-md от .auth-form-field__input */
  color: var(--c-text);
}

.auth-form-field__inner-input::placeholder {
  color: var(--c-text-tint-40);
}

.auth-form-field__suffix {
  flex-shrink: 0;
  color: var(--c-text-tint-40);
  font: var(--t-body-sm);
}

.auth-form-field__hint {
  font: var(--t-body-sm-on-snug);
  color: var(--c-text-muted);
}

/* Bullet-список под чекбоксом согласия на шаге profile. */
.auth-bullets {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  /* 4 */
}

.auth-bullets li {
  position: relative;
  padding-left: var(--s-4);
  /* 16 — место под буллет */
  font: var(--t-body-sm-on-snug);
  color: var(--c-text-muted);
}

.auth-bullets li::before {
  content: "•";
  position: absolute;
  left: var(--s-1);
  color: var(--c-text-muted);
}

/* Кастомный checkbox согласия (magenta, как в top-up__save). */
.auth-consent {
  display: flex;
  gap: var(--s-2);
  /* 8 */
  cursor: pointer;
  font: var(--t-body-sm-on-snug);
  color: var(--c-text);
}

.auth-consent__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-consent__box {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border: 1px solid var(--c-text-tint-20);
  border-radius: 4px;
  /* off-scale 4 — checkbox */
  background: #fff;
  position: relative;
  transition: background .15s ease, border-color .15s ease;
}

.auth-consent__input:checked+.auth-consent__box {
  background: var(--c-magenta);
  border-color: var(--c-magenta);
}

.auth-consent__input:checked+.auth-consent__box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: no-repeat center / 12px 12px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2.5 6.2l2.5 2.5L9.5 3.7' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

.auth-consent__text {
  flex: 1 1 auto;
}

/* ---------- Шаг 4: welcome ---------- */
.auth-step--welcome {
  align-items: center;
  text-align: center;
}

.auth-welcome__check {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--c-online);
  /* #08b866 — зелёный */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Mobile-адаптация ---------- */
@media (max-width: 480px) {
  .modal--auth .modal__dialog {
    padding: var(--s-7) var(--s-4) var(--s-5);
  }

  .auth-code {
    gap: var(--s-2);
  }

  /* 8 — на узких чтобы 4·56+3·8 = 248 влезало */
  .auth-code__digit {
    flex-basis: 56px;
    width: 56px;
    height: 64px;
  }

  .modal--auth__brand {
    font-size: var(--fs-2xl);
  }

  /* Welcome — компактная карточка по центру, не full-width (Figma m5). */
  .modal--auth[data-step="welcome"] .modal__dialog {
    max-width: 320px;
    padding: var(--s-5) var(--s-5) var(--s-5);
    /* 24 со всех сторон */
    gap: var(--s-4);
    /* 16 — компактнее */
  }

  .auth-welcome__check {
    width: 64px;
    height: 64px;
  }

  .auth-welcome__check svg {
    width: 32px;
    height: 32px;
  }
}

/* ============================================================
   BOOKING MODAL — «Запись» (user-режим). 2 таба: now / later.
   ============================================================ */
.modal--booking .modal__dialog {
  padding: var(--s-7) var(--s-5) var(--s-5);
  /* 48 24 24 */
  gap: var(--s-5);
  /* 24 */
  align-items: stretch;
}

/* ---------- Header: эксперт-блок ---------- */
.booking-expert {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  /* 12 */
}

.booking-expert__photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--c-text-tint-10);
  background-position: center;
  background-size: cover;
  flex-shrink: 0;
}

.booking-expert__info {
  flex: 1;
  min-width: 0;
}

.booking-expert__name {
  margin: 0;
  text-align: left;
  font: var(--t-display-xl);
}

.booking-expert__meta {
  display: flex;
  gap: var(--s-3);
  align-items: center;
  flex-wrap: wrap;
  margin-top: var(--s-1);
  font: var(--t-body-sm);
  color: var(--c-text-muted);
}

.booking-expert__rating {
  color: var(--c-star);
  font: var(--t-body-sm-strong);
}

.booking-expert__status::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  background: currentColor;
  vertical-align: middle;
}

.booking-expert__status[data-status="online"] {
  color: var(--c-online);
}

.booking-expert__status[data-status="offline"] {
  color: var(--c-text-muted);
}

/* ---------- Pill-табы ---------- */
.booking-tabs {
  display: flex;
  gap: var(--s-2);
  /* 8 */
  padding: var(--s-1);
  /* 4 */
  border: 1px solid var(--c-card-divider);
  border-radius: var(--r-md);
}

.booking-tab {
  flex: 1 1 0;
  min-height: 38px;
  padding: 10px;
  /* off-scale 10 — Figma */
  border: 0;
  background: #fff;
  border-radius: var(--r-xs);
  font: var(--t-body-sm-medium-on-snug);
  color: var(--c-text);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.booking-tab--active {
  background: var(--c-magenta-tint-20);
  color: var(--c-magenta);
}

.booking-tab[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------- Pane (only active visible) ---------- */
.booking-pane {
  display: none;
  flex-direction: column;
  gap: var(--s-4);
}

.modal--booking[data-tab="now"] .booking-pane--now,
.modal--booking[data-tab="later"] .booking-pane--later,
.modal--booking[data-tab="success"] .booking-pane--success {
  display: flex;
}

/* На шаге success — скрываем header-эксперта и pill-табы (большой layout success'a). */
.modal--booking[data-tab="success"] .booking-expert,
.modal--booking[data-tab="success"] .booking-tabs {
  display: none;
}

/* ---------- Section ---------- */
.booking-section {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  /* 8 — label → controls */
}

.booking-section__title {
  font: var(--t-body-sm-medium-on-snug);
  color: var(--c-text-muted);
}

/* ---------- Format radio-cards ---------- */
.booking-formats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
  /* 8 */
}

.booking-format input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.booking-format__box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  height: 48px;
  border: 1px solid var(--c-card-divider);
  border-radius: var(--r-md);
  cursor: pointer;
  font: var(--t-body-base-medium);
  color: var(--c-text);
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.booking-format input:checked+.booking-format__box {
  border-color: var(--c-magenta);
  background: rgba(170, 38, 146, 0.08);
  /* magenta @ 8% — нет токена */
  color: var(--c-magenta);
}

.booking-format__icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
}

.booking-format__icon svg {
  width: 20px;
  height: 20px;
}

/* ---------- Price ---------- */
.booking-price {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
}

.booking-price__main {
  font: var(--t-booking-price);
  /* Semibold 24/24 — большая цена */
  color: var(--c-text);
}

.booking-price__old {
  font: var(--t-body-sm);
  color: var(--c-text-muted);
  text-decoration: line-through;
}

.booking-price--total {
  justify-content: space-between;
  padding: var(--s-3) var(--s-4);
  background: var(--c-text-tint-5);
  border-radius: var(--r-md);
}

.booking-price--total .booking-price__main {
  font: var(--t-booking-price-total);
}

/* 20/24 в total */

/* ---------- Gift pill (1-я бесплатно) ---------- */
.booking-gift {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  /* off-scale — micro-gap */
  padding: 2px 12px;
  /* off-scale — pill-tight */
  border-radius: var(--r-pill);
  background: var(--c-card-divider);
  color: var(--c-magenta);
  font: var(--t-body-sm-medium);
}

.booking-gift[hidden] {
  display: none;
}

/* ---------- Balance row ---------- */
.booking-balance {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
  background: var(--c-text-tint-5);
  border-radius: var(--r-md);
  font: var(--t-body-sm);
  color: var(--c-text-muted);
}

.booking-balance__value {
  flex: 1;
  font: var(--t-body-sm-strong);
  color: var(--c-text);
}

.booking-balance__topup {
  border: 0;
  background: transparent;
  color: var(--c-magenta);
  font: var(--t-body-sm-medium);
  cursor: pointer;
}

/* ---------- Days scroller ---------- */
.booking-days {
  display: flex;
  gap: var(--s-2);
  overflow-x: auto;
  padding-bottom: var(--s-1);
  /* место под scrollbar */
  scrollbar-width: thin;
}

.booking-day {
  flex: 0 0 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: var(--s-2);
  border: 1px solid var(--c-card-divider);
  border-radius: var(--r-md);
  background: #fff;
  cursor: pointer;
  color: var(--c-text);
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.booking-day__weekday {
  font: var(--t-body-xs);
  color: var(--c-text-muted);
  text-transform: capitalize;
}

.booking-day__date {
  font: var(--t-modal-step-title);
  /* Semibold 18 — крупное число дня */
}

.booking-day.is-active {
  border-color: var(--c-magenta);
  background: var(--c-magenta);
  color: #fff;
}

.booking-day.is-active .booking-day__weekday {
  color: rgba(255, 255, 255, 0.7);
  /* white @ 70% — нет токена */
}

/* ---------- Duration pills ---------- */
.booking-durations {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-2);
}

.booking-duration input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.booking-duration__box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border: 1px solid var(--c-card-divider);
  border-radius: var(--r-pill);
  background: #fff;
  cursor: pointer;
  font: var(--t-body-sm-medium);
  color: var(--c-text);
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.booking-duration input:checked+.booking-duration__box {
  border-color: var(--c-magenta);
  background: var(--c-magenta);
  color: #fff;
}

/* ---------- Time slots ---------- */
.booking-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: var(--s-2);
}

.booking-slot {
  height: 40px;
  border: 1px solid var(--c-card-divider);
  border-radius: var(--r-md);
  background: #fff;
  cursor: pointer;
  font: var(--t-body-sm-medium);
  color: var(--c-text);
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.booking-slot:hover {
  border-color: var(--c-magenta);
}

.booking-slot.is-active {
  border-color: var(--c-magenta);
  background: var(--c-magenta);
  color: #fff;
}

.booking-slot[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

.booking-slots__empty {
  grid-column: 1 / -1;
  padding: var(--s-3) 0;
  text-align: center;
  font: var(--t-body-sm);
  color: var(--c-text-muted);
}

/* ---------- Success pane ---------- */
.booking-pane--success {
  align-items: center;
  text-align: center;
  gap: var(--s-3);
  /* 12 */
}

.booking-success__photo {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background-color: var(--c-text-tint-10);
  background-position: center;
  background-size: cover;
}

.booking-success__name {
  margin: 0;
  font: var(--t-modal-title-lg);
  color: var(--c-text);
}

.booking-success__title {
  margin: 0;
  font: var(--t-body-sm);
  color: var(--c-text-muted);
}

.booking-success__status {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-pill);
  font: var(--t-body-base-medium);
  background: var(--c-text-tint-5);
  color: var(--c-text);
}

.booking-pane--success[data-status="connecting"] .booking-success__status {
  background: var(--c-card-divider);
  color: var(--c-magenta);
}

.booking-pane--success[data-status="scheduled"] .booking-success__status {
  background: rgba(8, 184, 102, 0.1);
  /* online @ 10% — нет токена */
  color: var(--c-online);
}

.booking-pane--success[data-status="scheduled"] .booking-success__spinner {
  display: none;
}

.booking-success__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: booking-success-spin 0.9s linear infinite;
}

@keyframes booking-success-spin {
  to {
    transform: rotate(360deg);
  }
}

.booking-success__detail {
  margin: 0;
  font: var(--t-body-sm);
  color: var(--c-text-muted);
  max-width: 360px;
}

.booking-success__actions {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--s-2);
}

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
  .modal--booking .modal__dialog {
    padding: var(--s-7) var(--s-4) var(--s-4);
  }

  .booking-success__photo {
    width: 96px;
    height: 96px;
  }
}

/* ============================================================
   MODAL — Детали заказа (открывается с /lk/orders/)
   ============================================================ */
.modal--lk-order .modal__dialog {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  /* 24 */
}

.lk-order-modal__head {
  display: flex;
  gap: var(--s-4);
  /* 16 */
  align-items: center;
}

.lk-order-modal__photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--c-text-tint-10);
  flex-shrink: 0;
}

.lk-order-modal__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lk-order-modal__heading {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  min-width: 0;
}

.lk-order-modal__name {
  margin: 0;
  font: var(--t-display-xl);
  color: var(--c-text);
}

/* 24/32 Philosopher Regular */
.lk-order-modal__theme {
  margin: 0;
  font: var(--t-body-sm);
  color: var(--c-text-muted);
}

/* 14/20 */

.lk-order-modal__details {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  /* 12 */
}

.lk-order-modal__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-3);
}

.lk-order-modal__row dt {
  margin: 0;
  font: var(--t-body-sm);
  color: var(--c-text-muted);
}

/* 14/20 */
.lk-order-modal__row dd {
  margin: 0;
  font: var(--t-body-sm-medium);
  color: var(--c-text);
  text-align: right;
}

/* Статус — цветной пилл */
.lk-order-modal__status {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  /* 8 */
  padding: var(--s-1) var(--s-3);
  /* 4 12 */
  border-radius: var(--r-pill);
  font: var(--t-body-xs-medium);
  /* 12/16 Medium */
  background: var(--c-text-tint-10);
}

.lk-order-modal__status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.lk-order-modal__status--completed {
  color: var(--c-online);
  background: rgba(8, 184, 102, 0.10);
}

/* online @ 10% */
.lk-order-modal__status--scheduled {
  color: var(--c-magenta);
  background: var(--c-magenta-tint-10);
}

.lk-order-modal__status--in-progress {
  color: #b87d08;
  background: rgba(184, 125, 8, 0.10);
}

/* busy/amber, нет токена */
.lk-order-modal__status--cancelled {
  color: var(--c-text-muted);
  background: var(--c-text-tint-10);
}

.lk-order-modal__actions {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  /* 8 */
  margin-top: var(--s-4);
  /* 16 — отступ от details */
}

/* Все кнопки в actions — full-width, одного размера */
.lk-order-modal__actions>.btn {
  width: 100%;
  min-height: 48px;
}

/* Если все кнопки hidden — actions не оставляет визуальный зазор */
.lk-order-modal__actions:not(:has(button:not([hidden]))) {
  display: none;
}

/* ============================================================
   MODAL — Подтверждение удаления аккаунта
   ============================================================ */
.modal--delete-account .modal__dialog {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  max-width: 480px;
  width: 100%;
}

.delete-account-modal__reasons {
  margin: 0;
  padding: var(--s-3) var(--s-5);
  /* 12 24 */
  list-style: disc;
  background: var(--c-danger-tint-10);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  font: var(--t-body-sm);
  color: var(--c-text);
}

.delete-account-modal__reasons li {
  padding-left: var(--s-1);
}

.delete-account-modal__actions {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-top: var(--s-2);
}

.delete-account-modal__cancel {
  width: 100%;
  min-height: 48px;
}

.delete-account-modal__confirm {
  width: 100%;
  min-height: 44px;
  border: 0;
  background: transparent;
  font: var(--t-body-sm-medium);
  color: var(--c-danger);
  cursor: pointer;
}

.delete-account-modal__confirm:hover {
  text-decoration: underline;
}

/* ============================================================
   CARD — общая бордюрная карточка-контейнер.
   Figma 95:10438 / 95:9852 / 95:10466 / 95:10473 / 95:10551 — все виджеты
   ЛК используют один и тот же базовый стиль (border + radius 16 + 16/24 padding).

   Класс задуман как переиспользуемый: всё, что нужно от карточки —
   это белый фон, тонкий бордер и одинаковые внутренние отступы.
   Сверху накручиваем модификаторы (.lk-card--balance и т.п.) только
   для специфичной раскладки содержимого.
   ============================================================ */
.card-bordered {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 */
  padding: var(--s-4) var(--s-5);
  /* 16 24 — Figma */
  background: #fff;
  border: 1px solid var(--c-card-divider);
  /* rgba(170,38,146,0.1) — общий бордер дизайн-системы */
  border-radius: var(--r-md);
  /* 16 */
}

/* ============================================================
   LINK-MORE — текстовая «ссылка-кнопка» с chevron справа.
   Figma 95:10563 / 95:10558 / 95:10475 / 95:10553 (все «Подробнее»
   на дашборде ЛК).

   Структура: <a class="link-more"> или <button class="link-more">
     [текст] [<span class="link-more__icon">…</span>]

   Стиль: Inter Semi-Bold 14/20, color magenta, gap 4 px,
   padding-block 4 (Figma).
   ============================================================ */
.link-more {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  /* 4 */
  padding-block: var(--s-1);
  /* 4 — горизонтального нет */
  font: var(--t-body-sm-strong);
  color: var(--c-magenta);
  background: transparent;
  border: 0;
  border-radius: var(--r-sm);
  /* 8 — для фокус-кольца */
  cursor: pointer;
  transition: color 0.15s ease;
}

.link-more:hover {
  color: var(--c-purple-deep);
}

/* Иконка визуально 12×12 (мелкий chevron). Фигма-bbox 24×24 — это виджет
   с большим padding'ом вокруг arrow-glyph'а; рисуем уменьшенно, чтобы не
   доминировал над текстом 14px. */
.link-more__icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  color: currentColor;
}

.link-more__icon svg {
  width: 16px;
  height: 16px;
}

/* ============================================================
   FOOTER — Figma 77:4818 desktop / 77:4820 mobile.

   Светлый, без bg (просто на белом фоне страницы). Сетка 4 колонки на
   десктопе, single-column стек на mobile/tablet (по comments.md правилу
   ≥960 — desktop, всё ниже наследует mobile).

   Структура:
     .site-footer__grid    — 4 cols (desktop)
       col-1: brand+tagline+socials+support
       col-2: О нас + Польза
       col-3: Знания
       col-4: Ищем экспертов
     .site-footer__legal   — disclaimer + copyright
   ============================================================ */
.site-footer {
  background: #fff;
  color: var(--c-text);
  padding-block: var(--s-5);
  /* 24 mobile */
}

/* ============================================================
   GRID (mobile-first stack)
   ============================================================ */
.site-footer__grid {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  /* 24 */
}

/* ---------- Brand col ---------- */
.site-footer__brand-col {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  /* 24 */
}

.site-footer__brand-row {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  width: 100%;
}

.site-footer__brand {
  font: var(--t-footer-brand);
  color: var(--c-text);
  text-decoration: none;
}

.site-footer__tagline {
  font: var(--t-body-sm);
  color: var(--c-text-muted);
  margin: 0;
}

/* ---------- Socials ---------- */
.site-footer__socials {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  /* 8 mobile */
}

.site-footer__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  /* mobile */
  height: 40px;
  color: var(--c-text);
  flex-shrink: 0;
  transition: color .15s ease;
}

.site-footer__social:hover {
  color: var(--c-magenta);
}

.site-footer__social svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Mobile: socials в строке brand. Desktop: отдельно ниже tagline (3 × 48). */
.site-footer__socials--mobile {
  margin-left: auto;
  display: flex;
}

.site-footer__socials--desktop {
  display: none;
}

/* ---------- Support card ---------- */
.site-footer__support {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 */
}

.site-footer__support-row {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  /* 8 */
  font: var(--t-body-sm);
  color: var(--c-text);
  text-decoration: none;
  transition: color .15s ease;
}

.site-footer__support-row:hover {
  color: var(--c-magenta);
}

.site-footer__support-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--c-text);
}

.site-footer__support-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ============================================================
   COLUMNS — групповые секции (О нас / Польза / Знания / Ищем экспертов)
   ============================================================ */
.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 mobile, 48 desktop (override) */
}

.site-footer__group {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  /* 8 mobile */
}

.site-footer__title {
  font: var(--t-display-lg-bold-on-base);
  /* 20/24 mobile */
  color: var(--c-text);
  margin: 0;
}

.site-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  /* 8 */
}

.site-footer__list a {
  font: var(--t-body-sm);
  color: var(--c-text);
  text-decoration: none;
  transition: color .15s ease;
}

.site-footer__list a:hover {
  color: var(--c-magenta);
}

/* ---------- "Ищем экспертов" — email + hint + magenta-link ---------- */
.site-footer__email {
  font: var(--t-body-sm);
  color: var(--c-text);
  text-decoration: none;
}

.site-footer__email:hover {
  color: var(--c-magenta);
}

.site-footer__email-hint {
  font: var(--t-body-sm);
  color: var(--c-text-muted);
  margin: 0;
}

.site-footer__more {
  font: var(--t-body-sm);
  color: var(--c-magenta);
  text-decoration: underline;
}

.site-footer__more:hover {
  color: var(--c-purple-deep);
}

/* ============================================================
   LEGAL disclaimer + copyright
   ============================================================ */
.site-footer__legal {
  margin-top: var(--s-5);
  /* 24 mobile */
  display: flex;
  flex-direction: column;
  gap: 0;
}

.site-footer__legal p {
  font: var(--t-body-xs);
  color: var(--c-text-muted);
  margin: 0;
}

/* ============================================================
   DESKTOP (≥960px) — 4-column grid + крупный logo + 48-px gaps
   ============================================================ */
@media (min-width: 960px) {
  .site-footer {
    padding-block: var(--s-7);
  }

  /* 48 */

  .site-footer__grid {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr 1fr 1fr;
    gap: var(--s-7);
    /* 48 */
  }

  .site-footer__brand-col {
    gap: var(--s-7);
  }

  .site-footer__brand {
    font-size: var(--fs-3xl);
    line-height: 48px;
  }

  /* 48/48 — off-scale 48 */

  /* Mobile-сошлс ряд скрываем, desktop вариант показываем */
  .site-footer__socials--mobile {
    display: none;
  }

  .site-footer__socials--desktop {
    display: flex;
    gap: var(--s-6);
  }

  /* 32 */
  .site-footer__social {
    width: 48px;
    height: 48px;
  }

  .site-footer__col {
    gap: var(--s-7);
  }

  /* 48 — между группами */
  .site-footer__group {
    gap: var(--s-4);
  }

  /* 16 */
  .site-footer__title {
    font: var(--t-display-xl);
  }

  /* 24/32 desktop */

  .site-footer__legal {
    margin-top: var(--s-7);
  }

  .site-footer__legal p {
    font: var(--t-body-sm);
  }
}

/* ============================================================
   MOBILE BOTTOM TABBAR (Figma 153:17146).
   Виден на ≤767 (phone), скрыт на ≥768 (там header в десктоп-виде).
   Граница синхронна с header.css — иначе tabbar дублирует кнопку «Войти».

   Figma specs:
     • bg #fff, border-radius 24 24 0 0 (только верхние углы)
     • drop-shadow 0 -2px 8px rgba(0,0,0,0.25)
     • padding 16, gap 16 между табами
     • Каждый таб: flex column, gap 4, items center, flex:1, min-width 0
     • Icon 24×24 (inline SVG, color через currentColor)
     • Label 12/16, font-weight 500 (medium), color #282227 (default) / #aa2692 (active)
   ============================================================ */
.tabbar {
  display: none;
  /* desktop: скрыт по умолчанию */
}

@media (max-width: 767px) {
  .tabbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-4);
    padding: var(--s-4);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: #fff;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.25);
    /* off-elev — tabbar shadow */
  }

  /* Безопасная зона снизу (под tabbar) — чтобы контент не залезал */
  body {
    padding-bottom: 88px;
  }

  /* off-scale — tabbar height */
}

/* ---------- Таб ---------- */
.tabbar__item {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-1);
  text-decoration: none;
  color: var(--c-text);
  /* #282227 default */
  transition: color .15s ease;
}

.tabbar__item--active,
.tabbar__item[aria-current="page"] {
  color: var(--c-magenta);
  /* #aa2692 active */
}

/* Переключение видимости anon/user-пункта по auth-состоянию.
   .site-header.is-user — sibling от .tabbar (оба прямые дети body). */
.tabbar__item--user {
  display: none;
}

.site-header.is-user~.tabbar .tabbar__item--user {
  display: flex;
}

.site-header.is-user~.tabbar .tabbar__item--anon {
  display: none;
}

/* Icon 24×24 — внутри inline SVG (без width/height у самого svg, размеры от контейнера) */
.tabbar__icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tabbar__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Label */
.tabbar__label {
  font: var(--t-body-xs-medium);
  text-align: center;
  white-space: nowrap;
}


/* ============================================================
   CSS — SECTIONS (по одному файлу на каждую секцию страницы)
   ============================================================ */
/* ============================================================
   SECTION — HERO (block #1, pixel-perfect Figma 315:28069)
   Desktop: 1328 × 600 (двух-колоночный, фото справа 640×600, r48)
   Mobile : стек, фото 308h r24, кнопки arrows 40×40
   ============================================================ */

/* Section spacing */
.hero-section {
  padding-block: clamp(24px, 4vw, 56px);
}

/* MOBILE-FIRST stacked layout */
.hero {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  align-items: stretch;
}

.hero__title {
  margin: 0;
  font: var(--t-hero-title);
  color: var(--c-text);
  text-align: center;
  /* По Figma mobile — title на ВСЮ ширину (328px = container). text-wrap: balance
     равномерно ломает на ≈2 строки. На desktop переопределяется в 18ch. */
  max-width: none;
  width: 100%;
  text-wrap: balance;
}

/* ============================================================
   PROMPT ROTATOR (slide-up). Контейнер фиксированной высоты;
   два <span class="hero__prompt"> внутри сменяют друг друга
   вертикально по таймеру (см. js/components/hero-prompt-rotator.js).
   ============================================================ */
.hero__prompt-rotator {
  position: relative;
  height: var(--lh-sm);
  /* mobile = line-height одного промпта */
  overflow: hidden;
  pointer-events: none;
}

.hero__prompt {
  position: absolute;
  inset: 0;
  margin: 0;
  font: var(--t-hero-prompt);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* Градиентный fill через background-clip — те же #160131 → #aa2692 */
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Стартовая позиция: «снизу за рамкой» */
  transform: translateY(110%);
  opacity: 0;
  transition:
    transform .6s cubic-bezier(0.16, 1, 0.3, 1),
    opacity .35s ease;
  will-change: transform, opacity;
}

.hero__prompt.is-active {
  transform: translateY(0);
  opacity: 1;
}

.hero__prompt.is-leaving {
  transform: translateY(-110%);
  opacity: 0;
}

/* CTA ----------------------------------------------------------- */
.hero__cta {
  width: 100%;
  height: 56px;
  min-height: 56px;
  padding: var(--s-4) var(--s-3);
}

/* META — мобильная горизонтальная строка из 3 элементов ---------- */
.hero__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* плашка центрируется относительно ряда тегов */
  gap: var(--s-3);
  width: fit-content;
  margin-inline: auto;
  /* центр блока на mobile */
  font: var(--t-body-xs-medium);
  /* 12 — чипы помельче */
  color: var(--c-text-muted);
  text-align: center;
}

.hero__meta-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-4);
}

/* «1-я консультация бесплатно» — акцентная плашка под тегами:
   светло-розовый блок, magenta-текст в 2 строки по центру, наклон 5°,
   иконка подарка в правом верхнем углу (как у референса). */
/* Контейнер: две отдельные пилюли со смещением, без отступа между ними, наклон 5°. */
.hero__meta-free {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  transform: rotate(-5deg);
}

/* Каждая строка — отдельная пилюля: «Первая консультация» / «бесплатно 🎁». */
.hero__meta-free__line {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: var(--s-1) var(--s-3);
  border-radius: var(--r-pill);
  background: var(--c-pink-soft);
  color: var(--c-magenta);
  font-weight: var(--fw-medium);
  line-height: var(--lh-sm);
  white-space: nowrap;
}

/* Вторая пилюля сдвинута вправо и приподнята внахлёст (стаггер как у референса). */
.hero__meta-free__line+.hero__meta-free__line {
  margin-left: var(--s-6);
  /* 32 — сдвиг вправо */
  margin-top: -4px;
  /* off-scale — отрицательный нахлёст */
}

/* Подарок — инлайн после «бесплатно», того же цвета (magenta через currentColor). */
.hero__meta-free__icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.hero__meta-free__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hero__meta-free__icon svg,
.hero__meta-free__icon svg * {
  fill: currentColor;
}

.hero__meta-free__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Photo card — адаптивный по ширине И пропорции.
   • mobile (≤430): аспект Figma 328/308 ≈ portrait, max 360px — компактная.
   • tablet (430-1023): landscape 16/10 — на ВСЮ ширину контейнера (full-width).
   • desktop (≥1024, см. media ниже): fluid col 320-640px, aspect 640/600. */
.hero__photo {
  position: relative;
  width: 100%;
  /* tablet — full container width */
  aspect-ratio: 16 / 10;
  /* tablet — landscape */
  margin-inline: auto;
  background: #fff;
  border-radius: var(--r-lg);
  overflow: hidden;
}

@media (max-width: 430px) {
  .hero__photo {
    max-width: 360px;
    aspect-ratio: 328 / 308;
    /* mobile — почти portrait */
  }
}

/* Тонкий dark-gradient overlay сверху photo — text + tag всегда читаются
   на любом фото (тёмном или светлом). На тёмном фоне почти незаметен,
   на светлом даёт необходимый контраст. */
.hero__photo::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Track — flex-row из всех слайдов. Двигается одним transform translateX.
   `.is-no-transition` отключает анимацию для silent-reset (как в spheres-tabs). */
.hero__photo-track {
  position: absolute;
  inset: 0;
  display: flex;
  transform: translate3d(var(--shift, 0%), 0, 0);
  transition: transform .7s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}

.hero__photo-track.is-no-transition {
  transition: none;
}

.hero__photo-img {
  flex: 0 0 100%;
  /* каждый слайд = ширина viewport-а .hero__photo */
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero__photo-info {
  position: absolute;
  top: var(--s-4);
  left: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  z-index: 2;
}

.hero__photo-role {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font: var(--t-body-sm);
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  /* доп. контраст на ярких участках */
}

.hero__photo-name {
  margin: 0;
  font: var(--t-display-xl-bold-on-base);
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* Tag в hero — всегда solid (заливочный), независимо от класса. Это даёт
   узнаваемый бейдж на любом фоне (особенно на светлых photo, где tinted
   варианты типа .tag--pro теряются). */
.hero__photo .tag {
  background: var(--c-magenta);
  color: #fff;
  font: var(--t-tag-strong);
  /* Semibold-вариант solid pill */
}

/* .tag--gold / --day / --new берут цвет из components/tags.css.
   Override только для платинового (на hero — солидный тёмно-серый, в каталоге — gradient). */
.hero__photo .tag--gold {
  background: var(--c-gold);
  color: var(--c-text);
}

.hero__photo .tag--platinum {
  background: #4f5662;
  color: #fff;
}

.hero__photo-arrows {
  position: absolute;
  bottom: var(--s-4);
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  gap: var(--s-4);
  z-index: 2;
  /* поверх top-overlay (z=1) */
}

.hero-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-pink-soft);
  color: var(--c-magenta);
  border: 0;
  border-radius: var(--r-md);
  cursor: pointer;
  padding: var(--s-2);
  transition: background .15s ease, transform .15s ease;
}

.hero-arrow:hover {
  background: #efd4ec;
}

.hero-arrow:active {
  transform: scale(0.96);
}

.hero-arrow svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* Features list (mobile: stacked vertical, gap 16, body gap 6) ---- */
.hero__features {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero-feature {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.hero-feature__icon {
  flex-shrink: 0;
  width: var(--s-5);
  height: var(--s-5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--c-online);
}

.hero-feature__icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.hero-feature__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.hero-feature__title {
  margin: 0;
  font: var(--t-hero-feature-title);
  color: var(--c-text);
}

.hero-feature__desc {
  margin: 0;
  font: var(--t-hero-feature-desc);
  color: var(--c-text-muted);
}

/* ============================================================
   DESKTOP layout (>=960) — pixel-perfect Figma 1328×600
   Сетка: title / meta / prompt / cta / feats — слева;
   photo card — справа в колонке 640×600 (fluid 320→640).
   ============================================================ */
@media (min-width: 960px) {
  .hero {
    display: grid;
    /* Правая col fluid: clamp 320-640px, ~45vw — на узком desktop меньше,
       на широком — стандартные 640. Левая col занимает остальное (1fr).
       row 5 = 1fr — занимает всё свободное вертикальное место (под features). */
    grid-template-columns: minmax(0, 1fr) clamp(320px, 45vw, 640px);
    grid-template-rows: auto auto auto auto 1fr;
    grid-template-areas:
      "title    photo"
      "prompt   photo"
      "cta      photo"
      "meta     photo"
      "feats    photo";
    column-gap: clamp(24px, 3vw, 50px);
    row-gap: 0;
    /* align-items: stretch — photo занимает full height (равна высоте всех rows).
       Каждая ячейка слева растягивается тоже, но контент в ней auto-aligned. */
    align-items: stretch;
    min-height: clamp(440px, 42vw, 600px);
  }

  .hero__title {
    grid-area: title;
    /* font-size/line-height — fluid-токены (--fs-4xl/--lh-4xl).
       max-width 18ch — комфортная ширина для 3 строк на узком и широком desktop. */
    text-align: left;
    max-width: 18ch;
    width: auto;
    margin-inline: 0;
  }

  .hero__meta {
    grid-area: meta;
    margin-top: var(--s-3);
    /* 12 — ближе к кнопке (было 24) */
    margin-inline: 0;
    justify-self: start;
    /* блок слева в ячейке (не растягивается) */
    font: var(--t-body-sm-medium);
    /* 14 — помельче, чем было 16 */
  }

  .hero__meta-tags {
    gap: var(--s-5);
  }

  /* Prompt теперь видим на десктопе (раньше display:none) */
  .hero__prompt-rotator {
    grid-area: prompt;
    margin-top: var(--s-5);
    /* отступ от meta до prompt */
    height: 32px;
    /* = line-height десктопного промпта */
  }

  .hero__prompt {
    font: var(--t-display-xl);
    text-align: left;
  }

  .hero__cta {
    grid-area: cta;
    margin-top: var(--s-5);
    /* отступ от prompt до CTA */
    width: 300px;
    height: 72px;
    min-height: 72px;
    padding: var(--s-4) var(--s-3);
    align-self: start;
    justify-self: start;
  }

  .hero__features {
    grid-area: feats;
    align-self: end;
    /* push to bottom (auto-layout style) */
    margin-top: clamp(24px, 3vw, 48px);
    /* гарантированный отступ от CTA — не залипает */
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: clamp(12px, 1.2vw, 24px);
    row-gap: clamp(12px, 1.2vw, 24px);
    width: 100%;
    max-width: 638px;
  }

  .hero__photo {
    grid-area: photo;
    /* Photo растягивается на ВЕСЬ row span (5 rows ⇒ full hero height).
       align-self: stretch + height 100% — заполняет всю высоту левой колонки.
       aspect-ratio: auto — снимаем mobile-форс, height теперь = grid stretch. */
    width: 100%;
    height: 100%;
    max-width: none;
    aspect-ratio: auto;
    align-self: stretch;
    margin-inline: 0;
    border-radius: clamp(24px, 2.5vw, 48px);
  }

  .hero__photo-info {
    top: var(--s-6);
    left: var(--s-6);
    gap: var(--s-4);
  }

  .hero__photo-role {
    font: var(--t-hero-photo-role-desktop);
    gap: var(--s-3);
  }

  .hero__photo-name {
    font: var(--t-hero-photo-name-desktop);
  }

  .hero__photo-arrows {
    bottom: var(--s-5);
  }

  .hero-arrow {
    padding: var(--s-4);
  }
}

/* ============================================================
   SECTION — Готовы попробовать? (experts-teaser, Figma 64:1126)

   Desktop: section-head (centered, 48/56 + 24/32) → 32px gap → розовая
            panel rgba(170,38,146,0.05) с rоund 48 padding 48/100, внутри
            список карточек, потом white-pill CTA «Посмотреть всех экспертов».
   Mobile : то же без panel — flat layout на белом фоне.
   ============================================================ */

/* Section-head локальные размеры (override общих в layout.css) */
.experts-teaser__head {
  align-items: center;
  text-align: center;
  gap: var(--s-2);
  /* 8 */
  margin-bottom: var(--s-6);
  /* 32 — gap title→panel */
}

.experts-teaser__title {
  font: var(--t-display-headline);
  color: var(--c-text);
}

.experts-teaser__subtitle {
  font: var(--t-body-xl);
  color: var(--c-text-muted);
  max-width: none;
  /* перекрываем 720px из layout.css */
}

/* ---------- Panel (pink-tinted card) ---------- */
.experts-teaser__panel {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 — между карточками и до CTA */
  padding: var(--s-7) 100px;
  /* 48 / 100 (100 — section-only) */
  background: var(--c-magenta-tint-5);
  border-radius: var(--r-2xl);
  /* 48 */
}

.experts-teaser__list {
  display: flex;
  flex-direction: column;
  /* gap внутри panel уже даёт 16 — карточки сами держат padding-block + border-bottom */
}

/* ---------- White-pill CTA «Посмотреть всех экспертов» ---------- */
.experts-teaser__cta {
  display: flex;
  justify-content: center;
}

.experts-teaser__cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  /* 8 */
  width: 300px;
  height: 56px;
  padding: var(--s-4) var(--s-3);
  /* 16 / 12 */
  background: #fff;
  border: 1px solid var(--c-text-tint-20);
  border-radius: var(--r-pill);
  font: var(--t-body-base-strong);
  color: var(--c-text);
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.15));
  /* shadow-elev-1 (нет токена под drop-shadow) */
  transition: background-color .15s ease;
  cursor: pointer;
}

.experts-teaser__cta-btn:hover {
  background-color: #f3f1f3;
}

.experts-teaser__cta-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ============================================================
   MOBILE/TABLET (≤959) — без розовой панели, плоский layout.
   Десктоп с панелью включается от 960 (граница comments.md).
   ============================================================ */
@media (max-width: 959px) {
  .experts-teaser__head {
    margin-bottom: var(--s-4);
    /* 16 */
  }

  .experts-teaser__title {
    font: var(--t-display-section);
  }

  /* 28/32 mobile */
  .experts-teaser__subtitle {
    font: var(--t-body-base-medium);
  }

  .experts-teaser__panel {
    padding: 0;
    background: transparent;
    border-radius: 0;
    gap: var(--s-4);
  }

  .experts-teaser__cta-btn {
    width: 100%;
    height: 44px;
    font: var(--t-body-sm-strong);
    /* 14/20 mobile */
  }

  .experts-teaser__cta-icon {
    width: 16px;
    height: 16px;
  }
}

/* ============================================================
   SECTION — Как проходит консультация (Figma 201:77020 / 201:76970)

   Структура:
     .how-it-works-section
       .container
         .section-head + section-title + section-subtitle
         .how-it-works__inner   (relative — якорь для chevron'ов и deco-карт)
           .how-it-works__cards
             .how-step × 3      (текст с цветными маркерами |...|)
           .how-it-works__chevron × 2  (absolute, между карточками, desktop only)
           .how-it-works__video (poster + play)
           .how-it-works__cta-wrap → .btn--primary
           .how-it-works__deco  (6 absolute таро-карт, выезжают на :hover)

   Hover-анимация: при :hover на .how-it-works__inner таро-карты сдвигаются
   из-за рамки в видимую область с staggered easing.
   ============================================================ */

/* ---------- Section-head локально ---------- */
.how-it-works__head {
  align-items: center;
  text-align: center;
  gap: var(--s-2);
  /* 8 */
  margin-bottom: var(--s-6);
  /* 32 */
}

.how-it-works__title {
  font: var(--t-display-headline);
  color: var(--c-text);
}

.how-it-works__subtitle {
  font: var(--t-body-xl);
  color: var(--c-text-muted);
  max-width: none;
}

/* ---------- Inner (relative-обёртка) ---------- */
.how-it-works__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-6);
  /* 32 — между cards / video / cta */
}

/* ---------- Cards row ---------- */
.how-it-works__cards {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: var(--s-4);
  /* 16 */
  width: 100%;
}

.how-step {
  flex: 1 1 0;
  min-width: 0;
  min-height: 184px;
  padding: var(--s-6) var(--s-7);
  /* 32 / 48 desktop — по тексту */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--c-card-divider);
  /* rgba(170,38,146,0.1) */
  border-radius: var(--r-lg);
  /* 24 */
  position: relative;
  /* overflow: clip — декор позиционируется с отрицательными смещениями
     и заходит за края карточки, но визуально обрезается её рамкой.
     Так получаем «часть фигуры в углу», без видимых выпираний наружу. */
  overflow: clip;
}

.how-step__body {
  font: var(--t-body-base);
  color: var(--c-text);
  position: relative;
  z-index: 2;
  /* поверх декора */
}

/* ---------- Per-card decoration (constellation / planets / compass) ----------
   inlineSvg-фильтр снимает width/height у <svg> — задаём размер контейнеру по
   реальному viewBox-у Figma, чтобы SVG не растягивался до 300×150 (default).
   Декор всегда виден (часть default-состояния по Figma). На :hover — мягкое
   оживление через transform. */
.how-step__decor {
  position: absolute;
  display: block;
  pointer-events: none;
  z-index: 1;
  transition: transform 600ms ease-out;
}

.how-step__decor svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Декор частично выходит за карточку (overflow:visible на .how-step).
   Отрицательные смещения вынимают часть фигуры наружу — так текст
   внутри padding-зоны не пересекается с декором, а сама карточка
   остаётся компактной по высоте текста. */
/* Card 1 — constellation 114×89, нижний-правый, выпирает на 24px вправо/вниз */
.how-step__decor--1 {
  width: 114px;
  height: 89px;
  right: -24px;
  bottom: -24px;
}

/* Card 2 — planets 130×88, нижний-левый, выпирает на 30px влево/24px вниз */
.how-step__decor--2 {
  width: 130px;
  height: 88px;
  left: -30px;
  bottom: -24px;
}

/* Card 3 — compass 100×100, нижний-правый, выпирает на 24px вправо/вниз */
.how-step__decor--3 {
  width: 100px;
  height: 100px;
  right: -24px;
  bottom: -24px;
}

/* Hover секции — мягкое оживление: constellations поднимаются, compass крутится */
.how-it-works__inner:hover .how-step__decor--1 {
  transform: translateY(-4px);
}

.how-it-works__inner:hover .how-step__decor--2 {
  transform: translateY(-3px) translateX(2px);
}

.how-it-works__inner:hover .how-step__decor--3 {
  transform: rotate(15deg);
}

/* Маркер выделенных слов <mark> — magenta-плашка с белым текстом.
   Селектор через вложение: тег без класса, чтобы редактор админки мог
   ставить <mark> стандартной кнопкой; стиль локально привязан к секции.
   box-decoration-break: clone — padding+radius применяются к каждой строке при wrap. */
.how-step__body mark {
  background: var(--c-magenta);
  color: #fff;
  padding: 0 var(--s-1);
  /* 0 / 4 */
  border-radius: 3px;
  /* literal — Figma 3px */
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- Chevron-pills (desktop only) ---------- */
.how-it-works__chevron {
  position: absolute;
  top: 92px;
  /* верт. центр карточки 184/2 */
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--c-magenta-tint-20);
  border-radius: var(--r-pill);
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.15));
  /* shadow-elev-1 */
  color: var(--c-text);
  cursor: default;
  pointer-events: none;
  /* декоративные, не кликабельные */
  z-index: 2;
}

.how-it-works__chevron svg {
  width: 24px;
  height: 24px;
}

/* Позиции между cards (cards row 33%/66% при flex 1:1:1 + gap 16) */
.how-it-works__chevron--1 {
  left: 33.333%;
}

.how-it-works__chevron--2 {
  left: 66.666%;
}

/* ---------- Video (300×164 mobile, 600×330 desktop) ---------- */
.how-it-works__video {
  position: relative;
  width: 100%;
  max-width: 600px;
  aspect-ratio: 600 / 330;
  border-radius: var(--r-2xl);
  /* 48 */
  overflow: hidden;
  background: var(--c-pink-softer);
  /* Видео всегда поверх deco-карт (deco z-index: 5 ниже).
     Изначально дека была ВЫШЕ — этот контракт сменили: видео — primary content,
     карты — атмосферный фон, не должны перекрывать видео. */
  z-index: 6;
}

.how-it-works__video-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Play-кнопка поверх video-poster: красный round-rect с белым треугольником.
   Иконка — ICONS.play (один источник, см. icons.js), вставляется через
   data-icon="play" в main.js. Цвет белый через color → currentColor в SVG. */
.how-it-works__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 64px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-video-play, #ff0000);
  /* YouTube-style красный для play-кнопки видео-плеера */
  color: #fff;
  border: 0;
  border-radius: var(--r-xs);
  /* 12 */
  cursor: pointer;
  transition: transform .15s ease;
}

.how-it-works__play:hover {
  transform: scale(1.06);
}

.how-it-works__play svg {
  width: 18px;
  height: 22px;
  display: block;
}

/* ---------- CTA wrap ---------- */
.how-it-works__cta-wrap {
  display: flex;
  justify-content: center;
}

.how-it-works__cta {
  width: 300px;
}

/* десктопный фикс — Figma 300×72 */

/* ============================================================
   DECO — 10 декоративных таро-карт по Figma 201:76971.
   5 слева + 5 справа, шахматный паттерн в 3 столбца. Появляются
   сверху-вниз (translateY) с opacity fade-in на :hover .how-it-works__inner.
   z-index выше .how-it-works__video — карты залезают на видео и CTA.
   На mobile скрыты.

   Координаты top — относительно .how-it-works__inner (из Figma frame
   1328×882: top карты минус ~160px на title-блок и gap до __inner).
   Размер карты 96×154, поворот ±15deg (--rot).
   ============================================================ */
.how-it-works__deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  /* над video / cta */

  /* Fluid scaling 960 → 1440. Без media-queries — линейная интерполяция
     каждой координаты и размеров карт. На 960 значения = бывшего «компакта»
     (80×128, верх 206, …), на 1440 = бывшего «full» (96×154, верх 248, …).
     На <960 секция .how-it-works__deco скрыта через @media ниже.

     Формула: slope = (max−min)/(1440−960)*100 [vw]; intercept = min − 960*slope/100. */
  --deco-w: clamp(80px, 3.33vw + 48px, 96px);
  --deco-h: clamp(128px, 5.42vw + 76px, 154px);
  --deco-row-1: clamp(206px, 8.75vw + 122px, 248px);
  /* верхний ряд (pos-1, pos-8) */
  --deco-row-2: clamp(274px, 11.88vw + 160px, 331px);
  /* второй (pos-2, pos-7) */
  --deco-row-3: clamp(343px, 14.79vw + 201px, 414px);
  /* центральный (pos-3,4,6,9) */
  --deco-row-4: clamp(412px, 17.71vw + 242px, 497px);
  /* нижний (pos-5, pos-10) */
  --deco-col-edge: clamp(8px, 0.83vw + 0px, 12px);
  /* у самого края секции */
  --deco-col-mid: clamp(96px, 5vw + 48px, 120px);
  /* средняя дистанция */
  --deco-col-far: clamp(184px, 9.17vw + 96px, 228px);
  /* далеко от края (pos-4, pos-6) */
}

.how-deco-card {
  position: absolute;
  width: var(--deco-w);
  height: var(--deco-h);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-card);
  opacity: 0;
  /* default: невидима + чуть выше финала */
  transform: translateY(-40px) rotate(var(--rot, 0deg));
  transition:
    opacity 600ms ease,
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Hover секции — карты опускаются на места и проявляются */
.how-it-works__inner:hover .how-deco-card {
  opacity: 1;
  transform: translateY(0) rotate(var(--rot, 0deg));
}

/* ----- LEFT side (--rot: -15deg) ----- */
.how-deco-card--pos-1 {
  --rot: -15deg;
  top: var(--deco-row-1);
  left: var(--deco-col-edge);
  transition-delay: 160ms;
}

.how-deco-card--pos-2 {
  --rot: -15deg;
  top: var(--deco-row-2);
  left: var(--deco-col-mid);
  transition-delay: 80ms;
}

.how-deco-card--pos-3 {
  --rot: -15deg;
  top: var(--deco-row-3);
  left: var(--deco-col-edge);
  transition-delay: 160ms;
}

.how-deco-card--pos-4 {
  --rot: -15deg;
  top: var(--deco-row-3);
  left: var(--deco-col-far);
  transition-delay: 0ms;
}

.how-deco-card--pos-5 {
  --rot: -15deg;
  top: var(--deco-row-4);
  left: var(--deco-col-mid);
  transition-delay: 80ms;
}

/* ----- RIGHT side (--rot: +15deg) ----- */
.how-deco-card--pos-6 {
  --rot: 15deg;
  top: var(--deco-row-3);
  right: var(--deco-col-far);
  transition-delay: 0ms;
}

.how-deco-card--pos-7 {
  --rot: 15deg;
  top: var(--deco-row-2);
  right: var(--deco-col-mid);
  transition-delay: 80ms;
}

.how-deco-card--pos-8 {
  --rot: 15deg;
  top: var(--deco-row-1);
  right: var(--deco-col-edge);
  transition-delay: 160ms;
}

.how-deco-card--pos-9 {
  --rot: 15deg;
  top: var(--deco-row-3);
  right: var(--deco-col-edge);
  transition-delay: 160ms;
}

.how-deco-card--pos-10 {
  --rot: 15deg;
  top: var(--deco-row-4);
  right: var(--deco-col-mid);
  transition-delay: 80ms;
}

/* ============================================================
   MOBILE/TABLET (≤959) — column stack, без chevron'ов и deco-карт.
   Граница 960 по проектной конвенции (см. comments.md).
   ============================================================ */
@media (max-width: 959px) {
  .how-it-works__head {
    margin-bottom: var(--s-4);
  }

  /* 16 */
  .how-it-works__title {
    font-size: 28px;
    line-height: var(--lh-xl);
  }

  /* off-scale 28 */
  .how-it-works__subtitle {
    font: var(--t-body-base-medium);
  }

  .how-it-works__inner {
    gap: var(--s-4);
  }

  /* 16 mobile */

  .how-it-works__cards {
    flex-direction: column;
    gap: var(--s-4);
  }

  .how-step {
    min-height: auto;
    padding: var(--s-6) var(--s-5);
    /* 32 / 24 — по тексту */
  }

  .how-it-works__chevron {
    display: none;
  }

  .how-it-works__video {
    max-width: 100%;
    border-radius: var(--r-lg);
    /* 24 mobile */
  }

  .how-it-works__play {
    width: 48px;
    height: 32px;
  }

  .how-it-works__play svg {
    width: 14px;
    height: 18px;
  }

  .how-it-works__cta {
    width: 100%;
  }

  .how-it-works__deco {
    display: none;
  }
}

/* ============================================================
   SECTION — С чем помогут тарологи (Figma 195:76707 desktop, 74:3725 mobile).

   Десктоп:
     [photo-deco-left] [main center] [photo-deco-right]
     Фото абсолютно позиционированы по сторонам .spheres__inner;
     по умолчанию они выехали наружу и повёрнуты на ±60°. На :hover .spheres__inner
     возвращаются на финальные позиции с rotate ±15°/±10° (Figma Variant2).

   Мобилка:
     [2 фото статичной строкой]
     [tabs горизонтальный скроллер]
     [questions панель]
     [CTA full-width]

   Активный таб — bg magenta + text white. Вокруг табов маска
   (gradient-fade с обоих краёв) для эффекта переполнения.
   ============================================================ */

/* ---------- Section head ---------- */
.spheres__head {
  align-items: center;
  text-align: center;
  gap: var(--s-2);
  /* 8 */
  margin-bottom: var(--s-6);
  /* 32 */
}

.spheres__subtitle {
  max-width: none;
}

/* ---------- Inner-обёртка ----------
   На mobile — column-стек (photos-row сверху, main под ним).
   На desktop — flex-row с одним child (.spheres__main, фото абсолютно поверх). */
.spheres__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-4);
  /* 16 — между photos-row и main */
}

/* ---------- Main center column ---------- */
.spheres__main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-6);
  /* 32 desktop */
  width: 100%;
  max-width: 600px;
}

/* ============================================================
   TABS — горизонтальный скроллер с маской по краям.
   Активный — magenta bg + white text + увеличенный horizontal padding.
   ============================================================ */
.spheres__tabs-wrap {
  position: relative;
  width: 100%;
  max-width: 600px;
}

/* Mask-края — gradient white→transparent (мобайл/десктоп — тот же эффект) */
.spheres__tabs-wrap::before,
.spheres__tabs-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 64px;
  pointer-events: none;
  z-index: 1;
}

.spheres__tabs-wrap::before {
  left: 0;
  background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
}

.spheres__tabs-wrap::after {
  right: 0;
  background: linear-gradient(to left, #fff, rgba(255, 255, 255, 0));
}

/* Viewport — обрезает то, что не влезло, и под маску по краям */
.spheres__tabs {
  overflow: hidden;
  padding: 0;
}

/* Track — едет через --shift (translateX). Центровку активного таба считает JS.
   .is-no-transition — флаг для silent-reset (перепрыг между копиями без анимации). */
.spheres__tabs-track {
  display: inline-flex;
  gap: var(--s-4);
  /* 16 */
  align-items: flex-start;
  transform: translateX(var(--shift, 0));
  transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.spheres__tabs-track.is-no-transition,
.spheres__tabs-track.is-no-transition .spheres__tab {
  transition: none;
  /* при silent-reset гасим и cf-fade самих табов */
}

/* Все табы — одинаковый размер (10/16). Только background+color меняются на is-active.
   Так ширина таба стабильна → центровка через --shift не «дёргается» при переключении.
   В Figma активный шире на ~12px, но из-за нестабильности этот overhead того не стоит. */
.spheres__tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 10px 16px;
  /* фикс для всех */
  background: #fff;
  border: 0;
  border-radius: var(--r-md);
  /* 16 */
  font: var(--t-body-sm-medium-on-snug);
  color: var(--c-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background .25s ease, color .25s ease;
}

.spheres__tab:hover {
  color: var(--c-text);
}

.spheres__tab.is-active {
  background: var(--c-magenta);
  color: #fff;
}

/* ============================================================
   QUESTIONS PANEL
   ============================================================ */
.spheres__panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 22px;
  /* literal — Figma */
  padding: var(--s-6) var(--s-7);
  /* 32 / 48 desktop */
  background: var(--c-magenta-tint-5);
  border-radius: var(--r-lg);
  /* 24 */
  /* Анимация смены активной темы: out (slide-up + fade), swap, in. JS toggle .is-changing. */
  transition: opacity 200ms ease, transform 200ms ease;
}

.spheres__panel.is-changing {
  opacity: 0;
  transform: translateY(10px);
}

.spheres__question {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  /* 8 */
}

.spheres__question-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--c-magenta);
}

.spheres__question-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.spheres__question-text {
  font: var(--t-display-lg-on-xl);
  color: var(--c-text);
  text-align: left;
}

/* ---------- CTA ---------- */
.spheres__cta {
  width: 300px;
  /* Figma desktop */
}

/* ============================================================
   PHOTOS — общий стиль всех фото (mobile-row + desktop-deco)
   ============================================================ */
.spheres-photo {
  position: relative;
  width: 174px;
  height: 174px;
  background: var(--c-hero-bg);
  /* плейсхолдер на случай 404 */
  overflow: hidden;
}

/* <img> внутри — заполняет всю карточку, режется по border-radius родителя */
.spheres-photo__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Левая сторона — закругление с малым углом справа-снизу */
.spheres-photo--left-1,
.spheres-photo--left-2,
.spheres-photo--mobile-left {
  border-radius: 64px 64px 16px 64px;
  /* tl tr br bl */
}

/* Правая сторона — зеркально (малый угол слева-снизу) */
.spheres-photo--right-1,
.spheres-photo--right-2,
.spheres-photo--mobile-right {
  border-radius: 64px 64px 64px 16px;
}

/* Имя на фото — gradient-плашка снизу */
.spheres-photo__name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--s-2);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 60px;
  font: var(--t-body-base-medium);
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
}

/* Источники фото живут в DATA.spheresPhotos[*].src и рендерятся через
   <img> внутри .spheres-photo (см. TPL.spherePhoto). Раньше тут были
   background-image — убрано, чтобы пути были в одном месте (data). */

/* ============================================================
   MOBILE photos row — 2 фото статичной строкой (Figma 74:3729 / 74:3725).
   Pixel-perfect на 360: photo 174, row 203, оба фото центрированы с overlap
   27px (бокс-разница 360 vs Figma 213-bbox-каждое слева/справа = 66 visual,
   что даёт центры на 106.5 и 253.5 — повторяем через flex+negative margin).
   Fluid 360 → 959: photo 174 → 260, row 203 → 304.
     slope width  = (260-174)/(959-360)*100 = 14.36vw
     slope height = (304-203)/(959-360)*100 = 16.86vw
   На desktop (≥960) весь блок display:none.
   ============================================================ */
.spheres__photos-row {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: clamp(203px, 142.30px + 16.86vw, 304px);
}

.spheres-photo--mobile-left,
.spheres-photo--mobile-right {
  width: clamp(174px, 122.32px + 14.36vw, 260px);
  height: clamp(174px, 122.32px + 14.36vw, 260px);
  flex-shrink: 0;
}

.spheres-photo--mobile-left {
  transform: rotate(-15deg);
}

.spheres-photo--mobile-right {
  transform: rotate(15deg);
  /* Negative margin-left = overlap. На 360 overlap=27 → центры фото
     совпадают с Figma 74:3725 (106.5 и 253.5 от левого края row). */
  margin-left: -27px;
}

/* ============================================================
   DESKTOP photos deco — 4 фото, fly-in на :hover .spheres__inner.
   На mobile скрыта (display:none).
   ============================================================ */
.spheres__photos-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: none;
  /* desktop: показать */
  /* Изначально было z-index:5 (поверх panel'и) — пересмотрено:
     фото — атмосферный декор, не должны перекрывать главный контент.
     z-index не задаём, .spheres__main с position:relative+z-index:1
     рендерится поверх (см. desktop @media ниже). */
}

.spheres__photos-deco .spheres-photo {
  position: absolute;
  opacity: 0;
  /* Дефолт: повёрнут на ±60° и сдвинут наружу секции */
  transition:
    opacity 600ms ease,
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ----- Финальные позиции (после :hover .spheres__inner) -----
   Координаты по Figma Variant2 (195:76710):
     LEFT col 174-wide:   left=-9.55 / -3.79 (фактически off-edge slightly)
                          top=-9.55 (over top edge) / 202.21 (lower row)
     RIGHT col 174-wide:  left=-29.55 / -23.79 in container coords
                          top=-9.55 / 202.21
   Высота .spheres__inner ≈ height of __main (panel ~280 + tabs 38 + cta 72 + 2*32 gap ~ 450).
   Выставляем top px — 0 для верхних, 220 для нижних, и сдвиг по X через right/left = 0..−10.
*/
.spheres-photo--left-1 {
  left: 0;
  top: 0;
  transform: rotate(-15deg) translateX(-280px) rotate(45deg);
}

.spheres-photo--left-2 {
  left: 10px;
  top: 220px;
  transform: rotate(-10deg) translateX(-280px) rotate(50deg);
}

.spheres-photo--right-1 {
  right: 0;
  top: 0;
  transform: rotate(15deg) translateX(280px) rotate(-45deg);
}

.spheres-photo--right-2 {
  right: 10px;
  top: 220px;
  transform: rotate(10deg) translateX(280px) rotate(-50deg);
}

/* Hover секции — фото возвращаются на финальные позиции */
.spheres__inner:hover .spheres-photo--left-1 {
  opacity: 1;
  transform: rotate(-15deg);
  transition-delay: 0ms, 0ms;
}

.spheres__inner:hover .spheres-photo--left-2 {
  opacity: 1;
  transform: rotate(-10deg);
  transition-delay: 100ms, 100ms;
}

.spheres__inner:hover .spheres-photo--right-1 {
  opacity: 1;
  transform: rotate(15deg);
  transition-delay: 50ms, 50ms;
}

.spheres__inner:hover .spheres-photo--right-2 {
  opacity: 1;
  transform: rotate(10deg);
  transition-delay: 150ms, 150ms;
}

/* ============================================================
   DESKTOP (≥960) — Figma 195:76707 layout (по проектной конвенции 430/960).
   .spheres__main получает position:relative + z-index:1, чтобы рендериться
   поверх .spheres__photos-deco (фото — атмосферный декор позади контента).
   ============================================================ */
@media (min-width: 960px) {
  .spheres__inner {
    flex-direction: row;
    /* возврат к row */
    justify-content: center;
    gap: 0;
    min-height: 480px;
    /* запас под фото-deco */
  }

  .spheres__photos-row {
    display: none;
  }

  /* мобильная строка скрыта */
  .spheres__photos-deco {
    display: block;
  }

  /* desktop: фото видимы */
  .spheres__main {
    position: relative;
    z-index: 1;
  }

  /* поверх deco-фото */
}

/* ============================================================
   MOBILE/TABLET (≤959) — column-стек, full-width main.
   Photos-row сверху (перед main) — точно по Figma 74:3725.
   ============================================================ */
@media (max-width: 959px) {
  .spheres__main {
    width: 100%;
    max-width: none;
    gap: var(--s-4);
    /* 16 */
  }

  .spheres__tabs-wrap {
    max-width: none;
  }

  .spheres__panel {
    padding: var(--s-5) var(--s-4);
    /* 24 / 16 */
  }

  .spheres__cta {
    width: 100%;
    height: 56px;
  }

  .spheres__head {
    margin-bottom: var(--s-4);
  }

  /* 16 — было @768 */
}

/* ============================================================
   SECTION — Попробуйте бесплатную консультацию (Figma 195:76855 / 74:3759)

   Mobile (≤ tablet, наследуется): 2 cols × 5 rows, шахматный паттерн.
     col1: card1 num | desc1
     col1: desc2     | card2 num
     col1: card3 num | desc3
     col1: desc4     | card4 num
     CTA на 2 cols
     Без hover-анимации.

   Desktop (≥960): 5 cols × 2 rows. Numbered-карточки на default уехали:
     - col 1, 3, 5 (нечётные) — за верхнюю кромку (translateY(-115%))
     - col 2, 4 (чётные)      — за нижнюю кромку (translateY(115%))
     На :hover .free-steps__grid — все на местах.
     desc-карточки и CTA — статичные, всегда видны.
   ============================================================ */

/* ---------- Section head ---------- */
.free-steps__head {
  align-items: center;
  text-align: center;
  gap: var(--s-2);
  /* 8 */
  margin-bottom: var(--s-6);
  /* 32 */
}

/* ---------- Grid (mobile-first) ---------- */
.free-steps__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-2);
  width: 100%;
}

/* ============================================================
   CARD — общий стиль (numbered / desc / cta)
   ============================================================ */
.free-step-card {
  position: relative;
  border-radius: var(--r-lg);
  /* 24 */
  padding: var(--s-4);
  /* 16 mobile */
  height: 200px;
  box-sizing: border-box;
  overflow: hidden;
}

/* numbered — magenta-tinted bg, цифра + заголовок (Philosopher) */
.free-step-card--num {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: var(--s-2);
  /* 8 */
  background: var(--c-magenta-tint-5);
  /* font задаётся явно на детях __num и __title (Philosopher Bold), наследование не нужно */
}

/* Шрифты текущей секции — ОДИН fluid-clamp на ВСЕ диапазоны (320 → 1440).
   Не делим на mobile/desktop отдельно — иначе на узком desktop (960-1100,
   когда 5 cols × 2 rows уже активны но карточки ещё узкие) шрифты остаются
   на desktop-максимуме и текст вылезает. Линейная интерполяция:
     320 → mobile-min / 1440 → desktop-max
     slope = (max-min)/(1440-320)*100, intercept = min - 320*slope/100
   На desktop @media НИЧЕГО не переопределяем. */
.free-step-card__num {
  font: var(--t-free-themes-num);
  color: var(--c-magenta-tint-20);
  white-space: nowrap;
}

.free-step-card__title {
  font: var(--t-free-themes-title);
  color: var(--c-text);
  word-break: break-word;
  /* длинные слова разбиваются */
  hyphens: auto;
}

/* desc — серый bg, обычный текст */
.free-step-card--desc {
  display: flex;
  align-items: center;
  background: var(--c-text-tint-5);
}

.free-step-card__desc {
  font: var(--t-free-themes-desc);
  color: var(--c-text);
  margin: 0;
}

/* CTA — gradient pill (по правилам кнопок) */
.free-step-card--cta {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--c-magenta-border);
  border-radius: var(--r-pill);
  /* pill */
  background: linear-gradient(86deg, var(--c-purple-deep) 21.5%, var(--c-magenta) 99%);
  box-shadow: var(--inset-glow);
  color: #fff;
  font: var(--t-body-sm-strong);
  height: 56px;
  /* mobile CTA — стандарт */
  padding: var(--s-4) var(--s-3);
}

.free-step-card--cta:hover {
  opacity: 0.95;
}

/* ============================================================
   MOBILE GRID-AREAS (2 cols × 5 rows, шахматный паттерн)
   Per Figma 74:3759: 4 numbered + 4 desc + CTA на 2 cols. 5-й шаг
   на mobile НЕ показываем — col-5 num спрятан, его место в row 5
   занимает CTA (full-width).
   ============================================================ */
.free-step-card--col-1.free-step-card--num {
  grid-column: 1;
  grid-row: 1;
}

.free-step-card--col-1.free-step-card--desc {
  grid-column: 2;
  grid-row: 1;
}

.free-step-card--col-2.free-step-card--desc {
  grid-column: 1;
  grid-row: 2;
}

.free-step-card--col-2.free-step-card--num {
  grid-column: 2;
  grid-row: 2;
}

.free-step-card--col-3.free-step-card--num {
  grid-column: 1;
  grid-row: 3;
}

.free-step-card--col-3.free-step-card--desc {
  grid-column: 2;
  grid-row: 3;
}

.free-step-card--col-4.free-step-card--desc {
  grid-column: 1;
  grid-row: 4;
}

.free-step-card--col-4.free-step-card--num {
  grid-column: 2;
  grid-row: 4;
}

.free-step-card--col-5.free-step-card--num {
  display: none;
}

/* 5-й шаг скрыт на mobile (Figma 74:3759) */
.free-step-card--col-5.free-step-card--cta {
  grid-column: 1 / span 2;
  grid-row: 5;
}

/* CTA на всю ширину в row 5 */

/* ============================================================
   DESKTOP (≥960px) — 5 cols × 2 rows + hover-анимация
   ============================================================ */
@media (min-width: 960px) {
  .free-steps__grid {
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: 200px 200px;
    gap: var(--s-2);
    overflow: clip;
    /* обрезаем уехавшие numbered */
  }

  .free-step-card {
    padding: var(--s-5);
    /* 24 desktop */
  }

  /* Шрифты НЕ переопределяем — работает базовый fluid clamp (320 → 1440). */
  .free-step-card--col-5.free-step-card--num {
    display: flex;
  }

  /* возвращаем 5-й шаг на desktop */

  .free-step-card--cta {
    height: 100%;
    /* full cell — 200h */
    font: var(--t-body-base-strong);
    /* 16/24 Semibold desktop */
  }

  /* Раскладка по grid-area (5×2) — переопределяем mobile-areas */
  .free-step-card--col-1.free-step-card--num {
    grid-column: 1;
    grid-row: 1;
  }

  .free-step-card--col-1.free-step-card--desc {
    grid-column: 1;
    grid-row: 2;
  }

  .free-step-card--col-2.free-step-card--desc {
    grid-column: 2;
    grid-row: 1;
  }

  .free-step-card--col-2.free-step-card--num {
    grid-column: 2;
    grid-row: 2;
  }

  .free-step-card--col-3.free-step-card--num {
    grid-column: 3;
    grid-row: 1;
  }

  .free-step-card--col-3.free-step-card--desc {
    grid-column: 3;
    grid-row: 2;
  }

  .free-step-card--col-4.free-step-card--desc {
    grid-column: 4;
    grid-row: 1;
  }

  .free-step-card--col-4.free-step-card--num {
    grid-column: 4;
    grid-row: 2;
  }

  .free-step-card--col-5.free-step-card--num {
    grid-column: 5;
    grid-row: 1;
  }

  .free-step-card--col-5.free-step-card--cta {
    grid-column: 5;
    grid-row: 2;
  }

  /* Анимация fly-in: numbered-карточки по умолчанию уехали за кромку.
     Триггер — класс .is-visible на .free-steps__grid, который ставит
     IntersectionObserver (см. components/free-steps.js) когда блок попадает
     в центральные 60% viewport'а. Срабатывает один раз. */
  .free-step-card--num {
    opacity: 0;
    transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1), opacity 500ms ease;
  }

  /* col 1, 3, 5 — в row 1, уехали вверх */
  .free-step-card--col-1.free-step-card--num,
  .free-step-card--col-3.free-step-card--num,
  .free-step-card--col-5.free-step-card--num {
    transform: translateY(-115%);
  }

  /* col 2, 4 — в row 2, уехали вниз */
  .free-step-card--col-2.free-step-card--num,
  .free-step-card--col-4.free-step-card--num {
    transform: translateY(115%);
  }

  /* .is-visible → numbered возвращаются */
  .free-steps__grid.is-visible .free-step-card--num {
    opacity: 1;
    transform: translateY(0);
  }

  /* Stagger: 1, 2, 3, 4, 5 последовательно */
  .free-steps__grid.is-visible .free-step-card--col-1.free-step-card--num {
    transition-delay: 0ms, 0ms;
  }

  .free-steps__grid.is-visible .free-step-card--col-2.free-step-card--num {
    transition-delay: 80ms, 80ms;
  }

  .free-steps__grid.is-visible .free-step-card--col-3.free-step-card--num {
    transition-delay: 160ms, 160ms;
  }

  .free-steps__grid.is-visible .free-step-card--col-4.free-step-card--num {
    transition-delay: 240ms, 240ms;
  }

  .free-steps__grid.is-visible .free-step-card--col-5.free-step-card--num {
    transition-delay: 320ms, 320ms;
  }
}

/* ============================================================
   SECTION — Наши эксперты (видеооткрытки) — Figma 66:1882 / 74:3771

   Native scroll-snap движок. Без внешних библиотек, без inline-стилей
   (управление состоянием через classList + .scrollLeft property —
   полностью соответствует comments.md п.2).

   Структура layout:
     • .video-experts__viewport — relative-якорь absolute-стрелок,
       обычная ширина (внутри .container content).
     • .video-experts__list — scrollable track, full-bleed (100vw) —
       выходит за пределы .container до краёв viewport через width:100vw
       + margin-inline: calc(50% - 50vw). Глобальный body{overflow-x:clip}
       в base.css страхует страницу от горизонтального scrollbar.
     • .video-experts__slide — slot 240×400. Карточка .video-card
       внутри default 224×360, растёт до 240×400 при .is-active.

   Активные классы:
     • .video-experts__list.is-fits — все слайды помещаются;
       центрирование, стрелки скрыты (display:none через :has()).
     • .video-experts__list.is-dragging — пользователь тащит мышью.
     • .video-experts__arrow.is-disabled — нет куда листать в эту сторону
       (на старте/конце скролла); opacity 0.35, pointer-events: none.
     • .video-card.is-active — открытая карточка (рост + controls).

   Управление в components/video-experts.js.
   ============================================================ */
/* .video-experts-section — намеренно без overflow-x: clip — track использует
   width: 100vw, и страховку обеспечивает глобальный body{overflow-x:clip} в base.css. */

/* ---------- Section head ---------- */
.video-experts__head {
  align-items: center;
  text-align: center;
  gap: var(--s-2);
  /* 8 */
  margin-bottom: var(--s-6);
  /* 32 */
}

/* ============================================================
   VIEWPORT — relative-якорь absolute-стрелок. Сидит внутри
   .container content (НЕ full-bleed — стрелки позиционируются
   относительно него, должны быть в пределах содержимого).
   ============================================================ */
.video-experts__viewport {
  position: relative;
}

/* ============================================================
   TRACK — sсrollable горизонтальная лента, full-bleed на viewport.

   width: 100vw + margin: 50% - 50vw — гарантированно полная ширина
   viewport на любом vp, на любой вложенности (формула работает даже
   внутри .container с padding).

   padding-inline = max(clamp 16..56, (100vw - 1328) / 2):
     • на vp ≤ 1440 → clamp 16..56 (gutter container'а);
     • на vp > 1440 → (100vw - 1328) / 2 (содержимое визуально занимает
       ровно ту же позицию что и .container.content).

   scroll-padding-inline = тот же max — без него mandatory-snap при
   загрузке сдвинул бы scrollLeft с 0 на padding-left (доскрол).
   С proximity snap'ом тоже не лишний — для arrow-кликов snap по слайдам.

   padding-block: 60 + margin-block: -60 — БУФЕР под box-shadow
   карточки (overflow-x:auto на одной оси автоматически клипит и
   по второй из-за CSS-quirk; padding-edge сдвигает клип наружу,
   margin-block компенсирует визуальную высоту в layout).
   ============================================================ */
.video-experts__list {
  display: flex;
  gap: var(--s-4);
  /* 16 */
  list-style: none;
  align-items: center;

  width: 100vw;
  margin-inline: calc(50% - 50vw);
  padding-inline: max(clamp(16px, 3.7vw + 2.67px, 56px), calc((100vw - var(--container)) / 2));
  scroll-padding-inline: max(clamp(16px, 3.7vw + 2.67px, 56px), calc((100vw - var(--container)) / 2));

  padding-block: 60px;
  /* off-scale — buffer для box-shadow карточки */
  margin-block: -60px;
  /* off-scale — компенсация padding-block */

  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;

  cursor: grab;
  user-select: none;
}

.video-experts__list::-webkit-scrollbar {
  display: none;
}

.video-experts__list.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

/* IS-FITS: все слайды помещаются — отключаем скролл, центрируем.
   Padding-inline убираем чтобы justify-content: center работал. */
.video-experts__list.is-fits {
  overflow: visible;
  scroll-snap-type: none;
  justify-content: center;
  padding-inline: 0;
  cursor: default;
}

/* ============================================================
   SLIDE — slot 240×400 (видеокарточка default 224×360 центрируется
   внутри, при .is-active растёт до 240×400 — соседи не двигаются).
   ============================================================ */
.video-experts__slide {
  flex: 0 0 240px;
  width: 240px;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  overflow: visible;
}

/* ============================================================
   VIDEO CARD — фото + либо PLAY (default), либо CONTROLS (active).
   ============================================================ */
.video-card {
  position: relative;
  width: 224px;
  height: 360px;
  border-radius: var(--r-md);
  /* 16 */
  overflow: hidden;
  background: var(--c-hero-bg);
  /* #c67070 — fallback под фото */
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition:
    width 350ms cubic-bezier(0.22, 1, 0.36, 1),
    height 350ms cubic-bezier(0.22, 1, 0.36, 1);
}

.video-card__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* PLAY — белый круг с magenta ▶ по центру (default state) */
.video-card__play {
  position: absolute;
  left: 50%;
  top: calc(50% - 9px);
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--c-magenta);
  cursor: pointer;
  z-index: 2;
  transition: transform .15s ease, background .15s ease;
}

.video-card__play svg {
  width: 14px;
  height: 14px;
  transform: translateX(1px);
}

/* CONTROLS (× + mute) — top-right, видны в .is-active */
.video-card__controls {
  position: absolute;
  top: var(--s-2);
  right: var(--s-2);
  display: none;
  flex-direction: column;
  gap: var(--s-2);
  z-index: 2;
}

.video-card__ctrl {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--c-text);
  cursor: pointer;
  transition: background .15s ease;
}

.video-card__ctrl:hover {
  background: var(--c-pink-soft);
}

.video-card__ctrl svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* Active-стейт: рост карточки до полного слота + смена play на controls */
.video-card.is-active {
  width: 240px;
  height: 400px;
}

.video-card.is-active .video-card__play {
  display: none;
}

.video-card.is-active .video-card__controls {
  display: flex;
}

/* ============================================================
   ARROWS — белый круг 48×48 с тенью, сидят absolute по краям viewport
   (= по краям .container content на узких vp, по краям 1328-content
   на широких — позиция совпадает с gutter'ами остального контента).

   Disabled (atStart/atEnd) — opacity 0.35 + pointer-events: none.
   В .is-fits режиме обе стрелки display:none через :has().
   ============================================================ */
.video-experts__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e5d6e3;
  /* нет токена — pink-border */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  /* off-elev — arrow shadow */
  color: var(--c-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: opacity .2s ease, background .15s ease;
}

.video-experts__arrow:hover {
  background: var(--c-pink-soft);
}

.video-experts__arrow--prev {
  left: 10px;
}

.video-experts__arrow--next {
  right: 10px;
}

.video-experts__arrow svg {
  width: 14px;
  height: 14px;
  display: block;
  color: currentColor;
}

.video-experts__arrow.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* Когда трек is-fits — обе стрелки убираем из layout */
.video-experts__viewport:has(.video-experts__list.is-fits) .video-experts__arrow {
  display: none;
}

/* ---------- CTA wrap ---------- */
.video-experts__cta-wrap {
  display: flex;
  justify-content: center;
  margin-top: var(--s-6);
  /* 32 */
}

.video-experts__cta {
  width: 100%;
  max-width: 300px;
  height: 56px;
}

/* На широком десктопе — увеличиваем CTA до Figma-спеки 300×72 */
@media (min-width: 960px) {
  .video-experts__cta {
    height: 72px;
    font-size: var(--fs-base);
  }
}

/* ============================================================
   SECTION — Строгий отбор экспертов (Figma 72:2190 desktop / 74:3793 mobile)

   Брейкпоинт — CONTAINER QUERY на секции, не viewport @media:
     Desktop (container ≥1080):
       [main column: 3 cards row + summary card]  [featured expert vcard 340×442]
     Mobile/tablet (container <1080):
       Stack:
         intro paragraph
         sub bold
         3 cards (column)
         outro paragraph
       featured expert — скрыт (display: none)
   1080px — минимум, при котором main(3 cards 200+) + featured 340 + gap 32
   укладываются без коллапсирования заголовков карточек.
   ============================================================ */
.strict-section {
  container-type: inline-size;
}

.strict__head {
  align-items: center;
  text-align: center;
  gap: var(--s-2);
  /* 8 */
  margin-bottom: var(--s-6);
  /* 32 */
}

/* ---------- Layout (mobile-first stack) ---------- */
.strict__layout {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  /* 32 */
}

.strict__main {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 — между блоками внутри main */
}

/* ============================================================
   STRICT CARDS — 3 card stack/row.
   Mobile: column stack, gap 16.
   Desktop: 3-col flex row, gap 16, equal height.
   ============================================================ */
.strict-cards {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 */
  width: 100%;
}

.strict-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  /* 8 mobile */
  padding: var(--s-4);
  /* 16 mobile */
  background: var(--c-text-tint-5);
  border-radius: var(--r-lg);
  /* 24 */
}

.strict-card__head {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  width: 100%;
}

.strict-card__title {
  flex: 1;
  margin: 0;
  font: var(--t-display-lg-bold-on-sm);
  color: var(--c-text);
}

.strict-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  /* mobile */
  height: 32px;
  color: var(--c-magenta);
  flex-shrink: 0;
}

.strict-card__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.strict-card__desc {
  font: var(--t-body-xs-on-snug);
  color: var(--c-text);
  margin: 0;
}

/* ============================================================
   SUMMARY card — desktop-only нижняя карточка с двумя параграфами.
   На mobile скрыта (заменена inline-параграфами .strict__intro).
   ============================================================ */
.strict__summary {
  display: none;
  /* mobile: hidden */
  flex-direction: column;
  gap: var(--s-4);
  /* 16 */
  padding: var(--s-5);
  /* 24 */
  background: var(--c-text-tint-5);
  border-radius: var(--r-lg);
  /* 24 */
}

.strict__summary p {
  font: var(--t-body-base-on-xl);
  color: var(--c-text);
  margin: 0;
}

/* ============================================================
   MOBILE-ONLY intro/outro paragraphs (вне summary card)
   ============================================================ */
.strict__intro {
  font: var(--t-body-sm);
  color: var(--c-text);
  margin: 0;
}

.strict__intro--mobile-bold {
  font: var(--t-body-sm-strong);
}

/* 14/20 Semibold вариант intro */

/* Featured-expert на mobile скрыт */
.strict__featured {
  display: none;
}

/* ============================================================
   DESKTOP (container ≥1080px) — 2-col row, featured справа, summary снизу.

   • align-items: stretch — обе колонки одинаковой высоты (= height featured 442).
   • .strict__summary { flex: 1 } — растягивается на оставшуюся высоту
     после cards row, заполняя пространство до уровня нижней кромки featured.
   • Иконки и заголовки fluid через cqi (% container inline-size) — между
     container 1080 и 1440 размеры линейно растут, без скачков. Принцип:
       cqi = 1% от ширины секции → размер ∝ ширине
     Такой подход дешевле vw, привязан к секции, без зависимости от viewport.
     Формулы линейные: f(w) = a + b*cqi, где a и b подобраны под пограничные
     значения 1080→min, 1440→max.
   ============================================================ */
@container (min-width: 1080px) {
  .strict__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: var(--s-6);
    /* 32 */
    align-items: stretch;
    /* main растёт до высоты featured */
  }

  .strict__main {
    gap: var(--s-4);
  }

  /* 16 */

  /* Summary card flex:1 — растягивается на остаток высоты до 442px featured */
  .strict__summary {
    display: flex;
    flex: 1;
    /* fill remaining */
    justify-content: center;
    /* вертикальное центрирование контента */
  }

  /* На desktop intro/outro mobile-параграфы скрыты — текст в .strict__summary */
  .strict__intro--mobile,
  .strict__intro--mobile-bold {
    display: none;
  }

  /* Cards row 3-col равной высоты */
  .strict-cards {
    flex-direction: row;
    align-items: stretch;
  }

  .strict-card {
    flex: 1 1 0;
    min-width: 0;
    /* Padding fluid 16→24 от 1080 до 1440 контейнера: 16 + 0.74cqi*0.something.
       Линейно: pad(w) = 16 + (24-16)(w-1080)/360 → 8 + 0.74cqi.
       clamp(16, 8px+0.74cqi, 24). */
    padding: clamp(16px, 8px + 0.74cqi, 24px);
    gap: var(--s-3);
    /* 12 — было 16, ужал чуть */
  }

  /* Desktop: head — column (icon сверху, title под ним).
     В DOM title идёт раньше иконки (нужно для mobile-ряда: title слева, icon справа).
     На desktop через `order` ставим icon в начало column-стека. */
  .strict-card__head {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-3);
    /* 12 — было 16 */
  }

  /* Иконка fluid 48→56 (1080→1440). Линейно: 24 + 2.22cqi. */
  .strict-card__icon {
    order: -1;
    width: clamp(48px, 24px + 2.22cqi, 56px);
    height: clamp(48px, 24px + 2.22cqi, 56px);
  }

  /* Заголовок fluid 20→22 (1080→1440). */
  .strict-card__title {
    order: 0;
    font: var(--t-strict-card-title);
  }

  .strict-card__desc {
    font: var(--t-body-sm);
  }

  /* 14/20 desktop */

  /* Featured expert — vertical card 340×442 */
  .strict__featured {
    display: block;
    align-self: start;
  }

  .strict__featured .expert-vcard {
    width: 100%;
    max-width: 340px;
  }
}

/* ============================================================
   SECTION — Как проходит Таро-консультация (Figma 66:2022 / 74:3783)

   Mobile (default): 3 карточки stack column (gap 16). Стрелки между скрыты.
                     В каждой карточке: title слева + icon 32×32 справа в одной
                     строке, desc 12/18 ниже. padding 16, gap 8, radius 24.

   Desktop (≥960):   flex-row gap 16: card → arrow → card → arrow → card.
                     В карточке: column-стек (icon 64×64 → title 24/24 → desc 14/20),
                     padding 24, gap 16. Equal height (flex 1).
                     CTA «Подобрать таролога» 300×72 primary.
   ============================================================ */

.tarot-flow__head {
  align-items: center;
  text-align: center;
  gap: var(--s-2);
  /* 8 */
  margin-bottom: var(--s-6);
  /* 32 */
}

/* ---------- Cards container ---------- */
.tarot-flow__cards {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 */
  width: 100%;
}

/* ============================================================
   CARD — общий стиль (mobile-first)
   ============================================================ */
.tarot-flow-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  /* 8 mobile */
  padding: var(--s-4);
  /* 16 mobile */
  background: var(--c-text-tint-5);
  border-radius: var(--r-lg);
  /* 24 */
}

/* На mobile в карточке title слева + icon справа в одной строке,
   desc — отдельной строкой. Mobile-grid: 2-row × 2-col area-trick. */
.tarot-flow-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "title icon"
    "desc  desc";
  align-items: start;
  column-gap: var(--s-2);
  row-gap: var(--s-2);
}

.tarot-flow-card__icon {
  grid-area: icon;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--c-magenta);
}

.tarot-flow-card__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.tarot-flow-card__title {
  grid-area: title;
  margin: 0;
  font: var(--t-display-lg-bold-on-sm);
  color: var(--c-text);
  align-self: center;
}

.tarot-flow-card__desc {
  grid-area: desc;
  margin: 0;
  font: var(--t-body-xs-on-snug);
  color: var(--c-text);
}

/* ---------- Arrows (mobile: hidden) ---------- */
.tarot-flow__arrow {
  display: none;
}

/* ---------- CTA ---------- */
.tarot-flow__cta-wrap {
  display: flex;
  justify-content: center;
  margin-top: var(--s-4);
  /* 16 mobile */
}

.tarot-flow__cta {
  width: 100%;
  height: 56px;
  /* mobile */
}

/* ============================================================
   DESKTOP (≥960px) — flex-row, arrows visible, full card sizes
   ============================================================ */
@media (min-width: 960px) {
  .tarot-flow__head {
    margin-bottom: var(--s-6);
  }

  .tarot-flow__cards {
    flex-direction: row;
    align-items: stretch;
    gap: var(--s-4);
    /* 16 */
  }

  /* Card — column-стек, icon 64 сверху */
  .tarot-flow-card {
    flex: 1 1 0;
    min-width: 0;
    grid-template-columns: 1fr;
    grid-template-areas:
      "icon"
      "title"
      "desc";
    column-gap: 0;
    row-gap: var(--s-4);
    /* 16 */
    padding: var(--s-5);
    /* 24 */
    align-items: flex-start;
  }

  .tarot-flow-card__icon {
    width: 64px;
    height: 64px;
  }

  .tarot-flow-card__title {
    font: var(--t-display-xl-bold-on-base);
  }

  /* 24/24 Bold desktop */
  .tarot-flow-card__desc {
    font: var(--t-body-sm);
  }

  /* 14/20 desktop */

  /* Arrows (desktop) — magenta-tinted square 56×56 with 24×24 chevron */
  .tarot-flow__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    align-self: center;
    width: 56px;
    height: 56px;
    padding: var(--s-4);
    background: var(--c-card-divider);
    border-radius: var(--r-md);
    /* 16 */
    color: var(--c-text);
  }

  .tarot-flow__arrow svg {
    width: 24px;
    height: 24px;
  }

  /* CTA на desktop — 300×72 primary (Figma) */
  .tarot-flow__cta-wrap {
    margin-top: var(--s-6);
  }

  .tarot-flow__cta {
    width: 300px;
    height: 72px;
  }
}

/* ============================================================
   SECTION — Истории наших клиентов (Figma 72:2262 desktop / 74:3812 mobile)

   ТРИ СОСТОЯНИЯ через container query на .stories__shell. Threshold —
   ширина shell'а (равна .container content width = viewport - padding).

   • Mobile (default, shell <720): column-стек, без bg-shell.
       profile → stats → highlight → Запрос → vcard → Консультация → Результат
       → 2 кнопки stack column (full-width).

   • 2-col (shell 720-1199): «обёртка» (bg + padding + radius), grid 2-col.
       grid-template-areas:
         "main      expert"
         "secondary expert"
     main (profile/stats/highlight/Запрос) над secondary (Консультация/Результат).
     vcard на 2 ряда справа. Левая колонка занимает всю оставшуюся ширину.
     Threshold 720 — минимум, при котором vcard 340 + content 340+ читаются.

   • 3-col (shell ≥1200): grid 3-col по Figma 72:2262.
       grid-template-areas: "main secondary expert"
     main 300w, secondary 1fr (читабельная ~400+ ширина), vcard 340w.
     Threshold 1200 — точка, где secondary получает >=400px (комфорт чтения).

   • Все «крупные» размеры (padding, gap, photo, шрифты) fluid через cqi
     в пределах desktop-диапазона. Без brittle-magic media-queries между.

   highlights над фразами — <mark> с magenta-tint bg.
   ============================================================ */
.stories__shell {
  container-type: inline-size;
}

.stories__head {
  align-items: center;
  text-align: center;
  gap: var(--s-2);
  /* 8 */
  margin-bottom: var(--s-6);
  /* 32 */
}

/* ---------- SHELL — на mobile прозрачный, на desktop card-обёртка ---------- */
.stories__shell {
  background: transparent;
  border-radius: 0;
  padding: 0;
}

/* ---------- Inner (mobile-first column stack) ---------- */
.stories__inner {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 mobile */
  width: 100%;
}

.stories__col {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 */
  min-width: 0;
  /* безопасный flex/grid item */
}

/* ---------- PROFILE (photo + name + age) ---------- */
.stories__profile {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  /* 12 mobile */
  width: 100%;
}

.stories__photo {
  position: relative;
  width: 64px;
  /* mobile */
  height: 64px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  /* 8 mobile */
  overflow: hidden;
  background: var(--c-hero-bg);
}

.stories__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.stories__profile-text {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  /* 4 */
  min-width: 0;
}

.stories__name {
  font: var(--t-body-md-strong-on-xl);
  color: var(--c-text);
}

.stories__age {
  font: var(--t-body-base-on-xl);
  color: var(--c-text);
}

/* ---------- STATS (duration + price) ---------- */
.stories__stats {
  display: flex;
  gap: var(--s-6);
  /* 32 */
  align-items: center;
  flex-wrap: wrap;
}

.stories__stat {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  /* 8 */
  font: var(--t-body-sm);
  color: var(--c-text);
  white-space: nowrap;
}

.stories__stat-icon {
  display: inline-flex;
  width: 16px;
  /* mobile */
  height: 16px;
  color: var(--c-text);
}

.stories__stat-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------- HIGHLIGHT pill ---------- */
.stories__highlight {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  /* 16 */
  padding: var(--s-4);
  /* 16 */
  background: var(--c-card-divider);
  border-radius: var(--r-md);
  /* 16 */
}

.stories__highlight-bar {
  flex-shrink: 0;
  width: 4px;
  align-self: stretch;
  background: var(--c-magenta);
  border-radius: 2px;
  /* off-scale — индикатор-линия */
}

.stories__highlight-text {
  flex: 1;
  font: var(--t-body-sm-medium);
  color: var(--c-magenta);
}

/* ---------- CHUNK (Запрос / Консультация / Результат) ---------- */
.stories__chunk {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  /* 8 mobile */
}

.stories__chunk-title {
  margin: 0;
  font: var(--t-body-md-strong-on-xl);
  color: var(--c-text);
}

.stories__chunk-text {
  margin: 0;
  font: var(--t-body-sm);
  color: var(--c-text);
}

.stories__chunk-text+.stories__chunk-text {
  margin-top: var(--s-2);
}

/* <mark> — magenta-tint bg-выделение */
.stories__chunk-text mark {
  background: var(--c-magenta-tint-20);
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
  /* off-scale — inline highlight */
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- EXPERT vcard col (mobile full-width centered, desktop 340 справа) */
.stories__col--expert .expert-vcard {
  width: 100%;
  max-width: 340px;
  margin-inline: auto;
}

/* ---------- CTA buttons ---------- */
.stories__cta {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 */
  margin-top: var(--s-6);
  /* 32 */
  align-items: stretch;
}

.stories__cta-btn {
  width: 100%;
  height: 56px;
  min-height: 56px;
}

/* ============================================================
   DESKTOP (container ≥720) — 2-col grid + shell-обёртка.
   Все «крупные» размеры (padding, gap, photo, шрифты) fluid
   между container 720 → 1440 через cqi.
   ============================================================ */
@container (min-width: 720px) {

  .stories__shell {
    /* padding 16 → 32: clamp(16px, 2.22cqi, 32px). 2.22cqi = 2.22% от section width.
       720 → 16 (clamp.min cap), 1440 → 32. */
    padding: clamp(16px, 2.22cqi, 32px);
    background: var(--c-text-tint-5);
    /* radius 24 → 48 (3.33cqi) */
    border-radius: clamp(24px, 3.33cqi, 48px);
  }

  .stories__inner {
    display: grid;
    /* Левая колонка минимум 340, чтобы не обрезала мелкий текст;
       правая 340 — Figma vcard. */
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-areas:
      "main      expert"
      "secondary expert";
    /* row 16→32, col 24→50 */
    row-gap: clamp(16px, 2.22cqi, 32px);
    column-gap: clamp(24px, 3.47cqi, 50px);
    align-items: start;
  }

  .stories__col--main {
    grid-area: main;
  }

  .stories__col--secondary {
    grid-area: secondary;
  }

  .stories__col--expert {
    grid-area: expert;
  }

  /* Внутренний gap столбца 16→32 */
  .stories__col {
    gap: clamp(16px, 2.22cqi, 32px);
  }

  /* Profile photo 80 → 96 (8.89cqi tagged-clamp). 64 + 2.22cqi → 80 на 720, 96 на 1440 */
  .stories__photo {
    width: clamp(80px, 64px + 2.22cqi, 96px);
    height: clamp(80px, 64px + 2.22cqi, 96px);
    border-radius: var(--r-xs);
  }

  .stories__profile {
    gap: clamp(12px, 0.56cqi, 16px);
  }

  /* 12→16 */

  /* Stats 14→18, icon 16→24 */
  .stories__stat {
    font: var(--t-stories-stat);
  }

  .stories__stat-icon {
    width: clamp(16px, 8px + 1.11cqi, 24px);
    height: clamp(16px, 8px + 1.11cqi, 24px);
  }

  /* Highlight 14→16 */
  .stories__highlight-text {
    font: var(--t-stories-text);
  }

  /* Chunk: gap title→text 8→16, paragraph 14→16 */
  .stories__chunk {
    gap: clamp(8px, 4px + 0.56cqi, 16px);
  }

  .stories__chunk-text {
    font: var(--t-stories-text);
  }

  .stories__chunk-title {
    font: var(--t-stories-chunk-title-wide);
  }

  /* CTA-стили вынесены ниже из @container — .stories__cta стоит СНАРУЖИ
     .stories__shell (на котором container-type), поэтому container query
     до неё не достаёт. Используем @media по viewport. */
}

/* ============================================================
   CTA buttons (Figma 72:2446) — desktop layout по @media, не @container.
   Row из 2 кнопок 300×72 с gap 32. Mobile/tablet (<960) — column-stack full-width.
   Граница 960 — единая для всех desktop-переходов (comments.md).
   ============================================================ */
@media (min-width: 960px) {
  .stories__cta {
    flex-direction: row;
    justify-content: center;
    gap: var(--s-6);
    margin-top: var(--s-6);
    align-items: center;
  }

  .stories__cta-btn {
    width: 300px;
    height: 72px;
    min-height: 72px;
    flex: 0 0 auto;
    /* не растягиваться */
  }
}

/* ============================================================
   3-COL DESKTOP (shell ≥1200) — Figma 72:2262 layout.
   main 300w | secondary 1fr | vcard 340w. Активируется когда secondary
   получит ≥~400px (комфорт чтения long-paragraph chunks). Ниже —
   2-col-каскад выше остаётся в силе.
   ============================================================ */
@container (min-width: 1200px) {
  .stories__inner {
    grid-template-columns: 300px minmax(0, 1fr) 340px;
    grid-template-areas: "main secondary expert";
    /* row-gap уже не используется (одна row), но оставляем — на случай wrap */
    column-gap: clamp(32px, 4.17cqi, 50px);
  }

  /* Возвращаем главную и secondary колонки на свои места в одной row */
  .stories__col--main {
    grid-area: main;
  }

  .stories__col--secondary {
    grid-area: secondary;
  }

  .stories__col--expert {
    grid-area: expert;
  }

  /* На 3-col main узкий (300) — gap внутри столбца компактнее */
  .stories__col--main {
    gap: var(--s-4);
  }

  /* 16 */
}


/* ============================================================
   SECTION — Частые вопросы (Figma 72:2513 desktop / 74:3861 mobile)

   Mobile (default):
     padding 8 у каждого item, title 16/20, answer 12/16, toggle 40×40.
   Desktop (≥960):
     padding 16, title 24/24, answer 14/20, toggle 56×56.

   Без бэкграунда у item (только rounded radius 24). Между items нет divider'а.
   Раскрытие через aria-expanded="true" + grid-template-rows transition (no JS height).
   ============================================================ */

.faq-section .section-head {
  align-items: center;
  text-align: center;
  margin-bottom: var(--s-4);
  /* 16 mobile */
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

/* ---------- Страница FAQ (/support/faq/) ---------- */
.faq-head .page-title {
  margin-top: var(--s-3);
}

.faq-page {
  padding-block-start: var(--s-4);
}

.faq-page__group-title {
  margin: var(--s-7) 0 var(--s-4);
  font: var(--t-display-2xl-on-xl);
  /* 32 — крупнее вопросов (24) */
  color: var(--c-text);
}

.faq-page__groups>.faq-page__group-title:first-child {
  margin-top: 0;
}

/* ============================================================
   ITEM — wrapper с padding + radius
   ============================================================ */
.faq-item {
  width: 100%;
  border-radius: var(--r-lg);
  /* 24 */
}

/* Header-row: title + chevron справа.
   align-items: center всегда — без переключения на :start при open,
   так chevron не «прыгает» вверх при раскрытии. */
.faq-item__btn {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  /* 16 */
  width: 100%;
  padding: var(--s-2);
  /* 8 mobile */
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  border-radius: var(--r-lg);
  transition: background .15s ease;
}

.faq-item__btn:hover {
  background: rgba(40, 34, 39, 0.03);
  /* tint-3, нет токена */
}

.faq-item__title {
  flex: 1;
  min-width: 0;
  font: var(--t-display-base-bold-on-sm);
  color: var(--c-text);
}

.faq-item__toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  /* mobile */
  height: 40px;
  padding: var(--s-2);
  /* 8 */
  border-radius: var(--r-md);
  /* 16 */
  color: var(--c-text);
  transition: transform .25s ease, background .15s ease;
}

.faq-item__toggle svg {
  width: 24px;
  height: 24px;
  display: block;
}

.faq-item.is-open .faq-item__toggle {
  transform: rotate(180deg);
}

/* ============================================================
   PANEL — раскрывается через max-height + overflow:hidden.
   max-height: 0 в closed → весь контент клиппится, ничего не «торчит».
   На open — max-height большой, transition плавно растягивает вниз.
   max-height вместо grid-template-rows — надёжнее для variable-height
   contents (grid 0fr иногда оставляет видимые остатки).
   ============================================================ */
/* Открытие через grid-template-rows 0fr → 1fr (height = content's actual)
   + overflow:hidden и min-height:0 на answer — гарантированный clip без
   видимых остатков. opacity transition даёт плавное появление текста. */
.faq-item__panel {
  display: grid;
  grid-template-rows: minmax(0, 0fr);
  transition: grid-template-rows .35s ease;
  padding: 0 var(--s-2);
}

.faq-item.is-open .faq-item__panel {
  grid-template-rows: minmax(0, 1fr);
}

.faq-item__answer {
  overflow: hidden;
  min-height: 0;
  font: var(--t-body-xs);
  color: var(--c-text);
  /* Отступ внутри открытого item: title→answer = 8 (меньше),
     answer→следующий item-title = 24 (больше) */
  padding: var(--s-2) 56px var(--s-5) 0;
  /* 8 / 56 / 24 / 0 */
  /* Плавное появление текста параллельно с раскрытием высоты */
  opacity: 0;
  transition: opacity .25s ease 0s;
}

.faq-item.is-open .faq-item__answer {
  opacity: 1;
  transition: opacity .3s ease .15s;
}

/* ============================================================
   DESKTOP (≥960px)
   ============================================================ */
@media (min-width: 960px) {
  .faq-section .section-head {
    margin-bottom: var(--s-6);
  }

  /* 32 */

  .faq-item__btn {
    padding: var(--s-2) var(--s-4);
    /* 8 верт / 16 гориз */
  }

  .faq-item__title {
    font: var(--t-display-lg-bold-on-base);
  }

  /* 20/24 Bold desktop (было 24) */
  .faq-item__toggle {
    width: 56px;
    height: 56px;
    padding: var(--s-4);
    /* 16 */
  }

  .faq-item__panel {
    padding: 0 var(--s-4);
    /* совпадает с btn */
  }

  .faq-item__answer {
    font: var(--t-body-sm);
  }

  /* 14/20 desktop */
}

/* ============================================================
   SECTION — Остались вопросы? Напишите нам (Figma 72:2751 / 74:3872)

   Mobile: padding 24/16, radius 24, gap 24, title 28/32, buttons
           full-width 44h column, hours-text 14/20 muted.
   Desktop: padding 64/32, radius 48, gap 48, title 48/56,
            2 buttons 300×72 в строке (gap 32) с border + drop-shadow.
   ============================================================ */
.cta-help {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-5);
  /* 24 mobile */
  padding: var(--s-5) var(--s-4);
  /* 24 / 16 mobile */
  background: var(--c-text-tint-5);
  border-radius: var(--r-lg);
  /* 24 */
  text-align: center;
}

.cta-help__title {
  margin: 0;
  font: var(--t-display-section);
  color: var(--c-text);
  width: 100%;
}

/* Buttons — mobile: column full-width; desktop: row gap 32 */
.cta-help__buttons {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 */
  width: 100%;
}

.cta-help__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  /* 8 */
  height: 44px;
  /* mobile */
  padding: var(--s-4) var(--s-3);
  /* 16 / 12 */
  border-radius: var(--r-pill);
  border: 1px solid var(--c-text-tint-10);
  /* mobile */
  background: #fff;
  color: var(--c-text);
  font: var(--t-body-sm-strong);
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.cta-help__btn:hover {
  border-color: var(--c-magenta);
  color: var(--c-magenta);
}

.cta-help__btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  /* mobile */
  height: 16px;
  flex-shrink: 0;
  color: var(--c-text);
}

.cta-help__btn:hover .cta-help__btn-icon {
  color: var(--c-magenta);
}

.cta-help__btn-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Hours-text */
.cta-help__hours {
  margin: 0;
  font: var(--t-body-sm);
  color: var(--c-text-muted);
}

/* ============================================================
   DESKTOP (≥960px)
   ============================================================ */
@media (min-width: 960px) {
  .cta-help {
    gap: var(--s-7);
    /* 48 */
    padding: var(--s-9) var(--s-6);
    /* 64 / 32 */
    border-radius: var(--r-2xl);
    /* 48 */
  }

  .cta-help__title {
    font: var(--t-display-headline);
  }

  /* 48/56 desktop */

  .cta-help__buttons {
    flex-direction: row;
    justify-content: center;
    gap: var(--s-6);
    /* 32 */
    width: auto;
  }

  .cta-help__btn {
    width: 300px;
    height: 72px;
    padding: var(--s-4) var(--s-3);
    /* 16 / 12 */
    font: var(--t-body-base-strong);
    /* 16/24 Semibold desktop */
    border-color: var(--c-text-tint-20);
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.15);
    /* shadow-elev-1 — токена под 0/4/4 нет */
  }

  .cta-help__btn-icon {
    width: 24px;
    height: 24px;
  }
}

/* ============================================================
   SECTION — Подписывайтесь на наши соцсети (Figma 72:3042 / 74:3878)

   Mobile: padding 24/16, radius 24, gap 24, title 28/32 magenta,
           subtitle 14/20 magenta-muted.
   Desktop: padding 64/32, radius 48, gap 24, title 48/56 magenta,
            subtitle 20/28 magenta-muted, 3 social-icons 48×48 в строке gap 32.

   Иконки — brand-цвет внутри SVG (Telegram/OK/VK), без CSS color-override.
   ============================================================ */
.subscribe {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-5);
  /* 24 */
  padding: var(--s-5) var(--s-4);
  /* 24 / 16 mobile */
  background: var(--c-magenta-tint-5);
  border-radius: var(--r-lg);
  /* 24 */
  text-align: center;
}

.subscribe__title {
  margin: 0;
  font: var(--t-display-section);
  color: var(--c-magenta);
  width: 100%;
}

.subscribe__desc {
  margin: 0;
  font: var(--t-body-sm);
  color: rgba(170, 38, 146, 0.6);
  /* magenta @ 60% — нет токена */
  width: 100%;
}

.subscribe__icons {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-6);
  /* 32 */
}

.subscribe__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  transition: transform .15s ease;
}

.subscribe__icon:hover {
  transform: translateY(-2px);
}

.subscribe__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ============================================================
   DESKTOP (≥960px)
   ============================================================ */
@media (min-width: 960px) {
  .subscribe {
    padding: var(--s-9) var(--s-6);
    /* 64 / 32 */
    border-radius: var(--r-2xl);
    /* 48 */
  }

  .subscribe__title {
    font: var(--t-display-headline);
  }

  /* 48/56 desktop */
  .subscribe__desc {
    font: var(--t-body-lg);
  }

  /* 20/28 desktop */
}

/* ============================================================
   SECTION — SEO BLOCK (Figma 309:58273 desktop / 315:27213 mobile)

   Структура (см. _includes/sections/seo-experts.njk):
     .seo-block (data-seo-block, .is-opened toggle)
       h2.seo-block__title
       .seo-block__cats-wrap → горизонтальный скроллер категорий + arrow
       p.seo-block__short  → 3-line clamp в closed, full в opened
       .seo-block__full     → h3 + список + p, скрыт в closed
       button.seo-block__toggle  → «Читать полностью» / «Свернуть»

   Брейкпоинты по comments.md: всё mobile-first, desktop через ≥960.
   ============================================================ */

.seo-block {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 */
  width: 100%;
  color: var(--c-text);
}

/* ---------- Title ---------- */
.seo-block__title {
  font: var(--t-display-xl);
  color: var(--c-text);
  margin: 0;
}

/* ============================================================
   CATS — горизонтальный скроллер 9 категорий + правая стрелка-кнопка
   ============================================================ */
.seo-block__cats-wrap {
  position: relative;
  width: 100%;
}

/* Маски слева/справа: white → transparent (100w), показываются по
   .has-prev / .has-next (тогда есть куда крутить в эту сторону). */
.seo-block__cats-wrap::before,
.seo-block__cats-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity .2s ease;
}

.seo-block__cats-wrap::before {
  left: 0;
  background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
}

.seo-block__cats-wrap::after {
  right: 0;
  background: linear-gradient(to left, #fff, rgba(255, 255, 255, 0));
}

.seo-block__cats-wrap.has-prev::before {
  opacity: 1;
}

.seo-block__cats-wrap.has-next::after {
  opacity: 1;
}

.seo-block__cats {
  display: flex;
  gap: var(--s-4);
  /* 16 */
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}

.seo-block__cats::-webkit-scrollbar {
  display: none;
}

/* Single category card — 140×108, white bg, 1px border */
.seo-cat {
  flex-shrink: 0;
  width: 140px;
  height: 108px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  /* 8 */
  padding: var(--s-4) var(--s-2);
  /* 16 / 8 */
  background: #fff;
  border: 1px solid var(--c-text-tint-10);
  border-radius: var(--r-md);
  /* 16 */
  text-decoration: none;
  text-align: center;
  transition: border-color .15s ease, transform .15s ease;
}

.seo-cat:hover {
  border-color: var(--c-magenta);
}

.seo-cat:hover .seo-cat__icon-wrap {
  background: rgba(170, 38, 146, 0.15);
  /* magenta @ 15% — нет токена */
  color: var(--c-magenta);
}

.seo-cat__icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-2);
  /* 8 */
  background: var(--c-text-tint-10);
  border-radius: var(--r-md);
  /* 16 */
  color: var(--c-text);
}

.seo-cat__icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
}

.seo-cat__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.seo-cat__label {
  font: var(--t-body-xs-medium);
  color: var(--c-text);
}

/* Стрелки prev/next — absolute поверх масок */
.seo-block__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--r-md);
  /* 16 */
  background: var(--c-pink-soft);
  /* #f7eaf5 */
  color: var(--c-text);
  cursor: pointer;
  z-index: 2;
  transition: background .15s ease;
}

.seo-block__arrow:hover {
  background: #f0e0ed;
}

.seo-block__arrow svg {
  width: 24px;
  height: 24px;
}

.seo-block__arrow--prev {
  left: 0;
}

.seo-block__arrow--next {
  right: 0;
}

.seo-block__arrow[hidden] {
  display: none;
}

/* ============================================================
   TEXT — short (clamp 3 строки в closed) + full (скрыт в closed)
   ============================================================ */
.seo-block__short {
  font: var(--t-body-sm-on-snug);
  color: var(--c-text);
  margin: 0;
  /* Closed state — обрезаем по 3 строки.
     line-clamp + -webkit-line-clamp вместе — стандартное property + префикс
     для совместимости (linter «Also define the standard property line-clamp»). */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seo-block.is-opened .seo-block__short {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}

.seo-block__full {
  display: none;
  flex-direction: column;
  gap: var(--s-2);
  /* 8 */
}

.seo-block.is-opened .seo-block__full {
  display: flex;
}

.seo-block__h3 {
  font: var(--t-display-md-bold-on-xl);
  color: var(--c-text);
  margin: 0;
}

.seo-block__full p {
  font: var(--t-body-sm-on-snug);
  color: var(--c-text);
  margin: 0;
}

.seo-block__full ul {
  margin: 0;
  padding-left: 21px;
  list-style: disc;
  font: var(--t-body-sm-on-snug);
  color: var(--c-text);
}

.seo-block__full ul li {
  margin-bottom: 0;
}

/* ---------- Toggle link ---------- */
.seo-block__toggle {
  align-self: flex-start;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: var(--t-body-sm);
  color: var(--c-magenta);
  text-decoration: underline;
}

.seo-block__toggle:hover {
  color: var(--c-purple-deep);
}


/* ============================================================
   CSS — SECTIONS — EXPERT PAGE (/expert.html, Figma 88:2736 / 88:2798)
   ============================================================ */
/* ============================================================
   SECTION — EXPERT HERO (Figma 88:2739 desktop / 88:2802 mobile + 406:27336 card)

   Структура — ОДИН ВНЕШНИЙ блок, ВНУТРИ photo + card-wrap.

   Desktop (≥960):
     .expert-hero  — relative, overflow:hidden, min-height 600
     .expert-hero__photo — absolute inset:0 (фото фоном на весь outer, flush)
     .expert-hero__card-wrap — absolute top/left/bottom: 64, width: 480+64=544
                               bg-gradient: solid #913387 в card-зоне (480px),
                               fade #913387→transparent в правых 64px (на photo)
     .expert-hero__card — белый блок 480w, внутри wrap слева

   Mobile (≤959):
     .expert-hero — flex column
     .expert-hero__photo — в потоке, aspect 1:1
     .expert-hero__card-wrap — в потоке, margin 16, без gradient'а
     .expert-hero__card — внутри wrap

   Outer-radius клипит фото и card по своему 48/24 радиусу.
   ============================================================ */

.expert-hero-section {
  padding-block-start: var(--s-5);
  padding-block-end: 0;
}

.breadcrumbs {
  font: var(--t-body-sm);
  color: var(--c-text-muted);
  margin-bottom: var(--s-5);
}

.breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--c-magenta);
}

/* ---------- Outer ----------
   Mobile: flex column (photo сверху, card снизу), padding 16.
   Desktop: padding 64 со всех сторон, относительный контекст для absolute-photo.
   ============================================================ */
.expert-hero {
  position: relative;
  /* Mobile: высота фиксирована 432 пока photo-aspect ≤ 3:2.
     Когда photo-width × 2/3 > 400 (порог aspect 3:2), outer и photo растут
     пропорционально. Формула: outer-h = photo-h + 32 (overflow для stats).
     calc((100vw - 2*gutter) * 2/3 + 32) — точная связь с .container шириной. */
  min-height: max(432px, calc((100vw - 2 * var(--gutter)) * 2 / 3 + 32px));
}

@media (min-width: 960px) {
  .expert-hero {
    min-height: 0;
    display: flex;
    flex-direction: row-reverse;
    /* DOM [photo, wrap], визуально: wrap слева, photo справа */
    align-items: stretch;
    /* photo тянется в высоту до card-wrap */
    border-radius: var(--r-2xl);
    /* 48 */
    overflow: hidden;
  }
}

/* ---------- Photo ----------
   Фото — background-image на div (без img-элемента), чтобы div не получал
   intrinsic-высоту от картинки. С `align-items: stretch` div подстраивается
   под высоту card-wrap (= card-content + padding).

   Mobile: в потоке, квадрат.
   Desktop: flex-item справа, height по wrap'у через stretch.
   ============================================================ */
.expert-hero__photo {
  position: absolute;
  /* mobile: фото в верхней части .expert-hero */
  top: 0;
  left: 0;
  right: 0;
  /* Mobile: height = max(400, photo-width × 2/3). При photo ширине ≤600 — 400px,
     при ширине >600 — растёт пропорционально с аспектом 3:2 (cap).
     Формула через viewport-width и --gutter для точности. */
  height: max(400px, calc((100vw - 2 * var(--gutter)) * 2 / 3));
  overflow: hidden;
  border-radius: var(--r-lg);
  /* 24 mobile */
  background-color: var(--c-hero-bg);
}

.expert-hero__photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Тёмный gradient overlay на photo (mobile) — даёт читаемый белый текст внизу */
.expert-hero__photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.85) 100%);
  pointer-events: none;
  border-radius: inherit;
}

@media (min-width: 960px) {
  .expert-hero__photo {
    position: relative;
    /* desktop: flex item */
    top: auto;
    left: auto;
    right: auto;
    height: auto;
    /* сбрасываем mobile max(400px,…) */
    border-radius: 0;
    /* outer-radius клипает */
    flex: 1 1 0;
    /* занимает оставшееся пространство */
    margin-left: -128px;
    /* заезжает под card-wrap на 128px (fade-зону) */
  }

  .expert-hero__photo::before {
    display: none;
    /* без тёмного overlay на desktop */
  }
}

/* ---------- Card-wrap ----------
   Mobile: в потоке под photo, margin 16.
   Desktop: в потоке (position:relative для z-stack), сидит в padding-box outer.
   Ширина 544 (= card 480 + fade 64). Background-gradient: solid #913387 в первых
   480px (под card-ом), fade в правых 64px (на photo) до прозрачности.
   ============================================================ */
.expert-hero__card-wrap {
  position: relative;
  padding: var(--s-9);
  /* 64 со всех сторон */
  background: linear-gradient(to right,
      #913387 0%,
      #913387 calc(100% - 128px),
      /* solid до правой fade-зоны */
      rgba(145, 51, 135, 0) 100%);
  /* fade 128px → transparent, цвет нет в токенах */
  flex: 0 0 auto;
  /* hug — ширина по содержимому card */
}

/* ---------- Card ----------
   Белый блок внутри wrap. На desktop 480 wide, заполняет wrap по высоте.
   ============================================================ */
.expert-hero__card {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 — Figma внутренний gap */
  background: #fff;
  border-radius: var(--r-lg);
  /* 24 mobile */
  padding: var(--s-5);
  /* 24 mobile */
  width: 100%;
}

@media (min-width: 960px) {
  .expert-hero__card {
    width: 480px;
    height: auto;
    /* hug по контенту, не stretch */
    padding: var(--s-7);
    /* 48 со всех сторон */
    border-radius: 32px;
    /* off-scale 32 */
  }
}

/* ---------- Card top row (status + thanks) ---------- */
.expert-hero__card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}

/* ---------- Thanks button ---------- */
.expert-hero__thanks {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: var(--t-body-sm-medium-on-base);
  color: var(--c-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.expert-hero__thanks-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  flex-shrink: 0;
  color: var(--c-text);
  /* чёрный, не зелёный */
}

.expert-hero__thanks-icon svg {
  width: 100%;
  height: 100%;
}

/* gift.svg в ICONS-словаре имеет жёстко зашитый fill="#08B866" (зелёный для
   booking__free). Тут перебиваем на currentColor — берём цвет родителя (чёрный). */
.expert-hero__thanks-icon svg path {
  fill: currentColor;
}

/* ---------- Name / title ---------- */
.expert-hero__name {
  font: var(--t-display-2xl-on-xl);
  color: var(--c-text);
  margin: 0;
}

@media (min-width: 960px) {
  .expert-hero__name {
    font: var(--t-display-headline);
  }

  /* 48/56 desktop */
}

.expert-hero__title {
  font: var(--t-body-xs);
  color: var(--c-text-muted);
  margin: 0;
}

/* ---------- Stats (3 cells) ----------
   Figma 406:27350 — 3 равных ячейки 122.7×56, gap 8. Каждая со светлой границей,
   white-fill. Контент центрирован.
   ============================================================ */
.expert-hero__stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--s-2);
}

.expert-hero__stat {
  flex: 1 1 0;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--c-text-tint-10);
  /* Figma 116:19315 */
  border-radius: var(--r-md);
  /* 16 — Figma */
  padding: var(--s-2) 0;
  /* 8 0 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  text-align: center;
}

.expert-hero__stat-num {
  font: var(--t-body-base-strong);
  color: var(--c-text);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.expert-hero__stat-icon {
  display: inline-flex;
  width: 12px;
  height: 12px;
  color: var(--c-text);
  /* Figma: чёрный, не жёлтый */
}

.expert-hero__stat-icon svg {
  width: 100%;
  height: 100%;
}

.expert-hero__stat-label {
  font: var(--t-body-xs);
  color: var(--c-text-muted);
}

/* ---------- Booking ---------- */
.expert-hero__booking {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-1);
  width: 100%;
  container-type: inline-size;
  container-name: booking-wrap;
}

.expert-hero__book {
  height: 56px;
  gap: var(--s-2);
}

.expert-hero__book .booking__icon-bubble {
  width: 40px;
  height: 40px;
}

.expert-hero__book .booking__icon-bubble svg {
  width: 16px;
  height: 16px;
}

@media (min-width: 960px) {
  .expert-hero__book {
    height: 64px;
    gap: var(--s-4);
  }

  .expert-hero__book .booking__icon-bubble {
    width: 48px;
    height: 48px;
  }

  .expert-hero__book .booking__icon-bubble svg {
    width: 24px;
    height: 24px;
  }

  .expert-hero__book .booking__text-main {
    font-size: var(--fs-base);
    line-height: var(--lh-base);
  }

  .expert-hero__book .booking__prices {
    font-size: var(--fs-sm);
    line-height: var(--lh-base);
  }

  /* Telegram-вариант hero-кнопки — единые 28×28 иконка и 14/24 текст (не растим
     до 24/16 как в classic-варианте: «Написать в Telegram» длиннее). */
  .expert-hero__book.booking__btn--telegram .booking__icon-bubble svg {
    width: 28px;
    height: 28px;
  }

  .expert-hero__book.booking__btn--telegram .booking__text-main {
    font: var(--t-body-sm-strong-on-base);
  }
}

/* ---------- Audio greeting (Figma 110:14630 — tertiary-style) ----------
   Белая залитая кнопка с тонкой обводкой и drop-shadow, иконка inline
   (без розового bubble), text по центру.
   ============================================================ */
.expert-hero__audio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  width: 100%;
  height: 48px;
  padding: var(--s-3);
  border: 1px solid var(--c-text-tint-20);
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--c-text);
  cursor: pointer;
  font: var(--t-body-base-strong);
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.15));
  /* shadow-elev-1 */
  transition: background-color .18s ease;
}

.expert-hero__audio:hover {
  background-color: #f3f1f3;
}

.expert-hero__audio-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--c-text);
  flex-shrink: 0;
}

.expert-hero__audio-icon svg {
  width: 100%;
  height: 100%;
}

/* ============================================================
   MOBILE LAYOUT (Figma 90:4819, ≤959)
   .expert-hero__mobile = display:contents (дети как layout-сиблинги .expert-hero)
   .expert-hero__photo  = absolute top:0, h:400
   .expert-hero__card-wrap = display:none на mobile
   Все mobile-элементы абсолютно позиционированы относительно .expert-hero.
   ============================================================ */

/* Default mobile (≤959): wrap транзакторно прозрачен в layout */
.expert-hero__mobile {
  display: contents;
}

/* Desktop ≥960: скрываем mobile wrapper и его детей */
@media (min-width: 960px) {
  .expert-hero__mobile {
    display: none;
  }
}

/* Mobile-only: скрываем desktop card-wrap */
@media (max-width: 959px) {
  .expert-hero__card-wrap {
    display: none;
  }

  /* Thanks-кнопка на photo (Figma 90:4840 — top 12 при outer 432, центр, белый underlined).
     Top в процентах от outer-height (12/432 = 2.78%) — масштабируется при росте hero. */
  .expert-hero__thanks--photo {
    position: absolute;
    top: 2.7778%;
    /* 12/432 */
    left: 0;
    right: 0;
    justify-content: center;
    color: #fff;
    font: var(--t-body-xs-strong);
    white-space: nowrap;
    z-index: 2;
  }

  .expert-hero__thanks--photo .expert-hero__thanks-icon {
    color: #fff;
  }

  /* Overlay-контент (status + name + title + audio) — abs внутри photo, Figma 90:4849
     top: 232 при outer 432 (53.7%), w: 300, left/right: 14. */
  .expert-hero__photo-overlay {
    position: absolute;
    top: 53.7037%;
    /* 232/432 */
    left: 14px;
    /* off-scale 14 */
    right: 14px;
    /* off-scale 14 */
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    /* 8 */
    z-index: 2;
  }

  .expert-hero__photo-overlay .status {
    color: var(--c-online);
    font: var(--t-body-xs-medium);
    /* 12/16 Medium на overlay */
  }

  .expert-hero__photo-overlay .expert-hero__name {
    color: #fff;
    font: var(--t-display-xl-bold-on-base);
    margin: 0;
  }

  .expert-hero__photo-overlay .expert-hero__title {
    color: rgba(255, 255, 255, 0.8);
    /* white @ 80% — нет токена */
    /* font наследуется от .expert-hero__title (--t-body-xs, 12/16) */
    margin: 0;
    /* gap-top относительно name через flex gap уже 8, тут override чтобы было 4 как в Figma */
    margin-top: -4px;
    /* gap 8 - 4 = 4 effective */
  }

  /* Audio-кнопка на mobile — отступ от title 8 (через flex gap родителя).
     Селектор .expert-hero__audio--mobile зарезервирован — добавь правила сюда
     если потребуется mobile-специфика. */

  /* Stats row — 3 cells abs, Figma 90:4850 top 372 при outer 432 (86.1%).
     В процентах — растёт пропорционально вместе с outer. */
  .expert-hero__stats-mobile {
    position: absolute;
    top: 86.1111%;
    /* 372/432 */
    left: 14px;
    /* off-scale 14 */
    right: 14px;
    /* off-scale 14 */
    display: flex;
    gap: var(--s-2);
    /* 8 */
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 2;
  }

  /* Inherits .expert-hero__stat (white bg, border, padding 8 0, radius 16) — works as-is */
}

/* ============================================================
   SECTION — EXPERT ABOUT (Figma 90:4812 desktop / 90:4878 mobile)

   bio-параграф + кнопка "Читать полностью".
   До клика: текст обрезан до 4 строк через -webkit-line-clamp.
   После клика: .is-collapsed снимается, текст показывается целиком,
   кнопка скрывается.
   ============================================================ */
.expert-about-section {
  padding-block: 0;
}

.expert-about {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-4);
  /* 16 — между текстом и кнопкой */
}

.expert-about__text {
  margin: 0;
  font: var(--t-body-sm);
  color: var(--c-text);
}

@media (min-width: 960px) {
  .expert-about__text {
    font: var(--t-body-base);
  }

  /* 16/24 desktop */
}

/* Default: схлопнут до 4 строк (примерно как в Figma до раскрытия) */
.expert-about__text.is-collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.expert-about__toggle {
  /* btn--text базовый стиль (magenta, no bg) — оставляем как есть.
     Скрытие после раскрытия — через .is-expanded на родителе. */
  font: var(--t-body-sm-strong);
  /* 14/20 Semibold (override .btn 16/24) */
}

.expert-about.is-expanded .expert-about__toggle {
  display: none;
}

/* ============================================================
   SECTION — EXPERT SERVICES (Figma 90:4478)

   3 карточки 200×148, radius 16, фон-фото + dark gradient overlay снизу.
   Контейнер: flex row, gap 16.
   Mobile: горизонтальный скролл (3×200 + gap не помещаются в 328 container).
   ============================================================ */
.expert-services-section {
  padding-block: 0;
}

.expert-services {
  display: flex;
  gap: var(--s-4);
  /* 16 */
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* Negative margin расширяет до краёв .container'а (= viewport на mobile);
     padding-inline возвращает первую карточку к контентной границе. */
  margin-inline: calc(-1 * clamp(16px, 3.7vw + 2.67px, 56px));
  padding-inline: clamp(16px, 3.7vw + 2.67px, 56px);
}

.expert-services::-webkit-scrollbar {
  display: none;
}

@media (min-width: 960px) {
  .expert-services {
    /* Desktop: в потоке 800-колонки, без full-bleed. При >3 карточках —
       горизонтальный скролл (стрелки навешивает expert-services-scroll.js). */
    overflow-x: auto;
    margin-inline: 0;
    padding-inline: 0;
  }
}

/* ---------- Скроллер со стрелками ---------- */
.expert-services-scroller {
  position: relative;
}

.expert-services__arrow {
  display: none;
}

@media (min-width: 960px) {
  .expert-services__arrow {
    position: absolute;
    top: 74px;
    /* центр карточки 148 */
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    background: var(--c-pink-soft);
    color: var(--c-magenta);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-btn);
    z-index: 2;
  }

  .expert-services__arrow[hidden] {
    display: none;
  }

  .expert-services__arrow:hover {
    background: var(--c-pink-hover, #efd4ec);
  }

  .expert-services__arrow svg {
    width: 16px;
    height: 16px;
  }

  .expert-services__arrow--prev {
    left: -8px;
  }

  .expert-services__arrow--prev svg {
    transform: rotate(90deg);
  }

  .expert-services__arrow--next {
    right: -8px;
  }

  .expert-services__arrow--next svg {
    transform: rotate(-90deg);
  }

  /* Мягкий белый фейд по краям — появляется только когда за краем есть
     скрытые карточки (классы has-fade-* ставит expert-services-scroll.js). */
  .expert-services-scroller::before,
  .expert-services-scroller::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 16px;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity .2s ease;
  }

  .expert-services-scroller::before {
    left: 0;
    background: linear-gradient(to right, var(--c-surface), rgba(255, 255, 255, 0));
  }

  .expert-services-scroller::after {
    right: 0;
    background: linear-gradient(to left, var(--c-surface), rgba(255, 255, 255, 0));
  }

  .expert-services-scroller.has-fade-left::before {
    opacity: 1;
  }

  .expert-services-scroller.has-fade-right::after {
    opacity: 1;
  }
}

/* ---------- Service card (Figma 90:4466) ---------- */
.service-card {
  position: relative;
  flex: 0 0 200px;
  width: 200px;
  height: 148px;
  border-radius: var(--r-md);
  /* 16 */
  overflow: hidden;
  scroll-snap-align: start;
  background: var(--c-purple-deep);
  /* fallback fill */
  text-decoration: none;
  /* карточка теперь <a> */
  color: inherit;
}

.service-card__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Gradient overlay снизу — фигма-точный градиент:
   from-[36.84%] from-[rgba(22,8,39,0)] via-[53.8%] via-[rgba(22,8,39,0.75)] to-[#160827] */
.service-card__overlay {
  position: absolute;
  inset: 0;
  /* Цвет #160827 (purple-deepest) и его tints отсутствуют в токенах — оставляем literal */
  background: linear-gradient(to bottom,
      rgba(22, 8, 39, 0) 36.84%,
      rgba(22, 8, 39, 0.75) 53.8%,
      #160827 100%);
  pointer-events: none;
}

/* ---------- Body (контент якорится к НИЗУ карточки, w 176) ----------
   bottom: 12 — отступ от нижнего края card. При длинном title растёт вверх,
   меню (длительность + Заказать) остаётся на месте у низа. */
.service-card__body {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: 176px;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  /* 8 */
}

.service-card__title {
  margin: 0;
  font: var(--t-body-sm-strong);
  color: #fff;
}

.service-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
}

.service-card__duration {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: var(--t-body-xs);
  color: var(--c-divider-soft);
  /* Figma 90:4463 — #ecebf9 */
}

.service-card__icon {
  display: inline-flex;
  width: 12px;
  height: 12px;
  color: var(--c-divider-soft);
  flex-shrink: 0;
}

.service-card__icon svg {
  width: 100%;
  height: 100%;
}

.service-card__action {
  font: var(--t-body-sm);
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.service-card__action:hover {
  color: var(--c-pink-soft);
}

/* ============================================================
   SECTION — EXPERT REVIEWS (Figma 89:4096)

   Header (gap 16): "23 отзыва" Philosopher 24/32 + green badge "5★".
   Кнопка "Оставить отзыв" (white pill, pencil icon).
   List: feedback items с border-bottom.
   Show-more pill.
   ============================================================ */
.expert-reviews-section {
  padding-block: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 — между блоками внутри секции */
}

/* ---------- Header (count + green badge) ---------- */
.expert-reviews-head {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  /* 16 */
}

.expert-reviews-count {
  font: var(--t-display-xl);
  color: var(--c-text);
  white-space: nowrap;
}

.expert-reviews-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  /* off-scale — bullet-индикатор */
  padding: 2px 4px 2px 8px;
  /* off-scale — Figma exact */
  border-radius: var(--r-xs);
  background: var(--c-online);
  /* #08b866 green */
  color: #fff;
  font: var(--t-review-author);
}

.expert-reviews-badge__star {
  display: inline-flex;
  width: 12px;
  height: 12px;
  color: #fff;
}

.expert-reviews-badge__star svg {
  width: 100%;
  height: 100%;
}

/* ---------- Leave review (tertiary pill with pencil icon) ---------- */
.expert-reviews-leave {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  /* 8 */
  width: 100%;
  padding: var(--s-3);
  border: 1px solid var(--c-text-tint-20);
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--c-text);
  cursor: pointer;
  font: var(--t-body-base-strong);
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.15));
  /* shadow-elev-1 */
  transition: background-color .18s ease;
}

.expert-reviews-leave:hover {
  background-color: #f3f1f3;
}

.expert-reviews-leave__icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  color: var(--c-text);
}

.expert-reviews-leave__icon svg {
  width: 100%;
  height: 100%;
}

/* ---------- List ---------- */
.expert-reviews-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 — между отзывами */
}

.feedback-wrap[hidden] {
  display: none;
}

/* ---------- Feedback item ---------- */
.feedback {
  display: flex;
  gap: var(--s-4);
  /* 16 — между avatar/body/meta */
  align-items: flex-start;
  padding-bottom: var(--s-4);
  /* 16 под контентом до бордера */
  border-bottom: 1px solid var(--c-divider-soft);
  /* #ecebf9 */
}

.feedback__avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--r-xs);
  overflow: hidden;
  background: var(--c-pink-softer);
  /* fallback */
}

.feedback__body {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  /* 4 */
}

.feedback__name {
  margin: 0;
  font: var(--t-display-lg-bold-on-base);
  color: var(--c-text);
}

.feedback__text {
  margin: 0;
  font: var(--t-body-sm-on-base);
  /* 14/24 — единый размер для всех мест где feedback */
  color: var(--c-text-muted);
}

.feedback__meta {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-1);
  /* 4 */
}

.feedback__stars {
  display: inline-flex;
  gap: var(--s-2);
  /* 8 — между звёздами */
  color: var(--c-star);
}

.feedback__stars svg {
  width: 12px;
  height: 12px;
}

.feedback__date {
  font: var(--t-body-xs);
  color: var(--c-text-muted);
  white-space: nowrap;
}

/* ---------- Show more (secondary pill) ---------- */
.expert-reviews-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  padding: var(--s-4) var(--s-3);
  border: 0;
  border-radius: var(--r-pill);
  background: var(--c-text-tint-10);
  /* rgba(40,34,39,0.1) */
  color: var(--c-text);
  cursor: pointer;
  font: var(--t-body-base-strong);
  transition: background-color .18s ease;
}

.expert-reviews-more:hover {
  background-color: var(--c-text-tint-18);
}

.expert-reviews-more[hidden] {
  display: none;
}

/* ============================================================
   SECTION — EXPERT SCHEDULE (Figma 89:4246)

   .expert-schedule wrapper — relative, overflow clip (содержит fade + arrow).
   .expert-schedule__list  — flex row, gap 24, 5 day-columns.
   .schedule-day           — flex col, gap 12, width 106.
     .schedule-day__date   — Philosopher Bold 20/24.
     .schedule-day__slots  — flex col, gap 12.
       .schedule-day__slot — bg rgba(40,34,39,0.1), radius 20, padding 9/14,
                              Inter Regular 14/18, текст центрирован.
   .expert-schedule__fade  — abs right, 100px, white→transparent (right-to-left).
   .expert-schedule__arrow — abs right, центр по вертикали, bg #f7eaf5, radius 16.
   ============================================================ */
.expert-schedule-section {
  padding-block: 0;
}

.expert-schedule {
  position: relative;
  overflow: hidden;
  /* desktop: клипает list, держит fade+arrow на правом крае */
}

@media (max-width: 959px) {
  .expert-schedule {
    overflow: visible;
    /* mobile: без клипа, full-bleed на list */
  }
}

.expert-schedule__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--s-5);
  /* 24 — между столбцами */
  overflow-x: auto;
  /* список скроллится при нажатии arrow */
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.expert-schedule__list::-webkit-scrollbar {
  display: none;
}

/* Mobile: full-bleed (как services) — расширяем на gutter и возвращаем content
   через padding-inline, чтобы первый столбец был в контентной границе. */
@media (max-width: 959px) {
  .expert-schedule__list {
    margin-inline: calc(-1 * clamp(16px, 3.7vw + 2.67px, 56px));
    padding-inline: clamp(16px, 3.7vw + 2.67px, 56px);
  }
}

/* ---------- Schedule day column ---------- */
.schedule-day {
  flex: 0 0 106px;
  width: 106px;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  /* 12 */
}

.schedule-day__date {
  font: var(--t-display-lg-bold-on-base);
  color: var(--c-text);
}

.schedule-day__slots {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  /* 12 */
}

.schedule-day__slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 9px 14px;
  /* Figma 89:4155 */
  border: 0;
  border-radius: 20px;
  /* off-scale 20 — slot pill */
  background: var(--c-text-tint-10);
  /* tint-10 */
  cursor: pointer;
  font: var(--t-body-sm-on-snug);
  color: var(--c-text);
  white-space: nowrap;
  transition: background-color .18s ease;
}

.schedule-day__slot:hover {
  background: var(--c-text-tint-18);
}

.schedule-day__empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  color: var(--c-text-muted);
  font: var(--t-body-sm-on-snug);
}

/* ---------- Fade overlay (left + right edges) ---------- */
.expert-schedule__fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  pointer-events: none;
  transition: opacity .18s ease;
}

.expert-schedule__fade--right {
  right: 0;
  background: linear-gradient(to left, #fff 0%, rgba(255, 255, 255, 0) 100%);
}

.expert-schedule__fade--left {
  left: 0;
  background: linear-gradient(to right, #fff 0%, rgba(255, 255, 255, 0) 100%);
}

/* ---------- Arrow buttons (left + right) ---------- */
.expert-schedule__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: var(--s-4);
  border: 0;
  border-radius: var(--r-md);
  background: var(--c-pink-soft);
  /* #f7eaf5 */
  color: var(--c-magenta);
  cursor: pointer;
  transition: background-color .18s ease, opacity .18s ease;
}

.expert-schedule__arrow:hover {
  background: #efd4ec;
}

.expert-schedule__arrow svg {
  width: 12px;
  height: 16px;
}

.expert-schedule__arrow--right {
  right: 0;
}

.expert-schedule__arrow--left {
  left: 0;
}

/* Hidden state — для скрытия стрелок/fade когда не нужны (start/end scroll) */
.expert-schedule__arrow.is-hidden,
.expert-schedule__fade.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* На mobile (≤959) — скрываем все стрелки и fade, юзер скроллит свайпом */
@media (max-width: 959px) {

  .expert-schedule__arrow,
  .expert-schedule__fade {
    display: none;
  }
}

/* ============================================================
   SECTION — EXPERT SPHERES LIST (Figma 90:4584)

   Заголовок "Работаю со сферами жизни" (Philosopher Regular 24/32)
   + chips: bg rgba(170,38,146,0.1), border 1px (same color), radius 20,
     padding 9 14, Inter Regular 14/18, color #aa2692.
   Контейнер chips: flex-wrap, gap 8.
   ============================================================ */
.expert-spheres-list-section {
  padding-block: 0;
}

.expert-spheres-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  /* 8 */
}

.sphere-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  /* Figma 90:4674 */
  border: 1px solid var(--c-card-divider);
  border-radius: 20px;
  /* off-scale 20 — chip pill */
  background: var(--c-card-divider);
  font: var(--t-body-xs);
  color: var(--c-magenta);
  /* #aa2692 */
  white-space: nowrap;
  text-align: center;
}

@media (min-width: 960px) {
  .sphere-chip {
    font: var(--t-body-sm-on-snug);
  }

  /* 14/18 desktop (Figma 90:4674) */
}

/* ============================================================
   SECTION — EXPERT TIMES (Figma 90:4629)

   Заголовок (Philosopher 24/32) + intro (Inter 14/18 muted) + 3 строки:
     .time-card
       .time-card__badge — 72×72 квадрат с border, в центре 14/20 semibold
                            "10-15" + "минут".
       .time-card__body  — flex col gap 8:
         .time-card__title — Philosopher Bold 20/24.
         .time-card__desc  — Inter Regular 14/20 #282227.
   Между строками gap 16 (от родителя). Между badge и body gap 15.
   ============================================================ */
.expert-times-section {
  padding-block: 0;
}

.expert-times-intro {
  margin: 0 0 var(--s-4) 0;
  font: var(--t-body-sm-on-snug);
  color: var(--c-text-muted);
  /* rgba(40,34,39,0.6) */
}

.expert-times-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 — между картами */
}

.time-card {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  /* Figma 91:5760 */
  background: none;
  /* без фона — отличается от tile-style до этого */
  padding: 0;
}

/* ---------- Badge (72×72 квадрат с border) ---------- */
.time-card__badge {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--s-4);
  /* 16 */
  border: 1px solid var(--c-magenta-tint-20);
  border-radius: var(--r-md);
  /* 16 */
  font: var(--t-body-sm-strong);
  color: var(--c-text);
  text-align: center;
  white-space: nowrap;
}

.time-card__duration,
.time-card__unit {
  display: block;
}

/* ---------- Body (title + desc справа) ---------- */
.time-card__body {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  /* 8 */
}

.time-card__title {
  margin: 0;
  font: var(--t-display-lg-bold-on-base);
  color: var(--c-text);
}

.time-card__desc {
  margin: 0;
  font: var(--t-body-sm);
  color: var(--c-text);
}

/* ============================================================
   SECTION — EXPERT CTA MOBILE (Figma 153:16313)

   Sticky bottom bar. Виден на mobile до 959 (тогда как tabbar — только ≤767).
   В 768-959 нет tabbar — cta-mobile стоит у самого низа (bottom: 0).
   В ≤767 поднят выше tabbar (bottom: 76).
   ============================================================ */
.expert-cta-mobile {
  display: none;
  /* default — desktop скрыт */
}

@media (max-width: 959px) {
  .expert-cta-mobile {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    /* по умолчанию у нижнего края, без tabbar */
    z-index: 55;
    background: #fff;
    padding: var(--s-4);
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    /* скругления только сверху */
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.12);
    /* off-elev — sticky bar */
  }

  .expert-cta-mobile__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-2);
    container-type: inline-size;
    container-name: booking-wrap;
  }

  .expert-cta-mobile__book {
    width: 100%;
    height: 56px;
  }

  .expert-cta-mobile__book .booking__icon-bubble {
    width: 40px;
    height: 40px;
  }

  .expert-cta-mobile__book .booking__icon-bubble svg {
    width: 16px;
    height: 16px;
  }

  /* Safe area для контента — освобождаем место под фиксированный cta-mobile.
     Здесь только cta-высота (~100px). */
  body.has-expert-cta {
    padding-bottom: 100px;
  }
}

/* На ≤767 — есть tabbar (76h). cta-mobile поднимается над ним, body padding больше. */
@media (max-width: 767px) {
  .expert-cta-mobile {
    bottom: 76px;
  }

  body.has-expert-cta {
    padding-bottom: 188px;
    /* tabbar 88 + cta 100 */
  }
}

/* ============================================================
   COOKIES BANNER (Figma 171:23975 / 171:24014)

   Fixed bottom-right. White card 24-radius с card-shadow.
   Текст: title Philosopher Bold 18/24 + body Inter 14/18.
   Кнопки: Отказаться (secondary) + Хорошо (primary), оба flex:1.

   На mobile — full-width sheet от низа viewport-а.
   На desktop — фиксированная карта 380w в нижнем-правом углу.
   ============================================================ */
.cookies {
  position: fixed;
  z-index: 70;
  /* выше tabbar (60) и cta-mobile (55) */
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 */
  background: #fff;
  border-radius: var(--r-lg);
  /* 24 */
  padding: var(--s-4);
  /* 16 */
  box-shadow: var(--shadow-card);
  /* Mobile (default): полная ширина у нижнего края */
  left: var(--s-4);
  right: var(--s-4);
  bottom: var(--s-4);
}

.cookies[hidden] {
  display: none;
}

@media (min-width: 960px) {
  .cookies {
    /* Desktop (Figma 171:23975): 600 wide, centered horizontally, ~20 от низа */
    left: 50%;
    right: auto;
    bottom: var(--s-5);
    /* 24 */
    transform: translateX(-50%);
    width: 600px;
  }
}

.cookies__text {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  /* 8 */
  color: var(--c-text);
}

.cookies__title {
  margin: 0;
  font: var(--t-section-heading-md);
  /* 18/24 Bold */
}

.cookies__desc {
  margin: 0;
  font: var(--t-body-sm-on-snug);
}

.cookies__link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookies__link:hover {
  color: var(--c-magenta);
}

.cookies__btns {
  display: flex;
  gap: var(--s-2);
  /* 8 */
  width: 100%;
}

.cookies__btn {
  flex: 1 1 0;
  min-width: 0;
}

/* ============================================================
   MEGA-MENU (desktop dropdown, Figma 281:21622)

   White card, padding 40, gap 40, radius 48, shadow-card.
   5 равных колонок: Philosopher Bold 24/24 + list item-pill'ов 36h.
   Каждый pill: Inter Medium 14/20, py-8, rounded-32, hover-эффект.
   Position fixed, центрирован под header'ом по container.
   ============================================================ */
.mega-menu {
  /* Position absolute внутри .site-header (= sticky parent).
     top: 100% — у нижнего края header. margin-top: 4 — отступ от header.
     Расположен по container внутри header'а (left/right с gutter). */
  position: absolute;
  top: 100%;
  left: clamp(16px, 3.7vw + 2.67px, 56px);
  right: clamp(16px, 3.7vw + 2.67px, 56px);
  margin-top: var(--s-1);
  z-index: 50;
  background: #fff;
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-card);
  display: none;
}

.mega-menu.is-open {
  display: block;
}

.mega-menu[hidden] {
  display: none;
}

.mega-menu.is-open[hidden] {
  display: block;
}

@media (max-width: 959px) {
  .mega-menu {
    display: none !important;
  }
}

/* Внутренний layout (как astro7): слева крупный label дропдауна,
   справа — ряд колонок-групп (ОБЩЕЕ / ГАДАНИЕ / НУМЕРОЛОГИЯ / ...).
   Колонки переносятся на узких desktop через flex-wrap. */
.mega-menu__inner {
  padding: var(--s-6);
  /* 32 */
  display: flex;
  flex-direction: column;
  /* label сверху, колонки под ним на всю ширину */
  gap: var(--s-5);
  /* 24 — label ↔ ряд колонок */
}

.mega-menu__label {
  font: var(--t-display-xl-bold-on-base);
  color: var(--c-text);
}

/* Узкий desktop: ужимаем внутренний паддинг, чтобы 5 колонок держались
   вплоть до порога бургера (~960–1020). */
@media (max-width: 1180px) {
  .mega-menu__inner {
    padding: var(--s-5);
  }

  /* 24 */
}

/* Ряд колонок-групп. flex-shrink позволяет 5 группам ужаться и влезть
   в один ряд (как на референсе); flex-grow:0 не даёт одиночной группе
   (напр. «Акции») растянуться на всю ширину. Перенос — только если даже
   ужатые колонки не помещаются (узкий desktop). */
.mega-menu__cols {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  /* 16 — между группами */
}

/* flex-basis 150 (а не фактическая ширина) определяет порог переноса:
   5 групп × 150 + 4 × 16 = 814px — влезают в один ряд до ~960px viewport,
   т.е. до появления бургера. min-width:0 позволяет тексту переноситься
   внутри колонки вместо схлопывания ряда. max-width — чтобы одиночная
   колонка (Акции) не растягивалась. */
.mega-menu__group {
  flex: 1 1 150px;
  min-width: 0;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  /* 12 — между title и списком */
}

.mega-menu__group-title {
  margin: 0;
  font: var(--t-body-xs-medium);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--c-text-muted);
}

/* NEW-плашка у пункта (напр. «Подсказка судьбы») */
.mega-menu__badge {
  margin-left: var(--s-2);
  padding: 0 var(--s-1);
  border-radius: var(--r-sm);
  font: var(--t-tag-strong);
  text-transform: uppercase;
  color: var(--c-online);
  background: rgba(8, 184, 102, 0.1);
  /* online-tint, нет токена */
}

/* ---------- Items list (no gap, каждый item — pill) ---------- */
.mega-menu__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.mega-menu__link {
  display: flex;
  align-items: center;
  min-height: 36px;
  /* min, не fixed — пункт в 2 строки не зажимается */
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-md);
  /* 16 — pill для 1 и 2 строк */
  font: var(--t-body-sm-medium);
  color: var(--c-text);
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}

.mega-menu__link:hover {
  background: var(--c-pink-softer);
  color: var(--c-magenta);
}

/* ============================================================
   MOBILE MENU — full-screen overlay (Figma 282:21154)

   Открывается по клику на «Меню» в tabbar. Position fixed,
   top-banner overlay + header-like top, phone+socials, accordion groups.
   Внизу остаётся видим tabbar (cта-mobile тоже видна, но обычно не нужна).
   ============================================================ */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 59;
  /* выше header (50) и backdrop (58), ниже tabbar (60) */
  background: #fff;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: var(--s-4);
  padding-bottom: 100px;
  /* место под tabbar */
  /* Slide-in справа: default state — за пределами viewport, transition по transform */
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .3s ease, visibility 0s linear .3s;
}

.mobile-menu::-webkit-scrollbar {
  display: none;
}

.mobile-menu.is-open {
  transform: translateX(0);
  visibility: visible;
  transition: transform .3s ease, visibility 0s linear 0s;
}

/* Tablet/desktop ≥768: меню как side-panel справа (tabbar скрыт ≥768) */
@media (min-width: 768px) {
  .mobile-menu {
    inset: 0 0 0 auto;
    width: 360px;
    padding-bottom: var(--s-4);
    box-shadow: -16px 0 38px rgba(59, 11, 52, 0.18);
    /* derived from shadow-card */
  }
}

/* ---------- Backdrop (затемнение основного контента) ---------- */
.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 58;
  /* выше header (50), под mobile-menu (59) */
  background: rgba(0, 0, 0, 0.5);
  /* overlay 50 — нет токена (есть --c-overlay-40) */
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility 0s linear .3s;
  cursor: pointer;
}

.mobile-menu-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .3s ease, visibility 0s linear 0s;
}

/* Старый burger-dropdown больше не нужен — burger открывает mobile-menu */
.header-burger__menu {
  display: none !important;
}

/* Lock scroll основного контента пока меню открыто */
body.mobile-menu-open {
  overflow: hidden;
}

/* ---------- Head (logo + Войти) ---------- */
.mobile-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s-5);
  /* 24 */
}

.mobile-menu__logo {
  display: inline-flex;
  height: 28px;
  color: var(--c-text);
}

.mobile-menu__logo svg {
  height: 100%;
  width: auto;
}

.mobile-menu__login {
  height: 40px;
  min-height: 40px;
  padding: var(--s-2) var(--s-4);
}

/* Видимость двух вариантов кнопки. Default — anon (Войти).
   .site-header.is-user — sibling от .mobile-menu (оба прямые дети body). */
.mobile-menu__login--user {
  display: none;
}

.site-header.is-user~.mobile-menu .mobile-menu__login--user {
  display: inline-flex;
}

.site-header.is-user~.mobile-menu .mobile-menu__login--anon {
  display: none;
}

/* ---------- Contact (phone + socials) ---------- */
.mobile-menu__contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--s-3);
  border-bottom: 1px solid var(--c-divider-soft);
  margin-bottom: var(--s-4);
}

.mobile-menu__phone {
  font: var(--t-body-sm-strong-on-base);
  /* 14/24 Semibold */
  color: var(--c-text);
  text-decoration: none;
}

.mobile-menu__socials {
  display: inline-flex;
  gap: var(--s-2);
}

.mobile-menu__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-text-tint-10);
  color: var(--c-text);
}

.mobile-menu__social svg {
  width: 16px;
  height: 16px;
}

/* ---------- Groups ---------- */
.mobile-menu__groups {
  display: flex;
  flex-direction: column;
}

/* Top-level group (Эзотерики, Доп. услуги) */
.mobile-menu__group {
  border-bottom: 1px solid var(--c-divider-soft);
}

.mobile-menu__group-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-4) 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: var(--t-section-heading-md);
  /* 18/24 Bold — top-level group */
  color: var(--c-text);
  text-align: left;
}

.mobile-menu__group.is-open .mobile-menu__group-btn {
  color: var(--c-magenta);
}

.mobile-menu__group-btn .mobile-menu__chev {
  transition: transform .2s ease;
}

.mobile-menu__group.is-open .mobile-menu__group-btn .mobile-menu__chev {
  transform: rotate(180deg);
}

.mobile-menu__subgroups {
  display: grid;
  grid-template-rows: minmax(0, 0fr);
  transition: grid-template-rows .3s ease;
  overflow: hidden;
}

.mobile-menu__group.is-open .mobile-menu__subgroups {
  grid-template-rows: minmax(0, 1fr);
}

/* Один анимируемый child grid'а — внутри него все секции-подгруппы стекаются
   нормальным потоком (без него несколько подгрупп валятся в одну grid-ячейку
   и накладываются друг на друга). */
.mobile-menu__subgroups-inner {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding-bottom: var(--s-3);
}

/* Sub-group — секция группы (ОБЩЕЕ / ГАДАНИЕ / ...) */
.mobile-menu__subgroup {
  padding-left: var(--s-4);
}

.mobile-menu__subgroup-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3) 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: var(--t-section-heading-sm);
  /* 16/24 Bold — sub-group */
  color: var(--c-text-muted);
  text-align: left;
}

.mobile-menu__subgroup.is-open .mobile-menu__subgroup-btn {
  color: var(--c-text);
}

.mobile-menu__subgroup-btn .mobile-menu__chev {
  transition: transform .2s ease;
}

.mobile-menu__subgroup.is-open .mobile-menu__subgroup-btn .mobile-menu__chev {
  transform: rotate(180deg);
}

/* Section-заголовок группы внутри дропдауна (ОБЩЕЕ / ГАДАНИЕ / ...) */
.mobile-menu__subtitle {
  margin: 0 0 var(--s-2);
  font: var(--t-body-xs-medium);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--c-text-muted);
}

.mobile-menu__badge {
  margin-left: var(--s-2);
  padding: 0 var(--s-1);
  border-radius: var(--r-sm);
  font: var(--t-tag-strong);
  text-transform: uppercase;
  color: var(--c-online);
  background: rgba(8, 184, 102, 0.1);
  /* online-tint, нет токена */
}

.mobile-menu__sublist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  flex-direction: column;
  gap: var(--s-3);
}

.mobile-menu__subgroup.is-open .mobile-menu__sublist {
  display: flex;
}

.mobile-menu__link {
  font: var(--t-body-sm-on-base);
  color: var(--c-text);
  text-decoration: none;
}

.mobile-menu__link:hover {
  color: var(--c-magenta);
}

.mobile-menu__chev {
  display: inline-flex;
  width: 16px;
  height: 16px;
  color: currentColor;
}

.mobile-menu__chev svg {
  width: 100%;
  height: 100%;
}


/* ============================================================
   CSS — PAGES (стили, специфичные для одной страницы)
   ============================================================ */
/* ============================================================
   CATALOG PAGE — breadcrumbs, фильтры, переключатель list/grid
   (используется на experts.html). Брейкпоинт desktop = 960px по comments.md.
   ============================================================ */

/* .breadcrumbs / .page-title — в src/css/typography.css */

/* H1 «Каталог экспертов» — центрируем по Figma 78:5186. */
.catalog-head__title {
  text-align: center;
}

/* ---------- Layout (mobile-first stack, desktop = grid sidebar) ----------
   minmax(0, 1fr) обязательно — без него grid-track auto-min-sizes по
   min-content потомков (nowrap-кнопки, цены), и на 360 viewport карточка
   распирает колонку >360, страница горизонтально overflow'ит. */
.catalog-layout {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 960px) {
  .catalog-layout {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: var(--s-6);
    align-items: start;
  }
}

/* ============================================================
   TOOLBAR — табы сортировок + переключатель вида (Figma 245:39206 / 254:20113)

   Layout: flex gap 16, табы — flex:1 (растягиваются), view-toggle справа.
   Все табы одного размера (padding 10), активный отличается только bg+color
   (как в spheres-tabs — стабильная ширина без layout-shift).
   ============================================================ */
.catalog-toolbar {
  display: flex;
  gap: var(--s-4);
  /* 16 */
  align-items: center;
  margin-bottom: var(--s-4);
}

.catalog-tabs {
  position: relative;
  /* якорь для абс. __indicator */
  display: inline-flex;
  gap: var(--s-2);
  /* 8 */
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
}

.catalog-tabs::-webkit-scrollbar {
  display: none;
}

/* Pill-подложка под активным табом. Геометрия (top/left/width/height)
   проставляется из JS — updateIndicator() в catalog-sort.js. */
.catalog-tabs__indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  background: var(--c-magenta);
  border-radius: var(--r-pill);
  pointer-events: none;
  transition: transform .28s cubic-bezier(.4, 0, .2, 1), width .28s cubic-bezier(.4, 0, .2, 1);
  z-index: 0;
}

.catalog-tab {
  position: relative;
  /* чтобы текст лежал над __indicator */
  z-index: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  /* off-scale — micro-gap */
  padding: 10px 14px;
  /* off-scale — pill-форма */
  border: 0;
  border-radius: var(--r-pill);
  /* совпадает с активным indicator */
  background: transparent;
  font: var(--t-body-sm-medium-on-snug);
  color: var(--c-text);
  cursor: pointer;
  white-space: nowrap;
  transition: color .25s ease;
}

.catalog-tab:hover {
  color: var(--c-magenta);
}

/* Активный таб — без bg (фон на __indicator), белый текст. */
.catalog-tab--active,
.catalog-tab--active:hover {
  color: #fff;
}

/* Зарезервированное место под стрелку ↑↓. Ширина одинакова для всех табов —
   при переключении layout не дёргается. У онлайн-статуса остаётся пустым. */
.catalog-tab__arrow {
  display: inline-block;
  width: 10px;
  /* off-scale — arrow slot */
  text-align: center;
  font-size: var(--fs-sm);
  line-height: 1;
  /* arrow-indicator — tight vertical render для символа ↑↓ */
}

/* Toolbar-end — обёртка правой части (на desktop одна view-toggle, на mobile
   sort-dropdown + разделитель + view-toggle в общей серой плашке). */
.catalog-toolbar-end {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
}

.catalog-toolbar-end__divider {
  display: none;
}

/* mobile-only — см. ниже */

/* View toggle — Figma 245:39193: bg var(--c-text-tint-10), padding 4, gap 4, кнопки 44×44. */
.view-toggle {
  display: inline-flex;
  gap: var(--s-1);
  /* 4 */
  padding: var(--s-1);
  /* 4 */
  background: var(--c-text-tint-10);
  border-radius: var(--r-md);
  /* 16 */
  flex-shrink: 0;
}

.view-toggle__btn {
  width: 44px;
  height: 44px;
  padding: 10px;
  /* off-scale 10 — Figma exact */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--r-xs);
  /* 12 — Figma */
  background: transparent;
  color: var(--c-text);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.view-toggle__btn:hover {
  color: var(--c-magenta);
}

.view-toggle__btn.is-active {
  background: #fff;
  color: var(--c-text);
}

.view-toggle__btn svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* ---------- Mobile actions (≤959) ----------
   Пара кнопок [Сортировка | Фильтры], заменяющих desktop-табы и sidebar.
   Высота 52 (как .view-toggle), фон серый. На desktop скрыты. */
.catalog-mobile-actions {
  display: none;
  /* desktop: показаны catalog-tabs + sidebar */
  gap: var(--s-2);
  /* 8 */
  flex: 0 0 auto;
}

.catalog-mobile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  /* 8 */
  height: 52px;
  /* off-scale 52 */
  padding: 0 var(--s-4);
  border: 0;
  border-radius: var(--r-md);
  /* 16 — как .view-toggle */
  background: var(--c-text-tint-10);
  font: var(--t-body-sm-medium-on-snug);
  color: var(--c-text);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s ease, color .15s ease;
}

.catalog-mobile-btn:hover {
  background: var(--c-text-tint-18);
}

.catalog-mobile-btn__text {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s-1);
}

/* Бейдж справа от «Фильтры» — magenta-кружок с цифрой выбранных фильтров. */
.catalog-mobile-btn__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  /* off-scale — tiny badge */
  border-radius: var(--r-pill);
  background: var(--c-magenta);
  color: #fff;
  font: var(--t-badge);
  /* 10/1 Semibold */
}

.catalog-mobile-btn__badge[hidden] {
  display: none;
}

/* ---------- Sort dropdown (≤959) ----------
   Trigger живёт справа в catalog-toolbar-end рядом с view-toggle, на mobile
   оборачивается в общую серую плашку. Меню — popover под trigger'ом,
   позицонируется absolute. Закрывается по клику вне / Esc.
   Поведение клика по пункту повторяет desktop-таб: первый клик — выбрать
   с дефолтным направлением, повторный — toggle ↑↓ (для toggleable ключей). */
.catalog-sort-dropdown {
  display: none;
}

/* desktop: скрыто */
.catalog-sort-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  /* 4 */
  height: 44px;
  /* off-scale 44 */
  padding: 0 var(--s-3);
  /* 12 */
  border: 0;
  background: transparent;
  border-radius: var(--r-xs);
  /* совпадает с view-toggle__btn */
  font: var(--t-body-sm-medium-on-snug);
  color: var(--c-text);
  cursor: pointer;
  white-space: nowrap;
}

.catalog-sort-dropdown__trigger:hover {
  color: var(--c-magenta);
}

.catalog-sort-dropdown__trigger[aria-expanded="true"] {
  background: #fff;
}

.catalog-sort-dropdown__menu {
  position: absolute;
  top: calc(100% + var(--s-1));
  /* 4 — gap под trigger */
  right: 0;
  z-index: 50;
  min-width: 220px;
  margin: 0;
  padding: var(--s-1);
  /* 4 */
  list-style: none;
  background: #fff;
  border: 1px solid var(--c-card-divider);
  border-radius: var(--r-md);
  /* 16 */
  box-shadow: var(--shadow-btn);
  display: flex;
  flex-direction: column;
  gap: 2px;
  /* off-scale — визуальный разделитель опций */
}

.catalog-sort-dropdown__menu[hidden] {
  display: none;
}

.catalog-sort-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  /* 12 */
  width: 100%;
  padding: var(--s-3) var(--s-4);
  /* 12 16 */
  border: 0;
  background: transparent;
  border-radius: var(--r-sm);
  /* 8 */
  font: var(--t-body-base);
  color: var(--c-text);
  cursor: pointer;
  text-align: left;
}

.catalog-sort-option:hover {
  background: var(--c-text-tint-10);
}

.catalog-sort-option.is-active {
  color: var(--c-magenta);
  font: var(--t-body-base-medium);
  /* 16/24 Medium — active вариант option */
}

.catalog-sort-option__arrow {
  display: inline-block;
  min-width: var(--s-3);
  font-size: var(--fs-sm);
  line-height: 1;
  /* arrow-indicator — tight vertical render */
  text-align: center;
}

@media (max-width: 959px) {
  .catalog-tabs {
    display: none;
  }

  .catalog-mobile-actions {
    display: inline-flex;
  }

  /* Сайдбар-фильтры скрыты на ≤959 — их роль играет modal[data-modal="catalog-filters"] */
  .filters {
    display: none;
  }

  /* Объединяем sort-dropdown + view-toggle в единую серую плашку:
     обёртка catalog-toolbar-end получает фон, view-toggle теряет свой. */
  .catalog-sort-dropdown {
    display: block;
    position: relative;
  }

  .catalog-toolbar-end {
    background: var(--c-text-tint-10);
    padding: var(--s-1);
    /* 4 */
    border-radius: var(--r-md);
    /* 16 */
    gap: var(--s-1);
    /* 4 */
  }

  .catalog-toolbar-end__divider {
    display: block;
    width: 1px;
    height: var(--s-5);
    background: var(--c-text-tint-20);
    margin: 0 var(--s-1);
    /* 4 — равные отступы вокруг */
    flex-shrink: 0;
  }

  /* Внутри объединённой плашки view-toggle теряет свой фон и padding —
     родитель уже играет роль контейнера. */
  .catalog-toolbar-end .view-toggle {
    background: transparent;
    padding: 0;
    border-radius: 0;
  }
}

/* ============================================================
   FILTERS sidebar (Figma 247:39240)

   Плоский vertical-стек групп без бекграунда, gap 24 между группами.
   Checkbox — кастомный 18×18 (white fallback, magenta-fill при checked,
   12×12 white check). Reset-кнопка тёмно-серая на var(--c-text-tint-10).
   ============================================================ */
.filters {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  /* 24 — между группами */
  padding: 0;
  background: transparent;
  border-radius: 0;
}

/* Sticky-к-нижней-границе для длинного сайдбара:
   top вычисляется JS-ом (catalog.js → updateFiltersSticky):
     • если filter ≤ viewport → top: 16px (classic top-sticky)
     • если filter > viewport → top: (viewportH − filterH − 16),
       т.е. отрицательное значение. Sticky активируется только когда верхний
       край сайдбара уйдёт за этот offset; в этот момент его нижний край
       оказывается ровно в нижней границе viewport (− 16).
   Тогда сайдбар сначала скроллится с потоком, а в нужный момент залипает
   нижним краем. align-self: start — чтобы grid-ячейка не растягивала filter. */
@media (min-width: 960px) {
  .filters {
    position: sticky;
    top: var(--s-4);
    /* fallback; реальное значение ставит JS */
    align-self: start;
  }
}

.filters__group {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

/* 16 — title↔list */
.filters__title {
  font: var(--t-filter-title);
  /* 16/32 Semibold (Figma 16.7/25.2 округлено) */
  color: var(--c-text);
}

.filters__list {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

/* 8 — между строками */
.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  /* off-scale 10 — Figma литерал */
  font: var(--t-body-sm-on-snug);
  color: var(--c-text);
  cursor: pointer;
  padding: 0;
}

.filter-row:hover {
  color: var(--c-magenta);
}

.filter-row>span {
  flex: 1;
  min-width: 0;
}

/* Custom checkbox — appearance reset + own visual.
   Active: magenta fill + white check (SVG в data-URL, чтобы не плодить файлов). */
.filter-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid var(--c-text-tint-20);
  border-radius: 4px;
  /* off-scale 4 — checkbox standard */
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: background .15s ease, border-color .15s ease;
}

.filter-row input[type="checkbox"]:hover {
  border-color: var(--c-magenta);
}

.filter-row input[type="checkbox"]:checked {
  background: var(--c-magenta);
  border-color: var(--c-magenta);
}

.filter-row input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none'%3E%3Cpath d='M5 9.2 7.8 12 13 6.5' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}

/* Reset кнопка — Figma 247:39274 */
.filters__reset {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  width: 100%;
  padding: var(--s-4) var(--s-3);
  /* 16 / 12 */
  border: 0;
  border-radius: var(--r-md);
  /* 16 */
  background: var(--c-text-tint-10);
  color: var(--c-text);
  font: var(--t-body-base-strong);
  cursor: pointer;
  transition: background .15s ease;
}

.filters__reset:hover {
  background: var(--c-text-tint-18);
}

/* ---------- Show more — Figma 171:17830: pill, bg var(--c-text-tint-10) ---------- */
.show-more {
  display: flex;
  justify-content: center;
  padding-top: var(--s-6);
}

.show-more__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  border: 0;
  min-width: 300px;
  /* минимальная ширина для крупного клик-таргета */
  padding: var(--s-4) var(--s-3);
  /* 16 / 12 */
  background: var(--c-text-tint-10);
  color: var(--c-text);
  font: var(--t-body-base-strong);
  border-radius: var(--r-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease;
}

.show-more__btn:hover {
  background: var(--c-text-tint-18);
}

.show-more__btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ============================================================
   EXPERTS LIST — два режима по data-view:
     detailed → горизонтальные карточки в один столбец, gap 16 (Figma 78:5188)
     compact  → grid вертикальных карточек 3-col на desktop, 2 на mid, 1 на mobile (Figma 116:15946)
   ============================================================ */
.experts-list {
  display: grid;
  gap: var(--s-4);
  /* 16 */
}

/* DETAILED view — список горизонтальных карточек.
   minmax(0, 1fr) — без этого внутренний nowrap-контент карточки (booking
   text, цены) расширяет track выше viewport на узких экранах. */
.experts-list[data-view="detailed"] {
  grid-template-columns: minmax(0, 1fr);
}

/* COMPACT view — сетка вертикальных карточек (auto-fill для адаптива) */
.experts-list[data-view="compact"] {
  /* min 296 даёт 3 колонки начиная с ~944w (3×296+2×16=920). Ниже — авто 2 col, потом 1. */
  grid-template-columns: repeat(auto-fill, minmax(296px, 1fr));
  justify-items: center;
}

/* Внутри сетки vertical карточки центрируются в своих ячейках */
.experts-list[data-view="compact"] .expert-vcard {
  width: 100%;
  max-width: 340px;
  /* по Figma — 340w в каталоге */
}

/* ============================================================
   PAGE — EXPERT (one expert profile, /expert.html, Figma 88:2736 / 88:2798)

   Двухколоночная раскладка main 800 + sidebar 472 + gap 56 на desktop (≥960).
   Mobile (≤959): main и sidebar — обычные flex-блоки в flex-column контейнере.
   Между секциями внутри колонок — gap, не margin (соблюдаем правило
   «секция самодостаточна, padding-block внутри»).
   ============================================================ */
.expert-body-section {
  padding-block: var(--section-padding-y);
}

/* Цитата эксперта идёт первой в main — убираем верхний паддинг,
   чтобы не дублировать отступ от section--tight + expert-body-section. */
.expert-quote-section {
  padding-block-start: 0;
}

.expert-layout {
  display: flex;
  flex-direction: column;
  gap: var(--s-7);
}

.expert-layout__main,
.expert-layout__sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--s-7);
  min-width: 0;
}

/* Header секции внутри expert-layout (заголовок над контентом) ─────── */
.expert-layout .expert-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
  margin-block-end: var(--s-5);
}

.expert-layout .expert-section-title {
  font: var(--t-display-2xl-on-xl);
  color: var(--c-text);
  margin: 0;
}

/* Десктоп: рядом 800 / 472, gap 56 */
@media (min-width: 960px) {
  .expert-layout {
    display: grid;
    grid-template-columns: minmax(0, 800px) 472px;
    gap: var(--s-8);
    align-items: start;
  }

  /* Sidebar sticky-к-нижней-границе для длинного main-контента:
     top вычисляется JS-ом (expert-sidebar.js → updateSidebarSticky):
       • если sidebar ≤ viewport → top: 16px (classic top-sticky)
       • если sidebar > viewport → top: (viewportH − sidebarH − 16),
         т.е. отрицательное значение. Sticky активируется только когда
         sidebar уйдёт за этот offset; в этот момент его нижний край
         оказывается в нижней границе viewport.
     Тогда sidebar сначала скроллится с потоком, а в нужный момент залипает
     нижним краем. align-self: start уже стоит на grid'е. */
  .expert-layout__sidebar {
    position: sticky;
    top: var(--s-4);
    /* fallback; реальное значение ставит JS */
  }
}

/* FAQ внутри main-колонки. На mobile должен быть ПОСЛЕДНИМ (после sidebar-секций).
   Через order на mobile-стеке + display:contents на main/sidebar. */
@media (max-width: 959px) {

  .expert-layout__main,
  .expert-layout__sidebar {
    display: contents;
    /* дети — прямые flex-children expert-layout */
  }

  .expert-service-faq-section {
    order: 99;
    /* в самый конец */
  }
}

/* ============================================================
   FAVORITE button — стиль аналогичен .expert-hero__audio:
   pill, белый фон, тонкая обводка, drop-shadow elev-1.
   Активное (.is-fav) — magenta-tint фон + magenta-текст.
   ============================================================ */
.expert-fav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  width: 100%;
  height: 48px;
  padding: var(--s-3);
  border: 1px solid var(--c-text-tint-20);
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--c-text);
  cursor: pointer;
  font: var(--t-body-base-strong);
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.15));
  /* shadow-elev-1 */
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.expert-fav:hover {
  background-color: #f3f1f3;
}

.expert-fav.is-fav {
  border-color: var(--c-magenta);
  background: var(--c-magenta-tint-10);
  color: var(--c-magenta);
}

.expert-fav.is-fav:hover {
  background-color: var(--c-magenta-tint-10);
}

.expert-fav__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.expert-fav__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.expert-fav__icon svg path {
  fill: currentColor;
}

/* Переключение outline ⇄ filled по .is-fav */
.expert-fav .expert-fav__icon--on {
  display: none;
}

.expert-fav.is-fav .expert-fav__icon--off {
  display: none;
}

.expert-fav.is-fav .expert-fav__icon--on {
  display: inline-flex;
}

/* Mobile-обёртка между hero и body — видна ≤959, скрыта ≥960 */
.expert-fav-mobile-wrap {
  padding-block: var(--s-4) 0;
}

@media (min-width: 960px) {
  .expert-fav-mobile-wrap {
    display: none;
  }
}

/* Desktop-вариант (внутри sticky-сайдбара) — виден ≥960, скрыт ≤959 */
.expert-fav--desktop {
  display: none;
}

@media (min-width: 960px) {
  .expert-fav--desktop {
    display: inline-flex;
  }
}

/* ============================================================
   /blog/ — листинг статей.

   Включает: blog-head (breadcrumbs + центр-title) + блог-grid 4×2.
   Карточка — см. components/article-card.css.
   ============================================================ */

/* ---------- Шапка ---------- */
.blog-head__title-row {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  /* 8 */
  align-items: center;
  text-align: center;
  margin-top: var(--s-7);
  /* 48 — Figma 206:77909 */
}

.blog-head__title {
  /* page-title уже задаёт Philosopher Regular + fluid 32→56. Здесь только центрируем. */
  text-align: center;
  max-width: 800px;
}

.blog-head__subtitle {
  font: var(--t-blog-subtitle);
  /* 18/28 — подзаголовок */
  color: var(--c-text-muted);
  max-width: 720px;
}

/* ---------- Грид ----------
   Колонки через auto-fill + minmax — без media-query: на любой ширине
   карточек влезает максимум возможных, остальные переносятся.
   • ≥1320 — 4 в ряд
   • ~960–1320 — 3 в ряд
   • ~600–960 — 2 в ряд
   • <600 — 1 в ряд
*/
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s-4);
  /* 16 — Figma */
}

/* ============================================================
   /blog/{slug}/ — страница статьи.

   Контентная колонка ширины 800px центрируется внутри контейнера 1328
   (как в Figma: 264 пустого слева + 800 контента + 264 справа).
   На mobile/tablet — растягиваем на всю ширину.
   ============================================================ */

/* ---------- Wrapper, ограничивающий ширину контентной колонки ---------- */
.article-layout {
  max-width: 800px;
  margin-inline: auto;
}

/* На странице статьи 5 секций идут единым потоком — убираем двойные
   section--tight padding'и, чтобы между ними не зияли 100px пустоты.
   Единый вертикальный ритм даёт padding-block у промежуточных секций
   + margin внутри блоков. */
.article-head {
  padding-bottom: 0;
}

.article-body-section,
.article-footer-section,
.article-themes-section {
  padding-block: clamp(24px, 3vw, 32px);
}

.article-experts-section {
  padding-top: clamp(24px, 3vw, 32px);
}

/* ---------- Breadcrumbs ----------
   Базовый стиль определён в pages/catalog.css (общий для всех страниц).
   Здесь — отступ от title. */
.article-head .breadcrumbs {
  margin-bottom: var(--s-7);
  /* 48 — Figma 206:77907 → 206:77909 (80 - 32) */
}

/* ---------- Title + мета ---------- */
.article-head__title-row {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  /* 24 — Figma 206:77839 (32 + 16) */
  margin-bottom: var(--s-5);
  /* 24 — до оглавления */
}

.article-title {
  font: var(--t-article-title);
  /* fluid 28→32 Bold */
  color: var(--c-text);
  margin: 0;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  /* 8 */
  font: var(--t-body-sm-on-base);
  /* 14/24 — дата + обновлено */
  color: var(--c-text-muted);
}

.article-meta__date,
.article-meta__updated {
  display: inline-block;
}

.article-meta__date::after,
.article-meta__updated::after {
  content: "·";
  margin-inline: var(--s-2);
  color: var(--c-text-muted);
}

.article-meta__read {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  /* 4 */
}

.article-meta__read-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  color: currentColor;
}

.article-meta__read-icon svg {
  width: 16px;
  height: 16px;
}

/* ---------- Оглавление ---------- */
.article-toc {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  /* 8 */
  padding-block: var(--s-2);
}

.article-toc__title {
  font: var(--t-display-lg-bold-on-base);
  color: var(--c-text);
  margin: 0;
}

.article-toc__list {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  /* 4 */
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}

.article-toc__item {
  counter-increment: toc;
}

.article-toc__link {
  display: inline-block;
  font: var(--t-body-sm);
  /* 14/20 — пункт оглавления */
  color: var(--c-text-muted);
  transition: color 0.15s ease;
}

.article-toc__link:hover {
  color: var(--c-magenta);
}

/* ============================================================
   Тело статьи
   ============================================================ */
.article-body {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  /* 24 — общий вертикальный ритм блоков */
}

.article-p {
  font: var(--t-body-base);
  color: var(--c-text);
  margin: 0;
}

/* Цитата (`type:'quote'`) и CTA-плашка (`type:'cta'`) — общий компонент
   `.callout` (см. components/callout.css). Здесь специфичных правил нет. */

/* ---------- H2 секции ---------- */
.article-h2 {
  font: var(--t-display-lg-bold-on-base);
  color: var(--c-text);
  margin: var(--s-4) 0 0;
  /* +16 над секцией поверх gap'a article-body */
  scroll-margin-top: var(--s-9);
  /* отступ при якорной прокрутке */
}

/* ---------- Крупная иллюстрация ---------- */
.article-figure {
  margin: 0;
  /* Figma 800×533 → aspect 800/533. */
  aspect-ratio: 800 / 533;
  border-radius: var(--r-2xl);
  /* 48 */
  overflow: hidden;
  background: var(--gradient-photo-fallback);
  /* default gradient fallback */
  position: relative;
}

.article-figure__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Палитры — единый токен для .article-card--gN и .article-figure--gN (см. tokens.css). */
.article-figure--g1 {
  background: var(--gradient-blog-1);
}

.article-figure--g2 {
  background: var(--gradient-blog-2);
}

.article-figure--g3 {
  background: var(--gradient-blog-3);
}

.article-figure--g4 {
  background: var(--gradient-blog-4);
}

.article-figure--g5 {
  background: var(--gradient-blog-5);
}

.article-figure--g6 {
  background: var(--gradient-blog-6);
}

.article-figure--g7 {
  background: var(--gradient-blog-7);
}

.article-figure--g8 {
  background: var(--gradient-blog-8);
}

/* ============================================================
   ARTICLE-FOOTER — автор, лайки, рейтинг, CTA-кнопка
   ============================================================ */
.article-footer {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  /* 24 */
}

.article-author {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  /* 8 */
}

.article-author__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0.667px solid var(--c-text);
  overflow: hidden;
  background: var(--gradient-photo-fallback);
  /* fallback на случай битого src */
  flex-shrink: 0;
}

.article-author__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-author__name {
  font: var(--t-article-author);
  /* Philosopher 18/24 */
  color: var(--c-text);
}

.article-stats {
  display: inline-flex;
  gap: var(--s-2);
  /* 8 */
}

.article-stat {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  /* 4 */
  padding: var(--s-1) var(--s-2);
  /* 4 8 */
  background: var(--c-text-tint-10);
  border-radius: var(--r-md);
  /* 16 */
  font: var(--t-body-xs);
  /* 12/16 — лайки/просмотры */
  color: var(--c-text-muted);
  border: 0;
}

.article-stat__icon {
  display: inline-flex;
  width: 12px;
  height: 12px;
  line-height: 1;
  font-size: var(--fs-xs);
}

/* Рейтинг + CTA — на mobile (Figma 247:40814) колонкой:
     4.99 (Philosopher 48/48)
     5 звёзд 48×48 на всю ширину, space-between
     кнопка «Оценить» — full-width pill
   На desktop (≥960) сворачивается в одну строку: рейтинг слева, кнопка справа.
   Последняя звезда — серая (пустая) через color на последнем элементе. */
.article-rating-row {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 */
}

.article-rating {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 */
  width: 100%;
}

.article-rating__value {
  font: var(--t-article-rating-value);
  /* fluid 36→48 Philosopher Regular — Figma 247:40816 */
  color: var(--c-text);
}

.article-rating__stars {
  display: inline-flex;
  gap: 2px;
  /* off-scale — micro-gap */
}

/* Поменьше чем рекомендованно Figma (48px) — по запросу заказчика звёзды
   в блоге компактнее. Используются единые .rating-star через CSS-mask. */
.article-rating__stars .rating-star {
  width: 18px;
  height: 18px;
}

.article-rating__count {
  font: var(--t-body-sm);
  color: var(--c-text-muted);
}

.article-cta-btn {
  width: 100%;
  text-align: center;
}

@media (min-width: 960px) {
  .article-rating-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .article-rating {
    flex-direction: row;
    align-items: center;
    gap: var(--s-3);
    /* 12 */
    width: auto;
  }

  .article-rating__stars {
    width: auto;
    justify-content: flex-start;
    gap: var(--s-2);
    /* 8 */
  }

  .article-rating__star {
    width: 24px;
    height: 24px;
  }

  .article-rating__star svg {
    width: 24px;
    height: 24px;
  }

  .article-cta-btn {
    width: auto;
    min-width: 240px;
  }
}

/* ============================================================
   ARTICLE-THEMES — теги
   ============================================================ */
.article-themes__title {
  font: var(--t-display-xl);
  color: var(--c-text);
  margin: 0 0 var(--s-5);
  /* 24 */
}

.article-themes__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  /* 8 */
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-theme {
  display: inline-flex;
  align-items: center;
  padding: var(--s-1) var(--s-3);
  /* 4 12 */
  background: var(--c-pink-soft);
  border-radius: var(--r-pill);
  font: var(--t-body-sm-on-base);
  /* 14/24 — тег темы */
  color: var(--c-text);
  transition: background 0.15s ease;
}

.article-theme:hover {
  background: var(--c-pink-softer);
}

/* ============================================================
   ARTICLE-EXPERTS — список экспертов под статьёй
   ============================================================ */
.article-experts__title {
  margin: 0 0 var(--s-5);
  /* 24 */
}

.article-experts__more {
  display: flex;
  justify-content: center;
  margin-top: var(--s-5);
  /* 24 */
}

.article-experts__more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  /* 8 — текст + стрелка */
  min-width: 300px;
  /* Figma 205:77144 */
}

.article-experts__more-icon {
  display: inline-flex;
  height: 16px;
  color: currentColor;
}

/* height + width:auto держит аспект chevron'а (viewBox 8×14), без распирания в квадрат. */
.article-experts__more-icon svg {
  height: 16px;
  width: auto;
}

/* ============================================================
   Доп. body-блоки (SEO + /about/...)
   ============================================================ */
/* Маркированный список — display:block (display:flex ломал list-style). */
.article-list {
  margin: 0;
  padding-left: var(--s-5);
  list-style: disc outside;
  font: var(--t-body-base);
  color: var(--c-text);
}

.article-list>li {
  margin-bottom: var(--s-2);
}

.article-list>li:last-child {
  margin-bottom: 0;
}

.article-list li::marker {
  color: var(--c-magenta);
}

/* Общий стиль <mark> в article-body — magenta-solid, белый текст
   (как .how-step__body mark на главной). */
.article-body mark {
  background: var(--c-magenta);
  color: #fff;
  padding: 0 var(--s-1);
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.article-numbered {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.article-numbered li {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
}

.article-numbered__marker {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--c-magenta-tint-10);
  color: var(--c-magenta);
  font: var(--t-body-sm-strong);
}

.article-numbered__text {
  font: var(--t-body-base);
  color: var(--c-text);
  padding-top: 4px;
}

/* .article-numbered mark — наследует общий стиль .article-body mark (magenta+white) */

.article-hero-image {
  margin: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--gradient-primary);
}

.article-hero-image__media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.article-hero-image__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--s-5) var(--s-6);
  font: var(--t-display-xl-bold);
  color: var(--c-text-on-dark);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
}

.article-cta-block {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-5) var(--s-6) var(--s-6);
  /* 24 32 32 — top 24, остальные 32 */
  border-radius: var(--r-md);
  background: var(--c-pink-soft);
}

.article-cta-block__brand {
  font: var(--t-footer-brand);
  color: var(--c-magenta);
  letter-spacing: 1px;
}

.article-cta-block__title {
  margin: 0;
  font: var(--t-display-xl);
  color: var(--c-text);
}

.article-cta-block__text {
  margin: 0;
  font: var(--t-body-base);
  color: var(--c-text);
}

.experts-portraits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--s-4);
}

.experts-portrait {
  display: flex;
}

.experts-portrait__link {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  width: 100%;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease;
}

.experts-portrait__link:hover {
  transform: translateY(-2px);
}

.experts-portrait__photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-text-tint-10);
}

.experts-portrait__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.experts-portrait__name {
  font: var(--t-body-sm-medium);
  color: var(--c-text);
  text-align: center;
}

/* --- Агрегированные отзывы (для /about/reviews/) ---
   .feedback — общий компонент (стили в sections/expert-reviews.css).
   Здесь только wrap-список + gap (как у .expert-reviews-list). */
.seo-reviews {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 — между карточками отзывов */
}

/* Скрытые отзывы (за пределами data-initial) — раскрываются «Загрузить ещё». */
.seo-review--hidden {
  display: none;
}

/* Ссылка на эксперта под текстом отзыва (агрегированная страница отзывов):
   маленький кружок-аватар + «Консультация с Имя Фамилия». */
.feedback__expert-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  /* hug по контенту, не на всю ширину */
  gap: var(--s-2);
  margin-top: var(--s-1);
  margin-left: calc(-1 * var(--s-2));
  /* компенсация padding — текст ровно по краю */
  padding: var(--s-2);
  /* 8 со всех сторон */
  border-radius: 12px;
  /* off-scale */
  font: var(--t-body-sm-medium);
  color: var(--c-magenta);
  text-decoration: none;
  transition: background-color .15s ease;
}

.feedback__expert-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.feedback__expert-link:hover {
  background: var(--c-pink-soft);
}

/* ============================================================
   /{category}/{slug}/ — SEO-страница (Figma 171:17955).

   Большую часть наследует от article.css: .article-layout (max-w 800),
   .article-p / .article-h2 / .article-figure / .callout. Здесь — только
   специфика SEO: шапка без меты-дат, заголовок 24/32, и обёртка для
   списка экспертов внутри текста.
   ============================================================ */

.seo-head {
  padding-bottom: 0;
}

.seo-head .breadcrumbs {
  margin-bottom: var(--s-7);
}

/* 48 — Figma 171:18006 */
.seo-head__copy {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}

/* Меньше, чем .page-title (32→56) — у SEO заголовок 24/32 (Figma 171:18015). */
.seo-title {
  font: var(--t-seo-title);
  /* fluid 24→32 Bold */
  color: var(--c-text);
  margin: 0;
}

.seo-lead {
  margin: 0;
  font: var(--t-body-base);
  /* 16/24 */
  color: var(--c-text);
}

/* Чтобы тело шло вплотную к шапке, без двойного section--tight padding'a. */
.seo-body-section {
  padding-top: var(--s-5);
}

/* 24 */

/* Embedded experts-блок внутри тела SEO-страницы */
.seo-experts {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  /* 24 */
  margin-block: var(--s-4);
  /* 16 — отбивка от соседних p/h2 */
}

.seo-experts__more {
  display: flex;
  justify-content: center;
}

.seo-experts__more-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  /* 8 */
  min-width: 300px;
}

.seo-experts__more-icon {
  display: inline-flex;
  height: 16px;
  color: currentColor;
}

/* height + width:auto держит аспект chevron'а (viewBox 8×14), без распирания в квадрат. */
.seo-experts__more-icon svg {
  height: 16px;
  width: auto;
}

/* ============================================================
   /znaniya/ — листинг материалов раздела «Знания».
   ============================================================ */
.znaniya-head {
  padding-bottom: 0;
}

.znaniya-head .breadcrumbs {
  margin-bottom: var(--s-5);
}

.znaniya-head__title {
  margin: 0 0 var(--s-4);
}

.znaniya-head__lead {
  margin: 0;
  font: var(--t-body-lg);
  color: var(--c-text-muted);
  max-width: 720px;
}

.znaniya-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--s-5);
  /* 24 */
}

.znaniya-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-5);
  /* 24 */
  border: 1px solid var(--c-card-divider);
  border-radius: var(--r-md);
  background: #fff;
  color: inherit;
  text-decoration: none;
  height: 100%;
  transition: border-color .15s ease, transform .15s ease;
}

.znaniya-card:hover {
  border-color: var(--c-magenta-border);
  transform: translateY(-2px);
}

.znaniya-card__title {
  margin: 0;
  font: var(--t-display-xl-bold);
  /* Philosopher Bold 24/32 */
  color: var(--c-text);
}

.znaniya-card__lead {
  margin: 0;
  font: var(--t-body-sm);
  color: var(--c-text-muted);
  flex: 1 1 auto;
  /* выравнивает «Читать» по нижнему краю */
}

.znaniya-card__more {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font: var(--t-body-sm-strong);
  color: var(--c-magenta);
}

.znaniya-card__icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
}

.znaniya-card__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ============================================================
   /lk/ — ЛИЧНЫЙ КАБИНЕТ → ДАШБОРД
   Figma 95:9799 desktop / 97:12498 mobile.

   Layout:
     desktop ≥960 — grid 192 | 1fr (sidebar + main col 1080)
     mobile        — одна колонка, sidebar скрыт.

   Виджеты сетки на desktop — auto-fill / minmax — карточки сами укладываются
   по ширине, без брейкпоинтных подкруток.
   ============================================================ */

.lk-head .breadcrumbs {
  margin-bottom: 0;
}

/* Убираем двойной section-padding между crumbs и контентом — был визуальный
   зазор 64-128px. Тот же приём, что на странице статьи. */
.lk-head {
  padding-bottom: 0;
}

.lk-section {
  padding-top: var(--s-5);
}

/* 24 — небольшой gap */

/* ---------- Layout ---------- */
.lk-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-6);
  /* 32 */
}

@media (min-width: 960px) {
  .lk-layout {
    grid-template-columns: 192px minmax(0, 1fr);
    gap: var(--s-8);
    /* 56 — Figma 95:9851 left offset */
    align-items: start;
  }
}

/* ============================================================
   SIDEBAR (Figma 95:9889)
   На mobile скрыт (по запросу — табы не показываем).
   ============================================================ */
.lk-sidebar {
  display: none;
}

@media (min-width: 960px) {
  .lk-sidebar {
    display: block;
  }
}

.lk-tabs {
  display: flex;
  flex-direction: column;
}

/* Таб-компонент Figma 84:7629:
     Default — bg white, color #282227
     Hover   — bg rgba(40,34,39,0.1), color #282227
     Current — bg #aa2692, color white */
.lk-tab {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  /* 12 */
  padding: 10px;
  /* off-scale 10 — Figma exact */
  min-height: 50px;
  /* off-scale — Figma */
  border-radius: var(--r-md);
  /* 16 */
  font: var(--t-body-sm-medium-on-snug);
  color: var(--c-text);
  background: #fff;
  transition: background 0.15s ease, color 0.15s ease;
}

.lk-tab:hover {
  background: var(--c-text-tint-10);
}

.lk-tab--active,
.lk-tab--active:hover {
  background: var(--c-magenta);
  color: var(--c-text-on-dark);
}

/* «Выйти» — button-вариант таба, отделён от навигации. Тонкая линия живёт
   в ::before на отрицательном top'е, ровно посередине margin'а — расстояние
   от линии до предыдущего таба и до самого «Выйти» одинаковое. Border-radius
   и padding наследуются от .lk-tab — то есть форма та же. */
.lk-tab--logout {
  border: 0;
  cursor: pointer;
  text-align: left;
  margin-top: var(--s-4);
  /* 16 = 8 над линией + 8 под линией */
  position: relative;
  color: var(--c-text-muted);
  font: inherit;
  font: var(--t-body-sm-medium-on-snug);
}

.lk-tab--logout::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: calc(-1 * var(--s-2));
  /* 8 — половина margin'а */
  height: 1px;
  background: var(--c-divider-soft);
}

.lk-tab--logout:hover {
  background: var(--c-danger-tint-10);
  color: var(--c-danger);
}

/* ============================================================
   LK PANE — секции для SPA-переключения между табами ЛК.
   Серверный рендер кладёт все pane'ы сразу, активный получает .is-active.
   JS-роутер (lk-router.js) переключает .is-active без reload.
   ============================================================ */
.lk-pane {
  display: none;
}

.lk-pane.is-active {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  /* 24 — между banner/h1/виджетами внутри pane */
  animation: lk-pane-in .22s ease-out;
}

@keyframes lk-pane-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lk-pane.is-active {
    animation: none;
  }
}

/* ============================================================
   MOBILE TABS — горизонтальный scroller с разделами ЛК (≤959).
   На desktop скрыт — там работает sidebar.
   ============================================================ */
.lk-mobile-tabs {
  display: none;
}

@media (max-width: 959px) {
  .lk-mobile-tabs {
    display: flex;
    gap: var(--s-2);
    /* 8 */
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-bottom: var(--s-4);
    /* 16 — отступ перед banner/title */
    padding-bottom: var(--s-1);
    /* Full-bleed: вылезаем за .container gutter до края viewport, чтобы скролл
       шёл до самого edge экрана. padding-inline = тот же gutter — первый таб
       начинается ровно под левым краем контента (тот же паттерн что video-experts). */
    width: 100vw;
    margin-inline: calc(-1 * clamp(16px, 3.7vw + 2.67px, 56px));
    padding-inline: clamp(16px, 3.7vw + 2.67px, 56px);
  }

  .lk-mobile-tabs::-webkit-scrollbar {
    display: none;
  }
}

.lk-mobile-tab {
  flex-shrink: 0;
  padding: var(--s-2) var(--s-3);
  /* 8 12 */
  border-radius: var(--r-pill);
  background: var(--c-text-tint-10);
  font: var(--t-body-sm-medium-on-snug);
  color: var(--c-text);
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}

.lk-mobile-tab:hover {
  background: var(--c-text-tint-18);
}

.lk-mobile-tab--active {
  background: var(--c-magenta);
  color: #fff;
}

/* ============================================================
   LOGOUT MOBILE — full-width кнопка «Выйти» внизу страницы ЛК.
   На desktop (≥960) скрыта — там пункт «Выйти» живёт в сайдбаре.
   ============================================================ */
.lk-logout-mobile {
  display: none;
}

@media (max-width: 959px) {
  .lk-logout-mobile {
    display: block;
    margin-top: var(--s-5);
    /* 24 — отступ от последнего блока */
  }
}

.lk-logout-mobile__btn {
  width: 100%;
  padding: var(--s-3);
  /* 12 */
  border: 0;
  background: transparent;
  border-radius: var(--r-md);
  cursor: pointer;
  font: var(--t-body-base-strong);
  color: var(--c-danger);
  text-align: center;
  transition: background .15s ease;
}

.lk-logout-mobile__btn:hover {
  background: var(--c-danger-tint-10);
}

/* ============================================================
   MAIN COLUMN — h1 + banner + widgets
   ============================================================ */
.lk-main {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  /* 24 */
  container-type: inline-size;
  container-name: lk-main;
}

.lk-title {
  /* H1 «Личный кабинет» — Figma 95:10396 (Philosopher Bold 56px на desktop).
     .page-title уже даёт fluid 32→56, переиспользуем. */
  margin: 0;
}

/* ---------- BANNER ----------
   Figma 95:10426 — 1080×218 dark-purple карточка с текстом справа.
   В отсутствие реальной картинки — magenta-purple градиент-плейсхолдер. */
.lk-banner {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  /* 24 — между h1 и баннером */
}

.lk-banner__card {
  /* mobile (Figma 97:12691) — radius 16; desktop (95:10426) — radius 48 */
  border-radius: var(--r-md);
  /* 16 */
  background: var(--gradient-photo-fallback) left center / cover no-repeat;
  /* пока картинка не загрузилась */
  background-image: url("/assets/images/lk/banner.jpg");
  background-size: cover;
  background-position: left center;
  /* показываем левую часть фотки на узких экранах */
  min-height: 114px;
  /* mobile (Figma 97:12691 — 114) */
  aspect-ratio: 1080 / 218;
  /* desktop пропорции — задают высоту */
}

@media (min-width: 960px) {
  .lk-banner__card {
    border-radius: var(--r-2xl);
    /* 48 */
  }
}

/* ============================================================
   WIDGETS — карточки дашборда (Figma 95:10524)

   Раскладка Figma:
     Row 1: [Баланс 400] + [До бонуса flex]
     Row 2: [Реферал 400] + [Комплимент flex] + [Выходные flex]

   На mobile — ряды разворачиваются в колонку.
   Базовая карточка — .card-bordered (см. components/card.css).
   ============================================================ */
.lk-widgets {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 */
}

.lk-widgets__row {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 */
}

@media (min-width: 960px) {
  .lk-widgets__row {
    flex-direction: row;
    align-items: stretch;
  }
}

/* Базовая карточка-виджет уже даёт border/radius/padding.
   Здесь — только размеры и специфичный layout-внутри. */
.lk-card {
  margin: 0;
}

.lk-card--grow {
  flex: 1 1 0;
  min-width: 0;
}

/* В grow-карточках (1 ребёнок-title + 1 кнопка) прижимаем «Подробнее» к низу,
   чтобы все 3 карточки в ряду визуально выровнялись по нижнему краю. */
.lk-card--grow>.link-more {
  margin-top: auto;
}

@media (min-width: 960px) {

  .lk-card--balance,
  .lk-card--referral {
    flex: 1 1 320px;
    max-width: 400px;
  }
}

/* На узком desktop (main-колонка ≤800px) трёхкартный ряд «Реферал + Комплимент +
   Выходные» превращается в 2+1 grid: Реферал на всю ширину сверху, Комплимент и
   Выходные рядом в подряду снизу. Компактнее стопки, читабельнее 3-в-ряд.
   Container query вместо @media — следует п.5 comments.md
   («не привязываемся к viewport, если плохо масштабируется»). */
@container lk-main (max-width: 800px) {
  .lk-widgets__row:has(> .lk-card--grow:nth-child(3)) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lk-widgets__row:has(> .lk-card--grow:nth-child(3))>.lk-card--referral {
    grid-column: 1 / -1;
    max-width: none;
  }
}

.lk-card__title {
  margin: 0;
  font: var(--t-modal-step-title);
  color: var(--c-text);
}

.lk-card__head {
  /* Используется в карточке реферала: title слева + «Подробнее» справа в одной строке */
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-4);
  width: 100%;
}

/* ---------- Карта «Баланс» (Figma 95:10438) — row layout ----------
   Баланс-блок (Label + 7000) растягивается, кнопка справа. */
.lk-card--balance {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  /* 24 */
  min-height: 106px;
}

.lk-balance {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  /* 2px по Figma — но min step 4 */
  flex: 1 1 0;
  min-width: 0;
}

.lk-balance__label {
  font: var(--t-body-xs-medium);
  color: var(--c-text-muted);
}

.lk-balance__value {
  font: var(--t-lk-balance-value);
  color: var(--c-text);
}

.lk-balance__cta {
  flex-shrink: 0;
  padding: var(--s-2) var(--s-3);
  /* 8 12 — Figma 95:10755 */
  min-height: 40px;
}

/* ---------- Реферальная ссылка + copy-кнопка (Figma 95:10512) ---------- */
.lk-referral__field {
  display: flex;
  gap: var(--s-4);
  /* 16 */
  width: 100%;
}

.lk-referral__input {
  flex: 1 1 0;
  min-width: 0;
  height: 48px;
  padding: var(--s-3) var(--s-4);
  /* 12 16 */
  border: 1px solid var(--c-card-divider);
  border-radius: var(--r-md);
  /* 16 */
  background: var(--c-text-tint-5);
  /* Figma 95:10480 */
  font: var(--t-body-base);
  color: var(--c-text);
}

.lk-referral__copy {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  /* 100 — Figma pill */
  background: var(--c-text-tint-10);
  border: 0;
  color: var(--c-text);
  cursor: pointer;
  transition: background 0.15s ease;
}

.lk-referral__copy:hover {
  background: var(--c-text-tint-18);
}

.lk-referral__copy svg {
  width: 24px;
  height: 24px;
}

/* ============================================================
   /lk/popolneniya/ — Пополнение счета (Figma 95:10569)
   ============================================================ */

/* ---------- Большая карточка баланса (Figma 95:10589, 400×184) ---------- */
.lk-balance-large {
  width: 100%;
  max-width: 400px;
  gap: var(--s-5);
  /* 24 — Figma вертикальный gap */
}

.lk-balance-large__cta {
  width: 100%;
  min-height: 48px;
}

/* ---------- Section title / subtitle (общие для способов оплаты + истории) ---------- */
.lk-section-title {
  margin: 0;
  font: var(--t-display-xl);
  color: var(--c-text);
}

.lk-section-sub {
  margin: var(--s-2) 0 0;
  /* 8 */
  font: var(--t-body-base);
  color: var(--c-text-muted);
}

/* ---------- Способы оплаты (Figma 95:10948) ---------- */
.lk-payment-methods__head {
  margin-bottom: var(--s-4);
  /* 16 */
}

/* Раскладка способов оплаты:
     mobile  — 4 карты в 2×2 (156×72), «Добавить» full-width 48 высотой ниже
     desktop — 5 равных колонок: 4 платежки + «Добавить» в одну строку. */
.lk-payment-methods__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4);
  /* 16 */
}

.lk-payment-methods__grid .lk-pm-card--add {
  grid-column: 1 / -1;
  /* full-width на mobile */
}

/* Локальный брейкпоинт 720: ширина, при которой 5 платежных карточек 156×72
   перестают помещаться в 2-колоночную сетку. Не привязано к viewport-конвенции
   430/960 — это контентный порог именно payment-methods grid'а. */
@media (min-width: 720px) {
  .lk-payment-methods__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .lk-payment-methods__grid .lk-pm-card--add {
    grid-column: auto;
    /* возврат в общую сетку */
  }
}

.lk-pm-card {
  /* Высота: mobile 72 (Figma 97:12348), desktop 84 (Figma 95:10876).
     Ширину отдаём grid'у; SVG-логотип внутри сам масштабируется через
     width:100%/height:100%. */
  height: 72px;
  padding: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.lk-pm-card:hover {
  background: var(--c-text-tint-10);
}

.lk-pm-card--active {
  border-color: var(--c-magenta);
  box-shadow: inset 0 0 0 1px var(--c-magenta);
  /* двойной бордер визуально = активный */
}

.lk-pm-card__logo {
  display: block;
  width: 100%;
  height: 100%;
}

.lk-pm-card__logo svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Локальный брейкпоинт 720: ширина, при которой 5 платежных карточек 156×72
   перестают помещаться в 2-колоночную сетку. Не привязано к viewport-конвенции
   430/960 — это контентный порог именно payment-methods grid'а. */
@media (min-width: 720px) {
  .lk-pm-card {
    height: 84px;
  }
}

/* Кнопка «Добавить» (Figma 96:10950) — такая же card-bordered карточка,
   гайдлайн: иконка плюс + надпись «Добавить» по центру, 204×84. */
.lk-pm-card--add {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  /* 8 */
  height: 48px;
  /* mobile — full-width 48; desktop переопределяем ниже */
  padding: var(--s-3);
  /* 12 — Figma 96:10950 */
  border: 0;
  border-radius: var(--r-md);
  /* 16 */
  background: var(--c-text-tint-10);
  font: var(--t-body-base-strong);
  color: var(--c-text);
  cursor: pointer;
  transition: background 0.15s ease;
}

.lk-pm-card--add:hover {
  background: var(--c-text-tint-18);
}

/* Локальный брейкпоинт 720: ширина, при которой 5 платежных карточек 156×72
   перестают помещаться в 2-колоночную сетку. Не привязано к viewport-конвенции
   430/960 — это контентный порог именно payment-methods grid'а. */
@media (min-width: 720px) {
  .lk-pm-card--add {
    height: 84px;
  }

  /* в общем ряду с платежками */
}

.lk-pm-card__plus {
  display: inline-flex;
  width: 24px;
  height: 24px;
  color: currentColor;
}

.lk-pm-card__plus svg {
  width: 24px;
  height: 24px;
}

/* ---------- История платежей (Figma 95:10805) ---------- */
.lk-payment-history {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  /* 24 — между h2 и таблицей */
}

.lk-table {
  display: flex;
  flex-direction: column;
}

.lk-table__row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--s-4);
  /* 16 */
  align-items: center;
  padding: var(--s-2) var(--s-4);
  /* 8 16 — Figma row 56 высотой */
  min-height: 56px;
  border-bottom: 1px solid var(--c-card-divider);
}

.lk-table__row--head {
  border-bottom: 1px solid var(--c-text-tint-10);
}

.lk-table__cell {
  font: var(--t-body-base);
  color: var(--c-text);
}

.lk-table__row--head .lk-table__cell {
  font: var(--t-body-base-strong);
  /* 16/24 Semibold — заголовки колонок */
  color: var(--c-text-muted);
}

/* На mobile (Figma 97:12468) таблица → горизонтальные карточки 328×84.
   Левая часть: дата (14/24, muted) + сумма (Philosopher 24/24, dark).
   Правая часть: статус с цветной точкой. */
/* Локальный брейкпоинт 719 (зеркальный 720 для desktop-варианта payment-methods):
   на узком экране таблица истории платежей превращается в карточный список. */
@media (max-width: 719px) {
  .lk-table {
    gap: var(--s-3);
    display: flex;
    flex-direction: column;
  }

  .lk-table__row--head {
    display: none;
  }

  .lk-table__row {
    grid-template-columns: 1fr auto;
    gap: 0;
    padding: 0;
    align-items: center;
    border: 1px solid var(--c-card-divider);
    border-radius: var(--r-md);
    min-height: 84px;
  }

  /* Колонка 1 — стопка [дата + сумма]. Использует первые две cell'ы как блок. */
  .lk-table__cell {
    padding: var(--s-4);
    /* 16 */
  }

  .lk-table__cell[data-label="Дата"] {
    grid-column: 1;
    grid-row: 1;
    padding-bottom: 0;
    font: var(--t-body-sm-medium-on-base);
    color: var(--c-text-muted);
  }

  .lk-table__cell[data-label="Сумма"] {
    grid-column: 1;
    grid-row: 2;
    padding-top: var(--s-1);
    font: var(--t-lk-payment-amount);
    /* 24/24 Medium Inter — Figma 97:12460 */
  }

  .lk-table__cell[data-label="Статус"] {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: center;
  }
}

/* ---------- Статус-пилюля с цветной точкой ---------- */
.lk-status {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  /* 8 */
}

.lk-status__dot {
  display: inline-block;
  width: var(--s-2);
  height: var(--s-2);
  border-radius: 50%;
  background: var(--c-text-muted);
  /* default */
}

.lk-status--pending .lk-status__dot {
  background: var(--c-star);
}

/* gold — в процессе */
.lk-status--success .lk-status__dot {
  background: var(--c-online);
}

/* зелёный — выполнено */

/* ============================================================
   /lk/orders/ — список заказов/консультаций.
   Карточный список (а не таблица — внутри фото эксперта).
   Mobile: stack column. Desktop: row [фото | body | right-side].
   ============================================================ */
.lk-orders {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  /* 12 — между карточками */
}

.lk-order {
  /* <button> — сбрасываем UA-стили, делаем как карточка-link */
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  grid-template-areas:
    "photo body"
    "right right";
  gap: var(--s-3);
  /* 12 mobile */
  padding: var(--s-4);
  /* 16 */
  background: #fff;
  border: 1px solid var(--c-card-divider);
  border-radius: var(--r-md);
  /* 16 */
  align-items: start;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  /* сбрасываем UA Inter-default → наследуем от body */
  color: inherit;
  transition: border-color .15s ease, background .15s ease;
}

.lk-order:hover {
  border-color: var(--c-magenta-border);
  background: var(--c-text-tint-5);
}

.lk-order:focus-visible {
  outline: 2px solid var(--c-magenta);
  outline-offset: 2px;
}

@media (min-width: 720px) {
  .lk-order {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    grid-template-areas: "photo body right";
    align-items: center;
    gap: var(--s-4);
    /* 16 desktop */
  }
}

.lk-order__photo {
  grid-area: photo;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--c-text-tint-10);
  flex-shrink: 0;
}

.lk-order__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lk-order__body {
  grid-area: body;
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  /* 4 — плотно: name → theme → meta */
  min-width: 0;
}

.lk-order__name {
  margin: 0;
  font: var(--t-body-base-strong);
  /* 16/24 Semibold */
  color: var(--c-text);
}

.lk-order__theme {
  margin: 0;
  font: var(--t-body-sm);
  /* 14/20 */
  color: var(--c-text);
  /* На широких карточках сокращаем длинные темы в одну строку с ellipsis. */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lk-order__meta {
  margin: 0;
  font: var(--t-body-xs);
  /* 12/16 */
  color: var(--c-text-muted);
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--s-1);
  /* 4 */
  align-items: center;
}

.lk-order__dot {
  color: var(--c-text-tint-40);
}

/* серая точка-разделитель */

.lk-order__right {
  grid-area: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--s-1);
  /* 4 */
  text-align: right;
}

@media (max-width: 719px) {

  /* На mobile right-блок располагается под body, прижимаемся к левому краю */
  .lk-order__right {
    align-items: flex-start;
    text-align: left;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }
}

.lk-order__amount {
  font: var(--t-body-base-strong);
  /* 16/24 Semibold */
  color: var(--c-text);
  white-space: nowrap;
}

.lk-order__status {
  font: var(--t-body-xs-medium);
  /* 12/16 Medium */
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  /* 4 */
  white-space: nowrap;
}

.lk-order__status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.lk-order__status--completed {
  color: var(--c-online);
}

/* зелёный */
.lk-order__status--scheduled {
  color: var(--c-magenta);
}

/* magenta */
.lk-order__status--in-progress {
  color: #b87d08;
}

/* busy/amber, нет токена */
.lk-order__status--cancelled {
  color: var(--c-text-muted);
}

/* серый */

/* ============================================================
   /lk/favorites/ — сетка сохранённых экспертов.
   Рендерится JS-ом (см. renderers['lk-favorites-grid']) через
   TPL.expertCardVertical — те же карточки, что в stories/strict.
   ============================================================ */
.lk-favorites {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--s-5);
  /* 24 */
}

.lk-favorites__empty {
  margin: 0;
  padding: var(--s-7) var(--s-5);
  /* 48 24 */
  text-align: center;
  background: var(--c-text-tint-5);
  border-radius: var(--r-md);
  font: var(--t-body-base);
  color: var(--c-text-muted);
}

/* ============================================================
   /lk/bonus-minutes/ — 4 блока подряд:
   balance (большая карточка) → referral → onboarding → history.
   ============================================================ */

/* ---------- TOP — balance + referral в 2 колонки (desktop) ---------- */
.lk-bonus-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-4);
  /* 16 */
}

@container lk-main (min-width: 720px) {
  .lk-bonus-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--s-5);
    /* 24 */
    /* align-items: stretch (default) — обе карточки одной высоты автоматически */
  }
}

/* Снимаем max-width 400 у реферал-карточки в контексте bonus-top (он унаследован
   от дашборда, где её ширина ограничивается, а здесь в 2-колоночном grid должна
   тянуться на всю 1fr-колонку). Magenta-balance — тоже full-width. */
.lk-bonus-top>.lk-card--referral {
  max-width: none;
}

.lk-bonus-top>.lk-bonus-balance,
.lk-bonus-top>.lk-card--referral {
  width: 100%;
}

/* ---------- BALANCE — magenta-card с белой цифрой ----------
   Высота — по референсу .lk-card--referral (заголовок + поле ввода ≈ 140-160px).
   Через padding + размер value подгоняем visual height примерно как у реферала. */
.lk-bonus-balance {
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* центрируем content вертикально внутри grid stretch */
  gap: var(--s-1);
  width: 100%;
  padding: var(--s-4) var(--s-5);
  /* 16 / 24 — компактнее, чем было */
  border-radius: var(--r-md);
  background: var(--gradient-primary);
  color: var(--c-text-on-dark);
  box-sizing: border-box;
}

.lk-bonus-balance__label {
  font: var(--t-body-sm);
  color: rgba(255, 255, 255, 0.7);
}

.lk-bonus-balance__value {
  font: var(--t-lk-bonus-balance);
  color: #fff;
}

/* ---------- REFERRAL ---------- */
.lk-bonus-referral {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: var(--s-5);
  /* 24 */
}

.lk-bonus-referral__head {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.lk-bonus-referral__title {
  margin: 0;
  font: var(--t-display-xl);
  /* 24/32 */
  color: var(--c-text);
}

.lk-bonus-referral__desc {
  margin: 0;
  font: var(--t-body-sm);
  color: var(--c-text-muted);
}

.lk-bonus-referral__field {
  display: flex;
  gap: var(--s-2);
}

.lk-bonus-referral__input {
  flex: 1 1 0;
  min-width: 0;
  height: 48px;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--c-card-divider);
  border-radius: var(--r-md);
  background: var(--c-text-tint-5);
  font: var(--t-body-base);
  color: var(--c-text);
}

.lk-bonus-referral__copy {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--c-card-divider);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--c-text);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.lk-bonus-referral__copy:hover {
  border-color: var(--c-magenta);
  color: var(--c-magenta);
}

.lk-bonus-referral__copy svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* ---------- ONBOARDING — 3 пункта ---------- */
.lk-bonus-onboarding {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.lk-bonus-onboarding__title {
  margin: 0;
  font: var(--t-display-xl);
  /* 24/32 Philosopher Regular */
  color: var(--c-text);
}

.lk-bonus-onboarding__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-4);
}

.lk-bonus-onboarding__item {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-4);
  background: var(--c-magenta-tint-5);
  border-radius: var(--r-md);
  align-items: flex-start;
}

.lk-bonus-onboarding__plus {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 40px;
  padding: 0 var(--s-3);
  border-radius: var(--r-pill);
  background: var(--c-magenta);
  color: var(--c-text-on-dark);
  font: var(--t-body-base-strong);
}

.lk-bonus-onboarding__text {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  min-width: 0;
}

.lk-bonus-onboarding__text h3 {
  margin: 0;
  font: var(--t-body-base-strong);
  /* 16/24 Semibold */
  color: var(--c-text);
}

.lk-bonus-onboarding__text p {
  margin: 0;
  font: var(--t-body-sm);
  color: var(--c-text-muted);
}

/* ---------- HISTORY — таблица с цветными +/- ---------- */
.lk-bonus-history {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  /* 24 */
}

.lk-table__cell--amount {
  font: var(--t-body-base-strong);
  /* 16/24 Semibold */
  white-space: nowrap;
}

.lk-bonus-history__amount--earn {
  color: var(--c-online);
}

/* зелёный */
.lk-bonus-history__amount--spend {
  color: var(--c-text);
}

/* default — обычный */

/* Mobile (≤719) — карточный вид для bonus-history. Переопределяет
   global .lk-table__cell[data-label="…"] стили payment-history через
   nested-селектор внутри .lk-bonus-history. */
@media (max-width: 719px) {
  .lk-bonus-history .lk-table__row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "source amount"
      "date   amount";
    border: 1px solid var(--c-card-divider);
    border-radius: var(--r-md);
    min-height: 72px;
    padding: var(--s-3) var(--s-4);
    align-items: center;
  }

  .lk-bonus-history .lk-table__cell {
    padding: 0;
  }

  .lk-bonus-history .lk-table__cell[data-label="Источник"] {
    grid-area: source;
    font: var(--t-body-sm-medium);
  }

  .lk-bonus-history .lk-table__cell[data-label="Дата"] {
    grid-area: date;
    font: var(--t-body-xs);
    color: var(--c-text-muted);
  }

  .lk-bonus-history .lk-table__cell[data-label="Минуты"] {
    grid-area: amount;
    justify-self: end;
    text-align: right;
  }
}

/* ============================================================
   /lk/profile/ — форма «Обо мне».
   ============================================================ */
.lk-profile {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  /* 32 — между группами */
}

.lk-profile__group {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  /* 16 — между legend и грид-полей */
}

.lk-profile__legend {
  font: var(--t-display-xl);
  /* 24/32 Philosopher Regular */
  color: var(--c-text);
  padding: 0;
  margin: 0;
}

.lk-profile__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-4);
  /* 16 */
}

@container lk-main (min-width: 720px) {
  .lk-profile__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* Radio group — кастомные пилы, 2 варианта в ряд */
.lk-profile__radio-row {
  display: flex;
  gap: var(--s-2);
  /* 8 */
}

.lk-profile__radio {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: var(--s-2) var(--s-4);
  border: 1px solid var(--c-card-divider);
  border-radius: var(--r-md);
  background: #fff;
  font: var(--t-body-base);
  color: var(--c-text);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.lk-profile__radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lk-profile__radio:has(input:checked) {
  border-color: var(--c-magenta);
  background: var(--c-magenta-tint-10);
  color: var(--c-magenta);
}

/* Password — отдельный row после контактов: «Пароль ••••••••» слева + кнопка справа */
.lk-profile__password-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-4) 0;
  border-top: 1px solid var(--c-card-divider);
  border-bottom: 1px solid var(--c-card-divider);
}

.lk-profile__password-text {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.lk-profile__password-title {
  font: var(--t-body-base-strong);
  color: var(--c-text);
}

.lk-profile__password-hint {
  font: var(--t-body-sm);
  color: var(--c-text-muted);
  letter-spacing: 2px;
}

/* Save — full-width primary с disabled-стейтом */
.lk-profile__save {
  align-self: stretch;
  min-height: 48px;
}

@container lk-main (min-width: 720px) {
  .lk-profile__save {
    align-self: flex-end;
    min-width: 240px;
  }
}

/* Danger zone — отдельный блок ниже Save, отделён большим отступом.
   Layout: на mobile стек (текст сверху, кнопка снизу). На desktop —
   row, текст слева flex:1, кнопка справа по центру vertical. */
.lk-profile__danger {
  margin-top: var(--s-7);
  /* 48 — визуальная пауза от Save */
  padding: var(--s-5);
  /* 24 */
  border: 1px solid var(--c-danger-tint-10);
  border-radius: var(--r-md);
  background: var(--c-danger-tint-10);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.lk-profile__danger-text {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  flex: 1 1 0;
  min-width: 0;
}

.lk-profile__danger-title {
  font: var(--t-body-base-strong);
  color: var(--c-danger);
}

.lk-profile__danger-hint {
  font: var(--t-body-sm);
  color: var(--c-text-muted);
}

.lk-profile__delete-btn {
  padding: var(--s-2) var(--s-4);
  border: 1px solid var(--c-danger);
  border-radius: var(--r-md);
  background: #fff;
  font: var(--t-body-sm-strong);
  color: var(--c-danger);
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s ease, color .15s ease;
}

.lk-profile__delete-btn:hover {
  background: var(--c-danger);
  color: #fff;
}

@container lk-main (min-width: 720px) {
  .lk-profile__danger {
    flex-direction: row;
    align-items: center;
    /* vertical center кнопки относительно текста */
    gap: var(--s-5);
    /* 24 — больше воздуха между text и кнопкой */
  }
}

/* Resend-link внутри change-password-модалки */
.lk-profile__resend-btn {
  align-self: flex-start;
  border: 0;
  background: transparent;
  padding: var(--s-2) 0;
  font: var(--t-body-sm-medium);
  color: var(--c-magenta);
  cursor: pointer;
}

.lk-profile__resend-btn:hover {
  text-decoration: underline;
}

/* Change-password-модалка: переключение step через data-step */
.modal--change-password .modal__dialog {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  max-width: 440px;
  width: 100%;
}

.modal--change-password .modal__body {
  display: none;
  flex-direction: column;
  gap: var(--s-3);
}

.modal--change-password[data-step="code"] [data-step-pane="code"] {
  display: flex;
}

.modal--change-password[data-step="new"] [data-step-pane="new"] {
  display: flex;
}

/* ============================================================
   TOPIC LINKS — блок «Посмотрите другие расклады по темам».
   Карточка: заголовок + табы-пилюли + 2-колоночная сетка ссылок (✦) +
   «Показать ещё». Внутренняя перелинковка на тематические страницы.
   ============================================================ */
.topic-links {
  background: var(--c-surface-soft);
  border-radius: var(--r-lg);
  padding: clamp(20px, 3vw, 40px);
  /* off-scale clamp */
}

.topic-links__title {
  margin: 0 0 var(--s-5);
  font: var(--t-display-xl-bold);
  color: var(--c-text);
}

/* ---------- Табы ---------- */
.topic-links__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-bottom: var(--s-6);
}

.topic-links__tab {
  border: 0;
  cursor: pointer;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-pill);
  background: var(--c-surface);
  font: var(--t-body-sm-medium);
  color: var(--c-text);
  transition: background-color .15s ease, color .15s ease;
}

.topic-links__tab:hover {
  color: var(--c-magenta);
}

.topic-links__tab.is-active {
  background: var(--c-text);
  color: var(--c-text-on-dark);
}

/* ---------- Список ссылок ---------- */
.topic-links__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3) var(--s-6);
}

@media (max-width: 640px) {
  .topic-links__list {
    grid-template-columns: 1fr;
  }
}

.topic-links__link {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s-2);
  font: var(--t-body-sm-medium);
  color: var(--c-text);
  text-decoration: none;
}

.topic-links__link:hover {
  color: var(--c-magenta);
}

.topic-links__link:hover span:last-child {
  text-decoration: underline;
}

.topic-links__marker {
  color: var(--c-magenta);
  flex-shrink: 0;
}

.topic-links__more {
  margin-top: var(--s-6);
  text-align: left;
}

/* ============================================================
   ONBOARDING MODAL — визард «Подобрать таролога» (8 шагов).
   База модалки (overlay/центрирование) — из components/modal.css.
   Здесь — содержимое: шапка с прогрессом, шаги, карточки, кольцо, итог.
   Палитра наша (magenta/pink), скругления — токены.
   ============================================================ */
.modal--onb .onb {
  width: min(480px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--s-5);
  border-radius: var(--r-xl);
  background: var(--c-surface);
}

/* ── Шапка ── */
.onb__head {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  margin-bottom: var(--s-2);
}

.onb__back,
.onb__close {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--c-text);
  border-radius: var(--r-pill);
}

.onb__back {
  transform: rotate(90deg);
}

/* chevron-down → влево */
.onb__back svg,
.onb__close svg {
  width: 18px;
  height: 18px;
}

.onb__back:hover,
.onb__close:hover {
  color: var(--c-magenta);
}

.onb__logo {
  justify-self: center;
  display: inline-flex;
}

.onb__logo svg {
  height: 22px;
  width: auto;
}

/* ── Прогресс ── */
.onb__progress {
  display: flex;
  gap: var(--s-1);
  margin-bottom: 0;
}

.onb__seg {
  flex: 1;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--c-text-tint-10);
  transition: background-color .25s ease;
}

.onb__seg.is-done {
  background: var(--c-magenta);
}

/* ── Шаги ── */
.onb__step {
  display: none;
}

.onb__step.is-active {
  display: block;
}

.onb__title {
  margin: 0 0 var(--s-3);
  font: var(--t-display-xl-bold-on-base);
  text-align: center;
  color: var(--c-text);
}

.onb__subtitle {
  margin: 0 0 var(--s-5);
  font: var(--t-body-sm-medium);
  color: var(--c-text-muted);
  text-align: center;
}

.onb__cta {
  width: 100%;
  justify-content: center;
  margin-top: var(--s-4);
}

.onb__note {
  margin: var(--s-3) 0 0;
  font: var(--t-body-sm-medium);
  color: var(--c-text-muted);
  text-align: center;
}

.onb__more {
  display: block;
  margin-top: var(--s-4);
  text-align: center;
  font: var(--t-body-sm-medium);
  color: var(--c-magenta);
  text-decoration: none;
}

.onb__more:hover {
  text-decoration: underline;
}

/* ── Карточки выбора ── */
.onb__cards {
  display: grid;
  gap: var(--s-3);
}

.onb__cards--2 {
  grid-template-columns: 1fr 1fr;
}

.onb__cards--grid {
  grid-template-columns: 1fr 1fr;
}

.onb__cards--list {
  grid-template-columns: 1fr;
}

.onb-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-4);
  border: 1px solid var(--c-text-tint-10);
  border-radius: var(--r-md);
  background: var(--c-surface-soft);
  cursor: pointer;
  text-align: center;
  transition: border-color .15s ease, background-color .15s ease;
}

.onb-card:hover {
  border-color: var(--c-magenta);
  background: var(--c-pink-softer);
}

.onb-card__label {
  font: var(--t-body-base-strong);
  color: var(--c-text);
}

.onb-card__desc {
  font: var(--t-body-sm-medium);
  color: var(--c-text-muted);
}

/* Аватар пола — квадратная картинка фикс. размера (одинаковый у обоих).
   Равномерное скругление + overflow:hidden (clip content, как во Figma).
   Градиент — фолбэк, пока/если картинка не загрузилась. */
.onb-card__avatar {
  width: 96px;
  height: 96px;
  object-fit: cover;
  display: block;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--gradient-primary);
}

/* Иконка темы/стиля */
.onb-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--c-magenta);
}

.onb-card__icon svg {
  width: 28px;
  height: 28px;
}

/* Карточка стиля — иконка слева, текст справа */
.onb-card--style {
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: var(--s-3);
}

.onb-card--style .onb-card__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ── Шаг 3 — вопрос ── */
.onb__textarea {
  width: 100%;
  resize: vertical;
  padding: var(--s-3);
  border: 1px solid var(--c-text-tint-10);
  border-radius: var(--r-md);
  font: var(--t-body-base);
  color: var(--c-text);
  background: var(--c-surface);
}

.onb__textarea:focus {
  outline: none;
  border-color: var(--c-magenta);
}

.onb-faq {
  margin-top: var(--s-6);
}

.onb-faq__title {
  margin: 0 0 var(--s-4);
  font: var(--t-section-heading-sm);
  text-align: center;
}

.onb-faq__group {
  margin-bottom: var(--s-4);
}

.onb-faq__group:last-child {
  margin-bottom: 0;
}

.onb-faq__group-title {
  margin: 0 0 var(--s-2);
  font: var(--t-body-sm-strong);
  color: var(--c-text);
}

.onb-faq__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.onb-faq__q {
  border: 0;
  background: transparent;
  padding: var(--s-1) 0;
  text-align: left;
  cursor: pointer;
  font: var(--t-body-sm-medium);
  color: var(--c-text);
}

.onb-faq__q::before {
  content: '• ';
  color: var(--c-magenta);
}

.onb-faq__q:hover {
  color: var(--c-magenta);
}

/* ── Шаг 5 — как проходит ── */
.onb-steps {
  list-style: none;
  margin: var(--s-5) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.onb-steps__item {
  display: flex;
  gap: var(--s-3);
}

.onb-steps__num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--c-magenta);
  color: var(--c-magenta);
  font: var(--t-body-sm-strong);
}

.onb-steps__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.onb-steps__t {
  font: var(--t-body-base-strong);
  color: var(--c-text);
}

.onb-steps__d {
  font: var(--t-body-sm-medium);
  color: var(--c-text-muted);
}

/* ── Шаг 6 — кольцо-лоадер ── */
.onb__step--loader {
  text-align: center;
}

.onb-ring {
  position: relative;
  width: 160px;
  height: 160px;
  margin: var(--s-5) auto var(--s-3);
}

.onb-ring__svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.onb-ring__track {
  fill: none;
  stroke: var(--c-text-tint-10);
  stroke-width: 10;
}

.onb-ring__fill {
  fill: none;
  stroke: var(--c-magenta);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset .1s linear;
}

.onb-ring__pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font: var(--t-display-2xl-on-xl);
  color: var(--c-text);
}

.onb-loader-reviews {
  margin-top: var(--s-5);
  text-align: left;
}

.onb-loader-reviews__lead {
  margin: 0 0 var(--s-3);
  font: var(--t-body-sm-strong);
  text-align: center;
}

.onb-mini-review {
  padding: var(--s-3);
  border-radius: var(--r-md);
  background: var(--c-surface-soft);
  margin-bottom: var(--s-2);
}

.onb-mini-review__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  margin-bottom: var(--s-1);
}

.onb-mini-review__author {
  font: var(--t-body-sm-strong);
}

.onb-mini-review__text {
  margin: 0;
  font: var(--t-body-sm-medium);
  color: var(--c-text-muted);
}

/* ── Шаг 7 — тизер ── */
.onb__step--reveal {
  text-align: center;
}

.onb-reveal__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  margin: var(--s-4) auto var(--s-5);
  border-radius: 50%;
  background: var(--gradient-primary);
  color: var(--c-text-on-dark);
  font: var(--fw-bold) var(--fs-3xl)/1 var(--font-display);
}

/* ── Шаг 8 — карточка эксперта: общий .expert-vcard (expert-card-vertical.css).
   Центрируем её в модалке. ── */
.onb-result {
  display: flex;
  justify-content: center;
}

/* ============================================================
   /services/ — каталог доп. услуг: тулбар (табы + сорт) + сетка карточек.
   ============================================================ */

.services-head__title {
  margin-top: var(--s-3);
}

/* ---------- Toolbar ---------- */
.services-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-5);
}

/* Табы-категории */
.services-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
}

.services-tabs__label {
  font: var(--t-body-sm-medium);
  color: var(--c-text-muted);
  margin-right: var(--s-2);
}

.services-tab {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-pill);
  font: var(--t-body-sm-medium);
  color: var(--c-text-muted);
  transition: background-color .15s ease, color .15s ease;
}

.services-tab:hover {
  color: var(--c-text);
}

.services-tab.is-active {
  background: var(--c-text);
  color: var(--c-text-on-dark);
}

/* Дропдауны тулбара (сорт + категория на мобиле) — общий вид */
.services-sort,
.services-cat {
  position: relative;
}

.services-sort__trigger,
.services-cat__trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  border: 0;
  border-radius: var(--r-md);
  background: var(--c-text-tint-10);
  /* серый fill — как кнопки тулбара каталога экспертов */
  cursor: pointer;
  font: var(--t-body-sm-medium);
  color: var(--c-text);
}

.services-sort__trigger:hover,
.services-cat__trigger:hover {
  background: var(--c-text-tint-20);
}

.services-sort__chev,
.services-cat__chev {
  display: inline-flex;
  width: 12px;
  height: 12px;
  transition: transform .2s ease;
}

.services-sort__trigger[aria-expanded="true"] .services-sort__chev,
.services-cat__trigger[aria-expanded="true"] .services-cat__chev {
  transform: rotate(180deg);
}

.services-sort__menu,
.services-cat__menu {
  position: absolute;
  top: calc(100% + var(--s-1));
  right: 0;
  z-index: 20;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  padding: var(--s-2);
  background: var(--c-surface);
  border: 1px solid var(--c-text-tint-10);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}

/* Скрыт по умолчанию: display:flex выше перебивал атрибут hidden. */
.services-sort__menu[hidden],
.services-cat__menu[hidden] {
  display: none;
}

.services-sort__option,
.services-cat__option {
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  font: var(--t-body-sm-medium);
  color: var(--c-text);
}

.services-sort__option:hover,
.services-cat__option:hover {
  background: var(--c-surface-soft);
  color: var(--c-magenta);
}

/* Категория-дропдаун — только на мобиле; на десктопе категории = табы.
   ≤959 (как переход на мобильный тулбар у каталога экспертов): табы прячем,
   показываем дропдаун; категория и сортировка остаются в одну линию. */
.services-cat {
  display: none;
}

@media (max-width: 959px) {
  .services-tabs {
    display: none;
  }

  .services-cat {
    display: block;
  }

  .services-toolbar {
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  /* Размер/высота/скругление — ровно как кнопки тулбара каталога экспертов
     (.catalog-mobile-btn: 52px, r-md, padding 0 16, snug-шрифт). */
  .services-sort__trigger,
  .services-cat__trigger {
    height: 52px;
    padding: 0 var(--s-4);
    border-radius: var(--r-md);
    font: var(--t-body-sm-medium-on-snug);
  }
}

/* ---------- Grid ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s-5);
}

.services-grid__empty {
  grid-column: 1 / -1;
  padding: var(--s-7) 0;
  text-align: center;
  color: var(--c-text-muted);
}

/* ============================================================
   /services/{slug}/ — детальная страница услуги.
   Hero (тёмный, bg-фото) + описание/«что понадобится» + сайдбар
   (параметры + «Заказать» + автор) + отзывы.
   ============================================================ */

/* ---------- Hero ----------
   Скруглённый баннер внутри .container (как hero эксперта), не full-bleed.
   Крошки — над баннером на белом фоне (.breadcrumbs, глобальный стиль). */
/* Паддинги hero/контента — один в один со страницей эксперта:
   hero start = --s-5, end = 0; body = --section-padding-y (наследует от
   .expert-body-section). Так разрыв баннер↔контент одинаков на обеих страницах. */
.service-hero-section {
  padding-block-start: var(--s-5);
  padding-block-end: 0;
}

.service-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 320px;
  padding: clamp(24px, 4vw, 56px);
  border-radius: var(--r-2xl);
  /* 48 — как у hero эксперта */
  background: var(--c-purple-deep);
  color: var(--c-text-on-dark);
}

.service-hero__bg {
  position: absolute;
  inset: 0 0 0 auto;
  width: 60%;
  height: 100%;
  object-fit: cover;
}

.service-hero__overlay {
  position: absolute;
  inset: 0;
  /* затемнение слева под текст, прозрачно справа над фото */
  background: linear-gradient(90deg, var(--c-purple-deep) 42%, color-mix(in srgb, var(--c-purple-deep) 15%, transparent) 100%);
}

.service-hero__content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.service-hero__title {
  margin: 0 0 var(--s-3);
  font: var(--t-display-2xl-on-xl);
}

.service-hero__lead {
  margin: 0;
  font: var(--t-body-base-on-xl);
  color: rgba(255, 255, 255, 0.85);
}

.service-hero__rating {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-top: var(--s-5);
}

.service-hero__rating-num {
  font: var(--t-display-xl-bold);
}

.service-hero__reviews {
  font: var(--t-body-sm-medium);
  color: rgba(255, 255, 255, 0.7);
}

/* Mobile: фото фоном на всю ширину, контент поверх затемнения. */
@media (max-width: 640px) {
  .service-hero {
    border-radius: var(--r-lg);
    min-height: 280px;
  }

  .service-hero__bg {
    width: 100%;
  }

  .service-hero__overlay {
    background: linear-gradient(90deg, var(--c-purple-deep) 30%, color-mix(in srgb, var(--c-purple-deep) 55%, transparent) 100%);
  }
}

/* ---------- Detail (левая колонка .expert-layout__main) ---------- */
.service-detail__p {
  margin: 0 0 var(--s-4);
  font: var(--t-body-base-on-xl);
  color: var(--c-text);
}

.service-detail__subtitle {
  margin: var(--s-6) 0 var(--s-4);
  font: var(--t-display-md-bold-on-xl);
}

.service-detail__needs {
  margin: 0;
  padding-left: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  font: var(--t-body-base);
  color: var(--c-text);
}

/* ---------- Карточка заказа (правый липкий сайдбар .expert-layout__sidebar) ---------- */
.service-order-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  padding: var(--s-5);
  background: var(--c-surface-soft);
  border-radius: var(--r-lg);
}

.service-order-card__params {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.service-order-card__param {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.service-order-card__param-label {
  font: var(--t-body-sm-medium);
  color: var(--c-text-muted);
}

.service-order-card__param-value {
  font: var(--t-display-xl-bold-on-base);
  color: var(--c-text);
}

.service-order-card__btn {
  width: 100%;
  justify-content: center;
  gap: var(--s-1);
  /* высота — из .btn--md (56) */
}

.service-order-card__dot {
  opacity: .8;
}

.service-order-card__price {
  font-weight: var(--fw-semibold);
}

.service-order-card__author {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding-top: var(--s-4);
  border-top: 1px solid var(--c-text-tint-10);
  text-decoration: none;
}

.service-order-card__author-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.service-order-card__author-info {
  display: flex;
  flex-direction: column;
}

.service-order-card__author-role {
  font: var(--t-body-xs);
  color: var(--c-text-muted);
}

.service-order-card__author-name {
  font: var(--t-body-sm-strong);
  color: var(--c-text);
}

.service-order-card__author:hover .service-order-card__author-name {
  color: var(--c-magenta);
}

/* Mobile: карточка заказа поднимается под hero (как booking-карточка у эксперта). */
@media (max-width: 959px) {
  .service-order-card {
    order: -1;
  }
}

/* ---------- Reviews ---------- */
.service-reviews__head {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin-bottom: var(--s-5);
}

.service-reviews__title {
  margin: 0;
  font: var(--t-display-xl-bold);
}

.service-reviews__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}

.service-reviews__badge-num {
  font: var(--t-body-base-strong);
}