/* ============================================================
   Aschool · concept.css  (Вариант B — foxford-structure)
   ------------------------------------------------------------
   ПРОТОТИП. Не production. Подключается ПОСЛЕ css/main.css и
   css/components.css и только ДОБАВЛЯЕТ новые структурные блоки,
   которых нет в текущей дизайн-системе. Существующие компоненты
   (.btn, .card, .hero, .faq, .lead-form, .site-header, .pain-*,
   .pill-tag, .price, .pay-block, .step, .review-card, .footer)
   переиспользуются как есть — здесь их правила НЕ переопределяются.
   Все цвета берутся из уже объявленных в main.css CSS-переменных
   бренда Aschool (--brand-red/orange/blue/cyan/dark + *-rgb).
   ============================================================ */


/* ══════════════════════════════════════
   HEADER — кнопки «Школам» (B2B, синяя) и «Кабинет» (ЛК)
   «Школам» вынесена в отдельную выделенную кнопку синего (B2B) цвета —
   визуально отделена от красных родительских CTA, чтобы родители не путали
   B2C и B2B. «Кабинет» ведёт на страницу ЛК (login.html).
══════════════════════════════════════ */
.btn-schools {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: var(--brand-white);
  box-shadow: 0 6px 16px rgba(var(--brand-blue-rgb), .28);
}
.btn-schools:hover {
  background: var(--brand-cyan);
  border-color: var(--brand-cyan);
  color: var(--brand-white);
  box-shadow: 0 10px 24px rgba(var(--brand-cyan-rgb), .32);
}
.header-cta .btn-schools:focus-visible,
.nav-actions .btn:focus-visible { outline: 2px solid var(--brand-dark); outline-offset: 2px; }

/* Группа кнопок «Школам»/«Кабинет» в мобильном меню.
   На десктопе скрыта — эти кнопки живут в .header-cta. На ≤1080px правило
   production `.header-cta .btn:not(.btn-primary){display:none}` прячет их в
   шапке, а здесь они появляются внутри выпадающего меню отдельным блоком. */
.nav-actions { display: none; }
@media (max-width: 1080px) {
  .nav-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid rgba(var(--brand-dark-rgb), .1);
  }
  .nav-actions .btn { width: 100%; }
}

/* ══════════════════════════════════════
   ЭКРАН 1 — Промополоса над header
   Ненавязчивая полоса с одним актуальным сообщением.
   Без выдуманных скидок и дедлайнов.
══════════════════════════════════════ */
.concept-promo {
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-cyan));
  color: var(--brand-white);
}
.concept-promo .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
  flex-wrap: wrap;
  padding-top: 9px;
  padding-bottom: 9px;
  text-align: center;
}
.concept-promo p {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
}
.concept-promo a {
  color: var(--brand-white);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.concept-promo a:hover { opacity: .85; }
@media (max-width: 520px) { .concept-promo p { font-size: 12.5px; } }

/* ══════════════════════════════════════
   ЭКРАН 4 — Полоса доверия
   Только подтверждённые преимущества, без цифровой статистики.
══════════════════════════════════════ */
.concept-trust {
  padding: 30px 0;
}
.concept-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.concept-trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  background: #fff;
  border: 1px solid rgba(var(--brand-dark-rgb), .08);
  border-radius: 16px;
  padding: 16px 12px;
  box-shadow: 0 4px 14px rgba(var(--brand-dark-rgb), .05);
}
.concept-trust-item .ic {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--brand-red-rgb), .1);
  color: var(--brand-red);
  flex-shrink: 0;
}
.concept-trust-item .ic svg { width: 22px; height: 22px; }
.concept-trust-item span {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: rgba(var(--brand-dark-rgb), .82);
}
@media (max-width: 900px) { .concept-trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) {
  .concept-trust-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .concept-trust-item { padding: 14px 8px; }
}

/* ══════════════════════════════════════
   ЭКРАН 6 — Как помогает Aschool
   Проблема → решение → результат (три колонки внутри карточки).
══════════════════════════════════════ */
.concept-solution-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}
.concept-solution {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 12px;
  background: #fff;
  border: 1px solid rgba(var(--brand-dark-rgb), .08);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: 0 6px 18px rgba(var(--brand-dark-rgb), .05);
}
.concept-solution .cell { display: flex; flex-direction: column; gap: 6px; }
.concept-solution .cell-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.concept-solution .cell-problem .cell-label { color: var(--brand-red); }
.concept-solution .cell-solution .cell-label { color: var(--brand-blue); }
.concept-solution .cell-result .cell-label { color: var(--brand-orange); }
.concept-solution .cell p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: rgba(var(--brand-dark-rgb), .82);
}
.concept-solution .arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(var(--brand-dark-rgb), .3);
  font-size: 20px;
  font-weight: 700;
}
@media (max-width: 820px) {
  .concept-solution {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .concept-solution .arrow { transform: rotate(90deg); height: 14px; }
}

/* ══════════════════════════════════════
   ЭКРАН 7 — Форматы обучения
   Переиспользует .card. Здесь только «мета»-строка под заголовком.
══════════════════════════════════════ */
.concept-format-meta {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.concept-format-meta li {
  font-size: 13px;
  line-height: 1.4;
  color: rgba(var(--brand-dark-rgb), .7);
  padding: 0;
}
.concept-format-meta li b {
  color: var(--brand-dark);
  font-weight: 700;
}

/* ══════════════════════════════════════
   ЭКРАН 8 — Как устроено обучение (горизонтальный степпер)
   Переиспользует .step-card. Здесь — сетка на 4/2/1.
══════════════════════════════════════ */
.concept-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 8px;
}
.concept-steps .step-card { padding: 22px 20px; }
.concept-steps .step-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--brand-red);
  color: var(--brand-white);
  font-weight: 900;
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
@media (max-width: 900px) { .concept-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .concept-steps { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════
   ЭКРАН 10 — Команда сопровождения (модель ролей, без вымышленных людей)
══════════════════════════════════════ */
.concept-team {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 8px;
}
.concept-team-card {
  background: #fff;
  border: 1px solid rgba(var(--brand-dark-rgb), .08);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 6px 18px rgba(var(--brand-dark-rgb), .05);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.concept-role-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 18px;
  color: var(--brand-white);
  background: var(--brand-dark);
}
.concept-team-card:nth-child(1) .concept-role-avatar { background: var(--brand-red); }
.concept-team-card:nth-child(2) .concept-role-avatar { background: var(--brand-blue); }
.concept-team-card:nth-child(3) .concept-role-avatar { background: var(--brand-orange); }
.concept-team-card:nth-child(4) .concept-role-avatar { background: var(--brand-cyan); }
.concept-team-card:nth-child(5) .concept-role-avatar { background: var(--brand-blue); }
.concept-team-card:nth-child(6) .concept-role-avatar { background: var(--brand-red); }
.concept-team-card h3 { font-size: 16px; margin: 0 0 6px; color: var(--brand-dark); }
.concept-team-card p { margin: 0; font-size: 13.5px; line-height: 1.5; color: rgba(var(--brand-dark-rgb), .7); }
@media (max-width: 900px) { .concept-team { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .concept-team { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════
   ЭКРАН 11 — Официальность обучения
══════════════════════════════════════ */
.concept-official {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 8px;
}
.concept-official-item {
  background: #fff;
  border: 1px solid rgba(var(--brand-dark-rgb), .08);
  border-left: 4px solid var(--brand-blue);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 4px 14px rgba(var(--brand-dark-rgb), .05);
}
.concept-official-item h3 { font-size: 15.5px; margin: 0 0 6px; color: var(--brand-dark); }
.concept-official-item p { margin: 0; font-size: 13.5px; line-height: 1.5; color: rgba(var(--brand-dark-rgb), .72); }
@media (max-width: 900px) { .concept-official { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .concept-official { grid-template-columns: 1fr; } }

/* ── TODO-пометка недостающего материала (видимая в концепте) ── */
.concept-todo {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-orange);
  background: rgba(var(--brand-orange-rgb), .1);
  border: 1px dashed rgba(var(--brand-orange-rgb), .5);
  border-radius: 8px;
  padding: 5px 10px;
  line-height: 1.4;
}

/* ── Секция-обёртка для «школам» (компактный B2B-вход на B2C-странице) ── */
.concept-schools-strip {
  background: rgba(var(--brand-blue-rgb), .06);
  border: 1px solid rgba(var(--brand-blue-rgb), .16);
  border-radius: var(--radius);
  padding: 22px 26px;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 28px;
}
.concept-schools-strip p { margin: 0; font-size: 15px; color: rgba(var(--brand-dark-rgb), .8); max-width: 640px; }
.concept-schools-strip b { color: var(--brand-dark); }

/* ══════════════════════════════════════
   Sticky mobile CTA (Вариант B — мягкая версия; в C — обязательный элемент)
══════════════════════════════════════ */
.concept-sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  display: none;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(var(--brand-dark-rgb), .1);
  box-shadow: 0 -8px 24px rgba(var(--brand-dark-rgb), .1);
}
.concept-sticky-cta .btn { width: 100%; }
@media (max-width: 720px) {
  .concept-sticky-cta { display: block; }
  /* чтобы sticky-CTA не перекрывал футер/последнюю форму */
  body.home-page { padding-bottom: 72px; }
}

/* ══════════════════════════════════════
   КОНЦЕПТ КАБИНЕТА (kabinet.html) — чат и оплаты.
   Дополняет существующие production dash-* стили (расписание, журнал —
   .dash-grades, задания — .dash-upload, видеовстречи — .dash-meet).
══════════════════════════════════════ */
.dash-chat { display: flex; flex-direction: column; gap: 12px; }
.dash-msg {
  max-width: 82%;
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(var(--brand-dark-rgb), .06);
}
.dash-msg .who { display: block; font-size: 11px; font-weight: 700; opacity: .7; margin-bottom: 3px; }
.dash-msg-in { align-self: flex-start; background: #fff; border: 1px solid rgba(var(--brand-dark-rgb), .08); border-bottom-left-radius: 4px; color: var(--brand-dark); }
.dash-msg-out { align-self: flex-end; background: var(--brand-blue); color: var(--brand-white); border-bottom-right-radius: 4px; }
.dash-chat-bar { display: flex; gap: 8px; margin-top: 8px; }
.dash-chat-bar input {
  flex: 1;
  padding: 11px 14px;
  border: 1.5px solid #e2e2e8;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
}

.dash-invoice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border: 1px solid rgba(var(--brand-dark-rgb), .1);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 12px;
}
.dash-invoice-main strong { display: block; color: var(--brand-dark); font-size: 15px; }
.dash-invoice-main span { font-size: 13px; color: rgba(var(--brand-dark-rgb), .6); }
.dash-invoice-sum { font-size: 20px; font-weight: 800; color: var(--brand-dark); white-space: nowrap; }
.dash-pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.dash-pill-paid { background: #E8F5E9; color: #2E7D32; }
.dash-pill-due { background: rgba(var(--brand-orange-rgb), .14); color: var(--brand-orange); }

/* Интро на странице кабинета — «Хочешь такой же кабинет?» */
.cabinet-intro { text-align: center; max-width: 760px; margin: 0 auto; }

/* ── Мелкие утилиты концепта ── */
.concept-note {
  text-align: center;
  font-size: 13px;
  color: rgba(var(--brand-dark-rgb), .55);
  margin-top: 12px;
}
.concept-section-intro { max-width: 720px; margin: 0 auto 8px; }

/* ══════════════════════════════════════
   Полоса статистики (опыт команды) — над полосой доверия
══════════════════════════════════════ */
.concept-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-width: 640px;
  margin: 0 auto 22px;
}
.concept-stat {
  background: #fff;
  border: 1px solid rgba(var(--brand-dark-rgb), .08);
  border-radius: 16px;
  padding: 18px 20px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(var(--brand-dark-rgb), .05);
}
.concept-stat b {
  display: block;
  font-size: 30px;
  font-weight: 900;
  color: var(--brand-red);
  line-height: 1.05;
  margin-bottom: 4px;
}
.concept-stat span {
  font-size: 13px;
  line-height: 1.35;
  color: rgba(var(--brand-dark-rgb), .7);
}
@media (max-width: 520px) { .concept-stats { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════
   ЭКРАН 14 — Отзывы: горизонтальный рельс со скроллом (15–20 карточек)
   Работает без JS (нативный scroll + scroll-snap). Стрелки — прогрессивное
   улучшение (concept.js), при отсутствии JS остаётся обычный скролл.
══════════════════════════════════════ */
.concept-reviews-wrap { position: relative; }
.concept-rail-nav {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}
.concept-rail-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(var(--brand-dark-rgb), .15);
  background: #fff;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(var(--brand-dark-rgb), .08);
  transition: background .2s ease, color .2s ease, transform .15s ease;
}
.concept-rail-btn:hover { background: var(--brand-dark); color: var(--brand-white); }
.concept-rail-btn:active { transform: scale(.94); }
.concept-rail-btn:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.concept-rail-btn svg { width: 20px; height: 20px; }

.concept-reviews-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 340px);
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 6px 4px 18px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--brand-dark-rgb), .3) transparent;
}
.concept-reviews-rail::-webkit-scrollbar { height: 8px; }
.concept-reviews-rail::-webkit-scrollbar-thumb {
  background: rgba(var(--brand-dark-rgb), .25);
  border-radius: 999px;
}
.concept-reviews-rail > .review-card {
  scroll-snap-align: start;
  height: auto;
}
@media (prefers-reduced-motion: reduce) {
  .concept-reviews-rail { scroll-behavior: auto; }
}

/* Карточка-заготовка под будущий отзыв (до получения от администраторов) */
.review-card--todo {
  border: 1px dashed rgba(var(--brand-orange-rgb), .55);
  background: rgba(var(--brand-orange-rgb), .04);
}
.review-card--todo .review-avatar {
  background: rgba(var(--brand-dark-rgb), .22) !important;
  box-shadow: none !important;
}
.review-card--todo .card-desc { color: rgba(var(--brand-dark-rgb), .55); font-style: italic; }
.review-card--todo .review-name { color: rgba(var(--brand-dark-rgb), .55); }

/* Отступ для якорей под липкой шапкой */
main[id] section[id], section[id] { scroll-margin-top: 88px; }

/* ══════════════════════════════════════
   Блок стоимости (мягкая подача) — главная #tarify
══════════════════════════════════════ */
.home-price {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  max-width: 820px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid rgba(var(--brand-dark-rgb), .08);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 10px 30px rgba(var(--brand-dark-rgb), .07);
}
.home-price-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--brand-orange-rgb), .1);
  color: var(--brand-orange);
}
.home-price-icon svg { width: 30px; height: 30px; }
.home-price-lead {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 800;
  color: var(--brand-dark);
  margin: 0 0 10px;
  line-height: 1.25;
}
.home-price-text {
  color: rgba(var(--brand-dark-rgb), .74);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 16px;
}
.home-price-from {
  margin: 0 0 20px;
  font-size: 15px;
  color: rgba(var(--brand-dark-rgb), .7);
}
.home-price-from b { font-size: 22px; color: var(--brand-dark); }
.home-price-from span { display: inline-block; }
.home-price-cta { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .home-price { flex-direction: column; gap: 16px; padding: 24px; }
  .home-price-cta .btn { width: 100%; }
}

/* ══════════════════════════════════════
   Видео «Загляни в школу» — кнопки пауза/плей и звук
══════════════════════════════════════ */
.js-lazy-video-wrap { position: relative; }
.video-controls {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease;
  z-index: 3;
}
.video-controls.is-visible { opacity: 1; visibility: visible; }
.video-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(43, 42, 41, .62);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background .2s ease, transform .12s ease;
}
.video-btn:hover { background: rgba(43, 42, 41, .85); }
.video-btn:active { transform: scale(.92); }
.video-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.video-btn svg { width: 20px; height: 20px; display: block; }
/* play/pause icon state */
.js-video-playpause .ic-play { display: none; }
.js-video-playpause.is-paused .ic-play { display: block; }
.js-video-playpause.is-paused .ic-pause { display: none; }
/* mute icon state (default muted -> show sound-off) */
.js-video-mute .ic-sound-off { display: none; }
.js-video-mute.is-muted .ic-sound-off { display: block; }
.js-video-mute.is-muted .ic-sound-on { display: none; }

/* ── Форма отзыва ──────────────────────────────────────────── */
.review-form-block {
  max-width: 720px;
  margin: 32px auto 0;
  padding: 28px;
  background: var(--brand-white);
  border: 1px solid rgba(var(--brand-dark-rgb), .1);
  border-radius: 18px;
  box-shadow: 0 12px 32px -20px rgba(var(--brand-dark-rgb), .25);
}
.review-form-block h3 { margin: 0 0 6px; }
.review-form-block .muted { margin-bottom: 20px; }
.review-form-block .lead-form {
  padding: 0; box-shadow: none; border: none; border-radius: 0;
}
@media (max-width: 640px) { .review-form-block { padding: 20px; } }

/* ── Педагоги: сетка карточек ──────────────────────────────── */
.teachers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.teacher-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--brand-white);
  border: 1px solid rgba(var(--brand-dark-rgb), .1);
  border-radius: 18px;
  overflow: hidden;
  transition: transform .4s ease, box-shadow .4s ease, border-color .4s ease;
  will-change: transform;
}
.teacher-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    18rem 18rem at var(--mx, 50%) var(--my, 0%),
    var(--brand-orange), var(--brand-red) 40%, transparent 70%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}
.teacher-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px -22px rgba(var(--brand-dark-rgb), .45);
  border-color: transparent;
}
.teacher-card:hover::before { opacity: 1; }

.teacher-photo {
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(160deg,
    rgba(var(--brand-blue-rgb), .07), rgba(var(--brand-red-rgb), .06));
  color: rgba(var(--brand-dark-rgb), .3);
}
.teacher-photo svg { width: 56px; height: 56px; }
.teacher-photo-note {
  font-size: .8rem;
  color: rgba(var(--brand-dark-rgb), .45);
}
.teacher-body { padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.teacher-name { margin: 0; font-size: 1.15rem; }
.teacher-spec {
  margin: 0;
  font-weight: 700;
  font-size: .85rem;
  color: var(--brand-red);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.teacher-desc { margin: 6px 0 0; color: rgba(var(--brand-dark-rgb), .8); font-size: .95rem; }
.teacher-docs {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px dashed rgba(var(--brand-dark-rgb), .15);
  font-size: .82rem;
  color: rgba(var(--brand-dark-rgb), .5);
}

/* ── Появление карточек ────────────────────────────────────── */
.reveal-card {
  opacity: 0;
  transform: translateY(18px);
}
.reveal-card.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity .55s ease, transform .55s ease;
  transition-delay: calc(var(--card-i, 0) * 80ms);
}
@media (prefers-reduced-motion: reduce) {
  .reveal-card, .reveal-card.is-visible {
    opacity: 1; transform: none; transition: none;
  }
  .teacher-card, .teacher-card:hover { transform: none; transition: none; }
}

/* ── Диагнозы ──────────────────────────────────────────────── */
.dx-grid {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.dx-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: var(--brand-white);
  border: 1px solid rgba(var(--brand-dark-rgb), .1);
  border-left: 3px solid var(--brand-red);
  border-radius: 12px;
  transition: transform .3s ease, box-shadow .3s ease, border-left-color .3s ease;
}
.dx-item:hover {
  transform: translateY(-3px);
  border-left-color: var(--brand-orange);
  box-shadow: 0 12px 28px -18px rgba(var(--brand-dark-rgb), .4);
}
.dx-abbr { font-weight: 800; font-size: 1.05rem; color: var(--brand-dark); }
.dx-full { font-size: .88rem; color: rgba(var(--brand-dark-rgb), .65); }
@media (prefers-reduced-motion: reduce) {
  .dx-item, .dx-item:hover { transform: none; transition: none; }
}

/* ── Telegram CTA ──────────────────────────────────────────── */
.tg-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.tg-cta svg { width: 20px; height: 20px; flex: none; }

/* ═══════════════════════════════════════════════════════════
   Aschool Chat — ИИ-менеджер (только главная)
═══════════════════════════════════════════════════════════ */
.asch-chat {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9990;
  font-family: inherit;
}
.asch-chat__launcher {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 0;
  box-shadow: 0 10px 28px rgba(var(--brand-red-rgb), .35), 0 0 0 2px rgba(var(--brand-orange-rgb), .35);
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
  overflow: visible;
}
.asch-chat__launcher:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 14px 32px rgba(var(--brand-orange-rgb), .45), 0 0 0 3px rgba(var(--brand-orange-rgb), .45);
}
.asch-chat__launcher:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 3px;
}
.asch-chat__launcher-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.asch-chat__launcher-online {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--success, #43D97C);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.asch-chat--open .asch-chat__launcher { display: none; }
/* Cookie banner sits in the same bottom corner and can be taller than the
   launcher — hide the launcher while the banner is visible so it never
   overlaps or steals clicks from "Разрешить аналитику"/"Только необходимые". */
body.cookie-banner-visible .asch-chat__launcher { display: none; }

.asch-chat__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--brand-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.asch-chat__badge[hidden] { display: none; }

.asch-chat__panel {
  width: min(380px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 100px));
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(var(--brand-dark-rgb), .22);
  border: 1px solid rgba(var(--brand-dark-rgb), .08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  animation: aschChatIn .22s ease;
}
.asch-chat__panel[hidden] { display: none; }
@keyframes aschChatIn {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .asch-chat__panel { animation: none; }
  .asch-chat__launcher:hover { transform: none; }
}

.asch-chat__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-orange) 100%);
  color: #fff;
  flex-shrink: 0;
}
.asch-chat__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.55);
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.asch-chat__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.asch-chat__meta { flex: 1; min-width: 0; }
.asch-chat__name { font-weight: 800; font-size: 15px; line-height: 1.2; }
.asch-chat__role { font-size: 12px; opacity: .9; margin-top: 2px; }
.asch-chat__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.asch-chat__close:hover { background: rgba(255,255,255,.28); }
.asch-chat__close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.asch-chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fafafa;
  -webkit-overflow-scrolling: touch;
}
.asch-chat__row { display: flex; }
.asch-chat__row--bot { justify-content: flex-start; }
.asch-chat__row--user { justify-content: flex-end; }
.asch-chat__bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
  word-wrap: break-word;
}
.asch-chat__bubble--bot {
  background: #fff;
  color: var(--brand-dark);
  border: 1px solid rgba(var(--brand-dark-rgb), .08);
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(var(--brand-dark-rgb), .04);
}
.asch-chat__bubble--user {
  background: var(--brand-blue);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.asch-chat__bubble a {
  color: var(--brand-blue);
  text-decoration: underline;
  font-weight: 600;
}
.asch-chat__bubble--user a { color: #fff; }

.asch-chat__typing {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 14px 18px;
  min-height: 20px;
}
.asch-chat__typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(var(--brand-dark-rgb), .35);
  animation: aschDot 1.2s infinite ease-in-out;
}
.asch-chat__typing span:nth-child(2) { animation-delay: .15s; }
.asch-chat__typing span:nth-child(3) { animation-delay: .3s; }
@keyframes aschDot {
  0%, 80%, 100% { transform: translateY(0); opacity: .4; }
  40% { transform: translateY(-4px); opacity: 1; }
}

.asch-chat__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 10px;
  background: #fafafa;
  flex-shrink: 0;
}
.asch-chat__chips[hidden] { display: none; }
.asch-chat__chip {
  border: 1px solid rgba(var(--brand-blue-rgb), .25);
  background: #fff;
  color: var(--brand-blue);
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  font-family: inherit;
  line-height: 1.3;
}
.asch-chat__chip:hover {
  background: rgba(var(--brand-blue-rgb), .08);
  border-color: var(--brand-blue);
}
.asch-chat__chip:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}


.asch-chat__online-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7CFFB2;
  margin-right: 4px;
  vertical-align: middle;
  box-shadow: 0 0 0 2px rgba(124,255,178,.35);
}
.asch-chat__row--bot {
  align-items: flex-end;
  gap: 8px;
}
.asch-chat__msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid rgba(var(--brand-dark-rgb), .08);
  background: #fff;
}
.asch-chat__mascots {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 4px;
  padding: 0 14px 2px;
  background: #fafafa;
  pointer-events: none;
}
.asch-chat__mascot {
  display: block;
  opacity: .92;
  filter: drop-shadow(0 2px 4px rgba(var(--brand-dark-rgb), .12));
}
.asch-chat__mascot--hedge { transform: translateY(2px); }
.asch-chat__mascot--turtle { transform: scaleX(-1) translateY(4px); }

.asch-chat__footer {
  border-top: 1px solid rgba(var(--brand-dark-rgb), .08);
  padding: 10px 12px 12px;
  background: #fff;
  flex-shrink: 0;
}
.asch-chat__status {
  font-size: 12px;
  color: rgba(var(--brand-dark-rgb), .55);
  margin: 0 0 6px;
  text-align: center;
}
.asch-chat__status[hidden] { display: none; }
.asch-chat__form {
  display: flex;
  gap: 8px;
  align-items: center;
}
.asch-chat__input {
  flex: 1;
  min-width: 0;
  border: 1.5px solid #e2e2e8;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--brand-dark);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.asch-chat__input:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(var(--brand-blue-rgb), .12);
}
.asch-chat__send {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: none;
  background: var(--brand-red);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.asch-chat__send:hover { background: var(--brand-orange); }
.asch-chat__send:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}
.asch-chat__send svg { width: 20px; height: 20px; display: block; }
.asch-chat__legal {
  margin: 8px 0 0;
  font-size: 10.5px;
  line-height: 1.35;
  color: rgba(var(--brand-dark-rgb), .45);
  text-align: center;
}
.asch-chat__legal a {
  color: var(--brand-blue);
  text-decoration: underline;
}

/* Mobile: full-ish panel, lift above sticky CTA */
@media (max-width: 520px) {
  .asch-chat {
    right: 12px;
    bottom: 12px;
  }
  .asch-chat__panel {
    width: calc(100vw - 16px);
    height: min(72vh, 580px);
    position: fixed;
    right: 8px;
    bottom: 8px;
    border-radius: 18px;
  }
  body.asch-chat-open .concept-sticky-cta { opacity: 0; pointer-events: none; }
}
@media (max-width: 900px) {
  /* sticky CTA visible — keep launcher above it */
  .asch-chat { bottom: 76px; }
  .asch-chat--open { bottom: 12px; }
}


/* ── Lessons gallery (как проходят занятия) ── */
.lessons-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}
.lessons-gallery__item {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 18px rgba(var(--brand-dark-rgb), .08);
  transition: transform .2s ease, box-shadow .2s ease;
}
.lessons-gallery__item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(var(--brand-dark-rgb), .12);
}
.lessons-gallery__item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #f4f6f8;
}
.lessons-gallery__item figcaption {
  padding: 10px 14px 12px;
  font-size: 14px;
  font-weight: 700;
  color: rgba(var(--brand-dark-rgb), .85);
}
.lessons-gallery__note {
  margin: 14px 0 0;
  font-size: 13px;
  text-align: center;
}
.lessons-gallery__note code {
  font-size: 12px;
  background: rgba(var(--brand-dark-rgb), .06);
  padding: 1px 6px;
  border-radius: 4px;
}
@media (max-width: 900px) {
  .lessons-gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 520px) {
  .lessons-gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
  .lessons-gallery__item figcaption { font-size: 12px; padding: 8px 10px 10px; }
}
