/* Шрифты сайта: раздаются со своего домена, внешних запросов у страниц нет. */

/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/s/inter/inter-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/s/inter/inter-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/s/inter/inter-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;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/s/inter/inter-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;
}
/* cyrillic */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(/assets/fonts/s/playfairdisplay/playfairdisplay-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(/assets/fonts/s/playfairdisplay/playfairdisplay-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;
}
/* latin */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(/assets/fonts/s/playfairdisplay/playfairdisplay-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;
}

/* Тема главного сайта: светлая издательская вёрстка на тёплой бумаге.

   Страницы собраны вручную и от выгрузки Tilda не зависят — от неё остались только картинки
   и две анкеты, у которых своя отправка заявки (их оформляет local-overrides.css).
*/

:root {
  /* Поверхности: тёплая бумага, чуть притемнённая полоса для чередования секций и белые карточки. */
  --paper: #fbfaf7;
  --paper-2: #f3efe7;
  --paper-3: #ebe5d9;
  --card: #ffffff;

  /* Текст: почти чёрный для заголовков, тёплый графит для абзацев, светлее — для подписей. */
  --ink: #14130f;
  --body: #46443d;
  --muted: #6e6a60;
  --line: #e6e0d5;
  --line-strong: #d4ccbc;

  /* Акценты: глубокий зелёный для действий и тёплая охра для цифр результата. */
  --accent: #14603f;
  --accent-hover: #0e4c31;
  --accent-soft: #e7f0eb;
  --gold: #a8641a;
  --gold-soft: #fbf1e3;

  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 28px;

  --container: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
  --section: clamp(64px, 8vw, 116px);
  --section-sm: clamp(40px, 5vw, 72px);

  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;

  --h1: clamp(2.35rem, 5.4vw, 4rem);
  --h2: clamp(1.85rem, 3.8vw, 2.9rem);
  --h3: clamp(1.15rem, 1.7vw, 1.4rem);
  --lead: clamp(1.05rem, 1.25vw, 1.2rem);

  --shadow-sm: 0 1px 2px rgba(20, 19, 15, 0.04), 0 8px 20px -14px rgba(20, 19, 15, 0.16);
  --shadow-md: 0 2px 6px rgba(20, 19, 15, 0.05), 0 22px 44px -28px rgba(20, 19, 15, 0.28);
  /* Глубокая тень для одиночных крупных объектов: снимок на обложке заметно приподнят над бумагой. */
  --shadow-lg: 0 4px 12px rgba(20, 19, 15, 0.06), 0 44px 72px -30px rgba(20, 19, 15, 0.4);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  background-color: var(--paper);
  scroll-behavior: smooth;
  /* Якорные переходы не должны заезжать под липкую шапку. */
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

::selection {
  background-color: #cfe3d8;
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ------------------------------------------------------------------ раскладка */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

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

.section--band {
  background-color: var(--paper-2);
}

.section__head {
  margin-bottom: clamp(32px, 4vw, 56px);
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow--accent {
  color: var(--accent);
}

h2.section__title {
  font-size: var(--h2);
}

.section__descr {
  margin-top: 16px;
  font-size: var(--lead);
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 720px) {
  .grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 720px) and (max-width: 999px) {
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition:
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease),
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.btn--primary {
  background-color: var(--accent);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  background-color: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background-color: var(--accent-soft);
}

/* Кнопка-ссылка на ролик: тот же вид, что и у второстепенной, плюс знак воспроизведения. */
.btn--video {
  padding-left: 20px;
}

.btn--video svg {
  width: 19px;
  height: 19px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.btn--sm {
  min-height: 44px;
  padding: 0 20px;
  font-size: 0.9rem;
}

.btn:active {
  transform: translateY(0);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Одиночная ссылка под блоком: по центру и с отступом от него. */
.btn-row--center {
  justify-content: center;
  margin-top: clamp(24px, 3vw, 34px);
}

/* Три кнопки в одну строку не помещаются даже в самом широком контейнере. На телефоне они идут
   столбиком, а с планшета два ролика встают парой одинаковой ширины, а главное действие — во всю
   ширину ряда под ними. */
.btn-row--split > .btn {
  width: 100%;
}

@media (min-width: 620px) {
  .btn-row--split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: fit-content;
  }

  .btn-row--split > .btn {
    width: auto;
  }

  .btn-row--split > .btn:last-child {
    grid-column: 1 / -1;
  }
}

/* -------------------------------------------------------------------- шапка */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: rgba(251, 250, 247, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 36px);
  min-height: 68px;
  padding-block: 12px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  flex: 0 0 auto;
}

.brand em {
  font-style: normal;
  color: var(--accent);
}

.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.site-nav a:hover {
  color: var(--ink);
  background-color: var(--paper-2);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.social-links {
  display: flex;
  gap: 2px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.social-links a:hover {
  color: var(--accent);
  background-color: var(--accent-soft);
}

.social-links svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background-color: transparent;
  color: var(--ink);
  cursor: pointer;
}

.burger svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.burger__close {
  display: none;
}

.burger[aria-expanded='true'] .burger__open {
  display: none;
}

.burger[aria-expanded='true'] .burger__close {
  display: block;
}

@media (max-width: 959px) {
  .site-nav,
  .site-header__actions .btn,
  .site-header__actions .social-links {
    display: none;
  }

  .burger {
    display: inline-flex;
  }

  .site-header__inner {
    justify-content: space-between;
  }
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background-color: var(--paper);
}

.mobile-nav[data-open='true'] {
  display: block;
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 12px 0 20px;
}

.mobile-nav a {
  display: block;
  padding: 12px 4px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.mobile-nav .btn {
  margin-top: 16px;
}

/* ------------------------------------------------------------------- обложка */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(48rem 30rem at 82% 8%, var(--gold-soft), transparent 68%),
    var(--paper);
}

/* Порядок на телефоне: заголовок, снимок, рассказ с кнопками. Расстояния между ними разные,
   поэтому их задают сами блоки, а не общий gap. */
.hero__inner {
  --hero-pad: clamp(48px, 7vw, 104px);
  display: grid;
  padding-block: var(--hero-pad);
}

/* Цифры стоят сразу под обложкой и читаются как её продолжение, поэтому расстояние между ними
   вдвое меньше обычного: половину снимаем с нижнего поля обложки, половину — с верхнего поля
   секции с цифрами. */
.hero:has(+ .section--tight) .hero__inner {
  padding-bottom: calc(var(--hero-pad) / 2);
}

.hero + .section--tight {
  padding-top: calc(var(--section-sm) / 2);
}

.hero__body {
  margin-top: clamp(24px, 4vw, 30px);
}

@media (min-width: 960px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    grid-template-rows: max-content 1fr;
    column-gap: clamp(32px, 5vw, 64px);
  }

  /* Снимок переезжает в соседнюю колонку и встаёт вровень с серединой текста. */
  .hero__head {
    grid-column: 1;
    grid-row: 1;
  }

  .hero__body {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    margin-top: 22px;
  }
}

/* Внутренние страницы обходятся без фотографии: содержимое встаёт одной колонкой по центру. */
.hero__inner--solo {
  grid-template-columns: minmax(0, 1fr);
  max-width: 44rem;
  margin-inline: auto;
  text-align: center;
}

.hero__inner--solo .hero__lead {
  margin-inline: auto;
}

.hero__inner--solo .btn-row {
  justify-content: center;
}

.hero__title {
  font-size: var(--h1);
  /* Заголовок делит строки поровну и в крайнем случае переносит слово, а не лезет на фотографию. */
  text-wrap: balance;
  overflow-wrap: break-word;
}

/* Печатающаяся фраза меняет длину на каждой букве, и выравнивание строк поровну перекладывало бы
   на каждой букве весь заголовок. Место под самый длинный вариант держит скрипт. */
.hero__title:has(.typed) {
  text-wrap: wrap;
}

/* Печатающаяся фраза выделена зелёным — и в заголовке, и в жирном тексте описания. */
.typed__text {
  color: var(--accent);
}

/* Мигающий курсор после печатающейся фразы. Появляется, только когда фразу печатает скрипт. */
.typed--active .typed__text::after {
  content: '';
  display: inline-block;
  width: 0.08em;
  height: 0.9em;
  margin-left: 0.06em;
  vertical-align: -0.08em;
  background-color: var(--accent);
  animation: typed-caret 1s steps(1) infinite;
}

@keyframes typed-caret {
  50% {
    opacity: 0;
  }
}

/* Текст только для скринридеров: на экране его нет, но читается он как обычный. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hero__lead {
  max-width: 38ch;
  font-size: var(--lead);
  color: var(--body);
}

.hero__lead strong {
  color: var(--ink);
  font-weight: 600;
}

.hero .btn-row {
  margin-top: clamp(26px, 3.5vw, 38px);
}

/* Снимок наклонён вправо, поэтому его углы выходят за колонку: оставляем им воздух. */
.hero__media {
  position: relative;
  padding: 16px 12px;
  margin-top: clamp(22px, 5vw, 34px);
  /* В одну колонку снимок во всю ширину планшета забирал бы весь первый экран. */
  width: min(100%, 25rem);
  margin-inline: auto;
}

@media (min-width: 960px) {
  .hero__media {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    width: auto;
    margin-top: 0;
    margin-inline: clamp(8px, 2vw, 32px) 0;
  }
}

.hero__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 560px;
  object-fit: cover;
  object-position: center 28%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: rotate(2.5deg);
}

/* Подпись поверх фотографии: короткий факт, который подтверждает обещание заголовка. */
.hero__badge {
  position: absolute;
  left: clamp(-12px, -1vw, 0px);
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 24px);
  padding: 14px 20px;
  border-radius: 999px;
  background-color: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.hero__badge b {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--ink);
}

.hero__badge span {
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--muted);
  max-width: 17ch;
}

/* -------------------------------------------------------------- строка цифр */

.stats {
  display: grid;
  gap: 1px;
  background-color: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (min-width: 640px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .stats--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .stats--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.stat {
  padding: clamp(22px, 2.6vw, 30px);
  background-color: var(--card);
}

.stat__value {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--gold);
}

.stat__label {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ------------------------------------------------------------------ карточки */

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(22px, 2.5vw, 30px);
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

/* Карточка-ссылка под курсором заметно приподнимается, подрастает и чуть кренится — так видно,
   что на неё можно нажать. Движение только трансформацией: раскладка от него не пересчитывается. */
.card--link:hover,
.card--link:focus-visible {
  border-color: var(--accent);
  transform: translateY(-6px) scale(1.03) rotate(-0.8deg);
  box-shadow: var(--shadow-md);
}

.card--link:active {
  transform: translateY(-2px) scale(1.01) rotate(-0.4deg);
}

.card--link:hover .card__icon,
.card--link:focus-visible .card__icon {
  background-color: var(--accent);
  color: #ffffff;
}

.card--link .card__icon {
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

/* Стрелка у подписи отъезжает вправо — маленькая подсказка, что это переход. */
.card--link:hover .program-card__more::after,
.card--link:focus-visible .program-card__more::after {
  transform: translateX(4px);
}

/* Тем, кто просил обойтись без анимаций, карточка просто подсвечивается. */
@media (prefers-reduced-motion: reduce) {
  .card--link:hover,
  .card--link:focus-visible,
  .card--link:active {
    transform: none;
  }
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background-color: var(--accent-soft);
  color: var(--accent);
}

.card__icon svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card__title {
  font-size: var(--h3);
}

.card__text {
  font-size: 0.95rem;
  color: var(--muted);
}

.card__text p + p {
  margin-top: 10px;
}

/* Карточка программы: картинка сверху, кнопка прижата к низу. */
.program {
  overflow: hidden;
  padding: 0;
  gap: 0;
}

.program__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.program__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  padding: clamp(20px, 2.2vw, 26px);
}

.program__body .btn {
  margin-top: auto;
}

/* ------------------------------------------------------------ термин с подсказкой */

/* Термин подчёркнут зелёным пунктиром: так видно, что у него есть пояснение. Подсказка всплывает
   над пунктом списка — внизу её закрывали бы карточки, стоящие на странице позже. На устройствах
   с мышью она открывается наведением, на телефоне — нажатием (скрипт), с клавиатуры — фокусом. */
.hint__term {
  text-decoration: underline dashed var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  cursor: help;
  border-radius: 4px;
}

.hint__term:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hint__bubble {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 2;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background-color: var(--ink);
  color: var(--paper);
  font-size: 0.88rem;
  line-height: 1.45;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  translate: 0 4px;
  pointer-events: none;
  transition: opacity 0.18s var(--ease), translate 0.18s var(--ease), visibility 0.18s;
}

/* Хвостик подсказки смотрит вниз, на пункт. */
.hint__bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 28px;
  border: 7px solid transparent;
  border-top-color: var(--ink);
}

.hint[data-open='true'] .hint__bubble,
.hint__term:focus-visible + .hint__bubble {
  opacity: 1;
  visibility: visible;
  translate: 0 0;
}

@media (hover: hover) {
  .hint:hover .hint__bubble {
    opacity: 1;
    visibility: visible;
    translate: 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hint__bubble {
    translate: none;
    transition: none;
  }
}

/* ---------------------------------------------------------------- шаги плана */

.steps {
  display: grid;
  gap: 14px;
  counter-reset: step;
}

@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.step {
  position: relative;
  padding: clamp(22px, 2.4vw, 28px);
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 14px;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold);
}

.step__title {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.step ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 0.93rem;
  color: var(--muted);
}

.step li {
  position: relative;
  padding-left: 20px;
}

.step li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background-color: var(--accent);
}

/* -------------------------------------------------------------------- отзывы */

/* Отзывы стоят в один ряд и листаются по горизонтали: строка текста остаётся читаемой длины,
   а страница не растягивается на десяток карточек. */
.reviews {
  display: flex;
  /* Карточки в ряду одной высоты: отзывы разной длины иначе выглядят рваным рядом. */
  align-items: stretch;
  gap: 16px;
  overflow-x: auto;
  /* Не «mandatory»: карточка шире остатка прокрутки, и жёсткая привязка мешала бы доводить ряд. */
  scroll-snap-type: x proximity;
  /* Полосу прокрутки прятать приходится: на стыке повторов её бегунок прыгал бы туда-обратно. */
  scrollbar-width: none;
}

.reviews::-webkit-scrollbar {
  display: none;
}

.reviews:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* На узких экранах стрелки стоят под рядом по центру: по бокам они закрыли бы текст карточки,
   которая там занимает всю ширину. */
.reviews__nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

/* От планшета стрелки уходят по бокам ряда — в поля, которые для них оставляет карусель. */
@media (min-width: 900px) {
  .reviews-carousel {
    position: relative;
    padding-inline: 60px;
  }

  /* Обёртка растворяется, чтобы стрелки считали края от самой карусели. Скрытая остаётся
     скрытой: `display` у элемента с `hidden` иначе перебил бы браузерное `display: none`. */
  .reviews__nav:not([hidden]) {
    display: contents;
  }

  .reviews__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: var(--shadow-sm);
  }

  .reviews__arrow--prev {
    left: 0;
  }

  .reviews__arrow--next {
    right: 0;
  }
}

.reviews__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background-color: var(--card);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), opacity 0.2s var(--ease);
}

.reviews__arrow svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reviews__arrow:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.reviews__arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.review {
  display: flex;
  flex-direction: column;
  flex: 0 0 min(680px, calc(100vw - 2 * var(--gutter)));
  scroll-snap-align: center;
  scroll-snap-stop: always;
  padding: clamp(24px, 2.6vw, 34px);
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  /* Плашки внутри равняются по ширине самой карточки, а не экрана: в ряду места меньше. */
  container-type: inline-size;
}

/* Пока каруселью занимается скрипт, соседние отзывы приглушены — читают тот, что в середине.
   Без скрипта ряд остаётся обычным: приглушать в нём нечего. */
.reviews[data-carousel-ready='true'] > .review {
  opacity: 0.4;
  transition: opacity 0.3s var(--ease);
}

.reviews[data-carousel-ready='true'] > .review[data-active='true'] {
  opacity: 1;
}

/* Заголовок карточки — цель менти. В данных она записана со строчной, здесь поднимается. */
.review__role {
  margin-bottom: 18px;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}

.review__role::first-letter {
  text-transform: uppercase;
}

/* Цель, срок и оффер — три отдельные плашки: одной общей на телефоне они сливались в столбик. */
.review__stats {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

@container (min-width: 460px) {
  .review__stats {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

.review__stat {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background-color: var(--gold-soft);
}

.review__stat dt {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.review__stat dd {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
}

.review__text {
  font-size: 0.97rem;
}

/* Отзывы разной длины: подрезаем их до общей высоты, чтобы карточки в ряду не отличались втрое.
   Подрезает скрипт — без него отзыв показан целиком, а не обрублен без возможности раскрыть. */
.review__text[data-clamped='true'] {
  position: relative;
  max-height: 34em;
  overflow: hidden;
}

.review__text[data-clamped='true']::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 5em;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--card));
}

.review__more {
  /* Кнопка прижата к низу карточки: в ряду одной высоты она стоит на одной линии у всех. */
  margin-top: auto;
  padding-top: 12px;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}

.review__more:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Окна поверх страницы: отзыв целиком и выбор ролика о программе. Вид у них общий, а ширина и
   содержимое — свои. */
.review-modal,
.video-modal {
  max-height: min(86vh, 900px);
  margin: auto;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--card);
  color: var(--body);
  box-shadow: var(--shadow-lg);
}

.review-modal::backdrop,
.video-modal::backdrop {
  background-color: rgba(20, 19, 15, 0.5);
}

/* Закрытое окно прячет сам браузер. Старый браузер, который окон не знает, показал бы его
   содержимое прямо на странице — прячем явно: кнопки в нём ведут себя как без скрипта. */
.review-modal:not([open]),
.video-modal:not([open]) {
  display: none;
}

/* Отзыв целиком — в окне: в ряду одной высоты ему места нет. */
.review-modal {
  width: min(720px, calc(100vw - 32px));
  overflow: hidden;
}

.review-modal[open] {
  display: flex;
  flex-direction: column;
}

.review-modal__head {
  display: flex;
  justify-content: flex-end;
  flex: none;
}

.review-modal__close,
.video-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: -6px -6px 0 0;
  border: none;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.review-modal__close:hover,
.video-modal__close:hover {
  background-color: var(--paper-2);
  color: var(--ink);
}

.review-modal__close svg,
.video-modal__close svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.review-modal__body {
  overflow-y: auto;
  padding-right: 4px;
}

/* Карточка внутри окна — только содержимое: рамку и ширину ряда задаёт само окно. */
.review-modal .review {
  flex: initial;
  padding: 0;
  border: none;
  background: none;
  opacity: 1;
}

.review__text p + p {
  margin-top: 14px;
}

/* «Видео о программе»: ролик у каждого направления свой, окно предлагает выбрать направление. */
.video-modal {
  width: min(560px, calc(100vw - 32px));
}

.video-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.video-modal__title {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
}

.video-modal__head .eyebrow {
  display: block;
  margin-bottom: 10px;
}

.video-modal__close {
  flex: none;
}

/* На телефоне направления стоят друг под другом, с планшета — парой. */
.video-modal__choices {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

@media (min-width: 560px) {
  .video-modal__choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Карточка направления — ссылка на его ролик. Крен и рост карточек-ссылок здесь убраны: в тесном
   окне карточка задевала бы соседнюю и края окна, — остаётся подсветка и небольшой подъём. */
.video-choice {
  padding: 20px;
  color: inherit;
}

.video-choice:hover,
.video-choice:focus-visible {
  transform: translateY(-3px);
}

.video-choice:active {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .video-choice:hover,
  .video-choice:focus-visible {
    transform: none;
  }
}

/* Название внутри ссылки — `span`: правила заголовков его не касаются, оформляем явно. */
.video-choice__title {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

/* ---------------------------------------------------------------------- цены */

.tariffs {
  display: grid;
  gap: 16px;
}

@media (min-width: 720px) {
  .tariffs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .tariffs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Ряды и разделители приходят из разметки, по которой платформа пересобирает блок с ценами:
   в сетке они растворяются, чтобы карточки встали одной решёткой. */
.t1067__row {
  display: contents;
}

.t1067__separator {
  display: none;
}

.t1067__col {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  padding: clamp(24px, 2.6vw, 32px);
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

/* Под курсором карточка тарифа ведёт себя так же, как карточка услуги: приподнимается,
   подрастает и чуть кренится. `:focus-within` — то же самое для тех, кто дошёл до кнопки с клавиатуры. */
.t1067__col:hover,
.t1067__col:focus-within {
  border-color: var(--accent);
  transform: translateY(-6px) scale(1.03) rotate(-0.8deg);
  box-shadow: var(--shadow-md);
}

.t1067__col:active {
  transform: translateY(-2px) scale(1.01) rotate(-0.4deg);
}

/* Нажимается вся карточка, а не только кнопка: прозрачный слой кнопки растянут на карточку.
   Поэтому над ценой и подписью курсор тоже «пальчик», а клик по любому месту ведёт в телеграм. */
.t1067__col .btn::after {
  content: '';
  position: absolute;
  inset: 0;
}

/* Кнопка внутри карточки не приподнимается отдельно: её собственная трансформация стала бы
   системой координат для растянутого слоя, и наведение замигало бы. Приподнимается карточка целиком. */
.t1067__col .btn--primary:hover {
  transform: none;
}

.t1067__price {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.1vw, 1.75rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
}

.t-card__descr {
  font-size: 0.9rem;
  color: var(--muted);
}

.t1067__col .btn {
  margin-top: auto;
}

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

.faq {
  display: grid;
  gap: 10px;
  max-width: 54rem;
}

.faq__item {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq__item summary {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px clamp(18px, 2vw, 26px);
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  content: '';
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  margin-top: 7px;
  margin-left: auto;
  border-right: 1.8px solid var(--muted);
  border-bottom: 1.8px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease);
}

.faq__item[open] summary::after {
  transform: rotate(-135deg);
}

.faq__answer {
  padding: 0 clamp(18px, 2vw, 26px) 22px;
  font-size: 0.97rem;
  color: var(--muted);
  max-width: 68ch;
}

.faq__answer p + p,
.faq__answer ul {
  margin-top: 12px;
}

.faq__answer ul {
  margin-bottom: 0;
  padding-left: 20px;
}

/* -------------------------------------------------------------------- призыв */

/* Финальный блок: тёмно-зелёная плашка, где обещание стоит слева, а действие — справа. Плотная
   пара «текст — кнопка» держит блок собранным, а по центру он расплывался пустотой. */
.cta {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: clamp(24px, 3vw, 44px);
  align-items: center;
  padding: clamp(32px, 4.5vw, 60px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(30rem 20rem at 88% -15%, rgba(168, 100, 26, 0.32), transparent 68%),
    radial-gradient(26rem 18rem at 4% 115%, rgba(255, 255, 255, 0.1), transparent 70%),
    linear-gradient(140deg, #16663f 0%, #0f4c32 58%, #0c3f29 100%);
  color: rgba(242, 246, 243, 0.82);
  box-shadow: var(--shadow-lg);
}

@media (min-width: 860px) {
  .cta {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.cta h2 {
  color: #ffffff;
  font-size: var(--h2);
  text-wrap: balance;
}

/* Золотая черта над заголовком — та же, что отмечает цифры результата на светлых секциях. */
.cta h2::before {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  margin-bottom: 20px;
  background-color: var(--gold);
}

.cta p {
  margin-top: 14px;
  max-width: 44ch;
  font-size: var(--lead);
  color: rgba(242, 246, 243, 0.78);
}

.cta .btn-row {
  margin-top: 26px;
}

/* На телефоне кнопки идут во всю ширину: рядом они встают разной длины и выглядят неровно. */
@media (max-width: 559px) {
  .cta .btn-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Рядом с текстом кнопки стоят столбиком и одной ширины: так пара читается как одно действие. */
@media (min-width: 860px) {
  .cta .btn-row {
    flex-direction: column;
    align-items: stretch;
    margin-top: 0;
  }
}

.cta .btn--primary {
  background-color: #ffffff;
  color: var(--accent);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.9);
}

.cta .btn--primary:hover {
  background-color: var(--gold-soft);
  color: var(--accent-hover);
}

.cta .btn--ghost {
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

.cta .btn--ghost:hover {
  background-color: rgba(255, 255, 255, 0.14);
  border-color: #ffffff;
  color: #ffffff;
}

/* --------------------------------------------------------------------- текст */

.prose {
  max-width: 44rem;
  font-size: 1.02rem;
  color: var(--body);
}

.prose > * + * {
  margin-top: 18px;
}

.prose h2 {
  margin-top: 44px;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}

.prose h3 {
  margin-top: 32px;
  font-size: 1.2rem;
}

.prose ul,
.prose ol {
  padding-left: 22px;
}

.prose li + li {
  margin-top: 8px;
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.prose td,
.prose th {
  padding: 12px 14px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background-color: var(--paper-2);
  color: var(--ink);
  font-weight: 600;
}

.page-head {
  padding-block: clamp(40px, 6vw, 80px) clamp(24px, 3vw, 40px);
  background:
    radial-gradient(40rem 24rem at 15% 0%, var(--accent-soft), transparent 70%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  max-width: 22ch;
}

.page-head p {
  margin-top: 16px;
  max-width: 52ch;
  font-size: var(--lead);
  color: var(--muted);
}

/* ------------------------------------------------------------- архив тарифов */

/* Список редакций. Классы `t1062__*` достались от прежней вёрстки и остались нарочно: по ним
   платформа находит пункт-образец, когда добавляет ссылку на новую редакцию. */
.archive-list {
  display: grid;
  gap: 12px;
}

.archive-list .t1062__separator {
  display: none;
}

.archive-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--card);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.archive-list__item:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* На телефоне дата и ссылка в строку не помещаются: дата важнее, она и остаётся целой. */
@media (max-width: 479px) {
  .archive-list__item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

.archive-list .t1062__title {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
}

.archive-list__more {
  flex: none;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent);
}

/* Страница редакции: программа заголовком, под ней — условия и цены строками. */
.archive {
  display: grid;
}

.archive__head {
  padding-top: clamp(30px, 4vw, 46px);
}

.archive__head:first-child {
  padding-top: 0;
}

.archive__title {
  font-family: var(--serif);
  font-size: var(--h2);
  color: var(--ink);
}

.archive__block {
  display: grid;
  gap: 6px 32px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

@media (min-width: 760px) {
  .archive__block {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr);
  }
}

.archive__label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 4px;
}

.archive__text {
  color: var(--body);
  line-height: 1.7;
}

.archive__text strong {
  color: var(--ink);
  font-weight: 600;
}

/* Текст блока платформа записывает начиная с переноса строки: пустой строки перед ним быть
   не должно. */
.archive__text br:first-child {
  display: none;
}

/* С седьмой редакции разделы разложены по направлениям: у каждого своя свёрнутая группа, и
   раскрывается она по нажатию на название. Название — зелёный заголовок со стрелкой,
   как у вопросов FAQ: сразу видно, что его можно открыть, а свёрнутые группы не растягивают
   страницу ценами направления, которое посетителю не нужно. */
.archive__direction {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.archive__direction + .archive__direction {
  margin-top: clamp(14px, 2vw, 20px);
}

/* Название направления — подпись раскрывающейся карточки: оно мельче заголовка страницы, чтобы
   свёрнутая страница не кричала двумя огромными словами, но крупнее заголовков программ внутри. */
.archive__direction-title {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: clamp(18px, 2.5vw, 26px) clamp(18px, 3vw, 32px);
  border-radius: calc(var(--radius) - 1px);
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
  transition: color 0.2s var(--ease);
}

.archive__direction-title::-webkit-details-marker {
  display: none;
}

.archive__direction-title::after {
  content: '';
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin: -6px 4px 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease), margin 0.25s var(--ease);
}

.archive__direction[open] > .archive__direction-title::after {
  margin-top: 6px;
  transform: rotate(-135deg);
}

.archive__direction-title:hover {
  color: var(--accent-hover);
}

/* Рамка фокуса внутри карточки: снаружи она пересекала бы открытую группу поперёк. */
.archive__direction-title:focus-visible {
  outline-offset: -4px;
}

/* Черта под названием отделяет группу от её разделов: без неё название направления сливалось бы
   с заголовком первой программы прямо под ним. Сверху и снизу отступ небольшой: воздух вокруг
   заголовков дают сами свёрнутые разделы. */
.archive__direction-body {
  padding: clamp(4px, 1vw, 8px) clamp(18px, 3vw, 32px);
  border-top: 1px solid var(--line);
}

/* Разделы внутри группы тоже свёрнуты: раскрытая группа — это список программ, а условия и цены
   раскрываются по нажатию на заголовок той, которая нужна. Черта между разделами разводит
   свёрнутые заголовки, иначе они читались бы одним абзацем. */
.archive__section + .archive__section {
  border-top: 1px solid var(--line);
}

/* Заголовок программы — ступень ниже названия направления: тот же шрифт заголовков, но мельче и
   чёрным, а стрелка меньше, чем у группы. Редакции до седьмой разделы не сворачивают и остаются
   с прежними крупными заголовками. Поля по бокам нужны рамке фокуса (ниже), а отрицательные
   отступы возвращают текст на одну линию с блоками раздела. */
.archive__section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 -10px;
  padding: clamp(16px, 2.2vw, 22px) 10px;
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  transition: color 0.2s var(--ease);
}

.archive__section-title::-webkit-details-marker {
  display: none;
}

.archive__section-title .archive__title {
  min-width: 0;
  /* На 2px мельче прежнего заголовка программы в группе: так попросил ментор. */
  font-size: calc(clamp(1.3rem, 2.2vw, 1.75rem) - 2px);
  line-height: 1.2;
  color: inherit;
}

.archive__section-title::after {
  content: '';
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin: -5px 4px 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease), margin 0.25s var(--ease);
}

.archive__section[open] > .archive__section-title::after {
  margin-top: 5px;
  transform: rotate(-135deg);
}

.archive__section-title:hover {
  color: var(--accent);
}

/* Рамка фокуса внутри заголовка: снаружи она наезжала бы на черту между разделами. */
.archive__section-title:focus-visible {
  outline-offset: -2px;
}

.archive__section-body {
  padding-bottom: clamp(8px, 1.5vw, 14px);
}

@media (prefers-reduced-motion: reduce) {
  .archive__direction-title,
  .archive__direction-title::after,
  .archive__section-title,
  .archive__section-title::after {
    transition: none;
  }
}

/* --------------------------------------------------------------------- форма */

.form {
  display: grid;
  gap: 18px;
  max-width: 34rem;
}

.field {
  display: grid;
  gap: 8px;
}

.field > label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background-color: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 96, 63, 0.14);
}

.field__hint {
  font-size: 0.85rem;
  color: var(--muted);
}

/* -------------------------------------------------------------------- подвал */

.site-footer {
  padding-block: clamp(48px, 6vw, 72px) 32px;
  background-color: var(--ink);
  color: rgba(251, 250, 247, 0.72);
}

.site-footer a {
  color: rgba(251, 250, 247, 0.72);
  transition: color 0.2s var(--ease);
}

.site-footer a:hover {
  color: #ffffff;
}

.site-footer__grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 720px) {
  .site-footer__grid {
    grid-template-columns: 1.4fr repeat(3, 1fr);
  }
}

.site-footer .brand {
  color: #ffffff;
  margin-bottom: 14px;
}

.site-footer .brand em {
  color: #8fc9ab;
}

.site-footer__legal {
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(251, 250, 247, 0.55);
}

.site-footer__title {
  margin-bottom: 14px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(251, 250, 247, 0.5);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 0.93rem;
}

.site-footer__social {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.site-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(251, 250, 247, 0.18);
}

.site-footer__social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.site-footer__bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(251, 250, 247, 0.12);
  font-size: 0.82rem;
  color: rgba(251, 250, 247, 0.5);
}

/* ------------------------------------------------------------ плашка о cookie */

.cookie {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 60;
  display: none;
  gap: 18px;
  align-items: center;
  max-width: 44rem;
  margin-inline: auto;
  padding: 18px 20px;
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  font-size: 0.85rem;
  color: var(--muted);
}

.cookie[data-open='true'] {
  display: flex;
  flex-wrap: wrap;
}

.cookie .btn {
  flex: 0 0 auto;
  margin-left: auto;
}

/* ---------------------------------------------------------------- «наверх» */

.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background-color: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), background-color 0.2s var(--ease);
}

.to-top[data-visible='true'] {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.to-top:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.to-top svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ------------------------------------------------------------- появление */

/* Сдвиг задан отдельным свойством `translate`, а не `transform`: иначе он затирал бы собственные
   трансформации блока — например подъём карточки-ссылки под курсором. */
.reveal {
  opacity: 0;
  translate: 0 14px;
  transition: opacity 0.6s var(--ease), translate 0.6s var(--ease);
}

.reveal[data-shown='true'] {
  opacity: 1;
  translate: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    translate: none;
    transition: none;
  }

  .btn,
  .card,
  .step,
  .t1067__col {
    transition: none;
  }

  .btn:hover,
  .card--link:hover,
  .t1067__col:hover,
  .t1067__col:focus-within,
  .t1067__col:active {
    transform: none;
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background-color: var(--card);
  border: 1px solid var(--accent);
  border-radius: 0 0 12px 0;
}

.skip-link:focus {
  left: 0;
}

/* ------------------------------------------------------------------ о менторе */

.about {
  display: grid;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

@media (min-width: 860px) {
  .about {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }
}

.about__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 480px;
  object-fit: cover;
  object-position: center 25%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.about__list {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.about__list li {
  position: relative;
  padding-left: 26px;
  color: var(--body);
}

.about__list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background-color: var(--gold);
}

.question-list {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 8px;
}

/* Карточка программы на главной: ссылка целиком, со стрелкой внизу. */
.program-card {
  color: inherit;
}

.program-card__more {
  margin-top: auto;
  padding-top: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}

.program-card__more::after {
  content: '→';
  display: inline-block;
  margin-left: 6px;
  transition: transform 0.25s var(--ease);
}

/* ------------------------------------------------------------ направления */

/* Услуги на главной: сначала большая карточка направления, под ней — его программы. В разметке
   группа программ идёт сразу за своей кнопкой, поэтому на телефоне она открывается прямо под
   выбранной карточкой. С планшета карточки встают в первый ряд, а открытая группа — под ними
   на всю ширину. */
.directions {
  display: grid;
  gap: 16px;
}

@media (min-width: 720px) {
  .directions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: clamp(32px, 4vw, 56px);
  }

  .direction-card {
    grid-row: 1;
  }

  .directions__panel {
    grid-column: 1 / -1;
  }
}

/* Кнопки выбора показывает скрипт: `display` у `.card` иначе перебил бы браузерное
   `display: none` у `hidden`, и без скрипта на странице висели бы кнопки, которые ничего не
   делают. */
.direction-card[hidden] {
  display: none;
}

/* Кнопка не наследует шрифт, цвет и выравнивание — возвращаем их, чтобы она выглядела карточкой. */
.direction-card {
  width: 100%;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.direction-card .card__icon {
  width: 52px;
  height: 52px;
  border-radius: 15px;
}

.direction-card .card__icon svg {
  width: 24px;
  height: 24px;
}

/* Заголовок внутри кнопки — `span`: правила заголовков его не касаются, оформляем явно. */
.direction-card__title {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.8vw, 2.15rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.direction-card .card__text {
  max-width: 40ch;
}

/* Стрелка смотрит вниз — туда, где откроются программы, — а у открытого направления вверх. */
.direction-card__more::after {
  content: '↓';
}

.direction-card:hover .direction-card__more::after,
.direction-card:focus-visible .direction-card__more::after {
  transform: translateY(3px);
}

.direction-card[aria-expanded='true'] .direction-card__more::after {
  transform: rotate(180deg);
}

/* Выбранное направление подсвечено акцентом: видно, чьи программы открыты под карточками. */
.direction-card[aria-expanded='true'] {
  border-color: var(--accent);
  background-color: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.direction-card[aria-expanded='true']:hover,
.direction-card[aria-expanded='true']:focus-visible {
  box-shadow: inset 0 0 0 1px var(--accent), var(--shadow-md);
}

.direction-card[aria-expanded='true'] .card__icon {
  background-color: var(--accent);
  color: #ffffff;
}

/* На телефоне группа отделена от следующей карточки направления, чтобы не слиться с ней. */
.directions__panel {
  padding: 16px 0 24px;
}

@media (min-width: 720px) {
  .directions__panel {
    padding: 0;
  }
}

.directions__title {
  margin-bottom: 20px;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
}

.directions__title .eyebrow {
  display: block;
  margin-bottom: 8px;
  font-family: var(--sans);
  letter-spacing: 0.16em;
}
