/* ===== Базовые переменные ===== */
:root {
  --c-text: #1a1d23;
  --c-muted: #5b6270;
  --c-bg: #ffffff;
  --c-bg-light: #f4f6f9;
  --c-border: #dde1e8;
  --c-primary: #1f5eff;
  --c-primary-dark: #1546c4;
  --c-accent: #0f9d6b;
  --c-ph: #d6dae1;
  --c-ph-text: #6b7280;
  --c-footer: #14171c;
  --c-footer-text: #c3c8d1;

  --gutter: 16px;
  --radius: 12px;
  --header-h: 64px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
  }
}
@media (min-width: 1200px) {
  :root {
    --gutter: 56px;
  }
}

/* ===== Сброс ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--c-text);
  background: var(--c-bg);
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--c-primary);
}
a:hover {
  color: var(--c-primary-dark);
}
h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
}
p {
  margin: 0;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
:focus-visible {
  outline: 3px solid var(--c-primary);
  outline-offset: 2px;
}

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

/* ===== Плейсхолдеры ===== */
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-ph);
  color: var(--c-ph-text);
  font-size: 13px;
  text-align: center;
  border-radius: 8px;
  padding: 8px;
}

/* ===== Шапка ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
}
.site-header__inner {
  height: var(--header-h);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--c-text);
  text-decoration: none;
}
.logo__img {
  width: auto;
  height: 40px;
}
.logo__text span {
  color: var(--c-primary);
}
.logo--light {
  color: #fff;
}
.logo--light .logo__text span {
  color: #7ea2ff;
}

.burger {
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.burger span {
  display: block;
  height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition:
    transform 0.2s,
    opacity 0.2s;
}
.burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.main-nav {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  padding: 8px var(--gutter) 16px;
}
.main-nav.is-open {
  display: block;
}
.main-nav a {
  display: block;
  padding: 12px 0;
  color: var(--c-text);
  text-decoration: none;
  font-weight: 500;
}
.main-nav a:hover {
  color: var(--c-primary);
}

@media (min-width: 768px) {
  .burger {
    display: none;
  }
  .main-nav {
    display: block;
    position: static;
    padding: 0;
    border: 0;
    background: none;
  }
  .main-nav ul {
    display: flex;
    gap: 28px;
  }
  .main-nav a {
    padding: 8px 0;
  }
}

/* ===== Секции ===== */
.section {
  padding: 48px var(--gutter);
}
.section--light {
  background: var(--c-bg-light);
}
.section__title {
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 800;
  margin-bottom: 28px;
}
.section__more {
  margin-top: 24px;
}
.link-arrow {
  font-weight: 600;
  text-decoration: none;
}
.link-arrow:hover {
  text-decoration: underline;
}

@media (min-width: 768px) {
  .section {
    padding: 72px var(--gutter);
  }
}
@media (min-width: 1200px) {
  .section {
    padding: 96px var(--gutter);
  }
}

/* ===== Кнопки ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
}
.btn--primary {
  background: var(--c-primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--c-primary-dark);
  color: #fff;
}
.btn--lg {
  padding: 16px 28px;
  font-size: 18px;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: grid;
  gap: 32px;
  align-content: center;
  background: linear-gradient(135deg, #eef3ff 0%, #ffffff 60%);
}
.hero__title {
  font-size: clamp(32px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.hero__subtitle {
  margin-top: 20px;
  font-size: clamp(17px, 1.6vw, 22px);
  color: var(--c-muted);
  max-width: 55ch;
}
.hero__actions {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.search {
  display: flex;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  overflow: hidden;
  flex: 1 1 300px;
  max-width: 480px;
}
.search__input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 17px;
  padding: 14px 16px;
  border: 0;
  outline: none;
  color: var(--c-text);
  background: transparent;
}
.search__btn {
  font: inherit;
  font-weight: 600;
  padding: 0 20px;
  border: 0;
  cursor: pointer;
  background: var(--c-bg-light);
  color: var(--c-text);
  border-left: 1px solid var(--c-border);
}
.search__btn:hover {
  background: var(--c-border);
}
.search:focus-within {
  border-color: var(--c-primary);
}

.hero__stats {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  color: var(--c-muted);
}
.hero__stats strong {
  color: var(--c-text);
  font-size: 22px;
  margin-right: 4px;
}

.hero__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 560px;
  object-fit: cover;
  border-radius: 24px;
}

@media (min-width: 480px) {
  .hero__actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
  }
}
@media (min-width: 1200px) {
  .hero {
    grid-template-columns: 1.2fr 1fr;
    gap: 64px;
    align-items: center;
  }
}

/* ===== Сетки ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
@media (min-width: 768px) {
  .grid {
    gap: 24px;
  }
}

/* ===== Шаги ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  counter-reset: none;
}
.step {
  position: relative;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--c-bg-light);
}
.step__num {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 40px;
  font-weight: 800;
  color: var(--c-border);
}
.step__title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}
.step__text {
  color: var(--c-muted);
  max-width: 70ch;
}

/* ===== Доверие ===== */
.trust-item {
  padding: 24px;
  border-left: 4px solid var(--c-accent);
  background: var(--c-bg-light);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.trust-item__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.trust-item__text {
  color: var(--c-muted);
}

/* ===== SEO-текст ===== */
.prose {
  max-width: 70ch;
}
.prose p {
  margin-bottom: 1em;
  font-size: 17px;
  line-height: 1.7;
}
.prose p:last-child {
  margin-bottom: 0;
}

/* ===== FAQ ===== */
.faq {
  max-width: 70ch;
}
.faq-item {
  border-bottom: 1px solid var(--c-border);
}
.faq-item__q {
  font-size: inherit;
  font-weight: inherit;
}
.faq-item__btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  text-align: left;
  color: var(--c-text);
  background: none;
  border: 0;
  cursor: pointer;
}
.faq-item__btn::after {
  content: "+";
  flex-shrink: 0;
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  color: var(--c-primary);
}
.faq-item__btn[aria-expanded="true"]::after {
  content: "−";
}
.faq-item__a {
  padding: 0 0 20px;
  color: var(--c-muted);
}

/* ===== Рекламные слоты ===== */
.ad-wrap {
  padding: 16px var(--gutter);
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}
.ad-slot {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px dashed #b9bfca;
  border-radius: 6px;
  background: repeating-linear-gradient(
    45deg,
    #f1f2f4 0 12px,
    #e9ebee 12px 24px
  );
}
.ad-slot > a,
.ad-slot > img,
.ad-slot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ad-label {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  background: rgba(30, 33, 40, 0.75);
  border-radius: 4px;
  pointer-events: none;
}
.ad-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  color: var(--c-ph-text);
  font-size: 14px;
}
.ad-more {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--c-muted);
}

/* Фиксированные высоты — защита от сдвига макета (CLS) */
.ad-slot--inline {
  height: 120px;
}
.ad-slot--bottom {
  height: 250px;
}
.ad-slot--native {
  min-height: 0;
  height: auto;
}

@media (min-width: 768px) {
  .ad-slot--inline {
    height: 160px;
  }
  .ad-slot--bottom {
    height: 250px;
    max-width: 970px;
    margin: 0 auto;
  }
  .ad-wrap--bottom .ad-more {
    display: block;
    max-width: 970px;
    margin: 6px auto 0;
  }
}

/* Нативный блок — оформлен как карточка, но с явной пометкой */
.ad-wrap--native {
  background: var(--c-bg-light);
}
.ad-native {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 16px;
  height: 300px;
  background: #fff;
}
.ad-native__media {
  height: 140px;
}
.ad-native__title {
  font-size: 18px;
  font-weight: 700;
}
.ad-native__text {
  color: var(--c-muted);
  margin-top: 6px;
}
.ad-native__advertiser {
  margin-top: 8px;
  font-size: 12px;
  color: var(--c-ph-text);
}

@media (min-width: 480px) {
  .ad-native {
    grid-template-columns: 180px 1fr;
    height: 180px;
  }
  .ad-native__media {
    height: 100%;
  }
}

/* ===== Подвал ===== */
.site-footer {
  background: var(--c-footer);
  color: var(--c-footer-text);
  padding: 48px var(--gutter) 32px;
}
.site-footer__top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #2b3039;
}
.site-footer__brand p {
  margin-top: 12px;
  max-width: 40ch;
}
.site-footer__heading {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  margin-bottom: 12px;
}
.site-footer__nav li + li {
  margin-top: 8px;
}
.site-footer a:not(.logo) {
  color: var(--c-footer-text);
  text-decoration: none;
}
.site-footer a:not(.logo):hover {
  color: #fff;
  text-decoration: underline;
}
.site-footer__disclosure {
  margin-top: 24px;
  font-size: 14px;
  max-width: 70ch;
}
.site-footer__copy {
  margin-top: 12px;
  font-size: 14px;
  color: #8a909b;
}

/* ===== Кнопки: доп. варианты ===== */
.btn--outline {
  padding: 12px 18px;
  background: #fff;
  color: var(--c-primary);
  border: 1px solid var(--c-primary);
  font-weight: 600;
}
.btn--outline:hover {
  background: var(--c-primary);
  color: #fff;
}
.btn--block {
  display: flex;
  width: 100%;
}

/* ===== Общая карточка ===== */
.profession-card,
.course-card,
.school-card,
.post-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 16px;
  overflow: hidden;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.profession-card:hover,
.course-card:hover,
.school-card:hover,
.post-card:hover {
  border-color: #c3cbe0;
  box-shadow: 0 8px 24px rgba(20, 40, 90, 0.08);
}

/* ===== Карточка профессии ===== */
.profession-card__img,
.course-card__img,
.post-card__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--c-ph);
}
.profession-card__body,
.course-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  padding: 16px 20px 20px;
}
.profession-card__name {
  font-size: 20px;
  font-weight: 700;
}
.profession-card__count {
  color: var(--c-muted);
  font-size: 15px;
}
.profession-card__price {
  margin-top: auto;
  padding-top: 10px;
  font-size: 20px;
  font-weight: 800;
}
.profession-card__total {
  color: var(--c-muted);
  font-size: 15px;
}
.profession-card__btn {
  margin-top: 14px;
}

/* ===== Карточка курса ===== */
.course-card__school {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}
.course-card__logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}
.course-card__rating {
  font-size: 14px;
}
.course-card__stars::after {
  content: " ★";
  color: #f5a524;
}
.course-card__reviews {
  color: var(--c-muted);
}
.course-card__title {
  font-size: 18px;
  font-weight: 700;
  margin-top: 4px;
  min-height: 2.4em;
}
.course-card__meta {
  color: var(--c-muted);
  font-size: 14px;
}
.course-card__prices {
  margin-top: auto;
  padding: 12px 0 14px;
  font-weight: 700;
}
.course-card__month {
  font-size: 17px;
}
.course-card__total {
  font-size: 17px;
  margin-top: 4px;
}
.course-card__prices s {
  margin-left: 6px;
  font-weight: 400;
  color: #9aa1ad;
}

/* ===== Карточка школы ===== */
.school-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.school-card {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 20px;
}
.school-card__logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  flex-shrink: 0;
}
.school-card__body {
  flex: 1;
  min-width: 0;
}
.school-card__name {
  font-size: 20px;
  font-weight: 700;
}
.school-card__rating {
  font-size: 14px;
  margin-top: 2px;
}
.school-card__rating::before {
  content: "★ ";
  color: #f5a524;
}
.school-card__count {
  color: var(--c-muted);
  font-size: 14px;
  margin-top: 2px;
}
.school-card__btn {
  width: 100%;
}

/* ===== Шаги (без иконок) ===== */
.step {
  background: #fff;
  border: 1px solid var(--c-border);
}
.step__num {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 50%;
  font-size: 20px;
  color: #fff;
  background: var(--c-primary);
}

/* ===== Блог ===== */
.blog-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.post-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.post-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding: 16px 20px 20px;
}
.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--c-muted);
}
.post-card__tag {
  padding: 2px 10px;
  border-radius: 999px;
  background: #e8efff;
  color: var(--c-primary-dark);
  font-weight: 600;
}
.post-card__title {
  font-size: 19px;
  font-weight: 700;
}
.post-card__excerpt {
  color: var(--c-muted);
  font-size: 15px;
}
.post-card__more {
  margin-top: auto;
  padding-top: 6px;
  font-weight: 600;
  color: var(--c-primary);
}

/* ===== Виджет подбора курса ===== */
.section--picker {
  background: var(--c-primary);
}
.picker {
  display: grid;
  gap: 28px;
  color: #fff;
}
.picker__title {
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 800;
}
.picker__subtitle {
  margin-top: 10px;
  max-width: 50ch;
  color: #dbe5ff;
  font-size: 17px;
}
.picker__form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  padding: 24px;
  background: #fff;
  color: var(--c-text);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(10, 30, 90, 0.25);
}
.picker__field {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.picker__label {
  display: block;
  margin-bottom: 8px;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-muted);
}
.picker__label output {
  color: var(--c-text);
  font-weight: 700;
}
.picker__select {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--c-text);
  background: var(--c-bg-light);
  border: 1px solid var(--c-border);
  border-radius: 10px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip input,
.check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.chip span {
  display: inline-block;
  padding: 9px 14px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: var(--c-bg-light);
  font-size: 15px;
  cursor: pointer;
}
.chip input:checked + span {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}
.chip input:focus-visible + span,
.check input:focus-visible + span {
  outline: 3px solid var(--c-primary);
  outline-offset: 2px;
}
.picker__range {
  width: 100%;
  accent-color: var(--c-primary);
}
.picker__range-scale {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--c-muted);
}
.picker__field--checks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}
.check {
  position: relative;
  cursor: pointer;
}
.check span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.check span::before {
  content: "";
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border: 2px solid #b9c1cf;
  border-radius: 6px;
  background: #fff;
}
.check input:checked + span::before {
  border-color: var(--c-primary);
  background: var(--c-primary)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-width='2.5' d='M3 8.5l3.2 3L13 4.5'/%3E%3C/svg%3E")
    center / 14px no-repeat;
}
.picker__submit {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
}
.picker__note {
  text-align: center;
  font-size: 14px;
  color: var(--c-muted);
}

@media (min-width: 1200px) {
  .picker {
    grid-template-columns: 320px 1fr;
    align-items: center;
    gap: 48px;
  }
}

/* ============================================================
   ЛИСТИНГИ: /courses/ и /professions/
   ============================================================ */

/* ===== Шапка листинга ===== */
.page-head {
  padding: 20px var(--gutter) 24px;
  background: var(--c-bg-light);
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 14px;
  color: var(--c-muted);
}
.breadcrumbs li + li::before {
  content: "/";
  margin-right: 4px;
  color: #a3a9b4;
}
.breadcrumbs a {
  color: var(--c-muted);
}
.breadcrumbs a:hover {
  color: var(--c-primary);
}
.page-head__title {
  margin-top: 12px;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.page-head__subtitle {
  margin-top: 8px;
  font-size: 18px;
  color: var(--c-muted);
}
.main-nav a[aria-current="page"] {
  color: var(--c-primary);
}

/* ===== Лидерборд ===== */
.ad-slot--leaderboard {
  height: 100px;
}
@media (min-width: 768px) {
  .ad-slot--leaderboard {
    height: 90px;
    max-width: 970px;
    margin: 0 auto;
  }
  .ad-wrap--leaderboard .ad-more {
    display: block;
    max-width: 970px;
    margin: 6px auto 0;
  }
}

/* ===== Двухколоночная область ===== */
.catalog {
  max-width: calc(1600px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 24px var(--gutter) 64px;
}
.catalog-main {
  min-width: 0;
}
@media (min-width: 768px) {
  .catalog {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
  }
  .catalog--narrow {
    grid-template-columns: 240px minmax(0, 1fr);
  }
}

/* ===== Сайдбар ===== */
.filters-head,
.filters-open {
  display: none;
}
@media (min-width: 768px) {
  .catalog-sidebar {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    padding-right: 4px;
  }
}

/* Мобильный: сайдбар — полноэкранная панель */
@media (max-width: 767.98px) {
  .catalog-sidebar {
    display: none;
  }
  .catalog-sidebar:target,
  .catalog-sidebar.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: #fff;
    overflow: hidden;
  }
  .filters-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    padding: 12px var(--gutter);
    border-bottom: 1px solid var(--c-border);
  }
  .filters-head__title {
    font-size: 20px;
    font-weight: 700;
  }
  .filters-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 30px;
    line-height: 1;
    color: var(--c-text);
    text-decoration: none;
  }
  .filters {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 8px var(--gutter) 0;
  }
  .filters-actions {
    position: sticky;
    bottom: 0;
    margin: 0;
    padding: 12px 0 16px;
    background: #fff;
    border-top: 1px solid var(--c-border);
    box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.06);
  }
  .ad-wrap--sidebar {
    display: none;
  }
  .filters-open {
    display: inline-flex;
    gap: 8px;
  }
  body.filters-locked {
    overflow: hidden;
  }
}

/* ===== Фильтры ===== */
.filters {
  font-size: 15px;
}
.active-filters {
  padding: 12px 0 16px;
  border-bottom: 1px solid var(--c-border);
}
.active-filters__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-muted);
  margin-bottom: 8px;
}
.active-filters__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e8efff;
  color: var(--c-primary-dark);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.filter-chip:hover {
  background: #d3e0ff;
}
.filter-chip span[aria-hidden] {
  font-size: 16px;
  line-height: 1;
}

.filter-group {
  border-bottom: 1px solid var(--c-border);
  padding: 4px 0;
}
.filter-group--static {
  padding: 14px 0;
}
.filter-group__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  list-style: none;
}
.filter-group--static .filter-group__title {
  display: block;
  padding: 0 0 10px;
  cursor: default;
}
.filter-group__title::-webkit-details-marker {
  display: none;
}
details.filter-group > .filter-group__title::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--c-muted);
  border-bottom: 2px solid var(--c-muted);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.15s;
}
details.filter-group[open] > .filter-group__title::after {
  transform: rotate(-135deg) translateY(-1px);
}
.filter-group__body {
  padding-bottom: 12px;
}
.filter-group__body--scroll {
  max-height: 240px;
  overflow-y: auto;
  padding-right: 6px;
}

.opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  cursor: pointer;
}
.opt input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--c-primary);
  cursor: pointer;
}
.opt__text {
  flex: 1;
}
.opt__count {
  font-size: 13px;
  color: var(--c-muted);
}

.filter-more__toggle {
  display: inline-block;
  padding: 6px 0;
  color: var(--c-primary);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.filter-more__toggle::-webkit-details-marker {
  display: none;
}
.filter-more__toggle::after {
  content: " ▼";
  font-size: 11px;
}
.filter-more[open] > .filter-more__toggle {
  display: none;
}

.price-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.price-range__field {
  position: relative;
  display: block;
}
.price-range__label {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--c-muted);
  pointer-events: none;
}
.price-range__unit {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--c-muted);
  pointer-events: none;
}
.price-range input,
.filter-input {
  width: 100%;
  padding: 10px 24px 10px 30px;
  font: inherit;
  font-size: 15px;
  color: var(--c-text);
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  -moz-appearance: textfield;
}
.filter-input {
  padding: 10px 12px;
}
.price-range input::-webkit-outer-spin-button,
.price-range input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.price-range input:focus,
.filter-input:focus {
  outline: none;
  border-color: var(--c-primary);
}
.filter-hint {
  margin-top: 8px;
  font-size: 13px;
  color: var(--c-muted);
}

.filters-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 0;
}
.filters-actions .btn {
  padding: 12px 18px;
}
.filters-reset {
  text-align: center;
  font-size: 15px;
  color: var(--c-muted);
  padding: 6px 0;
}
.filters-reset:hover {
  color: var(--c-primary);
}

.ad-wrap--sidebar {
  padding: 8px 0 0;
  border: 0;
  background: none;
}
.ad-slot--sidebar {
  width: 100%;
  max-width: 300px;
  height: 250px;
}

/* ===== Панель над сеткой ===== */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 20px;
}
.toolbar__count {
  font-size: 22px;
  font-weight: 800;
  flex: 1 1 100%;
}
.filters-open__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--c-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.filters-open:hover .filters-open__badge {
  background: #fff;
  color: var(--c-primary);
}
.sort {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sort__label {
  font-size: 14px;
  color: var(--c-muted);
}
.sort__select {
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
  color: var(--c-text);
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 8px;
}
.sort__apply {
  padding: 9px 14px;
}
@media (min-width: 768px) {
  .toolbar__count {
    flex: 0 1 auto;
    font-size: 24px;
  }
}

/* ===== Сетка карточек ===== */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
@media (min-width: 1200px) {
  .catalog-grid {
    gap: 24px;
  }
}
.catalog-grid--wide {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ===== Карточка курса в каталоге ===== */
.catalog-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.catalog-card:hover {
  border-color: var(--c-primary);
  box-shadow: 0 8px 24px rgba(20, 40, 90, 0.08);
}
.catalog-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.catalog-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  padding: 14px 16px 16px;
}
.catalog-card__title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  min-height: 2.6em;
}
.catalog-card__school,
.catalog-card__duration {
  font-size: 14px;
  color: var(--c-muted);
}
.catalog-card__price {
  margin-top: auto;
  padding-top: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--c-text);
}

/* Превью: оба состояния одного размера */
.card-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--c-ph);
  color: var(--c-ph-text);
}
.card-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  user-select: none;
}
.card-thumb--tone-1 { background: #e3ecff; color: #3b5fc4; }
.card-thumb--tone-2 { background: #e2f5ec; color: #1f8a5b; }
.card-thumb--tone-3 { background: #fdeee0; color: #c26a1b; }
.card-thumb--tone-4 { background: #f1e8fd; color: #7a46c9; }
.card-thumb--tone-5 { background: #fde6ea; color: #c23d58; }
.card-thumb--tone-6 { background: #e2f3f6; color: #1d7f91; }

/* ===== Нативная реклама — ячейка сетки ===== */
.ad-wrap--card {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 0;
  background: none;
}
.ad-slot--card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 300px;
  border-radius: 14px;
  background: #fff;
}
.card-thumb--ad {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: repeating-linear-gradient(45deg, #f1f2f4 0 12px, #e9ebee 12px 24px);
}
.ad-card__advertiser {
  margin-top: auto;
  padding-top: 8px;
  font-size: 12px;
  color: var(--c-muted);
}

/* ===== Пагинация ===== */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}
.pagination__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pagination__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  background: #fff;
  color: var(--c-text);
  font-weight: 600;
  text-decoration: none;
}
a.pagination__link:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}
.pagination__link.is-current {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}
.pagination__link--disabled {
  color: #a3a9b4;
  background: var(--c-bg-light);
}
.pagination__gap {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 4px;
  color: var(--c-muted);
}
@media (max-width: 479.98px) {
  .pagination__link--nav {
    font-size: 0;
    padding: 0;
  }
  .pagination__link--nav::before {
    font-size: 18px;
  }
  .pagination__link--nav:first-child::before {
    content: "←";
  }
  .pagination__link--nav:last-child::before {
    content: "→";
  }
}

/* ===== Карточка профессии в каталоге ===== */
.prof-tile {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.prof-tile:hover {
  border-color: var(--c-primary);
  box-shadow: 0 8px 24px rgba(20, 40, 90, 0.08);
}
.prof-tile__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px;
  color: inherit;
  text-decoration: none;
}
.prof-tile__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  border-radius: 16px;
  font-size: 30px;
  font-weight: 800;
}
.prof-tile__icon--tone-1 { background: #e3ecff; color: #3b5fc4; }
.prof-tile__icon--tone-2 { background: #e2f5ec; color: #1f8a5b; }
.prof-tile__icon--tone-3 { background: #fdeee0; color: #c26a1b; }
.prof-tile__icon--tone-4 { background: #f1e8fd; color: #7a46c9; }
.prof-tile__icon--tone-5 { background: #fde6ea; color: #c23d58; }
.prof-tile__icon--tone-6 { background: #e2f3f6; color: #1d7f91; }
.prof-tile__name {
  font-size: 22px;
  font-weight: 800;
}
.prof-tile__area {
  margin-top: 4px;
  font-size: 14px;
  color: var(--c-muted);
}
.prof-tile__facts {
  display: grid;
  gap: 8px;
  margin: 20px 0;
  padding: 16px 0;
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}
.prof-tile__facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.prof-tile__facts dt {
  color: var(--c-muted);
}
.prof-tile__facts dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}
.prof-tile__more {
  margin-top: auto;
  font-weight: 700;
  color: var(--c-primary);
}

/* ===== Колонки ссылок (перелинковка) ===== */
.link-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px 40px;
  padding: 40px var(--gutter) 48px;
  border-top: 1px solid var(--c-border);
}
.link-columns__title {
  margin-bottom: 14px;
  font-size: 16px;
  font-weight: 700;
}
.link-columns__list li + li {
  margin-top: 6px;
}
.link-columns__list a {
  font-size: 15px;
  color: var(--c-muted);
  text-decoration: none;
}
.link-columns__list a:hover {
  color: var(--c-primary);
  text-decoration: underline;
}
.link-columns__all {
  display: inline-block;
  margin-top: 8px;
  font-size: 15px;
  color: var(--c-primary);
  text-decoration: none;
}
.link-columns__all:hover {
  text-decoration: underline;
}

/* ===== SEO-текст на всю ширину ===== */
.prose--wide {
  max-width: none;
}
@media (min-width: 1200px) {
  .prose--wide {
    column-count: 2;
    column-gap: 56px;
  }
  .prose--wide p {
    break-inside: avoid;
  }
}

/* ===== FAQ на всю ширину, стиль «список с шевроном» ===== */
.faq--wide {
  max-width: none;
  border-top: 1px solid var(--c-border);
}
.faq--wide .faq-item__btn {
  justify-content: flex-start;
  padding: 16px 0;
  font-size: 17px;
}
.faq--wide .faq-item__btn > span[itemprop] {
  flex: 1;
}
.faq-item__icon {
  flex-shrink: 0;
  width: 24px;
  font-size: 18px;
  line-height: 1;
}
.faq--wide .faq-item__btn::after {
  content: "";
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-right: 2px solid #8a909b;
  border-bottom: 2px solid #8a909b;
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.15s;
}
.faq--wide .faq-item__btn[aria-expanded="true"]::after {
  content: "";
  transform: rotate(-135deg) translateY(-2px);
}
.faq--wide .faq-item__a {
  padding: 0 0 18px 34px;
}
.faq--wide .faq-item__a p {
  max-width: 90ch;
}

/* ============================================================
   ШКОЛЫ: /schools/ и /schools/<slug>/
   ============================================================ */

/* ===== Карточка школы в каталоге ===== */
.school-tile {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.school-tile:hover {
  border-color: var(--c-primary);
  box-shadow: 0 8px 24px rgba(20, 40, 90, 0.08);
}
.school-tile__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px;
  color: inherit;
  text-decoration: none;
}
.school-tile__top {
  display: flex;
  align-items: center;
  gap: 16px;
}
.school-tile__logo {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 16px;
  object-fit: cover;
}
.school-tile__name {
  font-size: 22px;
  font-weight: 800;
}
.school-tile__rating {
  margin-top: 2px;
  font-size: 14px;
  color: var(--c-muted);
}
.school-tile__stars,
.school-hero__stars,
.review__rating {
  font-weight: 700;
  color: var(--c-text);
}
.school-tile__stars::before,
.school-hero__stars::before,
.review__rating::before {
  content: "★ ";
  color: #f5a524;
}
.school-tile__areas {
  margin-top: 14px;
  font-size: 15px;
  color: var(--c-muted);
}

/* ===== Шапка страницы школы ===== */
.school-hero {
  padding-bottom: 32px;
}
.school-hero__main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px 20px;
  align-items: start;
  margin-top: 16px;
}
.school-hero__logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  background: #fff;
}
.school-hero__title {
  margin-top: 0;
}
.school-hero__rating {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 6px;
  font-size: 16px;
}
.school-hero__reviews {
  color: var(--c-muted);
}
.school-hero__desc {
  margin-top: 12px;
  max-width: 70ch;
  color: var(--c-muted);
  font-size: 17px;
}
.school-hero__cta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.school-hero__cta .btn {
  flex: 1 1 220px;
}
.school-hero__info {
  display: contents;
}
.school-hero__title,
.school-hero__rating {
  grid-column: 2;
}
.school-hero__desc {
  grid-column: 1 / -1;
}
.school-hero__logo {
  grid-row: span 2;
}
.school-hero__cta .btn--outline {
  padding: 16px 24px;
}
@media (min-width: 768px) {
  .school-hero__logo {
    width: 96px;
    height: 96px;
    border-radius: 22px;
  }
  .school-hero__info {
    display: block;
  }
  .school-hero__logo {
    grid-row: auto;
  }
  .school-hero__cta .btn {
    flex: 0 1 auto;
  }
}
@media (min-width: 1200px) {
  .school-hero__main {
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }
  .school-hero__cta {
    grid-column: auto;
    flex-direction: column;
    align-items: stretch;
  }
}

.school-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 24px 0 0;
}
.school-facts div {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 12px;
}
.school-facts dt {
  font-size: 13px;
  color: var(--c-muted);
}
.school-facts dd {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 700;
}

/* ===== Вкладки-якоря ===== */
.page-tabs {
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--c-border);
  overflow-x: auto;
}
.page-tabs ul {
  display: flex;
  gap: 4px;
  padding: 0 var(--gutter);
}
.page-tabs a {
  display: block;
  padding: 14px 14px;
  white-space: nowrap;
  font-weight: 600;
  color: var(--c-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.page-tabs a:hover {
  color: var(--c-primary);
  border-bottom-color: var(--c-primary);
}
#school-courses,
#school-about,
#school-reviews,
#school-faq {
  scroll-margin-top: calc(var(--header-h) + 56px);
}
@media (min-width: 768px) {
  .page-tabs + .catalog .catalog-sidebar {
    top: calc(var(--header-h) + 64px);
    max-height: calc(100vh - var(--header-h) - 80px);
  }
}

/* ===== Карточка курса школы: доп. поля ===== */
.catalog-card__kind {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-primary);
}
.catalog-card__month {
  margin-top: auto;
  padding-top: 10px;
  font-size: 15px;
  font-weight: 600;
}
.catalog-card__month--none {
  color: var(--c-muted);
  font-weight: 400;
}
.catalog-card__month + .catalog-card__price {
  margin-top: 0;
  padding-top: 2px;
}
.catalog-card__price s {
  margin-left: 6px;
  font-size: 15px;
  font-weight: 400;
  color: #9aa1ad;
}

/* ===== О школе ===== */
.school-about {
  display: grid;
  gap: 32px;
}
.school-about .prose--wide {
  column-count: 1;
}
.school-details {
  margin: 0;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 16px;
}
.school-details div {
  padding: 10px 0;
  border-bottom: 1px solid var(--c-border);
}
.school-details div:last-child {
  border-bottom: 0;
}
.school-details dt {
  font-size: 13px;
  color: var(--c-muted);
}
.school-details dd {
  margin: 2px 0 0;
  font-weight: 600;
}
@media (min-width: 1200px) {
  .school-about {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 56px;
    align-items: start;
  }
}

/* ===== Отзывы ===== */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 28px;
}
.section-head .section__title {
  margin-bottom: 0;
}
.section-head__meta {
  color: var(--c-muted);
}
.section-head__meta strong {
  color: var(--c-text);
}
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.review {
  display: flex;
  flex-direction: column;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 16px;
}
.review__head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.review__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #e3ecff;
  color: #3b5fc4;
  font-weight: 800;
  font-size: 18px;
}
.review__author {
  font-weight: 700;
}
.review__course {
  font-size: 14px;
  color: var(--c-muted);
}
.review__rating {
  margin-left: auto;
  font-size: 16px;
}
.review__body {
  margin: 16px 0 0;
}
.review__body div + div {
  margin-top: 12px;
}
.review__body dt {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-accent);
}
.review__body div + div dt {
  color: #c23d58;
}
.review__body dd {
  margin: 4px 0 0;
  font-size: 15px;
}
.review__date {
  margin-top: auto;
  padding-top: 14px;
  font-size: 13px;
  color: var(--c-muted);
}

/* ============================================================
   ПРОФЕССИЯ /professions/<slug>/ и КУРС /courses/<school>/<course>/
   ============================================================ */

.catalog-card__school--logo {
  display: flex;
  align-items: center;
  gap: 6px;
}
.catalog-card__school--logo img {
  width: 20px;
  height: 20px;
  border-radius: 5px;
}

/* ===== Шапка профессии ===== */
.prof-hero {
  padding-bottom: 32px;
}
.prof-hero__main {
  display: grid;
  gap: 24px;
  margin-top: 12px;
}
.prof-hero__area {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-primary);
}
.prof-hero__lead {
  margin-top: 12px;
  max-width: 70ch;
  font-size: 18px;
  color: var(--c-muted);
}
.prof-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.prof-hero__actions .btn--outline {
  padding: 16px 24px;
}
.prof-hero__facts {
  margin: 0;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 1200px) {
  .prof-hero__main {
    grid-template-columns: minmax(0, 1fr) 440px;
    gap: 56px;
    align-items: center;
  }
}

/* ===== Навыки ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.skill {
  padding: 24px;
  border: 1px solid var(--c-border);
  border-radius: 16px;
  background: #fff;
}
.skill__num {
  font-size: 14px;
  font-weight: 800;
  color: var(--c-primary);
}
.skill__title {
  margin-top: 8px;
  font-size: 19px;
  font-weight: 700;
}
.skill__text {
  margin-top: 8px;
  color: var(--c-muted);
}

/* ===== Шапка курса ===== */
.course-hero {
  padding-bottom: 40px;
}
.course-hero__grid {
  display: grid;
  gap: 28px;
  margin-top: 16px;
}
.course-hero__school {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: #fff;
  color: var(--c-text);
  font-weight: 600;
  text-decoration: none;
}
.course-hero__school:hover {
  border-color: var(--c-primary);
}
.course-hero__school img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
.course-hero__school-rating {
  font-size: 14px;
  color: var(--c-muted);
}
.course-hero__school-rating::before {
  content: "★ ";
  color: #f5a524;
}
.course-hero__title {
  margin-top: 14px;
}
.course-hero__lead {
  margin-top: 12px;
  max-width: 70ch;
  font-size: 18px;
  color: var(--c-muted);
}
.course-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.course-tags li {
  padding: 5px 12px;
  border-radius: 999px;
  background: #e8efff;
  color: var(--c-primary-dark);
  font-size: 14px;
  font-weight: 600;
}
.course-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  margin: 24px 0 0;
}
.course-facts div {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 12px;
}
.course-facts dt {
  font-size: 13px;
  color: var(--c-muted);
}
.course-facts dd {
  margin: 4px 0 0;
  font-size: 17px;
  font-weight: 700;
}

/* ===== Блок цены ===== */
.price-box {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(20, 40, 90, 0.08);
}
.price-box__label {
  font-size: 14px;
  color: var(--c-muted);
}
.price-box__price {
  margin-top: 4px;
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
}
.price-box__old {
  margin-top: 6px;
  color: #9aa1ad;
}
.price-box__discount {
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #e2f5ec;
  color: #1f8a5b;
  font-weight: 700;
  font-size: 14px;
}
.price-box__month {
  margin: 12px 0 20px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--c-bg-light);
}
.price-box .btn + .btn {
  margin-top: 10px;
}
.price-box .btn--outline {
  padding: 14px 18px;
}
.price-box__notes {
  margin-top: 18px;
  font-size: 14px;
  color: var(--c-muted);
}
.price-box__notes li {
  position: relative;
  padding-left: 22px;
}
.price-box__notes li + li {
  margin-top: 6px;
}
.price-box__notes li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--c-accent);
  font-weight: 700;
}
.price-box__checked {
  margin-top: 14px;
  font-size: 12px;
  color: #8a909b;
}
@media (min-width: 1200px) {
  .course-hero__grid {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 56px;
    align-items: start;
  }
  .price-box {
    position: sticky;
    top: calc(var(--header-h) + 72px);
  }
}

/* ===== УТП ===== */
.usp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.usp {
  padding: 24px;
  border-radius: 16px;
  background: var(--c-bg-light);
}
.usp__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #fff;
  font-size: 26px;
}
.usp__title {
  margin-top: 14px;
  font-size: 19px;
  font-weight: 700;
}
.usp__text {
  margin-top: 8px;
  color: var(--c-muted);
}

/* ===== Программа ===== */
.modules {
  display: grid;
  gap: 10px;
}
.module details {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 14px;
}
.module__head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
}
.module__head::-webkit-details-marker {
  display: none;
}
.module__head::after {
  content: "";
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-right: 2px solid #8a909b;
  border-bottom: 2px solid #8a909b;
  transform: rotate(45deg) translateY(-3px);
}
.module details[open] .module__head::after {
  transform: rotate(-135deg) translateY(-2px);
}
.module__num {
  font-weight: 800;
  color: var(--c-primary);
}
.module__title {
  flex: 1;
  font-size: 17px;
  font-weight: 700;
}
.module__dur {
  font-size: 14px;
  color: var(--c-muted);
  white-space: nowrap;
}
.module__text {
  padding: 0 20px 18px 54px;
  color: var(--c-muted);
  max-width: 90ch;
}
@media (max-width: 479.98px) {
  .module__dur {
    display: none;
  }
}

/* ===== CTA-полоса ===== */
.course-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding: 32px var(--gutter);
  background: var(--c-primary);
  color: #fff;
}
.course-cta__title {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 800;
}
.course-cta__title span {
  font-weight: 400;
  opacity: 0.8;
}
.course-cta__sub {
  margin-top: 4px;
  color: #dbe5ff;
}
.btn--light {
  background: #fff;
  color: var(--c-primary-dark);
}
.btn--light:hover {
  background: #e8efff;
  color: var(--c-primary-dark);
}

/* ===== О школе на странице курса ===== */
.course-school {
  padding: 24px;
  border: 1px solid var(--c-border);
  border-radius: 16px;
}
.course-school__head {
  display: flex;
  align-items: center;
  gap: 16px;
}
.course-school__logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
}
.course-school__name {
  font-size: 22px;
  font-weight: 800;
}
.course-school__text {
  margin-top: 16px;
  max-width: 70ch;
  color: var(--c-muted);
}
.course-school__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.course-school__actions .btn {
  padding: 12px 20px;
}
#course-school .school-details {
  background: var(--c-bg-light);
}

.catalog-grid--similar {
  max-width: 1600px;
}
#course-usp,
#course-program,
#course-school,
#course-similar,
#course-faq,
#prof-courses,
#prof-about,
#prof-skills,
#prof-faq {
  scroll-margin-top: calc(var(--header-h) + 56px);
}

/* ===== Липкая кнопка на мобильном ===== */
.sticky-cta {
  display: none;
}
@media (max-width: 1199.98px) {
  .sticky-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: sticky;
    bottom: 0;
    z-index: 90;
    padding: 10px var(--gutter);
    background: #fff;
    border-top: 1px solid var(--c-border);
    box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.06);
  }
  .sticky-cta__price {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
  }
  .sticky-cta__price span {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: var(--c-muted);
  }
  .sticky-cta .btn {
    padding: 12px 18px;
    white-space: nowrap;
  }
}

/* ============================================================
   СРАВНЕНИЕ КУРСОВ /compare/
   ============================================================ */

.cmp-add {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 20px;
}
.cmp-add__label {
  font-weight: 600;
}
.cmp-add__select {
  flex: 1 1 260px;
  max-width: 420px;
}
.cmp-add .btn--outline {
  padding: 10px 18px;
}
.cmp-add__diff {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  cursor: pointer;
}
.cmp-add__diff input {
  width: 18px;
  height: 18px;
  accent-color: var(--c-primary);
}

/* ===== Итоги ===== */
.cmp-picks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.cmp-pick {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--c-border);
  border-radius: 16px;
  background: #fff;
}
.cmp-pick__tag {
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  background: #e2f5ec;
  color: #1f8a5b;
  font-size: 14px;
  font-weight: 700;
}
.cmp-pick__name {
  margin-top: 14px;
  font-size: 20px;
  font-weight: 800;
}
.cmp-pick__school {
  font-size: 14px;
  color: var(--c-muted);
}
.cmp-pick__text {
  margin: 10px 0 18px;
  color: var(--c-muted);
}
.cmp-pick .btn {
  margin-top: auto;
  padding: 12px 18px;
}

/* ===== Таблица ===== */
.cmp-legend {
  margin: -12px 0 20px;
  font-size: 14px;
  color: var(--c-muted);
}
.cmp-scroll {
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: 16px;
  background: #fff;
}
.cmp-scroll:focus-visible {
  outline: 3px solid var(--c-primary);
}
.cmp-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
}
.cmp-table th,
.cmp-table td {
  padding: 14px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--c-border);
}
.cmp-table tbody th[scope="row"],
.cmp-table tfoot th,
.cmp-corner {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 220px;
  min-width: 160px;
  background: #fff;
  color: var(--c-muted);
  font-weight: 500;
  box-shadow: 1px 0 0 var(--c-border);
}
.cmp-corner {
  z-index: 3;
  vertical-align: bottom;
  font-size: 14px;
}
.cmp-col {
  min-width: 220px;
  font-weight: 400;
}
.cmp-table td + td,
.cmp-table th + td,
.cmp-col + .cmp-col {
  border-left: 1px solid var(--c-border);
}

.cmp-head {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cmp-head__remove {
  position: absolute;
  top: -6px;
  right: -8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #8a909b;
  font-size: 22px;
  text-decoration: none;
}
.cmp-head__remove:hover {
  background: var(--c-bg-light);
  color: var(--c-text);
}
.cmp-head__school {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-right: 28px;
  font-size: 14px;
  color: var(--c-muted);
  text-decoration: none;
}
.cmp-head__school img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}
.cmp-head__rating::before {
  content: "★ ";
  color: #f5a524;
}
.cmp-head__name {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--c-text);
  text-decoration: none;
}
.cmp-head__name:hover {
  color: var(--c-primary);
}
.cmp-head__price {
  margin-bottom: 6px;
  font-size: 20px;
  font-weight: 800;
}
.cmp-head__price s,
.cmp-table s {
  font-size: 14px;
  font-weight: 400;
  color: #9aa1ad;
}
.cmp-head .btn {
  padding: 11px 16px;
}

.cmp-group__head th {
  padding-top: 22px;
  background: var(--c-bg-light);
  color: var(--c-text);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cmp-group__head th[scope="rowgroup"] {
  position: sticky;
  left: 0;
}
.cmp-sub {
  font-size: 13px;
  color: var(--c-muted);
}
.cmp-yes {
  color: var(--c-accent);
  font-weight: 800;
}
.cmp-no {
  color: #b9bfca;
}
.cmp-star::before {
  content: "★ ";
  color: #f5a524;
}
.cmp-table td.is-best {
  background: #f0faf5;
}
.cmp-best {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 6px;
  background: #e2f5ec;
  color: #1f8a5b;
  font-size: 12px;
  font-weight: 700;
  vertical-align: 1px;
}
.cmp-legend .cmp-best {
  margin-left: 0;
}
.cmp-table tfoot th,
.cmp-table tfoot td {
  border-bottom: 0;
  vertical-align: middle;
}
.cmp-table tfoot .btn {
  padding: 12px 16px;
}
.cmp-more {
  display: block;
  margin-top: 8px;
  text-align: center;
  font-size: 14px;
}

/* ===== Липкая панель на мобильном ===== */
.cmp-sticky {
  display: none;
}
@media (max-width: 767.98px) {
  .cmp-sticky {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    position: sticky;
    bottom: 0;
    z-index: 90;
    padding: 8px var(--gutter);
    background: #fff;
    border-top: 1px solid var(--c-border);
    box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.06);
  }
  .cmp-sticky__item {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .cmp-sticky__name {
    font-size: 12px;
    color: var(--c-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .cmp-sticky__price {
    font-size: 15px;
    font-weight: 800;
  }
  .cmp-sticky .btn {
    margin-top: 4px;
    padding: 8px 6px;
    font-size: 14px;
  }
  .cmp-add__diff {
    margin-left: 0;
  }
  .cmp-table tbody th[scope="row"],
  .cmp-table tfoot th,
  .cmp-corner {
    width: 130px;
    min-width: 130px;
    font-size: 14px;
  }
}

/* ============================================================
   БЛОГ /blog/ и СТАТЬЯ /blog/<slug>/
   ============================================================ */

/* ===== Рубрики ===== */
.blog-cats {
  margin-top: 20px;
  overflow-x: auto;
}
.blog-cats ul {
  display: flex;
  gap: 8px;
}
.blog-cats a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: #fff;
  color: var(--c-text);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}
.blog-cats a span {
  font-size: 13px;
  font-weight: 400;
  color: var(--c-muted);
}
.blog-cats a:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}
.blog-cats a[aria-current="page"] {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}
.blog-cats a[aria-current="page"] span {
  color: #dbe5ff;
}

/* ===== Главная статья ===== */
.blog-featured-wrap {
  padding-top: 32px;
  padding-bottom: 32px;
}
.post-featured {
  border: 1px solid var(--c-border);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.post-featured:hover {
  border-color: #c3cbe0;
  box-shadow: 0 8px 24px rgba(20, 40, 90, 0.08);
}
.post-featured__link {
  display: grid;
  color: inherit;
  text-decoration: none;
}
.post-featured__img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.post-featured__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
}
.post-featured__title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.2;
}
.post-featured__excerpt {
  font-size: 17px;
  color: var(--c-muted);
  max-width: 60ch;
}
.post-featured__btn {
  align-self: flex-start;
  margin-top: 8px;
  padding: 12px 22px;
}
@media (min-width: 1200px) {
  .post-featured__link {
    grid-template-columns: 1.3fr 1fr;
    align-items: center;
  }
  .post-featured__img {
    height: 100%;
    aspect-ratio: auto;
    min-height: 380px;
  }
  .post-featured__body {
    padding: 40px 48px;
  }
}

.blog-list .blog-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.blog-grid .ad-wrap--card .ad-slot--card {
  min-height: 360px;
}

/* ===== Статья: шапка ===== */
.article-head {
  padding-bottom: 28px;
}
.article-head__title {
  margin-top: 14px;
  max-width: 24ch;
  font-size: clamp(30px, 4.4vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.article-head__lead {
  margin-top: 14px;
  max-width: 65ch;
  font-size: clamp(17px, 1.5vw, 20px);
  color: var(--c-muted);
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 32px;
  margin-top: 24px;
}
.article-meta__author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.article-meta__name {
  display: block;
  font-weight: 700;
}
.article-meta__role {
  display: block;
  font-size: 14px;
  color: var(--c-muted);
}
.article-meta__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: 14px;
  color: var(--c-muted);
}

.article-cover {
  margin: 0;
  padding: 0 var(--gutter);
  background: linear-gradient(var(--c-bg-light) 50%, #fff 50%);
}
.article-cover img {
  width: 100%;
  height: auto;
  max-height: 560px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 20px;
}

/* ===== Статья: раскладка ===== */
.article-layout {
  display: grid;
  gap: 24px;
  padding: 32px var(--gutter) 56px;
}
@media (min-width: 1200px) {
  .article-layout {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 56px;
    align-items: start;
    padding-top: 48px;
  }
  .article-toc {
    position: sticky;
    top: calc(var(--header-h) + 24px);
  }
}
.article-toc__box {
  padding: 16px 20px;
  border: 1px solid var(--c-border);
  border-radius: 14px;
  background: var(--c-bg-light);
}
.article-toc__title {
  font-weight: 800;
  cursor: pointer;
}
.article-toc ol {
  margin-top: 12px;
  padding-left: 20px;
  list-style: decimal;
  font-size: 15px;
}
.article-toc li + li {
  margin-top: 8px;
}
.article-toc a {
  color: var(--c-muted);
  text-decoration: none;
}
.article-toc a:hover {
  color: var(--c-primary);
}

/* ===== Статья: типографика ===== */
.article-body {
  max-width: 72ch;
  font-size: 18px;
  line-height: 1.7;
}
.article-body > * + * {
  margin-top: 1.1em;
}
.article-body h2 {
  margin-top: 1.8em;
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 800;
  line-height: 1.25;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.article-body h3 {
  margin-top: 1.5em;
  font-size: 21px;
  font-weight: 700;
}
.article-body ul,
.article-body ol {
  padding-left: 1.4em;
}
.article-body ul {
  list-style: disc;
}
.article-body ol {
  list-style: decimal;
}
.article-body li + li {
  margin-top: 0.4em;
}
.article-body li::marker {
  color: var(--c-primary);
}
.article-body blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: 18px 24px;
  border-left: 4px solid var(--c-primary);
  border-radius: 0 12px 12px 0;
  background: #f1f5ff;
  font-size: 19px;
  font-weight: 600;
}
.article-table {
  overflow-x: auto;
}
.article-table table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 16px;
}
.article-table th,
.article-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
}
.article-table th {
  background: var(--c-bg-light);
  font-weight: 700;
}
.article-note {
  padding: 16px 20px;
  border-radius: 12px;
  background: #fff8e6;
  font-size: 16px;
}

.article-courses {
  padding: 20px;
  border: 1px solid var(--c-border);
  border-radius: 16px;
  font-size: 16px;
}
.article-courses__title {
  font-weight: 800;
  font-size: 18px;
}
.article-courses__list {
  margin: 12px 0 14px;
  padding: 0 !important;
  list-style: none !important;
}
.article-courses__list li + li {
  margin-top: 8px;
}
.article-course {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--c-bg-light);
  color: inherit;
  text-decoration: none;
  line-height: 1.35;
}
.article-course:hover {
  background: #e8efff;
}
.article-course img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.article-course__info {
  flex: 1;
  min-width: 0;
}
.article-course__name {
  display: block;
  font-weight: 700;
}
.article-course__meta {
  display: block;
  font-size: 14px;
  color: var(--c-muted);
}
.article-course__price {
  font-weight: 800;
  white-space: nowrap;
}

.ad-wrap--article {
  padding: 0;
  border: 0;
  background: none;
}
.ad-slot--article {
  height: 250px;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2em !important;
  padding: 0 !important;
  list-style: none !important;
}
.article-tags li + li {
  margin-top: 0;
}
.article-tags a {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--c-bg-light);
  color: var(--c-muted);
  font-size: 14px;
  text-decoration: none;
}
.article-tags a:hover {
  color: var(--c-primary);
}
.article-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding-top: 20px;
  border-top: 1px solid var(--c-border);
  font-size: 15px;
}
.article-share span {
  color: var(--c-muted);
}
.article-share a {
  font-weight: 600;
}

/* ============================================================
   ИНСТРУКЦИЯ /main/instruction (служебная страница)
   ============================================================ */
.ins-download {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 24px;
}
.ins-download p {
  font-size: 14px;
  color: var(--c-muted);
}
.ins-layout {
  padding-top: 40px;
}
.ins-body {
  min-width: 0;
  max-width: 920px;
  font-size: 17px;
  line-height: 1.65;
}
.ins-step {
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--c-border);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.ins-step > * + * {
  margin-top: 16px;
}
.ins-step__title {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 800;
  line-height: 1.25;
}
.ins-sub {
  margin-top: 28px !important;
  font-size: 19px;
  font-weight: 700;
}
.ins-body code {
  padding: 1px 6px;
  border-radius: 5px;
  background: #eef1f6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}
.ins-list {
  padding-left: 1.4em;
  list-style: decimal;
}
.ins-list--dots {
  list-style: disc;
}
.ins-list li + li {
  margin-top: 6px;
}
.ins-list ul {
  margin-top: 6px;
  padding-left: 1.2em;
  list-style: disc;
}
.ins-note {
  padding: 14px 18px;
  border-radius: 12px;
  background: #fff8e6;
  font-size: 16px;
}
.ins-files li {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--c-border);
}
.ins-files li > code {
  justify-self: start;
  font-weight: 700;
}
.ins-files span {
  color: var(--c-muted);
  font-size: 16px;
}
@media (min-width: 768px) {
  .ins-files li {
    grid-template-columns: 200px 1fr;
    gap: 16px;
  }
}
.ins-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.ins-card {
  padding: 16px;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.5;
}
.ins-card__tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #e8efff;
  color: var(--c-primary-dark);
  font-size: 13px;
  font-weight: 700;
}
.ins-card__tag--ok { background: #e2f5ec; color: #1f8a5b; }
.ins-card__tag--new { background: #fdeee0; color: #a85a14; }
.ins-card__tag--hide { background: #eceef2; color: #5b6270; }

.prompt {
  border-radius: 14px;
  overflow: hidden;
  background: #14171c;
}
.prompt__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 8px 16px;
  background: #1f2329;
  color: #9aa1ad;
  font-size: 13px;
}
.copy-btn {
  padding: 6px 12px;
  border: 1px solid #3a404a;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.copy-btn:hover {
  background: #2b3038;
}
.prompt__code {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  color: #e6e9ee;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* django: кнопка «Смотреть курсы» в карточке профессии всегда прижата к низу,
   независимо от того, есть ли у профессии цена (иначе карточки без цены
   оставляли кнопку вверху и кнопки «плыли»). */
.profession-card__price {
  margin-top: 0;
}
.profession-card__btn {
  margin-top: auto;
}

/* django: фото профессии в каталоге /professions/ */
.prof-tile__img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 16px;
  background: var(--c-ph);
}

/* django: блоки данных парсера на странице курса */
.course-hero__usp {
  margin-top: 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--c-primary);
}
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.skill {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 12px;
}
.skill__icon {
  flex-shrink: 0;
  margin-top: 1px;
}
.skill__text {
  font-size: 15px;
  line-height: 1.4;
}

/* django: кнопка «в сравнение» на карточках курса */
.catalog-card,
.course-card {
  position: relative;
}
.card-compare {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  color: #5b6270;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.card-compare:hover {
  color: var(--c-primary);
  border-color: var(--c-primary);
  background: #eef3ff;
}

/* django: кастомный HTML курса внутри hero-грида */
.course-hero__content {
  margin-top: 14px;
}
.course-hero__content.prose {
  max-width: none;
}
.course-hero__content img {
  max-width: 100%;
  height: auto;
}
.course-hero__content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}
.course-hero__content iframe {
  max-width: 100%;
}
/* django: не даём кастомному HTML ломать hero-грид — цена и кнопки остаются на месте */
.course-hero__content,
.course-hero__content * {
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
}

