@charset "UTF-8";
/* ==========================================================================
   AlfaSchool — alfaschoolonline.ru
   Design system: docs/03-design-system.md
   Mobile-first. Без внешних зависимостей.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts (self-hosted, OFL)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/manrope-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/manrope-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------------------
   2. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Палитра — docs/03-design-system.md */
  --brand: #1761f4;
  /* hover/active: затемнение primary в сторону navy. Обе точки — из палитры,
     нового RGB не вводится. Первая строка — запасное значение для браузеров
     без color-mix(): там состояние просто не темнеет. */
  --brand-hover: #1761f4;
  --brand-hover: color-mix(in srgb, #1761f4 86%, #0c0f2e);
  --brand-active: #1761f4;
  --brand-active: color-mix(in srgb, #1761f4 72%, #0c0f2e);
  --brand-light: #8aa8e5;
  --brand-soft: rgba(23, 97, 244, 0.09);
  --ink: #0c0f2e;
  /* Основной текст — тёмный из палитры: #6D6F7E на лавандовых секциях
     давал 4.2:1 при норме 4.5. Вторичный текст остаётся #6D6F7E. */
  --body: #0c0f2e;
  --muted: #6d6f7e;
  --surface: #fefefe;
  --page: #f6f7fc;
  --border: #e2e8ef;
  --border-strong: rgba(12, 15, 46, 0.18);
  /* Лавандовая и мятная поверхности — прозрачные оттенки secondary accent и
     teal: сплошной #f6f7fc совпал бы с --page и секции стали бы неразличимы. */
  --lavender: rgba(88, 100, 226, 0.05);
  --lavender-deep: rgba(88, 100, 226, 0.2);
  --teal: #089f9e;
  --teal-hover: #089f9e;
  --teal-hover: color-mix(in srgb, #089f9e 84%, #0c0f2e);
  /* Teal ДЛЯ ТЕКСТА. Сам #089F9E на светлом фоне даёт 3.0:1 на --page и
     3.2:1 на --surface — мелкому тексту нужно 4.5:1. Затемняем в сторону
     navy тем же приёмом, что и hover: нового RGB не вводится, оттенок
     остаётся teal. 76% → 4.65:1 на --page и 4.93:1 на --surface.
     Запасное значение без color-mix() — --ink: там, где color-mix не
     поддерживается, текст будет тёмным, а не нечитаемым бирюзовым. */
  --teal-text: #0c0f2e;
  --teal-text: color-mix(in srgb, #089f9e 76%, #0c0f2e);
  --mint: rgba(8, 159, 158, 0.08);
  --amber-bg: #fff8e8;
  --amber-line: #f2d9a4;
  --amber-ink: #8a6410;
  --danger: #c0392b;
  --danger-bg: #fdeceb;
  --success: #0f7b52;
  --success-bg: #e9f7f0;

  /* Типографика */
  --font: 'Manrope', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --fs-display: clamp(1.9375rem, 1.4rem + 2.35vw, 3rem);
  --fs-h2: clamp(1.5rem, 1.15rem + 1.55vw, 2.375rem);
  --fs-h3: clamp(1.125rem, 1.02rem + 0.5vw, 1.375rem);
  --fs-lead: clamp(1rem, 0.95rem + 0.32vw, 1.1875rem);
  --fs-body: 1rem;
  --fs-sm: 0.9375rem;
  --fs-xs: 0.8125rem;

  /* Геометрия */
  --container: 1200px;
  --gutter: 20px;
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  --section-y: 56px;

  /* Тени */
  --shadow-xs: 0 1px 2px rgba(12, 15, 46, 0.05);
  --shadow-sm: 0 2px 8px rgba(12, 15, 46, 0.05);
  --shadow-md: 0 8px 24px rgba(12, 15, 46, 0.07);
  --shadow-lg: 0 20px 48px rgba(12, 15, 46, 0.1);
  --shadow-cta: 0 6px 18px rgba(23, 97, 244, 0.28);

  --header-h: 64px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
    --section-y: 80px;
    --header-h: 76px;
  }
}
@media (min-width: 1024px) {
  :root {
    --gutter: 40px;
    --section-y: 104px;
  }
}

/* --------------------------------------------------------------------------
   3. Reset / base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--body);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: var(--fs-display); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.3; letter-spacing: -0.01em; }
h4 { font-size: 1.0625rem; line-height: 1.35; }

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-hover); }

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

ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: 0.4em; }

strong, b { font-weight: 700; color: var(--ink); }

hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}
:target { scroll-margin-top: calc(var(--header-h) + 24px); }

::selection { background: var(--lavender-deep); color: var(--ink); }

/* --------------------------------------------------------------------------
   4. Layout helpers
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * 0.7); }
.section--page { background: var(--page); }
.section--lavender { background: var(--lavender); }

.section__head { max-width: 720px; margin-bottom: 32px; }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head p { font-size: var(--fs-lead); color: var(--body); margin-bottom: 0; }
@media (min-width: 768px) { .section__head { margin-bottom: 44px; } }

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}
/* Надзаголовок набран 13px/700 — это мелкий текст, ему нужен --teal-text. */
.eyebrow--teal { color: var(--teal-text); }

.lead { font-size: var(--fs-lead); color: var(--body); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.nowrap { white-space: nowrap; }
.text-center { text-align: center; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -100px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--brand);
  color: #fefefe;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 0.16s var(--ease);
}
.skip-link:focus { top: 12px; color: #fefefe; }

.grid { display: grid; gap: 16px; }
@media (min-width: 640px)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 640px)  { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px)  { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 768px)  { .grid { gap: 24px; } }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease),
              color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.12s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn[disabled],
.btn[aria-disabled='true'] { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn--primary {
  background: var(--brand);
  color: #fefefe;
  box-shadow: var(--shadow-cta);
}
.btn--primary:hover { background: var(--brand-hover); color: #fefefe; }
.btn--primary:active { background: var(--brand-active); }

.btn--secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.btn--secondary:hover { border-color: var(--brand); color: var(--brand); }

.btn--teal { background: var(--teal); color: var(--ink); }
.btn--teal:hover { background: var(--teal-hover); color: var(--ink); }

.btn--ghost { background: transparent; color: var(--brand); padding-inline: 8px; }
.btn--ghost:hover { color: var(--brand-hover); text-decoration: underline; }

.btn--block { width: 100%; }
.btn--sm { min-height: 44px; padding: 10px 18px; font-size: var(--fs-sm); }
.btn--lg { min-height: 58px; padding: 17px 32px; font-size: 1.0625rem; }

.btn__arrow { flex: none; transition: transform 0.18s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

.cta-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
@media (min-width: 560px) {
  .cta-row { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 16px; }
  .cta-row .btn { width: auto; }
}
.cta-row--center { justify-content: center; }

/* --------------------------------------------------------------------------
   6. Header
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(254, 254, 254, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.header.is-stuck { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: none;
}
.logo__mark { width: 34px; height: 34px; flex: none; border-radius: 9px; }
.logo__text {
  font-size: 1.3125rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}
.logo__text b { color: var(--brand); font-weight: 800; }
@media (min-width: 768px) {
  .logo__mark { width: 38px; height: 38px; border-radius: 10px; }
  .logo__text { font-size: 1.4375rem; }
}

.nav { display: none; }
@media (min-width: 1024px) {
  .nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-inline: auto;
  }
  .nav a {
    padding: 8px 12px;
    border-radius: var(--radius-xs);
    color: var(--body);
    font-size: var(--fs-sm);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
  }
  .nav a:hover { color: var(--ink); background: var(--page); }
}
/* Полный набор пунктов требует 1231px строки шапки, а контейнер даёт 1200px
   только с 1280px вьюпорта. До 1280 показываем 4 пункта — остальные доступны
   в подвале и в мобильном меню. Порог поднят с 1200: слово AlfaSchool шире
   прежнего логотипа, и на 1200–1279 строка перестала помещаться. */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .nav a[data-nav-optional] { display: none; }
}
@media (min-width: 1280px) {
  .nav { gap: 2px; }
  .nav a { padding: 8px 10px; }
}

.header__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
/* Прижимаем действия к правому краю, если рядом нет навигации (юр. страницы, 404). */
@media (min-width: 1024px) { .nav + .header__actions { margin-left: 0; flex: none; } }

.header__phone {
  display: none;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  font-size: var(--fs-sm);
}
.header__phone:hover { color: var(--brand); }
@media (min-width: 768px) and (max-width: 1023.98px) { .header__phone { display: inline-block; } }
@media (min-width: 1200px) { .header__phone { display: inline-block; font-size: var(--fs-body); } }

.header__cta { display: none; }
@media (min-width: 560px) { .header__cta { display: inline-flex; } }

.burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  cursor: pointer;
  color: var(--ink);
}
.burger:hover { border-color: var(--border-strong); }
@media (min-width: 1024px) { .burger { display: none; } }
.burger__box { position: relative; width: 20px; height: 14px; }
.burger__box span {
  position: absolute; left: 0;
  width: 100%; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s var(--ease), opacity 0.15s var(--ease);
}
.burger__box span:nth-child(1) { top: 0; }
.burger__box span:nth-child(2) { top: 6px; }
.burger__box span:nth-child(3) { top: 12px; }
.burger[aria-expanded='true'] .burger__box span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded='true'] .burger__box span:nth-child(2) { opacity: 0; }
.burger[aria-expanded='true'] .burger__box span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  padding: 20px var(--gutter) 32px;
  background: var(--surface);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mobile-nav[hidden] { display: none; }
@media (min-width: 1024px) { .mobile-nav { display: none !important; } }
.mobile-nav a.mobile-nav__link {
  display: block;
  padding: 15px 4px;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
}
.mobile-nav__foot { margin-top: 24px; display: grid; gap: 12px; }
.mobile-nav__phone {
  display: block;
  text-align: center;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.125rem;
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: 24px calc(var(--section-y) * 0.9);
  background:
    radial-gradient(58% 42% at 88% 6%, var(--lavender) 0%, rgba(88, 100, 226, 0) 62%),
    radial-gradient(46% 40% at 4% 88%, var(--mint) 0%, rgba(8, 159, 158, 0) 60%),
    var(--surface);
}
@media (min-width: 768px) { .hero { padding-block: 48px var(--section-y); } }

.hero__grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; }
}
@media (min-width: 1200px) { .hero__grid { gap: 56px; } }

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding: 0;
  list-style: none;
}
.hero__chips li {
  margin: 0;
  padding: 7px 14px;
  background: var(--lavender);
  border-radius: var(--radius-pill);
  color: #0c0f2e;
  font-size: var(--fs-xs);
  font-weight: 700;
  white-space: nowrap;
}
@media (min-width: 768px) { .hero__chips li { font-size: var(--fs-sm); padding: 8px 16px; } }

.hero h1 { margin-bottom: 10px; }
.hero h1 .accent { color: var(--brand); }

/* Эмоциональный tagline под H1 — не заголовок, а поддерживающая строка. */
.hero__tagline {
  margin: 0 0 14px;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  /* clamp() опускает строку до 17px на узких экранах — там она перестаёт
     быть «крупным текстом» (18.66px/700) и требует уже 4.5:1. */
  color: var(--teal-text);
}

.hero__sub {
  font-size: var(--fs-lead);
  color: var(--body);
  margin-bottom: 22px;
  max-width: 34em;
}

.hero__cta { margin-bottom: 18px; }
@media (min-width: 768px) {
  .hero h1 { margin-bottom: 18px; }
  .hero__sub { margin-bottom: 26px; }
  .hero__cta { margin-bottom: 20px; }
}
.hero__note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: var(--fs-sm);
  color: var(--muted);
  margin: 0;
}
.hero__note svg { flex: none; margin-top: 2px; color: var(--teal); }

/* Hero visual */
.hero__visual { position: relative; }
.hero__figure {
  position: relative;
  margin: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--lavender);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
}
.hero__figure > img,
.hero__figure > svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero__figcaption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 0;
  font-size: var(--fs-xs);
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
}
.hero__figcaption svg { flex: none; color: var(--teal); }

.hero__badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(254, 254, 254, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
@media (min-width: 640px) { .hero__badge { right: auto; max-width: 340px; left: 20px; bottom: 20px; } }
.hero__badge svg { flex: none; color: var(--teal); }
.hero__badge span { font-size: var(--fs-xs); font-weight: 600; color: var(--ink); line-height: 1.4; }

/* --------------------------------------------------------------------------
   8. Trust strip
   -------------------------------------------------------------------------- */
.trust {
  border-block: 1px solid var(--border);
  background: var(--page);
  padding-block: 28px;
}
@media (min-width: 768px) { .trust { padding-block: 36px; } }
/* Одна колонка на узких экранах. При двух колонках на 320–430px под текст
   остаётся ~78px — уже, чем слово «Дистанционное», и заголовки рвались
   посреди слова. Две колонки включаются с 480px, где текстовая колонка
   ≥ 160px и заголовки помещаются в строку. */
.trust__grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 480px) { .trust__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .trust__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; } }
.trust__item { display: flex; gap: 12px; align-items: flex-start; }
/* Страховка от горизонтального скролла: flex-элемент с min-width:auto не
   может стать уже самого длинного слова, поэтому при любом будущем тексте
   строка вылезла бы за вьюпорт. min-width:0 разрешает колонке сжаться,
   overflow-wrap оставляет перенос последним средством. Разметку не трогаем. */
.trust__item > :not(.trust__icon) { min-width: 0; overflow-wrap: break-word; }
.trust__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--brand);
}
.trust__item:nth-child(even) .trust__icon { color: var(--teal); }
.trust__title { font-size: var(--fs-sm); font-weight: 700; color: var(--ink); line-height: 1.3; }
.trust__desc { font-size: var(--fs-xs); color: var(--muted); margin: 3px 0 0; line-height: 1.45; }

/* --------------------------------------------------------------------------
   9. Cards
   -------------------------------------------------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
@media (min-width: 768px) { .card { padding: 28px; } }
.card--soft { background: var(--page); box-shadow: none; }
.card--lavender { background: var(--lavender); border-color: transparent; }
.card--mint { background: var(--mint); border-color: transparent; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--body); }

.card__icon {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  background: var(--lavender);
  color: var(--brand);
  flex: none;
}
.card__icon--mint { background: var(--mint); color: var(--teal); }

/* Ступени 1–4 / 5–7 / 8–9 */
.stage-card { position: relative; overflow: hidden; }
.stage-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.stage-card__grade {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand);
  line-height: 1;
}
.stage-card__grade small { font-size: 0.9375rem; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.stage-card--mid .stage-card__grade,
.stage-card--senior .stage-card__grade { color: var(--teal); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}
.badge--ok { background: var(--success-bg); color: var(--success); }
.badge--plan { background: var(--amber-bg); color: var(--amber-ink); border: 1px solid var(--amber-line); white-space: normal; }
.badge--info { background: var(--lavender); color: #0c0f2e; }

.list-check { list-style: none; padding: 0; margin: 0 0 20px; }
.list-check li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
  font-size: var(--fs-sm);
  color: var(--body);
  line-height: 1.5;
}
.list-check li::before {
  content: '';
  position: absolute;
  left: 0; top: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M1.8 6.2 4.4 8.8 10.2 3' fill='none' stroke='%23089F9E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
}
.list-check--blue li::before {
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M1.8 6.2 4.4 8.8 10.2 3' fill='none' stroke='%231761F4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
}
.stage-card__foot { margin-top: auto; padding-top: 4px; }

.stage-note {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--amber-bg);
  border: 1px solid var(--amber-line);
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--amber-ink);
}
.stage-note strong { color: var(--amber-ink); }

/* --------------------------------------------------------------------------
   10. Steps (как проходит обучение)
   -------------------------------------------------------------------------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(5, 1fr); gap: 16px; } }
.steps li {
  counter-increment: step;
  margin: 0;
  padding: 22px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: var(--brand);
  color: #fefefe;
  font-size: var(--fs-sm);
  font-weight: 800;
}
.steps h3 { font-size: 1.0625rem; margin-bottom: 6px; }
.steps p { font-size: var(--fs-sm); margin: 0; }

/* --------------------------------------------------------------------------
   11. Программа
   -------------------------------------------------------------------------- */
.program { display: grid; gap: 24px; }
@media (min-width: 1024px) { .program { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: start; } }

.subjects { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 20px; list-style: none; }
.subjects li {
  margin: 0;
  padding: 9px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
}

.spec-list { list-style: none; padding: 0; margin: 0; }
.spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  margin: 0;
  font-size: var(--fs-sm);
}
.spec-list li:last-child { border-bottom: 0; }
.spec-list dt, .spec-list .k { color: var(--muted); }
.spec-list .v { color: var(--ink); font-weight: 700; text-align: right; }

/* --------------------------------------------------------------------------
   12. Формы обучения / сравнение
   -------------------------------------------------------------------------- */
.compare { display: grid; gap: 16px; }
@media (min-width: 768px) { .compare { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
.compare__card { display: flex; flex-direction: column; padding: 26px; border-radius: var(--radius-lg); }
.compare__card--a { background: var(--lavender); }
.compare__card--b { background: var(--mint); }
.compare__tag {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 12px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(254, 254, 254, 0.75);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   13. Split blocks (что получает ребёнок / что видит родитель)
   -------------------------------------------------------------------------- */
.split { display: grid; gap: 24px; }
@media (min-width: 1024px) { .split { grid-template-columns: repeat(2, 1fr); gap: 32px; } }
.split__col {
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}
@media (min-width: 768px) { .split__col { padding: 32px; } }
.split__col h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.split__col h3 svg { flex: none; }

/* --------------------------------------------------------------------------
   14. Документы / лицензия
   -------------------------------------------------------------------------- */
.docs-grid { display: grid; gap: 16px; }
@media (min-width: 768px) { .docs-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
.doc-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.doc-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.doc-card__head svg { flex: none; color: var(--brand); }
.doc-card__head h3 { margin: 0; font-size: 1.0625rem; }
.doc-card dl { margin: 0; display: grid; gap: 10px; }
.doc-card .row { display: grid; grid-template-columns: 1fr; gap: 2px; }
@media (min-width: 480px) { .doc-card .row { grid-template-columns: 160px 1fr; gap: 12px; align-items: baseline; } }
.doc-card dt { font-size: var(--fs-xs); color: var(--muted); }
.doc-card dd { margin: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }

.notice {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--amber-bg);
  border: 1px solid var(--amber-line);
  color: var(--amber-ink);
  font-size: var(--fs-sm);
  line-height: 1.55;
}
.notice svg { flex: none; margin-top: 2px; }
.notice p { margin: 0; color: inherit; }
.notice p + p { margin-top: 8px; }
.notice strong { color: inherit; }
.notice--info { background: var(--lavender); border-color: var(--lavender-deep); color: #0c0f2e; }

/* --------------------------------------------------------------------------
   15. Стоимость
   -------------------------------------------------------------------------- */
.price {
  display: grid;
  gap: 24px;
  padding: 32px 24px;
  border-radius: var(--radius-xl);
  /* Светлый край градиента ограничен --brand: белый текст на более светлом синем
     не проходит по контрасту AA. */
  background: linear-gradient(135deg, #0c0f2e 0%, #5864e2 58%, var(--brand) 100%);
  color: #fefefe;
}
@media (min-width: 768px) { .price { padding: 44px 40px; } }
@media (min-width: 1024px) { .price { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: center; } }
.price h2 { color: #fefefe; }
.price .eyebrow { color: #fefefe; }
.price p { color: #f6f7fc; }
.price__value { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; color: #fefefe; }
.price .list-check li { color: #f6f7fc; }
.price .list-check li::before {
  background: rgba(254, 254, 254, 0.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M1.8 6.2 4.4 8.8 10.2 3' fill='none' stroke='%23FEFEFE' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
}
.price .btn--primary { background: #fefefe; color: var(--brand); box-shadow: 0 8px 20px rgba(12, 15, 46, 0.25); }
.price .btn--primary:hover { background: #f6f7fc; color: var(--brand-hover); }
.price .btn--secondary { background: transparent; color: #fefefe; border-color: rgba(254, 254, 254, 0.72); box-shadow: none; }
.price .btn--secondary:hover { border-color: #fefefe; color: #fefefe; background: rgba(254, 254, 254, 0.12); }
.price__note { font-size: var(--fs-xs); color: #e2e8ef; margin: 16px 0 0; }

/* --------------------------------------------------------------------------
   16. FAQ
   -------------------------------------------------------------------------- */
.faq { max-width: 840px; margin-inline: auto; }
.faq__item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq__item[open] { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.faq__q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
  line-height: 1.4;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--brand); }
.faq__q .chev {
  flex: none;
  margin-top: 3px;
  transition: transform 0.2s var(--ease);
  color: var(--muted);
}
.faq__item[open] .faq__q .chev { transform: rotate(180deg); color: var(--brand); }
.faq__a { padding: 0 20px 20px; font-size: var(--fs-sm); color: var(--body); }
.faq__a p:last-child { margin-bottom: 0; }
@media (min-width: 768px) {
  .faq__q { padding: 20px 24px; font-size: 1.0625rem; }
  .faq__a { padding: 0 24px 22px; font-size: var(--fs-body); }
}

/* --------------------------------------------------------------------------
   17. Forms
   -------------------------------------------------------------------------- */
.form-block {
  display: grid;
  gap: 28px;
}
@media (min-width: 1024px) {
  .form-block { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr); gap: 48px; align-items: start; }
}
.form-card {
  padding: 24px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}
@media (min-width: 768px) { .form-card { padding: 32px; } }

.field { margin-bottom: 16px; }
.field__label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink);
}
.field__req { color: var(--danger); }
.field__hint { display: block; margin-top: 6px; font-size: var(--fs-xs); color: var(--muted); }

.input,
.select {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder { color: #6d6f7e; }
.input:hover, .select:hover { border-color: #8aa8e5; }
.input:focus, .select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23, 97, 244, 0.16);
}
.select {
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5 7 7.5l6-6' fill='none' stroke='%236D6F7E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}
.field.is-invalid .input,
.field.is-invalid .select { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12); }

.field__error {
  display: none;
  margin-top: 6px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--danger);
}
.field.is-invalid .field__error { display: block; }

.consent { margin-bottom: 14px; }
.consent__row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  cursor: pointer;
}
.consent input[type='checkbox'] {
  width: 22px; height: 22px;
  margin: 1px 0 0;
  flex: none;
  accent-color: var(--brand);
  cursor: pointer;
}
.consent__text { font-size: var(--fs-xs); line-height: 1.55; color: var(--body); }
.consent__text a { font-weight: 600; }
.consent.is-invalid .consent__text { color: var(--danger); }
.consent.is-invalid input[type='checkbox'] { outline: 2px solid var(--danger); outline-offset: 2px; border-radius: 4px; }

.form-status {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  line-height: 1.5;
  display: none;
}
.form-status[data-state='error'] { display: block; background: var(--danger-bg); color: var(--danger); border: 1px solid #f3c4bf; }
.form-status[data-state='pending'] { display: block; background: var(--page); color: var(--body); border: 1px solid var(--border); }
.form-status a { color: inherit; font-weight: 700; }

.form-success {
  display: none;
  text-align: center;
  padding: 12px 0;
}
.form-success[data-visible='true'] { display: block; }
.form-success__icon {
  display: grid; place-items: center;
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success);
}
.is-hidden { display: none !important; }

.honey {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.form-benefits { list-style: none; padding: 0; margin: 0; }
.form-benefits li {
  display: flex; gap: 12px; align-items: flex-start;
  margin-bottom: 18px;
  font-size: var(--fs-sm);
  color: var(--body);
}
.form-benefits svg { flex: none; margin-top: 2px; color: var(--teal); }
.form-benefits strong { display: block; color: var(--ink); margin-bottom: 2px; font-size: var(--fs-body); }

/* --------------------------------------------------------------------------
   18. Quiz (modal)
   -------------------------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.modal[hidden] { display: none; }
@media (min-width: 640px) { .modal { align-items: center; padding: 24px; } }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 15, 46, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: 0;
  padding: 0;
  cursor: pointer;
  animation: fade 0.2s var(--ease);
}
.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 20px 28px;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.24s var(--ease);
}
@media (min-width: 640px) {
  .modal__dialog { border-radius: var(--radius-xl); padding: 32px; max-height: 88vh; animation: pop 0.2s var(--ease); }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pop { from { transform: scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }

.modal__close {
  position: absolute;
  top: 14px; right: 14px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--page);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
}
.modal__close:hover { color: var(--ink); border-color: var(--border-strong); }

.modal__title { font-size: 1.375rem; margin-bottom: 6px; padding-right: 44px; }
.modal__sub { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 20px; }

.progress { display: flex; gap: 6px; margin-bottom: 20px; }
.progress span {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: background-color 0.25s var(--ease);
}
.progress span.is-done { background: var(--brand); }

.quiz-step[hidden] { display: none; }
.quiz-options { display: grid; gap: 10px; margin-bottom: 20px; }
.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 18px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}
.quiz-option:hover { border-color: var(--brand); background: var(--brand-soft); }
.quiz-option[aria-pressed='true'] { border-color: var(--brand); background: var(--brand-soft); }
.quiz-option__mark {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: grid; place-items: center;
}
.quiz-option[aria-pressed='true'] .quiz-option__mark { border-color: var(--brand); background: var(--brand); }
.quiz-option[aria-pressed='true'] .quiz-option__mark::after {
  content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fefefe;
}
.quiz-option small { display: block; font-weight: 500; font-size: var(--fs-xs); color: var(--body); margin-top: 2px; }

.quiz-nav { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.quiz-back {
  background: none; border: 0; padding: 8px;
  font: inherit; font-size: var(--fs-sm); font-weight: 600;
  color: var(--muted); cursor: pointer;
}
.quiz-back:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   19. Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--ink);
  color: #e2e8ef;
  padding-block: 44px 32px;
  font-size: var(--fs-sm);
}
.footer a { color: #e2e8ef; text-decoration: none; }
.footer a:hover { color: #fefefe; text-decoration: underline; }
.footer__grid { display: grid; gap: 32px; }
@media (min-width: 768px) { .footer__grid { grid-template-columns: repeat(2, 1fr); gap: 40px; } }
@media (min-width: 1024px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; } }
.footer h3 {
  color: #fefefe;
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer__logo { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.footer__logo .logo__text { color: #fefefe; }
.footer__logo .logo__text b { color: #8aa8e5; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 10px; }
.footer__legal { margin-top: 36px; padding-top: 24px; border-top: 1px solid rgba(254, 254, 254, 0.12); font-size: var(--fs-xs); color: #8aa8e5; line-height: 1.65; }
.footer__legal p { margin-bottom: 10px; }
.footer__req { display: grid; gap: 4px; margin-bottom: 16px; }
/* Юридические ссылки в подвале legal- и payment-страниц: на узких экранах
   ложатся в столбец, с 480px — в строку с разделителями. */
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-bottom: 4px;
}
.footer__links li { margin-bottom: 0; }
.footer__bottom {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  align-items: center;
}
.footer__contact { font-size: 1.0625rem; font-weight: 700; color: #fefefe; display: inline-block; margin-bottom: 8px; }
.footer__contact:hover { color: #fefefe; }
.link-button {
  background: none; border: 0; padding: 0;
  font: inherit; color: inherit;
  text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer;
}
.link-button:hover { color: #fefefe; }

/* --------------------------------------------------------------------------
   20. Cookie consent
   -------------------------------------------------------------------------- */
.cookie {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  padding: 16px var(--gutter) calc(16px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 32px rgba(12, 15, 46, 0.12);
  animation: slideUp 0.3s var(--ease);
}
.cookie[hidden] { display: none; }
@media (min-width: 768px) {
  .cookie {
    left: 20px; right: auto; bottom: 20px;
    max-width: 400px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
  }
}
.cookie h2 { font-size: 1rem; margin-bottom: 6px; }
.cookie p { font-size: var(--fs-xs); line-height: 1.5; margin-bottom: 14px; color: var(--body); }
.cookie__actions { display: grid; gap: 8px; }
@media (min-width: 360px) { .cookie__actions { grid-template-columns: 1fr 1fr; } }
.cookie__actions .btn { min-height: 46px; font-size: var(--fs-sm); padding-inline: 14px; }
.cookie__actions .btn--ghost { grid-column: 1 / -1; min-height: 40px; }

.cookie-prefs { display: grid; gap: 12px; margin: 4px 0 22px; }
.cookie-cat {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--page);
}
.cookie-cat__name { font-weight: 700; color: var(--ink); font-size: var(--fs-sm); }
.cookie-cat__desc { grid-column: 1 / -1; font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; }
.cookie-cat input[type='checkbox'] { width: 22px; height: 22px; accent-color: var(--brand); cursor: pointer; margin: 0; }
.cookie-cat input[disabled] { cursor: not-allowed; opacity: 0.6; }

/* --------------------------------------------------------------------------
   21. Chat widget
   -------------------------------------------------------------------------- */
.chat-launcher {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 18px 12px 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: #fefefe;
  font: inherit;
  font-weight: 700;
  font-size: var(--fs-sm);
  cursor: pointer;
  box-shadow: var(--shadow-cta);
  transition: background-color 0.18s var(--ease), transform 0.15s var(--ease);
}
.chat-launcher:hover { background: var(--brand-hover); transform: translateY(-1px); }
.chat-launcher[hidden] { display: none; }
/* Не перекрываем финальную форму заявки. */
.chat-launcher.is-tucked { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(8px); }
.chat-launcher__label { display: none; }
@media (min-width: 480px) { .chat-launcher__label { display: inline; } }
@media (max-width: 479px) { .chat-launcher { padding: 14px; border-radius: 50%; min-height: 56px; width: 56px; justify-content: center; } }
@media (min-width: 768px) { .chat-launcher { right: 24px; bottom: 24px; } }
/* Пока открыт cookie-баннер, кнопка чата поднимается над ним. На мобильных баннер
   занимает всю ширину экрана, и его высота зависит от переносов текста, поэтому
   фиксированное значение не годится: реальную высоту отдаёт consent.js в --cookie-h.
   Запасное значение покрывает самый высокий вариант баннера, если JS не отработал. */
body.cookie-open .chat-launcher { bottom: calc(var(--cookie-h, 280px) + 16px); }
/* С 768px баннер — карточка в левом нижнем углу, а кнопка чата в правом: не пересекаются. */
@media (min-width: 768px) { body.cookie-open .chat-launcher { bottom: 24px; } }

.chat-panel {
  position: fixed;
  z-index: 95;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  height: min(88dvh, 640px);
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: slideUp 0.24s var(--ease);
}
.chat-panel[hidden] { display: none; }
@media (min-width: 640px) {
  .chat-panel {
    inset: auto 24px 24px auto;
    width: 400px;
    height: min(78vh, 620px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
  }
}
.chat-panel__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--page);
}
.chat-panel__head .logo__mark { width: 34px; height: 34px; }
.chat-panel__title { font-weight: 800; color: var(--ink); font-size: var(--fs-body); line-height: 1.2; }
.chat-panel__status { font-size: var(--fs-xs); color: var(--muted); }
.chat-panel__close {
  margin-left: auto;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
}
.chat-panel__close:hover { color: var(--ink); }

.chat-log {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-msg {
  max-width: 86%;
  padding: 12px 15px;
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.chat-msg--bot { align-self: flex-start; background: var(--page); color: var(--ink); border-bottom-left-radius: 6px; }
.chat-msg--user { align-self: flex-end; background: var(--brand); color: #fefefe; border-bottom-right-radius: 6px; }
.chat-msg--system { align-self: center; background: var(--amber-bg); border: 1px solid var(--amber-line); color: var(--amber-ink); font-size: var(--fs-xs); max-width: 100%; }
.chat-msg p { margin: 0 0 8px; }
.chat-msg p:last-child { margin: 0; }

.chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 12px;
  max-height: 38vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.chat-quick[hidden] { display: none; }
.chat-quick button {
  padding: 8px 14px;
  min-height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.chat-quick button:hover { border-color: var(--brand); color: var(--brand); }
/* Длинные варианты (выбор темы) читаются хуже «таблетками» в строку —
   раскладываем их в столбец на всю ширину панели. */
.chat-quick--stack { flex-direction: column; align-items: stretch; }
.chat-quick--stack button { text-align: left; border-radius: var(--radius-sm); }
/* «Начать заново» — вспомогательное действие, не должно спорить с вариантами шага. */
.chat-quick button.is-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  align-self: flex-start;
}
.chat-quick button.is-ghost:hover { color: var(--brand); border-color: transparent; }

/* --- сценарный лид-чат: ссылки, ошибка, карточка согласия --------------- */
.chat-msg--bot a { color: var(--brand); font-weight: 600; }
.chat-msg--error {
  align-self: flex-start;
  background: var(--danger-bg);
  border: 1px solid #f3c4bf;
  color: var(--danger);
}
.chat-msg--error a { color: inherit; font-weight: 700; }

/* Нейтральная служебная строка (номер обращения): подтверждение, не предупреждение. */
.chat-msg--note {
  align-self: center;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  color: var(--muted);
  font-size: var(--fs-xs);
  max-width: 100%;
}

.chat-consent { max-width: 100%; align-self: stretch; }
.chat-summary { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.chat-summary li {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--fs-xs);
  line-height: 1.5;
}
.chat-summary li span { color: var(--muted); flex: none; }
.chat-summary li b { color: var(--ink); text-align: right; word-break: break-word; }

.chat-consent .consent { margin-bottom: 12px; }
.chat-consent .consent:last-of-type { margin-bottom: 4px; }
.chat-consent .consent.is-invalid .field__error { display: block; margin-left: 34px; }
.chat-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chat-actions .btn { flex: 1 1 auto; }
.chat-actions .btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.chat-form .input[disabled] { background: var(--page); color: var(--muted); cursor: not-allowed; }

.chat-form {
  display: flex;
  gap: 8px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.chat-form .input { min-height: 46px; padding: 11px 14px; font-size: var(--fs-sm); }
.chat-form button {
  flex: none;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fefefe;
  cursor: pointer;
}
.chat-form button:hover { background: var(--brand-hover); }
.chat-form button[disabled] { opacity: 0.5; cursor: not-allowed; }

.chat-typing { display: inline-flex; gap: 4px; align-items: center; }
.chat-typing i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted);
  animation: blink 1.2s infinite ease-in-out;
}
.chat-typing i:nth-child(2) { animation-delay: 0.18s; }
.chat-typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }

/* --------------------------------------------------------------------------
   22. Legal pages
   -------------------------------------------------------------------------- */
.legal-page { padding-block: 40px 64px; }
@media (min-width: 768px) { .legal-page { padding-block: 56px 88px; } }
.legal-doc { max-width: 800px; margin-inline: auto; }
.legal-doc h1 { font-size: clamp(1.625rem, 1.3rem + 1.6vw, 2.375rem); margin-bottom: 12px; }
.legal-doc h2 { font-size: clamp(1.1875rem, 1.08rem + 0.55vw, 1.5rem); margin-top: 40px; margin-bottom: 12px; }
.legal-doc h3 { font-size: 1.0625rem; margin-top: 24px; margin-bottom: 8px; }
.legal-doc p, .legal-doc li { font-size: var(--fs-sm); line-height: 1.7; }
@media (min-width: 768px) { .legal-doc p, .legal-doc li { font-size: var(--fs-body); } }
.legal-doc ul, .legal-doc ol { padding-left: 1.35em; }
.legal-doc ol ol { margin-top: 8px; }
.legal-meta {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  padding: 14px 18px;
  margin-bottom: 32px;
  background: var(--page);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.legal-meta b { color: var(--ink); }
.legal-toc {
  padding: 20px 24px;
  margin-bottom: 40px;
  background: var(--lavender);
  border-radius: var(--radius-lg);
}
.legal-toc h2 { margin: 0 0 12px; font-size: 1rem; }
.legal-toc ol { margin: 0; padding-left: 1.3em; }
.legal-toc li { font-size: var(--fs-sm); margin-bottom: 6px; }
.legal-table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: var(--fs-sm); }
.legal-table th, .legal-table td { padding: 12px 14px; text-align: left; border: 1px solid var(--border); vertical-align: top; }
.legal-table th { background: var(--page); color: var(--ink); font-weight: 700; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.breadcrumbs { font-size: var(--fs-xs); color: var(--muted); margin-bottom: 20px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand); }

.error-page { text-align: center; padding-block: 80px 100px; }
.error-page__code { font-size: clamp(4rem, 3rem + 8vw, 8rem); font-weight: 800; line-height: 1; color: var(--brand); letter-spacing: -0.04em; margin-bottom: 12px; }

/* --------------------------------------------------------------------------
   23. Claims mode — переключатель 5–9 (см. docs/15, legal/license-claim-rules.md)
   .claims-primary-only  → действующие документы только для 1–4
   .claims-full          → документы получены и на 5–9

   Класс на <html> — только маркер состояния: его читает app.js (режим для чата),
   выставляет scripts/build-claims.py и проверяет scripts/verify-build.ps1.
   Правил оформления у него нет и быть не должно.

   Раньше здесь стояли два правила display:none, прятавшие неактивный вариант
   claim через [data-claims]. Они удалены вместе с самой схемой: текст
   непроверенного режима больше не попадает в production-HTML, а подставляется
   build-time из src/claims/claims.json (см. scripts/build-claims.py).
   Скрывать нечего — неактивного варианта в файле физически нет.
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   24. Motion / print
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

@media print {
  .header, .footer, .cookie, .chat-launcher, .chat-panel, .modal, .skip-link { display: none !important; }
  body { color: #000; }
  a[href^='http']::after { content: ' (' attr(href) ')'; font-size: 0.8em; }
}
