/* razvitierebenka-online.ru
   Design: Warm Editorial — журнальная эстетика для вдумчивых родителей
   Palette (15.09.2026): тёплая бумага + оранжевый акцент, зелёный снят владельцем.
   Имена --forest* оставлены ради совместимости, цвет в них уже оранжевый.
   Fonts: Playfair Display (заголовки) + Nunito (тело) */


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --forest:    #B8431A;
  --forest-md: #D9531E;
  --forest-lt: #E0703A;
  --amber:     #D4870A;
  --amber-lt:  #F0A832;
  /* Янтарь под БЕЛЫМ текстом. Фирменный --amber #D4870A даёт с белым
     контраст 2,89:1 при норме 4,5:1 — на кнопках и подписях текст читался
     плохо, особенно на солнце с телефона. Затемнять сам --amber нельзя:
     он же рисует рамки, иконки и подсветки, где контраст не нужен, и весь
     сайт ушёл бы в бронзу. Поэтому отдельная переменная только для
     заливок с белым текстом: 4,68:1, оттенок остаётся янтарным. */
  --amber-dk:  #A66508;
  --cream:     #FFFFFF;
  --ivory:     #F4F4F1;
  --paper:     #FAF5EC;
  --text:      #1F1A17;
  --text-md:   #5C5047;
  --muted:     #6E6259;
  --border:    #DDD8CC;
  --border-lt: #EDE9E0;
  --white:     #FFFFFF;
  --red:       #C0392B;
  --sienna:    #A0522D;
  --wine:      #8C3A52;
  /* Псевдонимы для css/rubrics.css. Файл рубрик обращался к --accent (20 раз),
     --accent2 (1) и --bg (4), не объявленным нигде: невалидный var() без
     запасного значения обнуляет свойство целиком, поэтому весь акцентный цвет
     раздела рубрик был мёртв, а `.grade-pill.active` рисовалась белым по
     белому (контраст 1,03:1). Значения — цвета Warm Editorial, а не новые. */
  /* Тёмные варианты фирменных цветов — только для МЕЛКОГО ТЕКСТА на светлом
     фоне. Заливки, кнопки и бейджи остаются на --amber/--forest-lt: там цвет
     работает как фирменный, и трогать его без владельца нельзя.
     Янтарный #D4870A текстом на кремовом даёт 2,7:1 при пороге WCAG 4,5:1,
     светло-зелёный #E0703A — 3,8:1. Эти двое дают 5,5:1 и 5,9:1. */
  --amber-txt:  #8F5800;
  --forest-txt: #D9531E;
  --accent:    #B8431A;   /* = --forest */
  --accent2:   #D4870A;   /* = --amber  */
  --bg:        #FFFFFF;   /* = --cream  */
  --w:         1160px;
  --r:         0;
  --r-lg:      0;
}

html { font-size: 16px; scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: 'Nunito', Arial, sans-serif;
  color: var(--text);
  background: var(--paper);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
p { hyphens: auto; -webkit-hyphens: auto; }
a { color: inherit; text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--forest); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container {
  max-width: var(--w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ══════════════════════════════
   HEADER
══════════════════════════════ */
.header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--paper);
  box-shadow: 0 6px 24px rgba(184, 67, 26, 0.06);
}
.header-inner {
  max-width: var(--w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}
.logo span { color: var(--forest-lt); }

.nav { display: flex; align-items: center; gap: 0; }
.nav a {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-md);
  padding: 0.4rem 0.8rem;
  border-radius: 0;
  transition: background 0.2s, color 0.2s;
}
.nav a:hover {
  color: var(--forest);
  background: rgba(184, 67, 26,0.07);
}

/* ---- Выпадающие пункты меню ----
   Разметка — <details>/<summary>: открывается кликом и с клавиатуры без JS.
   Наведением не открываем намеренно: на тач-экранах hover срабатывает
   случайным касанием при скролле, и панель на 16 ссылок закрывает пол-экрана. */
.nav-drop { position: relative; }
.nav-drop > summary {
  font-size: 0.76rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-md);
  padding: 0.4rem 0.8rem; border-radius: 0; cursor: pointer;
  list-style: none; display: inline-flex; align-items: center; gap: 0.3rem;
  transition: background 0.2s, color 0.2s;
}
.nav-drop > summary::-webkit-details-marker { display: none; }
.nav-drop > summary::after { content: '▾'; font-size: 0.7em; opacity: 0.65; }
.nav-drop > summary:hover,
.nav-drop[open] > summary { color: var(--forest); background: rgba(184, 67, 26,0.07); }
.nav-drop[open] > summary::after { transform: rotate(180deg); }

/* Колонки, а не грид: у групп разное число ссылок, и в гриде «Русский язык»
   с восемью пунктами задавал высоту строки, оставляя под «Чтением» дыру в
   пол-панели. Колоночная раскладка укладывает группы подряд и переносит
   сама. Ширина по содержимому — иначе длинное «Склонение существительных»
   налезало на соседнюю колонку. */
.nav .nav-panel {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 80;
  background: var(--paper); border: 1px solid var(--border-lt);
  border-radius: 0; box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  padding: 0.9rem 1.2rem; animation: navSlideDown 0.18s ease;
  column-count: 2; column-gap: 2rem;
  width: max-content; max-width: min(600px, 92vw);
}
/* Панель с одной группой (Родителям): вторая колонка оставляла бы пустоту
   в половину ширины. */
.nav .nav-panel--narrow { column-count: 1; }
.nav-col { padding: 0.1rem 0; break-inside: avoid; }
/* Заголовки групп — чёрные и крупнее ссылок под ними: приглушённый серый
   на 0.66rem сливался со списком, и панель читалась как одна простыня. */
.nav-col-t {
  display: block; font-size: 0.84rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text); margin: 0.55rem 0 0.35rem;
  padding-bottom: 0.28rem; border-bottom: 1px solid var(--border-lt);
}
.nav-panel a {
  display: block; font-size: 0.86rem; font-weight: 600; text-transform: none;
  letter-spacing: 0; color: var(--text-md); padding: 0.26rem 0.45rem;
  border-radius: 0; white-space: nowrap;
}
.nav-panel a:hover { color: var(--forest); background: rgba(184, 67, 26,0.07); }
/* Название тренажёра — вес ссылки как есть; пояснение после тире
   («Техника чтения — замер») тусклее и обычным весом, чтобы имя считывалось
   первым. У пунктов без тире делить нечего — там название и есть весь текст. */
.nav-panel a .nav-q { font-weight: 400; color: var(--muted); }
.nav-panel .nav-all {
  column-span: all; margin-top: 0.55rem; padding-top: 0.6rem;
  border-top: 1px solid var(--border-lt);
  color: var(--forest); font-weight: 800; font-size: 0.82rem;
}

/* Мобильное меню: та же разметка, но панель не всплывает, а раскрывается
   на месте — иначе абсолютный блок ушёл бы за край экрана. */
.mobile-nav .nav-drop > summary {
  display: flex; justify-content: space-between; width: 100%;
  font-size: 0.95rem; text-transform: none; letter-spacing: 0;
  padding: 0.6rem 0; border-radius: 0;
}
.mobile-nav .nav-panel {
  display: block; column-count: 1; position: static; width: auto; max-width: none;
  padding: 0 0 0.4rem 0.75rem; box-shadow: none; border: none;
  border-left: 2px solid var(--border-lt); margin: 0 0 0.5rem 0.2rem;
}
/* Специфичность важнее вкуса: .mobile-nav a ниже по файлу делает ссылки
   капсом и крупными — для пунктов шапки это верно, для списка из шестнадцати
   тренажёров получается стена. Перебиваем адресно. */
.mobile-nav .nav-panel a {
  white-space: normal; padding: 0.32rem 0; font-size: 0.9rem;
  text-transform: none; letter-spacing: 0; font-weight: 600; border: none;
}
.mobile-nav .nav-panel .nav-col-t { font-size: 0.84rem; margin: 0.85rem 0 0.2rem; }
.mobile-nav .nav-panel .nav-all { margin-top: 0.4rem; font-size: 0.86rem; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border: none;
  background: none;
}
.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 0;
  transition: all 0.3s;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@keyframes navSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mobile-nav {
  display: none;
  background: var(--paper);
  border-top: 1px solid var(--border-lt);
  padding: 0.75rem 1.5rem 1rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.mobile-nav.open {
  display: block;
  animation: navSlideDown 0.18s ease forwards;
}
.mobile-nav a {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-lt);
  color: var(--text-md);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: var(--forest); }

/* ══════════════════════════════
   КНОПКИ
══════════════════════════════ */
.btn {
  display: inline-block;
  padding: 0.78rem 1.9rem;
  font-family: 'Nunito', inherit;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-radius: 0;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  text-align: center;
}
.btn:hover { opacity: 0.9; transform: translateY(-2px); }
.btn-primary {
  background: var(--forest);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(184, 67, 26,0.28);
}
.btn-primary:hover { color: var(--white); box-shadow: 0 8px 24px rgba(184, 67, 26,0.36); }
.btn-outline {
  background: transparent;
  color: var(--forest);
  border: 2px solid var(--forest);
}
.btn-outline:hover { background: rgba(184, 67, 26,0.06); color: var(--forest); }
.btn-full { width: 100%; display: block; }

/* ══════════════════════════════
   HERO
══════════════════════════════ */
/* 15.09.2026: первый экран по образцу Brilliant — слева заголовок, справа
   живой мини-тренажёр (js/hero-sostav.js). Фон — тёплая бумага с медовым
   свечением за тренажёром, сплошной цветной заливки нет. Углы прямые. */
.hero {
  position: relative;
  padding: 3.5rem 1.5rem 4.5rem;
  overflow: hidden;
  background: var(--paper);
}
.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -160px;
  width: 760px;
  height: 640px;
  background: radial-gradient(closest-side, rgba(242,181,68,0.34), transparent);
  pointer-events: none;
  z-index: 0;
}
.hero-grid {
  position: relative;
  z-index: 1;
  max-width: var(--w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.hero-inner { max-width: 560px; }
.hero-label {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--forest);
  margin-bottom: 1rem;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.1rem, 4.4vw, 3.5rem);
  font-weight: 900;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--forest-md); }
.hero p {
  font-size: 1.05rem;
  color: var(--text-md);
  margin-bottom: 2rem;
  line-height: 1.75;
}
.hero-btns { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero .btn-primary { background: var(--forest); border-color: var(--forest); color: var(--white); }
.hero .btn-primary:hover { background: #8F3312; }
.hero .btn-outline { color: var(--text); border-color: var(--text); background: transparent; }
.hero .btn-outline:hover { background: rgba(31,26,23,0.06); color: var(--text); }

/* мини-тренажёр */
.hs {
  background: var(--white);
  padding: 1.6rem 1.75rem 1.4rem;
  box-shadow: 0 30px 60px -30px rgba(90,50,20,0.35), 0 0 0 1px rgba(90,50,20,0.05);
}
.hs-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.hs-head strong { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.hs-dots { display: flex; gap: 6px; }
.hs-dots i { width: 22px; height: 6px; background: var(--border); }
.hs-dots i.is-done { background: var(--forest-md); }
.hs-q { margin: 0.9rem 0 0.4rem; color: var(--text-md); font-weight: 700; }
.hs-house { width: 210px; margin: 0.6rem auto 1.1rem; }
.hs-roof {
  position: relative; height: 0;
  border-left: 105px solid transparent; border-right: 105px solid transparent;
  border-bottom: 78px solid var(--forest-md);
}
.hs-roof span {
  position: absolute; left: -30px; top: 30px; width: 60px; text-align: center;
  color: #fff; font: 800 2.1rem/1 'Playfair Display', serif;
}
.hs-walls { display: grid; grid-template-columns: 1fr 1fr; border: 4px solid var(--text); border-top: 0; background: #F7EEDF; }
.hs-walls div {
  height: 92px; display: grid; place-items: center;
  font: 800 2.4rem/1 'Playfair Display', serif; font-variant-numeric: tabular-nums;
}
.hs-walls div + div { border-left: 4px solid var(--text); }
.hs-walls .hs-ask { color: var(--forest-md); background: #fff; animation: hsPulse 1.2s ease-in-out infinite; }
@keyframes hsPulse { 50% { background: #FDEBD9; } }
.hs-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.hs-opts button {
  border: 2px solid var(--text); border-radius: 0; background: #fff; color: var(--text);
  padding: 0.85rem 0; font: 800 1.5rem/1 'Nunito', sans-serif; cursor: pointer;
  transition: transform .12s, background .15s;
}
.hs-opts button:hover { background: #F7EEDF; transform: translateY(-2px); }
.hs-opts button:focus-visible { outline: 3px solid var(--amber-lt); outline-offset: 2px; }
.hs-opts button.is-good { background: #2F6F8F; border-color: #2F6F8F; color: #fff; }
.hs-opts button.is-bad { border-color: var(--forest-md); color: var(--forest-md); animation: hsShake .3s; }
@keyframes hsShake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.hs-msg { margin: 0.9rem 0 0; min-height: 1.6em; font-weight: 700; color: var(--text-md); font-size: 0.95rem; }
.hs-done { text-align: center; padding: 1.6rem 0 0.6rem; }
.hs-done-t { font: 800 1.7rem/1.2 'Playfair Display', serif; margin-bottom: 0.5rem; }
.hs-done p { color: var(--text-md); margin-bottom: 1.1rem; }
@media (max-width: 900px) {
  .hero { padding: 1.5rem 1rem 3rem; }
  /* На телефоне тренажёр встаёт сразу под заголовок — в первый экран,
     абзац и кнопки уходят под него. */
  .hero-grid { display: flex; flex-direction: column; align-items: stretch; gap: 1.1rem; }
  .hero-inner { display: contents; }
  .hero-label { order: 0; margin-bottom: 0; }
  .hero h1 { order: 1; margin-bottom: 0; font-size: 1.85rem; }
  .hs { order: 2; padding: 1.1rem 1.1rem 1rem; }
  .hero p { order: 3; margin-bottom: 0; }
  .hero-btns { order: 4; }
  .hs-q { margin-top: 0.5rem; }
  .hs-house { margin: 0.4rem auto 0.8rem; }
  .hero::before { width: 480px; height: 420px; right: -200px; }
}
@media (prefers-reduced-motion: reduce) {
  .hs-walls .hs-ask, .hs-opts button.is-bad { animation: none; }
}
/* ══════════════════════════════
   СЕКЦИИ
══════════════════════════════ */
.section { padding: 4.5rem 0; }
.bg-light { background: var(--cream); }
.section-header { margin-bottom: 2.5rem; }
.section-header--flex {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.section-label {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--amber-txt);
  margin-bottom: 0.5rem;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.section-desc {
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 0.55rem;
  line-height: 1.7;
}
.link-more {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--forest-txt);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
  margin-bottom: 0.25rem;
}
.link-more:hover { color: var(--amber-txt); }

/* ══════════════════════════════
   КАТЕГОРИИ
══════════════════════════════ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
}
.cat-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1.5px solid var(--border-lt);
  border-radius: 0;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  cursor: pointer;
}
.cat-card:hover, .cat-card.active {
  border-color: var(--forest-lt);
  box-shadow: 0 8px 30px rgba(184, 67, 26,0.14);
  transform: translateY(-4px);
  text-decoration: none;
}
.cat-card.active {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(184, 67, 26,0.2);
}
.cat-img {
  width: 100%;
  aspect-ratio: 16/10;
  background-size: cover;
  background-position: center;
  background-color: var(--ivory);
  background-repeat: no-repeat;
  transition: transform 0.4s ease;
  image-rendering: -webkit-optimize-contrast;
}
.cat-card:hover .cat-img { transform: scale(1.04); }
.cat-body {
  padding: 0.85rem 1.1rem 1rem;
}
.cat-icon-sm { font-size: 1.2rem; margin-bottom: 0.3rem; display: block; }
.cat-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.2rem;
}
.cat-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ══════════════════════════════
   ТРЕНАЖЁРЫ (тизер на главной)
══════════════════════════════ */
.trainers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}
/* Карточка тренажёра — сам листок-стикер, а не белая плашка с картинкой
   внутри. Бумагу, загиб и наклон подставляет tools/add_trainer_stickers.py
   через --tr-paper / --tr-fold / --tr-tilt в style карточки: цвет несёт
   предмет (жёлтая внимание, зелёная математика, розовая русский).
   Наклон мелкий, доли градуса: лист размером с карточку при 2,5° выглядит
   перекошенным, а не приклеенным от руки. */
.trainer-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  position: relative;
  /* Без min-width: 0 элемент грид-сетки не сжимается ниже своей min-content
     ширины, и на 390px две колонки (`1fr 1fr` из медиазапроса) выходили
     164,86 + 201,38 = шире самой сетки: правый столбец карточек уезжал за
     экран и обрезался `overflow-x: hidden` на body. Дефект был и до
     стикеров — на телефоне у десяти карточек срезало правый край. */
  min-width: 0;
  background: var(--tr-paper, var(--white));
  border: 0;
  border-radius: 0;
  padding: 1.5rem;
  transform: rotate(var(--tr-tilt, 0deg));
  box-shadow: 0 1px 2px rgba(46,42,36,0.12), 0 10px 20px -14px rgba(46,42,36,0.45);
  transition: box-shadow 0.25s, transform 0.25s;
  cursor: pointer;
}
/* загнутый уголок листа */
.trainer-card::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 0;
  height: 0;
  border-left: 22px solid transparent;
  border-bottom: 22px solid var(--tr-fold, var(--border-lt));
  border-bottom-right-radius: 3px;
}
.trainer-card:hover {
  transform: rotate(0deg) translateY(-5px);
  box-shadow: 0 2px 4px rgba(46,42,36,0.14), 0 18px 34px -16px rgba(46,42,36,0.55);
  text-decoration: none;
}
/* Иконка карточки — стикер (tools/add_trainer_stickers.py), не эмодзи.
   Плашки под ним нет намеренно: у стикера своя цветная бумага, и подложка
   `--tr-tint` спорила бы с ней двумя фонами на одном элементе.
   `--tr-tint`/`--tr-ink` остаются в силе для бейджей и CTA той же карточки. */
.trainer-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;   /* запас: карточка без стикера покажет эмодзи, а не пустоту */
}
.trainer-icon .tr-sticker {
  width: 100%;
  height: 100%;
  display: block;
  /* тени нет: рисунок лежит прямо на бумаге карточки, а не отдельным
     листком поверх неё — падающая тень выдала бы несуществующий зазор */
}
/* Имя тренажёра — h3, а не span: карточки тренажёров дают весь поисковый
   трафик сайта и были единственным блоком без заголовков (у карточек статей
   рядом h3 стоял). Отступы h3 здесь гасятся — карточка свёрстана флексом с
   собственным gap. */
.trainer-name {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}
/* Описание — тёплый серо-коричневый, а не общий --muted (#6E6259): тот
   годится на белом фоне, но на цветной бумаге карточки даёт 3,8–4,4:1 при
   норме WCAG 4,5:1. Этот цвет даёт 5,6–6,4:1 на всех пяти оттенках бумаги
   и не спорит с розовым листом, как спорил зеленоватый. */
.trainer-desc {
  font-size: 0.85rem;
  color: #514C42;
  line-height: 1.5;
}
/* CTA на цветной бумаге — чернилами, а не фирменным --tr-ink: зелёная и
   янтарная надпись на розовом и жёлтом листе спорят с бумагой. */
.trainer-cta {
  margin-top: auto;
  font-size: 0.78rem;
  font-weight: 800;
  color: #2E2A24;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
/* Стрелка переехала из текста в псевдоэлемент, чтобы двигаться отдельно от
   надписи. Подталкивание короткое и редкое (0,5 с движения на 3,6 с цикла):
   непрерывное мельтешение двадцати стрелок читается как сбой отрисовки, а
   не как приглашение нажать. Задержка --tr-nudge у каждой карточки своя —
   иначе весь экран дёргается разом. */
.trainer-cta::after {
  content: "→";
  display: inline-block;
  margin-left: 0.4em;
  animation: tr-nudge 3.6s ease-in-out var(--tr-nudge, 0s) infinite;
}
@keyframes tr-nudge {
  0%, 78%, 100% { transform: translateX(0); }
  86%           { transform: translateX(5px); }
  93%           { transform: translateX(0); }
}
.trainer-card:hover .trainer-cta::after {
  animation: none;
  transform: translateX(6px);
  transition: transform 0.2s;
}
@media (prefers-reduced-motion: reduce) {
  .trainer-cta::after { animation: none; }
  .trainer-card, .trainer-card:hover { transition: none; }
}

/* Фильтр тренажёров: класс (вкладки) + предмет (select) */
.trainers-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
  margin: 1.5rem 0 1.6rem;
}
.grade-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.grade-tab {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text-md);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 0;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  transition: all 0.18s;
}
.grade-tab:hover { border-color: var(--forest-lt); color: var(--forest); }
.grade-tab.active { background: var(--forest); border-color: var(--forest); color: #fff; }
.subj-select {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-md);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 0;
  padding: 0.5rem 2.1rem 0.5rem 1.1rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235A6B49'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.1rem center;
}
.subj-select:focus { outline: 2px solid var(--forest-lt); outline-offset: 1px; }

.trainer-badges { display: flex; gap: 0.35rem; flex-wrap: wrap; }
/* Бейдж на цветной бумаге: подложка белая полупрозрачная, а не --tr-tint —
   тонированная плашка поверх тонированного листа даёт грязный третий цвет. */
.trainer-badge {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 800;
  color: #2E2A24;
  background: rgba(255,255,255,0.62);
  padding: 0.2rem 0.55rem;
  border-radius: 0;
}
.trainer-card.is-hidden { display: none; }

/* ══ Главная: тренажёры — раскрытые книги (15.09.2026, по просьбе владельца) ══
   Только #trainers на главной: каталог /trainers/ носит тот же .trainer-card
   и остаётся стикерами. Разметку карточки не трогаем — книгу рисует CSS:
   сетка на две страницы, корешок градиентом по центру, срез страниц и
   обложка — тенями снизу. Цвет обложки — по предмету (data-subject), а не
   из --tr-paper: там у математики зеленоватая бумага, а зелёный снят. */
#trainers .trainers-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr));
  gap: 2.6rem 2rem;
  padding: 0.4rem 0.6rem 1rem;
}
#trainers .trainer-card {
  --book-cover: #9C4A2A;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto 1fr auto;
  grid-template-areas:
    "icon   name"
    "badges desc"
    ".      desc"
    ".      cta";
  column-gap: 2.6rem;
  row-gap: 0.55rem;
  padding: 1.5rem 1.4rem 1.35rem;
  transform: none;
  background:
    /* корешок: тень сгиба посередине разворота */
    linear-gradient(90deg,
      transparent calc(50% - 30px),
      rgba(80,50,25,0.07) calc(50% - 12px),
      rgba(80,50,25,0.22) calc(50% - 1px),
      rgba(80,50,25,0.30) 50%,
      rgba(80,50,25,0.22) calc(50% + 1px),
      rgba(80,50,25,0.07) calc(50% + 12px),
      transparent calc(50% + 30px)),
    /* лёгкое затемнение к внешним краям страниц */
    linear-gradient(90deg, rgba(80,50,25,0.06), transparent 14%, transparent 86%, rgba(80,50,25,0.06)),
    #FFFCF5;
  box-shadow:
    0 3px 0 -1px #F1E8D8,
    0 6px 0 -2px #E6DAC5,
    0 9px 0 -3px #D9CBB2,
    0 13px 0 0 var(--book-cover),
    0 30px 34px -20px rgba(60,35,15,0.55);
}
#trainers .trainer-card[data-subject="matematika"] { --book-cover: #B8431A; }
#trainers .trainer-card[data-subject="chtenie"]    { --book-cover: #2F5D7C; }
#trainers .trainer-card[data-subject="russkij"]    { --book-cover: #8C3A52; }
/* Тёмная охра, а не янтарь: на светлом янтаре золотая гравировка
   сливалась с кожей — проверено скриншотом закрытой обложки. */
#trainers .trainer-card[data-subject="vnimanie"]   { --book-cover: #8A5A0E; }
#trainers .trainer-card[data-subject="angliyskiy"] { --book-cover: #3E4A7A; }
#trainers .trainer-card[data-subject="fizika"]     { --book-cover: #4A3F6B; }
#trainers .trainer-card[data-subject="himiya"]     { --book-cover: #6B4A2F; }
/* ── Закрытая обложка и распахивание (16.09.2026) ──────────────────
   Обложка — ::after карточки: цветная крышка поверх разворота, петля по
   левому краю. Класс .is-open ставит js/books-open.js, когда книга
   доезжает до экрана; на компьютере она открывается и при наведении и с
   клавиатуры. Название на обложке берётся из data-title карточки, поэтому
   разметку внутри трогать не пришлось. */
#trainers .trainer-card {
  perspective: 1400px;
  transform-style: preserve-3d;
}
#trainers .trainer-card::after {
  content: attr(data-title);
  position: absolute;
  inset: 0;
  /* ширину и высоту обнуляло правило загнутого уголка стикера */
  width: auto;
  height: auto;
  border: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.6rem 2rem 2.6rem 3.2rem;
  text-align: center;
  /* Старые буквы: Old Standard TT — шрифт дореволюционного набора,
     с кириллицей. Разрядка — как на корешке переплёта. */
  /* Буквы с завитками: Ruslan Display — кириллический наборный шрифт под
     старую вязь. Запасной — Old Standard TT (дореволюционный набор). */
  font: 400 1.5rem/1.4 'Ruslan Display', 'Old Standard TT', 'Playfair Display', Georgia, serif;
  letter-spacing: 0.02em;
  /* Тиснение золотом: тёмная грань сверху, светлая снизу. */
  /* Гравировка золотом: буква вдавлена в кожу и залита металлом.
     Сверху тёмная грань штампа, снизу тёплый блик, вокруг лёгкое свечение —
     так золотая фольга ведёт себя на тиснёном переплёте. */
  color: #F2D68C;
  text-shadow:
    0 -1px 0 rgba(0,0,0,0.6),
    0 -2px 1px rgba(60,35,10,0.45),
    0 1px 0 rgba(255,240,200,0.55),
    0 2px 1px rgba(180,140,60,0.5),
    0 3px 4px rgba(0,0,0,0.4),
    0 0 10px rgba(242,214,140,0.28);
  background-color: var(--book-cover);
  /* Фактура кожи (две штриховки), корешок слева, блик сверху.
     Записано отдельными свойствами: длинная сборная запись background
     браузером не принималась целиком, и обложка выходила прозрачной. */
  background-image:
    /* виньетки по четырём углам рамки — завиток тиснением */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='46'%3E%3Cg fill='none' stroke='%23D9B978' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M4 26 C4 12 12 4 26 4'/%3E%3Cpath d='M10 26 C10 16 16 10 26 10'/%3E%3Cpath d='M10 34 C18 34 22 30 22 22 C22 17 18 15 15 17 C12 19 13 24 18 24'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='46'%3E%3Cg fill='none' stroke='%23D9B978' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M4 26 C4 12 12 4 26 4'/%3E%3Cpath d='M10 26 C10 16 16 10 26 10'/%3E%3Cpath d='M10 34 C18 34 22 30 22 22 C22 17 18 15 15 17 C12 19 13 24 18 24'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='46'%3E%3Cg fill='none' stroke='%23D9B978' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M4 26 C4 12 12 4 26 4'/%3E%3Cpath d='M10 26 C10 16 16 10 26 10'/%3E%3Cpath d='M10 34 C18 34 22 30 22 22 C22 17 18 15 15 17 C12 19 13 24 18 24'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='46'%3E%3Cg fill='none' stroke='%23D9B978' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M4 26 C4 12 12 4 26 4'/%3E%3Cpath d='M10 26 C10 16 16 10 26 10'/%3E%3Cpath d='M10 34 C18 34 22 30 22 22 C22 17 18 15 15 17 C12 19 13 24 18 24'/%3E%3C/g%3E%3C/svg%3E"),
    repeating-linear-gradient(48deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(-42deg, rgba(0,0,0,0.07) 0 1px, transparent 1px 5px),
    linear-gradient(90deg, rgba(0,0,0,0.45) 0 10px, rgba(255,235,190,0.20) 11px 14px, rgba(0,0,0,0.13) 15px 30px, transparent 30px),
    linear-gradient(118deg, rgba(255,255,255,0.13), transparent 45%),
    radial-gradient(120% 90% at 50% 38%, rgba(255,255,255,0.08), transparent 72%);
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat, repeat, no-repeat, no-repeat, no-repeat;
  background-position:
    1.25rem 1.3rem,
    right 1.25rem top 1.3rem,
    1.25rem bottom 1.3rem,
    right 1.25rem bottom 1.3rem,
    0 0, 0 0, 0 0, 0 0, 0 0;
  background-size:
    46px 46px, 46px 46px, 46px 46px, 46px 46px,
    auto, auto, auto, auto, auto;
  /* Двойная золотая рамка тиснением по периметру. */
  box-shadow:
    inset 0 0 0 calc(1.05rem + 1px) rgba(0,0,0,0.22),
    inset 0 0 0 calc(1.05rem + 3px) rgba(217,185,120,0.8),
    inset 0 0 0 calc(1.05rem + 4px) rgba(0,0,0,0.2),
    inset -2px 0 0 rgba(0,0,0,0.18),
    0 10px 22px -12px rgba(50,25,10,0.6);
  transform-origin: left center;
  transform: rotateY(0deg);
  /* Медленное открытие (16.09.2026, по просьбе владельца): 4 с.
     Разгон в начале и долгое торможение в конце — крышка переплёта тяжёлая. */
  transition: transform 7s cubic-bezier(.28,.01,.12,1), box-shadow 7s;
  backface-visibility: hidden;
  will-change: transform;
}
#trainers .trainer-card.is-open::after,
#trainers .trainer-card:hover::after,
#trainers .trainer-card:focus-visible::after {
  transform: rotateY(-172deg);
  box-shadow: inset -2px 0 0 rgba(0,0,0,0.18), -14px 10px 26px -14px rgba(50,25,10,0.5);
}
@media (prefers-reduced-motion: reduce) {
  #trainers .trainer-card::after { transition: none; transform: rotateY(-172deg); }
}
#trainers .trainer-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 3px 0 -1px #F1E8D8,
    0 6px 0 -2px #E6DAC5,
    0 9px 0 -3px #D9CBB2,
    0 13px 0 0 var(--book-cover),
    0 40px 40px -22px rgba(60,35,15,0.6);
}
#trainers .trainer-icon   { grid-area: icon; width: 76px; height: 76px; justify-self: center; align-self: end; margin-top: 0.4rem; }
#trainers .trainer-badges { grid-area: badges; justify-content: center; align-content: start; }
#trainers .trainer-badge  { background: #F3EADB; color: #4A3B2E; }
#trainers .trainer-name   { grid-area: name; font-size: 1.12rem; }
#trainers .trainer-desc   { grid-area: desc; font-size: 0.84rem; color: #5A4E44; }
#trainers .trainer-cta    { grid-area: cta; color: var(--forest); }
/* номер страницы внизу левой полосы — книжная деталь без лишней разметки */
#trainers .trainer-card::before {
  content: "— " counter(book-page) " —";
  counter-increment: book-page;
  position: absolute;
  left: 25%;
  bottom: 0.7rem;
  transform: translateX(-50%);
  font: italic 700 0.72rem/1 'Playfair Display', Georgia, serif;
  color: #A8998A;
}
#trainers .trainers-grid { counter-reset: book-page; }
#trainers .trainer-card.is-hidden { display: none; }
@media (max-width: 480px) {
  #trainers .trainers-grid { gap: 2.2rem; padding-inline: 0; }
  #trainers .trainer-card { column-gap: 1.6rem; padding: 1.1rem 0.9rem 1.2rem; }
  #trainers .trainer-icon { width: 60px; height: 60px; }
  #trainers .trainer-name { font-size: 1rem; }
  #trainers .trainer-desc { font-size: 0.8rem; }
  #trainers .trainer-badge { font-size: 0.6rem; }
}

.trainers-empty {
  display: none;
  text-align: center;
  padding: 2.4rem 1.5rem;
  background: var(--ivory);
  border-radius: 0;
  grid-column: 1 / -1;
}
.trainers-empty.is-visible { display: block; }
.trainers-empty p { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.7rem; }
.trainers-empty a { color: var(--forest); font-weight: 800; }

/* Строка фильтра */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  min-height: 2rem;
}
.filter-active {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--forest);
  background: rgba(184, 67, 26,0.09);
  padding: 0.3rem 0.75rem;
  border-radius: 0;
}
.filter-reset {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 0;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.filter-reset:hover { color: var(--text); border-color: var(--text); }

/* ══════════════════════════════
   КАРТОЧКИ СТАТЕЙ
══════════════════════════════ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.post-card--featured {
  grid-column: span 2;
}
.post-card--featured .post-card-title { font-size: 1.25rem; }
.post-card--featured .post-card-excerpt { font-size: 0.92rem; }

.post-card {
  background: var(--white);
  border: 1.5px solid var(--border-lt);
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.post-card:hover {
  border-color: var(--forest-lt);
  box-shadow: 0 10px 36px rgba(184, 67, 26,0.12);
  transform: translateY(-4px);
}
.post-card-img-wrap {
  position: relative;
  display: block;
  overflow: hidden;
}
.post-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
  background: var(--ivory);
}
.post-card:hover .post-card-img { transform: scale(1.06); }
.post-card-cat {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--white);
  background: var(--forest);
  padding: 0.25rem 0.65rem;
  border-radius: 0;
  backdrop-filter: blur(4px);
}
.post-card-body {
  padding: 1.35rem 1.35rem 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 0.7rem;
  letter-spacing: -0.005em;
}
.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--forest); }
.post-card-excerpt {
  font-size: 0.92rem;
  color: var(--text-md);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1rem;
}
.post-card-footer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-lt);
}
.post-card-date, .post-card-time {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}
.post-card-read {
  margin-left: auto;
  display: inline-block;
  padding: 0.38rem 1rem;
  background: var(--forest);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-radius: 0;
  transition: background 0.2s, transform 0.15s;
}
.post-card-read:hover { background: var(--forest-md); color: var(--white); transform: scale(1.04); }

/* ══════════════════════════════
   ПОДПИСКА
══════════════════════════════ */
.subscribe-section {
  background: var(--forest);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}
.subscribe-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 100% at 100% 50%, rgba(212,135,10,0.2) 0%, transparent 60%),
    radial-gradient(ellipse 50% 100% at 0% 50%, rgba(224, 112, 58,0.15) 0%, transparent 50%);
  pointer-events: none;
}
.subscribe-box {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.subscribe-text h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.45rem;
}
.subscribe-text p {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.65;
}
.subscribe-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.subscribe-form input {
  padding: 0.8rem 1.2rem;
  border: none;
  border-radius: 0;
  font-family: 'Nunito', inherit;
  font-size: 0.88rem;
  min-width: 260px;
  outline: none;
  background: rgba(255,255,255,0.95);
  color: var(--text);
}
.subscribe-form .btn-primary {
  background: var(--amber-dk);
  box-shadow: 0 4px 16px rgba(212,135,10,0.35);
}

/* ══════════════════════════════
   КУРСЫ
══════════════════════════════ */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.course-card {
  background: var(--white);
  border: 1.5px solid var(--border-lt);
  border-radius: 0;
  padding: 1.65rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.course-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--forest);
  border-radius: 0;
}
.course-card:hover {
  border-color: var(--forest-lt);
  box-shadow: 0 8px 30px rgba(184, 67, 26,0.12);
  transform: translateY(-3px);
}
.course-card-head {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.course-logo {
  width: 52px;
  height: 52px;
  background: var(--cream);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  border: 1px solid var(--border-lt);
}
.course-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.course-badge {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.18rem 0.6rem;
  border-radius: 0;
  background: rgba(212,135,10,0.12);
  color: var(--amber);
}
.course-badge--green { background: rgba(184, 67, 26,0.1); color: var(--forest); }
.course-badge--blue { background: rgba(184, 67, 26,0.08); color: var(--forest-md); }
.course-desc {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.65;
}
.course-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}
.course-features li {
  font-size: 0.83rem;
  color: var(--text);
  padding-left: 1.3rem;
  position: relative;
}
.course-features li::before {
  content:"";
  position: absolute;
  left: 0;
  color: var(--forest-lt);
  font-weight: 800;
}
.course-card .btn-primary {
  background: var(--forest);
  box-shadow: 0 4px 12px rgba(184, 67, 26,0.22);
}
.course-card .btn-primary:hover { box-shadow: 0 6px 20px rgba(184, 67, 26,0.3); }

/* ══════════════════════════════
   ПО КЛАССАМ
══════════════════════════════ */
.grades-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}
.grade-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.25rem 1.5rem;
  border-radius: 0;
  background: var(--white);
  border: 2px solid var(--border-lt);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s, background 0.25s;
  position: relative;
  overflow: hidden;
}
.grade-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--forest);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.grade-card:hover::before { transform: scaleX(1); }
.grade-card:hover {
  border-color: var(--forest-lt);
  box-shadow: 0 8px 28px rgba(184, 67, 26,0.13);
  transform: translateY(-4px);
  background: var(--cream);
}
.grade-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.75rem;
  font-weight: 900;
  color: var(--forest);
  line-height: 1;
}
.grade-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.grade-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ══════════════════════════════
   О БЛОГЕ
══════════════════════════════ */
.about-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  padding: 3rem 0;
}
.about-text .section-title { margin-bottom: 1.25rem; }
.about-text p {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.8;
}
.about-text .btn { margin-top: 0.75rem; }
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.about-stat {
  background: var(--cream);
  border-radius: 0;
  padding: 1.65rem;
  text-align: center;
  border: 1px solid var(--border-lt);
  transition: box-shadow 0.2s, transform 0.2s;
}
.about-stat:hover {
  box-shadow: 0 6px 20px rgba(184, 67, 26,0.1);
  transform: translateY(-2px);
}
.about-stat strong {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--forest);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.about-stat span {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ══════════════════════════════
   ФУТЕР
══════════════════════════════ */
.footer {
  background: var(--text);
  color: #8a9e78;
  padding: 4rem 0 1.75rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 1.75rem;
}
.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--white);
  display: inline-block;
  margin-bottom: 0.85rem;
}
.footer-logo span { color: var(--amber-lt); }
.footer-desc { font-size: 0.92rem; color: #9aac8c; line-height: 1.7; margin-bottom: 1.4rem; }
.footer-social { display: flex; gap: 0.5rem; }
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 0;
  background: rgba(255,255,255,0.07);
  font-size: 0.7rem;
  font-weight: 800;
  color: #7a8e6a;
  transition: background 0.2s, color 0.2s;
}
.social-link:hover { background: var(--amber-dk); color: var(--white); }
.footer-col-title {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1.1rem;
}
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a { font-size: 0.92rem; color: #8da080; transition: color 0.2s; }
.footer-links a:hover { color: var(--amber-lt); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #3e5030;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ══════════════════════════════
   СТРАНИЦА СТАТЬИ
══════════════════════════════ */
.breadcrumbs {
  max-width: var(--w);
  margin: 0 auto;
  padding: 1.1rem 1.5rem 0;
  font-size: 0.77rem;
  color: var(--muted);
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--forest); }
.breadcrumbs .sep { color: var(--border); }

.article-wrap {
  max-width: var(--w);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}
.article-cat,
.article-category {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white);
  background: var(--forest);
  padding: 0.25rem 0.65rem;
  border-radius: 0;
}
.article-date, .article-read-time,
.article-reading {
  font-size: 0.77rem;
  color: var(--muted);
  font-weight: 600;
}
.article-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  font-weight: 900;
  line-height: 1.18;
  color: var(--text);
  margin-bottom: 1.75rem;
  letter-spacing: -0.02em;
}
.article-cover {
  width: 100%;
  border-radius: 0;
  aspect-ratio: 16/9;
  overflow: hidden;
  margin-bottom: 2.25rem;
  box-shadow: 0 8px 32px rgba(184, 67, 26,0.12);
}
.article-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}
.article-content,
.article {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
  letter-spacing: 0.005em;
}
.article-body p,
.article-content p,
.article > p,
.article > ul,
.article > ol,
.article > h2,
.article > h3 {
  max-width: 70ch;
  margin-left: auto;
  margin-right: auto;
}
.article-content h2,
.article h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text);
  margin: 2.75rem auto 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--forest-lt);
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.article-content h3,
.article h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.85rem auto 0.6rem;
  line-height: 1.3;
}
.article-content p, .article p {
  margin-bottom: 1.35rem;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.article-content li, .article li { line-height: 1.7; }
.article-content ul, .article-content ol,
.article ul, .article ol {
  padding-left: 1.6rem;
  margin-bottom: 1.25rem;
}
.article-content li, .article li { margin-bottom: 0.5rem; }
.article-content strong, .article strong { font-weight: 700; }
.article-content a, .article a { color: var(--forest); text-decoration: underline; text-underline-offset: 3px; }
/* Кнопка внутри статьи. Правило выше красит ЛЮБУЮ ссылку статьи в --forest,
   а фон `.btn-primary` — тот же --forest: текст кнопки сливался с заливкой в
   ноль. Найдено браузерной проверкой 24.09.2026 (цвет текста и фона совпали
   до байта), по разметке этого не видно вовсе. На проде так и стоит с августа
   в статье kak-motivirovat-rebenka-uchitsya-v-shkole — единственной с
   карточками офферов. Подчёркивание кнопке тоже не нужно. */
.article-content a.btn, .article a.btn { text-decoration: none; }
.article-content a.btn-primary, .article a.btn-primary { color: var(--white); }
.article-content a.btn-outline, .article a.btn-outline { color: var(--forest); }
.article-content img, .article img { border-radius: 0; margin: 1.75rem 0; }

.cta-block {
  background: var(--white);
  border-left: 4px solid var(--amber);
  border-radius: 0;
  padding: 1.5rem 1.75rem;
  margin: 2.5rem 0;
}
.cta-block p {
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.course-card-article {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--white);
  border: 1.5px solid var(--border-lt);
  border-radius: 0;
  padding: 1.35rem;
  margin: 2rem 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.course-card-article:hover {
  border-color: var(--forest-lt);
  box-shadow: 0 4px 20px rgba(184, 67, 26,0.1);
}
.course-card-article .course-logo {
  font-size: 1.6rem;
  width: 56px;
  height: 56px;
}

/* ══════════════════════════════
   САЙДБАР
══════════════════════════════ */
.sidebar { position: sticky; top: 88px; }
.sidebar-widget {
  background: var(--white);
  border: 1.5px solid var(--border-lt);
  border-radius: 0;
  padding: 1.35rem;
  margin-bottom: 1.5rem;
}
.sidebar-widget-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  padding-bottom: 0.7rem;
  border-bottom: 2px solid var(--forest-lt);
  margin-bottom: 1rem;
}
.sidebar-post {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-lt);
}
.sidebar-post:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-post-thumb {
  width: 68px;
  height: 50px;
  object-fit: cover;
  border-radius: 0;
  flex-shrink: 0;
}
.sidebar-post-thumb-placeholder {
  width: 68px;
  height: 50px;
  background: var(--cream);
  border-radius: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.sidebar-post-title {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}
.sidebar-post-title:hover { color: var(--forest); }
.sidebar-post-date {
  font-size: 0.67rem;
  color: var(--muted);
  margin-top: 0.3rem;
}
.widget-subscribe { text-align: center; }
.widget-subscribe p {
  font-size: 0.83rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}
.widget-subscribe .subscribe-form {
  flex-direction: column;
  gap: 0.5rem;
}
.widget-subscribe .subscribe-form input {
  min-width: unset;
  width: 100%;
  border: 1.5px solid var(--border);
  background: var(--paper);
  padding: 0.65rem 1rem;
  border-radius: 0;
  font-family: 'Nunito', inherit;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
  color: var(--text);
}
.widget-subscribe .subscribe-form input:focus { border-color: var(--forest-lt); }

/* ══════════════════════════════
   РЕГИОНАЛЬНАЯ ЛЕНТА НОВОСТЕЙ
══════════════════════════════ */
.region-name-badge {
  display: inline-block;
  font-size: 0.78em;
  font-weight: 700;
  color: var(--forest);
  background: rgba(184, 67, 26,0.1);
  padding: 0.15em 0.65em;
  border-radius: 0;
  vertical-align: middle;
  white-space: nowrap;
}

.region-selector-wrap {
  margin-bottom: 1.5rem;
  animation: slideDown 0.2s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.region-select {
  width: 100%;
  max-width: 420px;
  padding: 0.65rem 1rem;
  font-family: 'Nunito', inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: 0;
  background: var(--white);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
  appearance: auto;
}
.region-select:focus { border-color: var(--forest-lt); }

/* Карточка новости */
.news-card .post-card-img-wrap--news {
  aspect-ratio: 16/7;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.news-card-icon {
  font-size: 2.8rem;
  line-height: 1;
}

.news-cat--regional {
  background: var(--forest);
  color: var(--white);
  font-size: 0.6rem;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.news-cat--federal {
  background: #607d8b;
  color: var(--white);
  font-size: 0.62rem;
}
.news-card--federal { opacity: 0.88; }
.news-card--federal:hover { opacity: 1; }

/* Skeleton-loader */
.news-skeleton {
  background: var(--white);
  border: 1.5px solid var(--border-lt);
  border-radius: 0;
  overflow: hidden;
  min-height: 260px;
  position: relative;
}
.news-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.6) 50%,
    rgba(255,255,255,0) 100%);
  animation: shimmer 1.4s infinite;
  background-size: 200% 100%;
}
.news-skeleton::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--cream) 35%, #ede9e0 35% 55%, #e5e0d5 55% 65%, #ede9e0 65%);
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

.news-feed-error {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  padding: 1.5rem;
}
.news-feed-error a { color: var(--forest); }

.news-empty {
  grid-column: 1/-1;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  padding: 2rem;
}

/* ══════════════════════════════
   СТАТЬИ + САЙДБАР НОВОСТЕЙ
══════════════════════════════ */
.posts-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}
.posts-main {}

.news-sidebar {
  position: sticky;
  top: 88px;
  background: var(--white);
  border: 1.5px solid var(--border-lt);
  border-radius: 0;
  overflow: hidden;
}
.news-sidebar-header {
  padding: 1rem 1.1rem 0.75rem;
  border-bottom: 1px solid var(--border-lt);
  background: var(--cream);
}
.news-sidebar-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.25rem 0 0.4rem;
}
.news-sidebar-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}
.news-sidebar-change {
  display: inline-block;
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--forest-lt);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.news-sidebar-change:hover { color: var(--amber); }

.news-sidebar .region-selector-wrap {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-lt);
  margin-bottom: 0;
}
.news-sidebar .region-select {
  max-width: 100%;
  font-size: 0.82rem;
  padding: 0.5rem 0.75rem;
}

.news-item {
  display: flex;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-lt);
  text-decoration: none;
  transition: background 0.15s;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { background: var(--cream); }
.news-item--federal { opacity: 0.82; }
.news-item--federal:hover { opacity: 1; }

.news-item-icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.news-item-body { flex: 1; min-width: 0; }
.news-item-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-item:hover .news-item-title { color: var(--forest); }
.news-item-meta {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}
.news-item-source {
  font-size: 0.63rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--forest-lt);
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.news-item-date {
  font-size: 0.63rem;
  color: var(--muted);
}

.news-skeleton--sm {
  min-height: 72px;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border-lt);
}

/* ══════════════════════════════
   RICH ELEMENTS — статейные блоки
══════════════════════════════ */
.chart-wrap {
  margin: 2rem 0;
  padding: 1.35rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--border-lt);
  border-radius: 0;
  box-shadow: 0 2px 12px rgba(184, 67, 26,0.06);
  /* Высота обязательна. Chart.js с responsive:true + maintainAspectRatio:false
     тянет canvas по высоте родителя, а родитель без высоты растёт от canvas —
     петля раздувала график до ~7500px (страница уезжала за 30000px). */
  height: 360px;
}
/* Атрибут height="280" в разметке Chart.js переписывает — размер держим здесь. */
.chart-wrap canvas {
  display: block;
  width: 100% !important;
  height: calc(360px - 1.35rem * 2 - 2.1rem) !important;
}
.chart-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 1rem;
  text-align: center;
}

.steps-block {
  margin: 2rem 0;
  padding: 1.65rem;
  background: var(--cream);
  border-left: 4px solid var(--forest-lt);
  border-radius: 0;
}
.steps-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--forest);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.steps-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}
.steps-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--forest);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}
.steps-text {
  line-height: 1.6;
  padding-top: 0.25rem;
}

.expert-quote {
  margin: 2rem 0;
  padding: 1.65rem 1.75rem;
  background: var(--cream);
  border-left: 5px solid var(--amber);
  border-radius: 0;
  font-style: normal;
}
.quote-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 0.9rem;
}
.quote-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.quote-author {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--text);
}
.quote-title {
  font-size: 0.82rem;
  color: var(--muted);
}
.quote-audio { margin-left: auto; }

.btn-audio {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.9rem;
  background: var(--white);
  border: 1.5px solid var(--forest-lt);
  border-radius: 0;
  color: var(--forest);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-family: 'Nunito', inherit;
}
.btn-audio:hover,
.btn-audio.playing {
  background: var(--forest);
  color: var(--white);
  border-color: var(--forest);
}
.btn-audio-icon { font-size: 0.75rem; }

.fact-cards-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
}
.fact-card {
  flex: 1 1 180px;
  padding: 1.35rem 1rem;
  border-radius: 0;
  border: 1px solid var(--border-lt);
  background: var(--white);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}
.fact-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.08); }
.fact-card--blue  { border-top: 4px solid #2563EB; }
.fact-card--green { border-top: 4px solid var(--forest); }
.fact-card--red   { border-top: 4px solid #dc2626; }
.fact-card--yellow{ border-top: 4px solid var(--amber); }
.fact-card--purple { border-top: 4px solid #7c3aed; }
.fact-icon  { font-size: 1.75rem; line-height: 1; }
.fact-number {
  font-family: 'Playfair Display', serif;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}
.fact-label {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.3;
  font-weight: 600;
}

.affiliate-block {
  margin: 2rem 0;
  text-align: center;
}
.affiliate-block .btn {
  display: inline-block;
  padding: 0.78rem 2rem;
  border-radius: 0;
  font-weight: 800;
  font-size: 0.92rem;
  transition: opacity 0.2s, transform 0.15s;
}
.affiliate-block .btn:hover { opacity: 0.88; transform: translateY(-2px); }
.affiliate-block .btn-primary {
  background: var(--forest);
  color: var(--white);
}
.affiliate-block .btn-secondary {
  background: var(--red);
  color: var(--white);
}
.affiliate-block .btn-cta {
  background: var(--amber-dk);
  color: var(--white);
}

/* INLINE IMAGES */
.inline-img {
  margin: 2rem 0;
  border-radius: 0;
  overflow: hidden;
}
.inline-img img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}
.inline-img-caption {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  padding: 0.4rem 0.5rem;
  background: var(--cream);
  border-radius: 0;
}

/* ══════════════════════════════
   АДАПТИВ
══════════════════════════════ */

/* Safe area для notch-устройств (iPhone и др.) */
.header-inner {
  padding-left: max(1.5rem, env(safe-area-inset-left));
  padding-right: max(1.5rem, env(safe-area-inset-right));
}
.container {
  padding-left: max(1.5rem, env(safe-area-inset-left));
  padding-right: max(1.5rem, env(safe-area-inset-right));
}
.footer {
  padding-bottom: max(1.75rem, env(safe-area-inset-bottom));
}

/* Минимальные touch-таргеты 44px */
.nav a, .mobile-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.mobile-nav a {
  display: flex;
  min-height: 48px;
}
/* Ссылки внутри выпадающей панели — список, а не пункты шапки. Правило выше
   раскладывало их inline-flex, и шестнадцать тренажёров вставали по два-три
   в строку вперемешку. На телефоне высоту не трогаем: там палец. */
.nav .nav-panel a { display: block; min-height: 0; }
.burger {
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
}
.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.post-card-read {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 1024px) {
  .posts-with-sidebar {
    grid-template-columns: 1fr;
  }
  .news-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .news-sidebar-header,
  .news-sidebar .region-selector-wrap {
    grid-column: 1 / -1;
  }
}

@media (max-width: 960px) {
  .posts-grid { grid-template-columns: 1fr 1fr; }
  .post-card--featured { grid-column: span 2; }
  .courses-grid { grid-template-columns: 1fr 1fr; }
  .article-wrap { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grades-grid { grid-template-columns: repeat(2, 1fr); }
  .about-block { grid-template-columns: 1fr; gap: 2.5rem; padding: 2rem 0; }
}

@media (max-width: 768px) {
  .nav { display: none; }
  .burger { display: flex; }
  .section { padding: 2.75rem 0; }
  /* Изображения: чёткие пропорции, без обрезов */
  .post-card-img { aspect-ratio: 16/10; }
  .cat-img { aspect-ratio: 4/3; }
  .article-cover { aspect-ratio: 16/10; margin-bottom: 1.25rem; }
  .article-cover-img { width: 100%; height: 100%; object-fit: cover; }
  .inline-img img { aspect-ratio: 16/10; object-fit: cover; }
  .hero { padding: 3rem 1rem 2.5rem; }
  .hero p { font-size: 0.95rem; margin-bottom: 1.75rem; }
  .hero-btns { gap: 0.75rem; }
  .posts-grid { grid-template-columns: 1fr; }
  .post-card--featured { grid-column: span 1; }
  .post-card--featured .post-card-title { font-size: 1rem; }
  .courses-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: 1fr 1fr; }
  .trainers-grid { grid-template-columns: 1fr 1fr; }
  .subscribe-section { padding: 2.5rem 0; }
  .subscribe-box { flex-direction: column; text-align: center; }
  .subscribe-form { width: 100%; justify-content: center; flex-direction: column; }
  .subscribe-form input { min-width: unset; width: 100%; }
  .subscribe-form .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer { padding: 2.5rem 0 1.5rem; }
  .section-header--flex { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .about-stats { gap: 1rem; }
  .region-select { max-width: 100%; }
  .article-wrap { padding: 1.5rem 1rem 3rem; }
}

@media (max-width: 640px) {
  .news-sidebar { grid-template-columns: 1fr; }
  .steps-block { padding: 1.1rem; }
  .expert-quote { padding: 1rem 1.25rem; }
  .fact-cards-row { gap: 0.65rem; }
  .fact-card { flex: 1 1 130px; padding: 1rem 0.75rem; }
  .quote-audio { margin-left: 0; }
}

@media (max-width: 480px) {
  .categories-grid { grid-template-columns: 1fr 1fr; }
  .trainers-grid { grid-template-columns: 1fr 1fr; }
  .post-card-img { aspect-ratio: 16/9; }
  .cat-img { aspect-ratio: 16/10; }
  .hero { padding: 2.25rem 0.75rem 2rem; }
  .hero h1 { font-size: 1.7rem; }
  .hero p { font-size: 0.9rem; }
  .hero-btns .btn { font-size: 0.78rem; padding: 0.7rem 1.4rem; }
  .grades-grid { grid-template-columns: 1fr 1fr; }
  .news-skeleton { min-height: 200px; }
  .section { padding: 2rem 0; }
  .section-title { font-size: 1.4rem; }
  .post-card-body { padding: 1rem; }
  .course-card { padding: 1.25rem; }
  .grade-card { padding: 1.5rem 1rem; }
  .grade-num { font-size: 2.25rem; }
  .header-inner { padding: 0 0.75rem; height: 56px; }
  .logo { font-size: 1rem; }
  .mobile-nav { padding: 0.5rem 0.75rem 0.75rem; }
}

/* ══════════════════════════════
   AFFILIATE BANNERS (офферы Шамиля)
══════════════════════════════ */
.affiliate-banner {
  background: linear-gradient(135deg, var(--cream) 0%, var(--ivory) 100%);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--amber);
  border-radius: 0;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  position: relative;
}
.affiliate-banner__label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  position: absolute;
  top: 0.6rem;
  right: 1rem;
}
.affiliate-banner__body {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.affiliate-banner__icon {
  font-size: 2rem;
  flex-shrink: 0;
}
.affiliate-banner__text {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.affiliate-banner__text strong {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.3;
}
.affiliate-banner__text span {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.4;
}
.affiliate-banner .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Сетка офферов (2 в ряд) */
.affiliate-offers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}
.affiliate-offer-card {
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 0;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: relative;
}
/* Блок-переход внутри текста статьи: одиночная карточка в потоке чтения,
   а не пара в сетке. Стоит в средней трети вместо текстовой ссылки —
   см. tools/add_offer_block.py. Левая полоса акцентом отделяет рекламный
   блок от прозы: читатель должен видеть, где кончается статья и начинается
   предложение, даже не читая метку. */
.affiliate-offer-card--inline {
  margin: 1.75rem 0;
  border-left: 3px solid var(--accent, #e8710a);
}
/* Строка маркировки: «Реклама. ООО …, ИНН …. erid: …». Требование 38-ФЗ
   ст. 18.1 для выделенного рекламного блока; токен и реквизиты выдаёт
   кабинет САЛИД. Мелко и приглушённо — это служебная строка, а не текст
   предложения, но читаемая: пряталь её нельзя. */
.affiliate-offer-card__legal {
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--muted);
  margin-top: 0.15rem;
  word-break: break-word;
}

.affiliate-offer-card--inline .affiliate-offer-card__title {
  font-size: 1.05rem;
}
@media (max-width: 480px) {
  .affiliate-offer-card--inline { margin: 1.25rem 0; padding: 1rem; }
}

.affiliate-offer-card__label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  align-self: flex-end;
  margin-bottom: -0.4rem;
}
.affiliate-offer-card__icon { font-size: 1.75rem; }
.affiliate-offer-card__title {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.affiliate-offer-card__desc {
  font-size: 0.825rem;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}
.affiliate-offer-card .btn { margin-top: auto; }

/* Перелинковка — блок "Читайте также" */
.related-articles {
  background: var(--cream);
  border-radius: 0;
  padding: 1.5rem;
  margin: 2.5rem 0;
}
.related-articles__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.related-articles__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.related-articles__list a {
  font-size: 0.9rem;
  color: var(--forest-md);
  font-weight: 600;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border-lt);
  transition: color 0.2s;
}
.related-articles__list a:last-child { border-bottom: none; }
.related-articles__list a::before { content: '→'; color: var(--amber); flex-shrink: 0; }
.related-articles__list a:hover { color: var(--forest); }

@media (max-width: 640px) {
  .affiliate-banner__body { flex-direction: column; align-items: flex-start; }
  .affiliate-offers-grid { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .categories-grid { grid-template-columns: 1fr; }
  .trainers-grid { grid-template-columns: 1fr; }
  .grades-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 1.5rem; }
  .hero-btns { flex-direction: column; align-items: stretch; }
  .hero-btns .btn { width: 100%; text-align: center; }
  .container { padding-left: 0.75rem; padding-right: 0.75rem; }
}

/* ══════════════════════════════
   COMPARISON / TIMELINE / CALLOUT / PROGRESS
══════════════════════════════ */
.comparison-block { margin: 2rem 0; }
.comp-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text);
}
.comp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.comp-col {
  border-radius: 0;
  padding: 1.25rem 1.35rem;
  border: 1.5px solid var(--border-lt);
  background: var(--white);
}
.comp-col h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--border-lt);
}
.comp-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.comp-col li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.92rem;
  line-height: 1.5;
}
.comp-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  margin-top: 2px;
}
.comp-col--bad  { background: #fdf3f2; border-color: #f1c9c4; }
.comp-col--bad  h4 { color: #8a2a1f; border-color: #f1c9c4; }
.comp-col--bad  .comp-icon { background: #C0392B; color: #fff; }
.comp-col--good { background: #F7EEDF; border-color: #F2C9A8; }
.comp-col--good h4 { color: var(--forest); border-color: #F2C9A8; }
.comp-col--good .comp-icon { background: var(--forest); color: #fff; }

@media (max-width: 640px) {
  .comp-grid { grid-template-columns: 1fr; }
}

.timeline-block {
  margin: 2rem 0;
  padding: 1.5rem 1.5rem 1.25rem;
  background: var(--cream);
  border-radius: 0;
  border: 1px solid var(--border-lt);
}
.tl-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--forest);
  margin-bottom: 1.25rem;
  text-align: center;
}
.tl-list {
  list-style: none;
  position: relative;
  padding-left: 1.5rem;
  border-left: 3px solid var(--forest-lt);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.tl-item { position: relative; }
.tl-age {
  position: absolute;
  left: -2.85rem;
  top: 0;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.1;
  padding: 0.2rem;
  border: 3px solid var(--cream);
}
.tl-body { padding-left: 0.5rem; }
.tl-head {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.tl-body p { font-size: 0.92rem; line-height: 1.6; color: var(--text-md); margin: 0; }

@media (max-width: 480px) {
  .timeline-block { padding: 1rem; }
  .tl-list { padding-left: 1rem; }
  .tl-age { left: -2.3rem; width: 2rem; height: 2rem; font-size: 0.62rem; }
}

.callout {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1.1rem 1.35rem;
  margin: 1.75rem 0;
  border-radius: 0;
  border-left: 5px solid;
  background: var(--cream);
}
.callout-icon { font-size: 1.5rem; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.callout-body { flex: 1; }
.callout-title { display: block; font-weight: 800; font-size: 0.95rem; margin-bottom: 0.25rem; }
.callout-body p { margin: 0; font-size: 0.93rem; line-height: 1.6; }
.callout--tip       { border-color: var(--forest-lt); background: #F7EEDF; }
.callout--tip       .callout-title { color: var(--forest); }
.callout--warning   { border-color: var(--amber);     background: #fdf6e7; }
.callout--warning   .callout-title { color: #8a5a08; }
.callout--important { border-color: #C0392B;          background: #fdf3f2; }
.callout--important .callout-title { color: #8a2a1f; }
.callout--note      { border-color: #2563EB;          background: #eef3fc; }
.callout--note      .callout-title { color: #1e3a8a; }
.callout--success   { border-color: var(--forest);    background: #eef5e0; }
.callout--success   .callout-title { color: var(--forest); }

.progress-group {
  margin: 1.75rem 0;
  padding: 1.35rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--border-lt);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.progress-row { display: flex; flex-direction: column; gap: 0.35rem; }
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}
.progress-label strong { font-family: 'Playfair Display', serif; color: var(--forest); }
.progress-track {
  height: 10px;
  border-radius: 0;
  background: var(--ivory);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 0;
  transition: width 0.6s ease;
}

/* ══════════════════════════════
   ARTICLE TABLES
══════════════════════════════ */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.75rem 0;
  border-radius: 0;
  box-shadow: 0 1px 8px rgba(184, 67, 26,0.08);
}
.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.5;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.article-table th {
  background: var(--forest);
  color: var(--white);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 1rem;
  text-align: left;
  border: none;
  white-space: nowrap;
}
.article-table th:first-child { border-radius: 0; }
.article-table th:last-child  { border-radius: 0; }
.article-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border-lt);
  color: var(--text);
  vertical-align: top;
}
.article-table tbody tr:nth-child(even) td { background: var(--cream); }
.article-table tbody tr:hover td { background: var(--ivory); transition: background 0.15s; }
.article-table tbody tr:last-child td { border-bottom: none; }
.article-table tbody tr:last-child td:first-child { border-radius: 0; }
.article-table tbody tr:last-child td:last-child  { border-radius: 0; }
@media (max-width: 768px) {
  .article-table { font-size: 0.82rem; }
  .article-table th, .article-table td { padding: 0.55rem 0.75rem; }
}

/* ══════════════════════════════
   ARTICLE SIDEBAR
══════════════════════════════ */
.article-page-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2.5rem;
  align-items: start;
}
.article-page-wrap > * { min-width: 0; }
.article, .article-body { min-width: 0; }
.article-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.sidebar-widget {
  background: var(--cream);
  border: 1px solid var(--border-lt);
  border-radius: 0;
  padding: 1.25rem;
}
.sidebar-widget__title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--amber);
  display: inline-block;
}
.sidebar-posts {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.sidebar-post-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-lt);
  transition: opacity 0.15s;
}
.sidebar-post-item:last-child { border-bottom: none; }
.sidebar-post-item:hover { opacity: 0.75; }
.sidebar-post-cat {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--amber);
}
.sidebar-post-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
/* RSS виджет */
.sidebar-news-feed { display: flex; flex-direction: column; gap: 0.5rem; }
/* CTA виджет */
.sidebar-widget--cta {
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-md) 100%);
  border-color: var(--forest);
  position: relative;
  overflow: hidden;
}
.sidebar-widget__label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.5rem;
}
.sidebar-cta__icon { font-size: 1.75rem; margin-bottom: 0.4rem; }
.sidebar-cta__title {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 0.35rem;
}
.sidebar-cta__desc {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 0.85rem;
  line-height: 1.4;
}
.sidebar-widget--cta .btn-primary {
  background: var(--amber-dk);
  border-color: var(--amber-dk);
  color: var(--white);
}
.sidebar-widget--cta .btn-primary:hover { background: var(--amber-lt); border-color: var(--amber-lt); }
@media (max-width: 960px) {
  .article-page-wrap {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}
@media (max-width: 640px) {
  .article-sidebar { grid-template-columns: 1fr; }
}

/* ══════════════════════════════
   EXPERT QUOTES + AUDIO
══════════════════════════════ */
.expert-quote {
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-md) 100%);
  border-radius: 0;
  padding: 2rem 2rem 1.5rem;
  margin: 2rem 0;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.expert-quote::before {
  content: '"';
  font-family: 'Playfair Display', serif;
  font-size: 8rem;
  color: rgba(255,255,255,0.08);
  position: absolute;
  top: -1.5rem;
  left: 1rem;
  line-height: 1;
  pointer-events: none;
}
.quote-text {
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.95);
  font-style: italic;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}
.quote-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.quote-author {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--amber-lt);
}
.quote-title {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
  flex: 1;
}
.quote-audio {
  margin-left: auto;
}
.btn-audio {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.3);
  color: var(--white);
  border-radius: 0;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Nunito', sans-serif;
}
.btn-audio:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.5);
}
.btn-audio.playing {
  background: var(--amber);
  border-color: var(--amber);
}
.btn-audio.playing .btn-audio-icon::before { content: '⏸'; }
.btn-audio-icon { font-style: normal; }

/* Hero-цитата в начале статьи */
.article-hero-quote {
  margin: 0 0 2.5rem 0;
  text-align: center;
}
.article-hero-quote .expert-quote {
  max-width: 820px;
  margin: 0 auto;
  text-align: left;
}
.article-hero-quote .quote-text {
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .expert-quote { padding: 1.5rem 1.25rem 1.25rem; }
  .quote-text { font-size: 0.95rem; }
  .quote-footer { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .quote-audio { margin-left: 0; }
}

/* ══════════════════════════════
   МОБИЛЬНЫЙ АДАПТИВ — статьи
══════════════════════════════ */

/* Статья на планшете */
@media (max-width: 768px) {
  .article-page { padding: 0; }
  .article-page .container { padding: 0 1rem; }

  /* Хлебные крошки */
  .breadcrumb .container { padding: 0.75rem 1rem; font-size: 0.74rem; }

  /* Обложка */
  .article-cover { border-radius: 0; margin-bottom: 1.5rem; }
  .article-cover-img { border-radius: 0; }

  /* Мета */
  .article-meta { gap: 0.6rem; margin-bottom: 0.75rem; }

  /* Заголовок h1 внутри статьи */
  .article h1, .article-title {
    font-size: clamp(1.4rem, 5vw, 1.85rem);
    line-height: 1.22;
    margin-bottom: 1.25rem;
  }

  /* Тело статьи — комфортный читаемый размер на мобильных */
  .article-body, .article-content, .article {
    font-size: 1.0625rem;
    line-height: 1.75;
  }
  .article-content p, .article p { margin-bottom: 1.15rem; }
  .article h2, .article-content h2 {
    font-size: 1.4rem;
    margin: 2rem 0 0.85rem;
    line-height: 1.25;
  }
  .article h3, .article-content h3 {
    font-size: 1.15rem;
    margin: 1.5rem 0 0.5rem;
    line-height: 1.3;
  }

  /* Графики — уменьшить высоту */
  .chart-wrap { padding: 1rem; margin: 1.25rem 0; }
  .chart-wrap canvas { max-height: 180px; }

  /* Партнёрский баннер */
  .affiliate-banner { padding: 1rem; margin: 1.5rem 0; }
  .affiliate-banner .btn { width: 100%; text-align: center; }

  /* Факт-карточки */
  .fact-cards-row { flex-direction: column; gap: 0.75rem; }
  .fact-card { flex: 1 1 auto; padding: 1rem; }

  /* Блок шагов */
  .steps-block { padding: 1rem; border-radius: 0; }

  /* Inline-изображения — full-bleed на мобильном */
  .inline-img {
    margin: 1.5rem -1rem;
    border-radius: 0;
  }
  .inline-img img {
    border-radius: 0;
    aspect-ratio: 16/9;
  }
  .inline-img-caption {
    border-radius: 0;
    padding: 0.5rem 1rem;
  }
}

/* Статья на телефоне */
@media (max-width: 480px) {
  .article-page .container { padding: 0 0.75rem; }
  .breadcrumb .container { font-size: 0.7rem; padding: 0.6rem 0.75rem; }

  .article-cover { margin-bottom: 1rem; aspect-ratio: 16/9; }
  .article-meta { gap: 0.4rem; flex-wrap: wrap; }
  .inline-img { margin: 1.25rem -0.75rem; }
  .inline-img-caption { padding: 0.4rem 0.75rem; }

  .article-body, .article-content, .article { font-size: 1.0625rem; line-height: 1.7; }
  .article-content h2, .article h2 { font-size: 1.3rem; }
  .article-content h3, .article h3 { font-size: 1.1rem; }
  .post-card-title { font-size: 1.05rem; }
  .post-card-excerpt { font-size: 0.9rem; }
  .cat-name { font-size: 0.95rem; }
  .cat-desc { font-size: 0.8rem; }

  .chart-wrap canvas { max-height: 150px; }

  .affiliate-banner { padding: 0.875rem; }
  .affiliate-banner__icon { font-size: 1.5rem; }
  .affiliate-banner__text strong { font-size: 0.9rem; }
  .affiliate-banner__text span { font-size: 0.8rem; }

  .fact-card { padding: 0.875rem 0.75rem; }
  .fact-number { font-size: 1.75rem; }

  .steps-num { width: 1.75rem; height: 1.75rem; font-size: 0.8rem; }
  .steps-text { font-size: 0.95rem; }

  /* Главная: карточки постов */
  .post-card-title { font-size: 0.95rem; }
  .post-card-excerpt { font-size: 0.82rem; }
}

/* ══════════════════════════════
   МОБИЛЬНЫЙ ПОЛИШ — статьи v2
   (читаемость, таблицы, графики, медиа)
══════════════════════════════ */

/* Защита от горизонтального overflow в теле статьи */
.article-body,
.article-content,
.article {
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.article-body a { word-break: break-word; }
.article-body img,
.article-body video,
.article-body iframe {
  max-width: 100%;
  height: auto;
  display: block;
}
.article-body pre,
.article-body code {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Таблицы — визуальный hint «можно скроллить» на мобильных */
.table-wrap {
  position: relative;
  background:
    linear-gradient(to right, var(--white) 30%, rgba(255,255,255,0)) left center/20px 100% no-repeat,
    rgba(255,255,255,0) 70%) right center/20px 100% no-repeat,
    rgba(184, 67, 26,0.12) left center/10px 100% no-repeat,
    rgba(184, 67, 26,0.12) right center/10px 100% no-repeat;
  background-attachment: local, local, scroll, scroll;
}

@media (max-width: 768px) {
  .article-table th { font-size: 0.72rem; letter-spacing: 0.02em; }
  .article-table th,
  .article-table td { padding: 0.6rem 0.7rem; white-space: normal; }
}

/* Графики — адекватная высота + горизонтальный скролл для узких экранов */
@media (max-width: 768px) {
  .chart-wrap {
    padding: 1rem 0.9rem;
    margin: 1.5rem 0;
    height: 300px;
  }
  .chart-title { font-size: 0.88rem; line-height: 1.35; }
  /* height: auto здесь нельзя — вернётся петля раздувания canvas. */
  .chart-wrap canvas {
    height: 220px !important;
    width: 100% !important;
  }
}
@media (max-width: 480px) {
  .chart-wrap { padding: 0.85rem 0.75rem; height: 280px; }
  .chart-wrap canvas { height: 200px !important; }
}

/* Факт-карточки — 2×2 сетка на планшете, 1 колонка только на узком телефоне */
@media (max-width: 768px) {
  .fact-cards-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
  .fact-card { flex: unset; padding: 1rem 0.85rem; }
  .fact-number { font-size: 1.65rem; }
  .fact-label { font-size: 0.82rem; line-height: 1.45; }
  .fact-icon { font-size: 1.5rem; }
}
@media (max-width: 480px) {
  .fact-cards-row { grid-template-columns: 1fr; }
  .fact-card { padding: 1rem; }
  .fact-number { font-size: 1.9rem; }
  .fact-label { font-size: 0.9rem; }
}

/* Партнёрский баннер — вертикальный стек на телефоне */
@media (max-width: 560px) {
  .affiliate-banner__body {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }
  .affiliate-banner__icon { font-size: 1.8rem; }
  .affiliate-banner__text { min-width: 0; width: 100%; }
  .affiliate-banner__text strong { font-size: 1rem; line-height: 1.3; }
  .affiliate-banner__text span { font-size: 0.85rem; line-height: 1.45; }
  .affiliate-banner .btn { width: 100%; text-align: center; }
  .affiliate-banner__label { position: static; margin-bottom: 0.4rem; }
}

/* Цитаты экспертов — audio player не ломает layout */
@media (max-width: 640px) {
  .quote-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
  .quote-author { font-size: 0.95rem; }
  .quote-title { font-size: 0.8rem; line-height: 1.4; }
  .quote-audio-wrap { width: 100%; margin-top: 0.6rem; }
  .audio-play-btn { width: 100%; justify-content: center; }
}

/* Inline-изображения в статье — подписи и отступы */
@media (max-width: 640px) {
  .inline-img img { border-radius: 0; }
  .inline-img-caption {
    font-size: 0.78rem;
    line-height: 1.4;
  }
  .photo-credit { font-size: 0.7rem; }
}

/* Блок шагов — компактнее на телефоне */
@media (max-width: 480px) {
  .steps-block {
    padding: 1rem 0.9rem;
    border-left-width: 3px;
  }
  .steps-title { font-size: 0.82rem; }
}

/* Читаемость тела статьи на телефоне — больше воздуха */
@media (max-width: 480px) {
  .article-body ul,
  .article-body ol { padding-left: 1.25rem; }
  .article-body li { margin-bottom: 0.5rem; line-height: 1.65; }
  .article h1, .article-title { font-size: clamp(1.45rem, 6vw, 1.75rem); }
  .article-category { font-size: 0.72rem; }
  .article-date,
  .article-reading { font-size: 0.78rem; }
}

/* ══════════════════════════════
   БРЕЙКПОИНТ 410px — iPhone 12/13/14/15 Pro (390px) и SE (375px)
   Провал между 480px и 360px для большинства современных iPhone
══════════════════════════════ */
@media (max-width: 410px) {
  /* Типографика — ещё компактнее */
  .article-body, .article-content, .article { font-size: 1rem; line-height: 1.68; }
  .article h2, .article-content h2 {
    font-size: 1.2rem;
    margin: 1.75rem auto 0.65rem;
    padding-bottom: 0.5rem;
  }
  .article h3, .article-content h3 {
    font-size: 1.05rem;
    margin: 1.4rem auto 0.5rem;
  }
  .article p, .article-content p { margin-bottom: 1rem; }

  /* Графики */
  .chart-wrap { padding: 0.75rem 0.65rem; margin: 1.25rem 0; height: 270px; }
  .chart-wrap canvas { height: 200px !important; }
  .chart-title { font-size: 0.82rem; }

  /* Hero-секция */
  .hero h1 { font-size: 1.45rem; }

  /* Цитаты */
  .quote-text { font-size: 0.92rem; line-height: 1.65; }
  .quote-author { font-size: 0.88rem; }
  .expert-quote { padding: 1rem 1rem 0.875rem; }

  /* Affiliate блоки */
  .affiliate-block { padding: 0.75rem; }
  .btn { font-size: 0.875rem; padding: 0.65rem 1.1rem; }

  /* Шаги */
  .steps-block { padding: 0.875rem 0.75rem; }
  .steps-num { width: 1.65rem; height: 1.65rem; font-size: 0.78rem; }
  .steps-text { font-size: 0.9rem; }

  /* Отступы контейнера */
  .article-page .container { padding: 0 0.65rem; }
  .inline-img { margin: 1rem -0.65rem; }
  .inline-img-caption { padding: 0.35rem 0.65rem; }

  /* Breadcrumb */
  .breadcrumb .container { font-size: 0.68rem; padding: 0.5rem 0.65rem; }
}

/* ============================================================
   МОБИЛЬНЫЙ ПОЛИШ — статьи v3 (финальная визуальная доводка)
   ============================================================ */

/* Affiliate-баннер: воздух вокруг CTA, чтобы кнопка не упиралась в край */
@media (max-width: 640px) {
  .affiliate-banner,
  .affiliate-link-block {
    padding: 1.1rem 1rem 1.25rem !important;
  }
  .affiliate-banner .btn,
  .affiliate-link-block .btn {
    margin-top: 0.85rem;
    width: 100%;
    text-align: center;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
  }
}

/* Таблицы: лучший hint для скролла + аккуратнее ячейки */
@media (max-width: 640px) {
  .table-wrap {
    position: relative;
    margin: 1.25rem -0.5rem;
    padding: 0 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }
  .table-wrap::after {
    content: "← проведите →";
    display: block;
    text-align: center;
    font-size: 0.7rem;
    color: var(--muted);
    padding: 0.4rem 0 0.1rem;
    letter-spacing: 0.02em;
  }
  .article-table {
    min-width: 520px;
    font-size: 0.85rem;
  }
  .article-table th,
  .article-table td {
    padding: 0.55rem 0.65rem;
    line-height: 1.4;
    vertical-align: top;
  }
  .article-table th {
    font-size: 0.78rem;
    letter-spacing: 0.02em;
  }
}

/* Chart.js: контейнер получает запас под подписи, canvas не схлопывается */
@media (max-width: 640px) {
  .chart-wrap {
    padding: 1rem 0.5rem 1.25rem;
    margin: 1.4rem 0;
    height: 290px;
  }
  .chart-wrap canvas {
    width: 100% !important;
    height: 205px !important;
  }
  .chart-title {
    font-size: 0.95rem;
    line-height: 1.35;
    margin-bottom: 0.6rem;
  }
}

/* Fact-cards: больше воздуха между, единообразные отступы */
@media (max-width: 640px) {
  .fact-cards-row {
    gap: 0.85rem;
    margin: 1.4rem 0;
  }
  .fact-card {
    padding: 1rem 0.9rem;
  }
  .fact-card .fact-label {
    font-size: 0.82rem;
    line-height: 1.45;
  }
  .fact-card .fact-number {
    font-size: 1.65rem;
    margin: 0.35rem 0 0.45rem;
  }
}

/* Steps: аккуратный ритм между шагами */
@media (max-width: 640px) {
  .steps-block li,
  .steps-item {
    margin-bottom: 0.9rem;
  }
  .steps-num {
    margin-right: 0.7rem;
    flex-shrink: 0;
  }
  .steps-text {
    line-height: 1.55;
  }
}

/* Цитаты экспертов: вертикальная стековка на узких экранах */
@media (max-width: 560px) {
  .expert-quote,
  .article-hero-quote .expert-quote {
    padding: 1.1rem 1rem;
  }
  .quote-text {
    font-size: 1rem;
    line-height: 1.55;
  }
  .quote-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    margin-top: 0.75rem;
  }
  .quote-audio-wrap {
    margin-top: 0.75rem;
  }
  .audio-play-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Параграфы: больше воздуха, плотнее межстрочный — читать легче */
@media (max-width: 640px) {
  .article-body p {
    margin-bottom: 1.1rem;
    line-height: 1.65;
    font-size: 1rem;
  }
  .article-body h2 {
    margin-top: 2.1rem;
    margin-bottom: 0.9rem;
    line-height: 1.25;
  }
  .article-body h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
    line-height: 1.3;
  }
}

/* Inline-изображения: аккуратные отступы подписи */
@media (max-width: 640px) {
  .inline-img img {
    border-radius: 0;
  }
  .inline-img-caption {
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--muted);
    padding: 0.5rem 0.65rem 0.25rem;
  }
}

/* ══════════════════════════════════════════════════
   МОБИЛЬНЫЙ ФИКС v3 — перебивает весь хаос выше
   (таблицы, fact-cards, hero, цитаты, H1)
════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* 1. HERO статьи: обложка не на весь экран, H1 сразу виден */
  .article-cover {
    aspect-ratio: 16/10;
    margin-bottom: 1rem;
  }
  .article-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
  }
  .article-body > h1,
  .article > h1 {
    font-size: 1.7rem;
    line-height: 1.2;
    margin: 0.5rem 0 1rem;
    font-family: 'Playfair Display', serif;
    font-weight: 800;
    color: var(--text);
  }

  /* 2. Цитата эксперта — визуально отделена */
  .article-hero-quote {
    margin: 1.25rem 0 1.5rem;
  }
  .article-hero-quote .expert-quote,
  .expert-quote {
    background: var(--cream);
    border-left: 4px solid var(--forest);
    border-radius: 0;
    padding: 1.1rem 1.15rem;
    margin: 1.25rem 0;
  }
  .expert-quote .quote-text {
    font-size: 1rem;
    line-height: 1.55;
    margin: 0 0 0.75rem;
    font-style: italic;
    /* Фон врезки здесь переопределён на светлый (--cream), а цвет текста
       остался белым из десктопного правила с зелёным градиентом — на телефоне
       врезка «Совет редакции» выходила белым по кремовому и не читалась ни на
       одной статье сайта. Цвет обязан меняться вместе с фоном. */
    color: var(--text);
  }
  .expert-quote .quote-footer {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    border-top: 1px solid var(--border-lt);
    padding-top: 0.65rem;
  }
  .expert-quote .quote-author {
    font-weight: 700;
    color: var(--forest);
    font-size: 0.92rem;
  }
  .expert-quote .quote-title {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.35;
  }

  /* 3. Fact-cards — видимые карточки с контрастом */
  .fact-cards-row {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin: 1.5rem 0;
  }
  .fact-card {
    background: var(--cream) !important;
    border: 1px solid rgba(184, 67, 26, 0.12) !important;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
    padding: 1.1rem 1rem !important;
    display: grid !important;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 0.85rem;
    row-gap: 0.3rem;
    align-items: center;
    text-align: left !important;
  }
  .fact-card .fact-icon {
    font-size: 1.75rem;
    grid-row: 1 / 3;
    align-self: start;
  }
  .fact-card .fact-number {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--forest);
    line-height: 1;
    margin: 0;
  }
  .fact-card .fact-label {
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--text);
    margin: 0;
    grid-column: 2;
  }

  /* 4. Таблицы в статьях — адаптив, горизонтальный скролл */
  .article-body table,
  .article-content table,
  .article table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.88rem;
    border: 1px solid var(--border-lt);
    border-radius: 0;
  }
  .article-body table thead,
  .article-content table thead,
  .article table thead {
    background: var(--cream);
  }
  .article-body table th,
  .article-body table td,
  .article-content table th,
  .article-content table td,
  .article table th,
  .article table td {
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid var(--border-lt);
    vertical-align: top;
    text-align: left;
    min-width: 110px;
    line-height: 1.4;
    word-break: normal;
    hyphens: none;
  }
  /* `.article table th` специфичнее, чем `.article-table th` (0,1,2 против
     0,1,1), поэтому без :not() зелёный текст ложился на зелёный фон шапки
     `.article-table` — контраст 1,05:1, то есть шапки не было видно вовсе.
     Дефект жил в 55 статьях из 60 и только на узких экранах. */
  .article-body table:not(.article-table) th,
  .article-content table:not(.article-table) th,
  .article table:not(.article-table) th {
    font-weight: 700;
    color: var(--forest);
    font-size: 0.82rem;
    text-transform: none;
  }
  /* У фирменной таблицы шапка тёмно-зелёная — текст на ней только белый. */
  .article-body table.article-table th,
  .article-content table.article-table th,
  .article table.article-table th {
    font-weight: 700;
    color: var(--white);
    font-size: 0.82rem;
  }
  .article-body table tr:last-child td,
  .article-content table tr:last-child td,
  .article table tr:last-child td {
    border-bottom: none;
  }

  /* 5. Хлебные крошки — компактнее, не воруют место у H1 */
  .breadcrumb .container {
    font-size: 0.72rem;
    padding: 0.6rem 0.85rem;
    line-height: 1.4;
    color: var(--muted);
  }
  .breadcrumb a {
    color: var(--muted);
  }
}

@media (max-width: 480px) {
  .article-body > h1,
  .article > h1 {
    font-size: 1.5rem;
  }
  .article-cover {
    aspect-ratio: 4/3;
  }
  .fact-card .fact-number {
    font-size: 1.35rem;
  }
  .article-body table th,
  .article-body table td,
  .article table th,
  .article table td {
    padding: 0.6rem 0.65rem;
    font-size: 0.83rem;
    min-width: 100px;
  }
}

/* Блок ссылок на тренажёры в конце статьи. Отличается от «Читайте также»
   янтарной рамкой: тренажёры — самый сильный раздел сайта, и переход туда
   ценнее перехода на соседнюю статью. */
.related-articles--trainers {
  border: 2px solid var(--amber-lt);
  background: var(--cream);
}
.related-articles__note {
  margin: .6rem 0 0;
  font-family: 'Nunito', sans-serif;
  font-size: .88rem;
  color: var(--muted);
}

/* Подсказка под ссылкой на тренажёр: своя строка, приглушённая, без маркера —
   иначе на узком экране она читается как отдельный пункт списка. */
.related-articles__hint {
  display: block;
  margin-top: .15rem;
  font-family: 'Nunito', sans-serif;
  font-size: .85rem;
  color: var(--muted);
}

/* ══════════════════════════════
   ПЛАШКА «ГОТОВИМСЯ К ШКОЛЕ»
   Стоит НАД липкой шапкой на каждой странице сайта и в тренажёрах: весь
   поисковый трафик приходит сразу на внутреннюю страницу, минуя главную,
   и без плашки человек о сезонной рубрике не узнаёт вовсе.
   Полоса не липкая — прокручивается вместе со страницей, чтобы не отъедать
   высоту у игрового поля тренажёра на телефоне.
══════════════════════════════ */
.school-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .55rem 1.3rem;
  padding: 1.1rem 1.4rem;
  background: #F5B347;
  color: #241A04;
  text-align: center;
  line-height: 1.22;
}
.school-bar:hover { color: #241A04; }
.school-bar__head {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
}
.school-bar__icon { font-size: 2rem; line-height: 1; }
.school-bar__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.62rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.school-bar__days {
  background: rgba(28,43,14,0.14);
  border: 1px solid rgba(28,43,14,0.24);
  border-radius: 0;
  padding: .3rem .9rem;
  font-size: .84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}
.school-bar__days[hidden] { display: none; }
.school-bar__cta {
  background: var(--forest);
  color: var(--white);
  border-radius: 0;
  padding: .62rem 1.5rem;
  font-size: .88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(28,43,14,0.3);
  transition: background .2s, box-shadow .2s;
}
.school-bar:hover .school-bar__cta {
  background: var(--forest-md);
  box-shadow: 0 6px 20px rgba(28,43,14,0.38);
}
/* На самой странице плана плашка не кликабельна — ссылка вела бы сама на себя.
   Полоса при этом остаётся: она держит обратный отсчёт над текстом, ради
   которого человек и пришёл. */
.school-bar--static { cursor: default; }

/* Кнопка мягко пульсирует: плашка стоит на каждой странице, и без движения
   глаз к ней привыкает за два визита. Пульс — на кнопке, а не на всей полосе:
   мигающая на полстраницы плашка читается как реклама. */
@keyframes school-cta-pulse {
  0%, 82%, 100% { transform: scale(1); box-shadow: 0 4px 16px rgba(28,43,14,0.3); }
  88% { transform: scale(1.045); box-shadow: 0 6px 22px rgba(28,43,14,0.42); }
  94% { transform: scale(1); box-shadow: 0 4px 16px rgba(28,43,14,0.3); }
}
.school-bar__cta { animation: school-cta-pulse 6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .school-bar__cta { animation: none; }
}
@media (max-width: 640px) {
  .school-bar { padding: .85rem .9rem; gap: .5rem .7rem; }
  /* Заголовок занимает всю строку, счётчик и кнопка встают под ним парой —
     иначе на 360px строка ломается в трёх местах и плашка теряет форму. */
  .school-bar__head { flex: 1 1 100%; justify-content: center; }
  .school-bar__title { font-size: 1.3rem; }
  .school-bar__icon { font-size: 1.6rem; }
  .school-bar__days { font-size: .74rem; padding: .24rem .7rem; }
  .school-bar__cta { font-size: .78rem; padding: .5rem 1.1rem; }
}
/* На 360px счётчик и кнопка не влезали в строку вдвоём и плашка вырастала в
   три ряда. Ужимаем оба ровно настолько, чтобы они снова встали парой. */
@media (max-width: 400px) {
  .school-bar { gap: .45rem .5rem; padding: .8rem .7rem; }
  .school-bar__title { font-size: 1.18rem; }
  .school-bar__icon { font-size: 1.45rem; }
  .school-bar__days { font-size: .66rem; padding: .22rem .55rem; letter-spacing: .02em; }
  .school-bar__cta { font-size: .7rem; padding: .46rem .85rem; letter-spacing: .04em; }
}
@media print { .school-bar { display: none; } }

/* ══════════════════════════════
   ГЛАВНАЯ: БОЛЬШОЙ БЛОК «ГОТОВИМСЯ К ШКОЛЕ»
══════════════════════════════ */
.school-promo {
  padding: 3.4rem 0;
  background: #FDF2DE 100%);
}
.school-promo__card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 2.2rem;
  padding: 2.3rem 2.3rem 2.3rem 2.6rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0;
  box-shadow: 0 12px 38px rgba(184, 67, 26,0.12);
}
.school-promo__card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 7px;
  background: linear-gradient(180deg, var(--amber-lt) 0%, var(--forest) 100%);
}
.school-promo__kicker {
  display: inline-block;
  background: var(--amber-dk);
  color: var(--white);
  border-radius: 0;
  padding: .3rem .9rem;
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: .9rem;
}
.school-promo__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.65rem, 3.6vw, 2.35rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
}
.school-promo__lead {
  margin-top: .8rem;
  font-size: 1rem;
  color: var(--text-md);
  line-height: 1.7;
}
.school-promo__weeks {
  display: flex;
  flex-direction: column;
  gap: .8rem;
  margin: 1.5rem 0;
}
.school-promo__week {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: start;
  gap: .9rem;
  padding: .8rem .95rem;
  background: var(--cream);
  border-radius: 0;
  border-left: 3px solid var(--amber-lt);
}
.school-promo__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--white);
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 800;
}
.school-promo__week strong {
  display: block;
  font-size: .98rem;
  color: var(--text);
}
.school-promo__week span:last-child {
  display: block;
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.55;
}
.school-promo__btns {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
}
.school-promo__side {
  align-self: start;
  padding: 1.4rem 1.5rem;
  background: var(--ivory);
  border: 1px solid var(--border-lt);
  border-radius: 0;
}
.school-promo__side h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: .9rem;
}
.school-promo__days {
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
.school-promo__days li {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: .6rem;
  padding: .5rem 0;
  border-bottom: 1px dashed var(--border);
}
.school-promo__days li:last-child { border-bottom: none; }
.school-promo__days li > span {
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--amber);
}
.school-promo__days a {
  font-size: .93rem;
  font-weight: 700;
  color: var(--forest);
  text-decoration: underline;
  text-decoration-color: rgba(184, 67, 26,0.35);
  text-underline-offset: 3px;
}
.school-promo__days a:hover { text-decoration-color: var(--forest); }
.school-promo__note {
  margin-top: .9rem;
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.55;
}
@media (max-width: 960px) {
  .school-promo__card { grid-template-columns: 1fr; gap: 1.6rem; }
}
@media (max-width: 640px) {
  .school-promo { padding: 2.4rem 0; }
  .school-promo__card { padding: 1.5rem 1.2rem 1.5rem 1.5rem; }
  .school-promo__lead { font-size: .95rem; }
  .school-promo__week { grid-template-columns: 34px 1fr; gap: .7rem; padding: .7rem .8rem; }
  .school-promo__num { width: 34px; height: 34px; font-size: 1.05rem; }
  .school-promo__btns .btn { width: 100%; }
}

/* ══════════════════════════════
   ГЛАВНАЯ: ПЛАШКА «ТЕСТ ДЛЯ РОДИТЕЛЕЙ»
   Стоит сразу под hero, на светлом фоне: на зелёном промо-блоки читаются как
   реклама, а тест — это бесплатный инструмент, и выглядеть он должен как
   карточка сайта, а не как баннер. Вся плашка — одна ссылка, поэтому внутри
   только span'ы: вложенный <a> невалиден.
══════════════════════════════ */
.ptest-promo { padding: 2.6rem 0 0; }
.ptest-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.1rem 1.6rem;
  padding: 1.6rem 1.9rem 1.6rem 2.1rem;
  overflow: hidden;
  background: linear-gradient(135deg, var(--white) 0%, #FFF6E4 100%);
  border: 0;
  border-radius: 0;
  box-shadow: 0 10px 30px rgba(184, 67, 26,0.09);
  transition: transform .15s, box-shadow .2s, border-color .2s;
}
.ptest-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: linear-gradient(180deg, var(--amber-lt) 0%, var(--forest) 100%);
}
.ptest-card:hover {
  transform: translateY(-2px);
  border-color: rgba(212,135,10,0.5);
  box-shadow: 0 16px 40px rgba(184, 67, 26,0.15);
}
.ptest-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px; height: 62px;
  border-radius: 50%;
  background: var(--forest);
  font-size: 1.75rem;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(184, 67, 26,0.28);
}
.ptest-card__body { display: block; min-width: 0; }
.ptest-card__kicker {
  display: inline-block;
  background: var(--amber-dk);
  color: var(--white);
  border-radius: 0;
  padding: .26rem .8rem;
  font-size: .66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: .6rem;
}
/* Заголовок карточки — настоящий h2, а не span: без него блок для робота
   безымянный кусок текста внутри ссылки. Поэтому здесь гасятся отступы и
   цвет от глобальных правил h2. */
.ptest-card__title {
  display: block;
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
}
.ptest-card__lead {
  display: block;
  margin-top: .5rem;
  font-size: .95rem;
  line-height: 1.65;
  color: var(--text-md);
}
.ptest-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .9rem;
}
.ptest-card__chip {
  display: inline-block;
  padding: .28rem .75rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0;
  font-size: .74rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.ptest-card__cta {
  display: inline-block;
  padding: .8rem 1.7rem;
  background: var(--forest);
  color: var(--white);
  border-radius: 0;
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
  box-shadow: 0 5px 18px rgba(184, 67, 26,0.3);
  transition: background .2s, box-shadow .2s;
}
.ptest-card:hover .ptest-card__cta {
  background: var(--forest-md);
  box-shadow: 0 8px 24px rgba(184, 67, 26,0.38);
}
/* Кликается вся карточка, но обёрткой служит не <a>, а невидимый слой поверх
   неё: обёрточная ссылка выбрасывала весь блок из извлечения текста.
   Ссылка в карточке ровно одна — заголовок. «Пройти тест →» с 15.08.2026 —
   <span>, потому что второго <a> хватало, чтобы очистка от бойлерплейта
   снова выбросила плашку целиком (4205 знаков без текста плашки против 4456
   с ним). Поэтому кнопку над слоем НЕ поднимать: она обязана оставаться
   непозиционированной, чтобы клик по ней проваливался на растянутую ссылку
   заголовка. Вернёте .ptest-card__cta position:relative — кнопка станет
   мёртвой, и это будет видно только руками в браузере. */
.ptest-card__title a {
  color: inherit;
  text-decoration: none;
}
.ptest-card__title a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
.ptest-card__lead { margin: .5rem 0 0; }
/* Кнопка уезжает под текст раньше, чем ломается строка заголовка: на планшете
   она отъедала у него половину ширины и «Готов ли ребёнок к школе?» вставало
   в три строки. */
@media (max-width: 900px) {
  .ptest-card { grid-template-columns: auto 1fr; padding: 1.4rem 1.4rem 1.4rem 1.7rem; }
  /* Кнопка уходит под текст, но остаётся в колонке текста: растянутая на всю
     ширину карточки она весит больше заголовка и читается как баннер. */
  .ptest-card__cta { grid-column: 2; justify-self: start; }
}
/* На телефоне иконка встаёт отдельной строкой, а не сбоку: в узкой колонке
   рядом с ней текст ломался на 6–7 строк и плашка вырастала до полутора
   экранов. */
@media (max-width: 560px) {
  .ptest-promo { padding: 1.9rem 0 0; }
  .ptest-card {
    grid-template-columns: 1fr;
    gap: .7rem;
    padding: 1.25rem 1.15rem 1.35rem 1.45rem;
  }
  .ptest-card__icon { width: 46px; height: 46px; font-size: 1.3rem; }
  .ptest-card__lead { font-size: .9rem; line-height: 1.55; }
  /* Три чипа обязаны встать в одну строку: во вторую строку уходит один
     сиротливый чип, и плашка на пустом месте становится выше на 36px. */
  .ptest-card__meta { gap: .35rem; }
  .ptest-card__chip { font-size: .68rem; padding: .22rem .55rem; }
  .ptest-card__cta {
    grid-column: 1;
    justify-self: stretch;
    text-align: center;
    padding: .74rem 1.2rem;
    font-size: .78rem;
  }
}
@media print { .ptest-promo { display: none; } }


/* ══════════════════════════════════════════════════════════════════════
   КНОПКИ «ПОДЕЛИТЬСЯ» (js/share-buttons.js)

   Блок стоит на каждой странице сайта, поэтому он намеренно тихий: рамка
   вместо заливки, кнопки ростом с обычную строку. Кричащая полоса соцсетей
   на 119 страницах читается как реклама и отбирает внимание у партнёрских
   ссылок, ради которых страница и написана.

   Кнопки рисует скрипт, в разметке лежит только пустой <div data-share>.
   Поэтому все размеры заданы так, чтобы блок не прыгал в момент отрисовки:
   у контейнера есть min-height под одну строку заголовка и ряд кнопок.
   ══════════════════════════════════════════════════════════════════════ */
.share-box {
  margin: 2.2rem 0 1.6rem;
  padding: 1.15rem 1.3rem 1.25rem;
  border: 1px solid rgba(184, 67, 26, .16);
  border-radius: 0;
  background: var(--paper, #FFFDF9);
}
.share-box:empty { display: none; }        /* скрипт не отработал — пустой рамки не видно */

.share-title {
  margin: 0 0 .8rem;
  font-family: 'Nunito', sans-serif;
  font-size: .92rem;
  font-weight: 700;
  color: var(--text, #1F1A17);
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  padding: .5rem .95rem;
  /* 40px — минимум, в который попадает палец. Без явной высоты кнопка с
     текстом .84rem выходила 36px: на телефоне это промах через раз, а
     проверить можно только замером в браузере, глазами разница не видна. */
  min-height: 40px;
  border: 1px solid rgba(184, 67, 26, .18);
  border-radius: 0;                      /* pill-форма всех кнопок сайта */
  background: #fff;
  color: var(--text, #1F1A17);
  font-family: 'Nunito', sans-serif;
  font-size: .84rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.share-btn:hover { border-color: rgba(184, 67, 26, .38); background: var(--cream, #FBF7F0); }
.share-btn:focus-visible { outline: 2px solid var(--forest, #B8431A); outline-offset: 2px; }

.share-btn__i { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* Цвет сети — только у иконки. Заливка кнопки фирменным синим и оранжевым
   превращает ряд в рекламный баннер и спорит с янтарными партнёрскими
   ссылками, которые на странице главные. */
.share-btn--vk .share-btn__i { fill: #0077FF; }
.share-btn--telegram .share-btn__i { fill: #2AABEE; }
.share-btn--ok .share-btn__i { fill: #EE8208; }
.share-btn--copy .share-btn__i { fill: var(--muted, #6E6259); }

/* Нативная кнопка — единственная заметная: на телефоне именно она ведёт в
   чат класса, в MAX и в остальные мессенджеры, а прочие кнопки только
   дублируют её частными случаями. */
.share-btn--native {
  background: var(--forest, #B8431A);
  border-color: var(--forest, #B8431A);
  color: #fff;
}
.share-btn--native:hover { background: var(--forest-md, #D9531E); border-color: var(--forest-md, #D9531E); }
.share-btn--native .share-btn__i { fill: #fff; }

.share-btn.is-done {
  background: var(--forest, #B8431A);
  border-color: var(--forest, #B8431A);
  color: #fff;
}
.share-btn.is-done .share-btn__i { fill: #fff; }

/* На узком экране подписи сетей прячутся: три кнопки с текстом уходили во
   вторую и третью строку, и блок вырастал вдвое. Иконки при этом остаются
   кликабельными по 44px — это минимум для пальца, а название сети читается
   с логотипа быстрее, чем со слова. */
@media (max-width: 560px) {
  .share-box { padding: 1rem 1.05rem 1.1rem; margin: 1.8rem 0 1.4rem; }
  .share-title { font-size: .86rem; margin-bottom: .7rem; }
  .share-btn--vk .share-btn__t,
  .share-btn--telegram .share-btn__t,
  .share-btn--ok .share-btn__t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .share-btn--vk, .share-btn--telegram, .share-btn--ok {
    width: 44px; height: 44px; padding: 0; justify-content: center;
  }
  .share-btn--vk .share-btn__i,
  .share-btn--telegram .share-btn__i,
  .share-btn--ok .share-btn__i { width: 22px; height: 22px; }
}

/* Компактный вид — на экране результата тренажёра, где блок встаёт третьим
   после дневника и карточки-шеринга. Полноразмерный ряд там перегружает
   экран: ребёнок в этот момент смотрит на счёт, а не на соцсети. */
.share-box--compact {
  margin: .9rem 0 0;
  padding: .8rem .9rem .85rem;
  background: transparent;
  border-style: dashed;
}
.share-box--compact .share-title { font-size: .82rem; margin-bottom: .55rem; }
.share-box--compact .share-btn { padding: .42rem .8rem; font-size: .78rem; }

@media print { .share-box { display: none; } }


/* Дата обновления страницы — тренажёры, рубрики, хабы и посадочные
   (20.09.2026). У статей своя .article-date в шапке; здесь строка стоит в
   конце контента: читателю она нужна как отметка свежести, а не как
   заголовок, и в начале страницы отвлекала бы от самого тренажёра. */
.page-updated {
  margin: 2rem 0 0;
  text-align: center;
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--muted);
}

/* ══ Блок предложения .offer (бриф владельца 03.10.2026) ══════════════════
   Один блок на весь сайт: начало и конец статьи и тренажёра, три семинара
   на главной. Ставит tools/offer_blocks.py, клик меряет js/goals.js
   (цель offer_click). Скругления и заливка — по брифу, вопреки строгой сетке.
   Селекторы `div.offer > …` нарочно тяжелее, чем `.trainer-about
   a[rel~="sponsored"]` из trainers.css и `.article a` отсюда: иначе кнопка
   получила бы подчёркивание, подсветку и цвет текста обычной ссылки —
   ровно так 24.09.2026 кнопки в статьях стали невидимыми. */
div.offer {
  border: 2px solid #f5a623;
  border-radius: 14px;
  padding: 16px;
  background: #fff8ec;
  margin: 1.5rem 0;
  box-sizing: border-box;
  max-width: 100%;
  overflow-wrap: break-word;
}
div.offer > .offer__ad {
  display: block;
  font-size: .72rem;
  line-height: 1.2;
  color: #8a7350;
  margin: 0 0 .4rem;
}
div.offer > b {
  display: block;
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 .35rem;
}
div.offer > p {
  margin: 0 0 .9rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-md);
}
div.offer > a[href] {
  display: inline-block;
  background: #e8590c;
  color: #fff;
  font-weight: 700;
  line-height: 1.25;
  padding: 12px 20px;
  border: 0;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: none;
  transition: background .15s;
}
div.offer > a[href]:hover,
div.offer > a[href]:focus-visible {
  background: #c74a08;
  color: #fff;
  text-decoration: none;
}
div.offer > a[href]:visited { color: #fff; }
@media (max-width: 480px) {
  div.offer > a[href] { display: block; text-align: center; }
}

/* Главная: три семинара в ряд под первым экраном, на телефоне — столбиком. */
.offers-home .offers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.offers-home div.offer { margin: 0; display: flex; flex-direction: column; }
.offers-home div.offer > p { flex: 1; }
.offers-home div.offer > a[href] { align-self: flex-start; }
@media (max-width: 860px) {
  .offers-home .offers-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .offers-home div.offer > a[href] { align-self: stretch; }
}

/* Главная: статьи сверх девяти карточек — строкой по рубрикам. Без списка у
   13 статей пропала бы единственная внутренняя ссылка. */
.all-posts {
  margin-top: 1.75rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.all-posts__sum {
  cursor: pointer;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--forest);
  padding: .4rem 0;
}
.all-posts__group { scroll-margin-top: 90px; }
.all-posts__group h3 { font-size: 1rem; margin: 1.1rem 0 .5rem; }
.all-posts__list {
  margin: 0;
  padding-left: 1.1rem;
  columns: 2;
  column-gap: 2rem;
}
.all-posts__list li { margin-bottom: .4rem; break-inside: avoid; line-height: 1.4; }
.all-posts__list a { color: var(--text); }
.all-posts__list a:hover { color: var(--forest); }
@media (max-width: 640px) {
  .all-posts__list { columns: 1; }
}
