/* ГлавИдея — общие стили сайта.
   Бумажный фон, Playfair для заголовков, Manrope для текста, красный акцент. */

:root {
  --paper: #f7f5f0;
  --paper-2: #efece4;
  --ink: #161513;
  --ink-soft: #4a463f;
  --muted: #8d877c;
  --line: #dcd7cc;
  --red: #e2231a;
  --radius: 14px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Manrope", system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
  position: relative;
  overflow-x: hidden;
}

/* Та же бумажная фактура, что на главной. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(0,0,0,0) 60%, rgba(0,0,0,.05) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

a { color: inherit; }

/* ── Шапка ───────────────────────────────────────────────────────────── */

.topbar {
  position: relative; z-index: 2;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 245, 240, .82);
  backdrop-filter: blur(8px);
  position: sticky; top: 0;
}
.topbar__inner {
  max-width: 1080px; margin: 0 auto;
  padding: 16px 28px;
  display: flex; align-items: center; gap: 14px;
}
.topbar__brand { display: flex; align-items: center; text-decoration: none; }
/* Единая картинка: знак + «ГЛАВ ИДЕЯ» в две строки — как в оригинальном файле. */
.topbar__logo { height: 32px; width: auto; display: block; }
.topbar__nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.topbar__section {
  font-size: 13px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
  text-decoration: none;
}
.topbar__section:hover, .topbar__section.is-current { color: var(--ink); }

/* ── Каркас ──────────────────────────────────────────────────────────── */

.page { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 0 28px 80px; }

.crumbs { font-size: 13px; color: var(--muted); padding: 26px 0 0; }
.crumbs a { text-decoration: none; border-bottom: 1px solid transparent; }
.crumbs a:hover { border-color: var(--muted); }
.crumbs span { margin: 0 7px; }

/* Заголовок страниц без обложки (каталог и подобные) — та же типографика,
   что в .hero, но без сетки под картинку. */
.page-head { padding: 30px 0 8px; max-width: 62ch; }
.page-head h1 {
  font-family: "Playfair Display", serif; font-weight: 700;
  font-size: clamp(32px, 4.6vw, 46px); line-height: 1.08;
  letter-spacing: -.01em; margin: 12px 0 0;
}
.page-head__lead { font-size: 16px; line-height: 1.6; color: var(--ink-soft); margin-top: 14px; }

/* ── Обложка и заголовок книги ───────────────────────────────────────── */

.hero { display: grid; grid-template-columns: 232px 1fr; gap: 44px; padding: 34px 0 8px; align-items: start; }

.hero__cover {
  width: 100%; aspect-ratio: 662 / 1000;
  object-fit: cover; display: block;
  border-radius: 4px 10px 10px 4px;
  background: var(--paper-2);
  /* Книжный корешок: тёмная кромка слева и мягкая тень под обложкой. */
  box-shadow:
    inset 6px 0 12px -8px rgba(0,0,0,.5),
    0 18px 42px rgba(22,21,19,.20),
    0 3px 10px rgba(22,21,19,.10);
}
.hero__cover--empty {
  display: grid; place-items: center;
  border: 1px solid var(--line);
  font-family: "Playfair Display", serif; font-size: 46px; color: var(--line);
}
.hero__cover--empty svg { width: 56px; height: 56px; }

/* Тематическая эмблема курса вместо фото — плоский рисунок в палитре сайта
   на бумажной подложке. */
.hero__cover--emblem {
  display: grid; place-items: center;
  background: var(--paper-2);
  border: 1px solid var(--line);
  aspect-ratio: 62 / 93;
  border-radius: 10px;
}
.hero__cover--emblem .emblem { width: 62%; height: auto; }
.course__img--emblem {
  display: flex; align-items: center; justify-content: center;
  background: var(--paper-2);
}
.course__img--emblem .emblem { width: 108px; height: auto; }

.hero__kicker {
  font-size: 12px; font-weight: 700; letter-spacing: .3em;
  text-transform: uppercase; color: var(--muted);
}
.hero__kicker .dot {
  display: inline-block; width: 5px; height: 5px; background: var(--red);
  border-radius: 50%; margin: 0 8px 2px 0; vertical-align: middle;
}
.hero h1 {
  font-family: "Playfair Display", serif; font-weight: 700;
  font-size: clamp(34px, 5.2vw, 54px); line-height: 1.05;
  letter-spacing: -.01em; margin: 12px 0 0;
}
.hero__author { font-size: 17px; color: var(--ink-soft); margin-top: 12px; }
.hero__author b { font-weight: 700; }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px;
}
.chip {
  border: 1px solid var(--line); background: rgba(255,255,255,.45);
  border-radius: 999px; padding: 7px 14px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
}
.hero__lead { font-size: 16px; line-height: 1.68; color: var(--ink-soft); margin-top: 22px; max-width: 60ch; }

/* ── Заголовки разделов ──────────────────────────────────────────────── */

.section { margin-top: 56px; }
.section__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 20px; }
.section__head h2 {
  font-family: "Playfair Display", serif; font-weight: 700; font-size: 27px; letter-spacing: -.01em;
}
.section__head .note { font-size: 13.5px; color: var(--muted); }
.rule { height: 2px; width: 56px; background: var(--ink); margin-bottom: 26px; }

/* ── Карточка выпуска ────────────────────────────────────────────────── */

.ep {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(255,255,255,.5);
  padding: 24px 26px; margin-bottom: 20px;
}
.ep.is-active { border-color: rgba(226,35,26,.42); background: rgba(255,255,255,.78); }

.ep__top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ep__part {
  font-size: 13px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase;
  color: var(--red);
}
.ep__dur { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ep__sub { font-size: 14.5px; color: var(--ink-soft); margin-top: 8px; }

/* ── Плеер ───────────────────────────────────────────────────────────── */

.player { margin-top: 20px; }
.player__row { display: flex; align-items: center; gap: 15px; }

.play {
  width: 54px; height: 54px; flex-shrink: 0;
  border: none; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 8px 20px rgba(22,21,19,.20);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.play:hover { transform: translateY(-2px); background: #000; box-shadow: 0 12px 26px rgba(22,21,19,.28); }
.play:active { transform: translateY(0); }
.play svg { width: 20px; height: 20px; pointer-events: none; }
.play .icon-pause { display: none; }
.is-playing .play .icon-play { display: none; }
.is-playing .play .icon-pause { display: block; }
.play.is-busy { opacity: .55; cursor: progress; }

.player__bar { flex: 1; min-width: 0; }

/* Дорожка прогресса — увеличенная зона нажатия при тонкой видимой линии. */
.track {
  position: relative; height: 22px; cursor: pointer;
  display: flex; align-items: center; touch-action: none;
}
.track__line { position: relative; height: 5px; width: 100%; background: var(--line); border-radius: 3px; overflow: hidden; }
.track__buffer { position: absolute; inset: 0 auto 0 0; background: rgba(22,21,19,.13); width: 0; }
.track__fill { position: absolute; inset: 0 auto 0 0; background: var(--red); width: 0; }
.track__knob {
  position: absolute; top: 50%; left: 0;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--red); border: 2px solid var(--paper);
  transform: translate(-50%, -50%); pointer-events: none;
  opacity: 0; transition: opacity .18s ease;
}
.track:hover .track__knob, .track.is-scrubbing .track__knob { opacity: 1; }
/* Засечки глав прямо на дорожке — видно, где начинается следующая часть. */
.track__tick { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(247,245,240,.85); }

.player__times {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.player__tools { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.tool {
  border: 1px solid var(--line); background: rgba(255,255,255,.5);
  border-radius: 999px; padding: 7px 13px; cursor: pointer;
  font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  display: inline-flex; align-items: center; gap: 6px;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.tool:hover { border-color: var(--ink-soft); color: var(--ink); background: rgba(255,255,255,.85); }
.tool svg { width: 15px; height: 15px; }
.tool--rate { min-width: 56px; justify-content: center; }
.player__resume {
  margin-left: auto; font-size: 12.5px; color: var(--muted);
  display: none; align-items: center; gap: 8px;
}
.player__resume.is-shown { display: inline-flex; }
.player__resume button {
  border: none; background: none; padding: 0; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--red);
  border-bottom: 1px solid transparent;
}
.player__resume button:hover { border-color: var(--red); }

.player__error {
  display: none; margin-top: 12px; font-size: 13px; color: var(--red);
}
.player__error.is-shown { display: block; }

/* ── Главы ───────────────────────────────────────────────────────────── */

.chapters { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 6px; }
.chapters__label {
  font-size: 11.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin: 12px 0 6px;
}
.chapter {
  display: flex; gap: 14px; align-items: baseline;
  width: 100%; text-align: left;
  border: none; background: none; cursor: pointer;
  font: inherit; color: var(--ink-soft);
  padding: 9px 10px; margin-left: -10px;
  border-radius: 9px;
  transition: background .18s ease, color .18s ease;
}
.chapter:hover { background: rgba(255,255,255,.8); color: var(--ink); }
.chapter.is-current { background: rgba(226,35,26,.07); color: var(--ink); }
.chapter.is-current .chapter__time { color: var(--red); }
.chapter__time {
  font-size: 12.5px; font-variant-numeric: tabular-nums;
  color: var(--muted); min-width: 46px; flex-shrink: 0;
}
.chapter__title { font-size: 14.5px; font-weight: 600; display: block; }
.chapter__bullets { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.5; display: block; }

/* ── Короткие эпизоды ────────────────────────────────────────────────── */

.parts { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 8px; }
.parts > summary {
  list-style: none; cursor: pointer; padding: 18px 0;
  display: flex; align-items: center; gap: 11px;
  font-size: 14.5px; font-weight: 700; color: var(--ink-soft);
}
.parts > summary::-webkit-details-marker { display: none; }
.parts > summary:hover { color: var(--ink); }
.parts > summary .caret { transition: transform .22s ease; width: 15px; height: 15px; }
.parts[open] > summary .caret { transform: rotate(90deg); }
.parts > summary .count { font-weight: 500; color: var(--muted); }

.short {
  display: flex; align-items: center; gap: 15px;
  padding: 13px 0; border-top: 1px solid var(--line);
}
.short__play {
  width: 40px; height: 40px; flex-shrink: 0;
  border: 1px solid var(--line); border-radius: 50%;
  background: rgba(255,255,255,.6); color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}
.short__play:hover { border-color: var(--ink); background: #fff; }
.short__play svg { width: 15px; height: 15px; }
.short__play .icon-pause { display: none; }
.short.is-playing .short__play .icon-play { display: none; }
.short.is-playing .short__play .icon-pause { display: block; }
.short__body { min-width: 0; flex: 1; }
.short__title { font-size: 15px; font-weight: 600; }
.short__meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; font-variant-numeric: tabular-nums; }
.short__progress { height: 3px; background: var(--line); border-radius: 2px; margin-top: 8px; display: none; }
.short.is-active .short__progress { display: block; }
.short__progress i { display: block; height: 100%; background: var(--red); border-radius: 2px; width: 0; }

/* ── Подвал ──────────────────────────────────────────────────────────── */

.foot {
  position: relative; z-index: 1;
  border-top: 1px solid var(--line); padding: 26px 28px;
  display: flex; flex-wrap: wrap; gap: 9px 22px;
  justify-content: center; align-items: center;
  font-size: 13px; color: var(--muted);
}
.foot a { text-decoration: none; font-weight: 600; color: var(--ink-soft); border-bottom: 1px solid transparent; }
.foot a:hover { border-color: var(--ink-soft); }
.foot .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--line); }

/* ── Адаптив ─────────────────────────────────────────────────────────── */

@media (max-width: 820px) {
  .hero { grid-template-columns: 168px 1fr; gap: 28px; }
}
@media (max-width: 620px) {
  .page { padding: 0 20px 64px; }
  .topbar__inner { padding: 14px 20px; }
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .hero__cover { width: 172px; }
  .ep { padding: 20px 18px; }
  .player__row { gap: 12px; }
  .play { width: 48px; height: 48px; }
  .player__resume { margin-left: 0; width: 100%; }
  .foot .sep { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ══ Главная страница ═════════════════════════════════════════════════ */

.home { position: relative; z-index: 1; max-width: 940px; margin: 0 auto; padding: 0 28px 90px; }

.home__hero { text-align: center; padding: 76px 0 0; }
.home__brand { display: inline-flex; align-items: center; }
.home__logo { height: 58px; width: auto; display: block; }

.home__rule { width: 64px; height: 2px; background: var(--ink); margin: 40px auto 30px; }

.home__kicker {
  font-size: 13px; letter-spacing: .34em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}
.home__kicker .dot {
  display: inline-block; width: 6px; height: 6px; background: var(--red);
  border-radius: 50%; margin: 0 6px 2px 0; vertical-align: middle;
}
.home h1 {
  font-family: "Playfair Display", serif; font-weight: 700;
  font-size: clamp(38px, 7.4vw, 66px); line-height: 1.04;
  letter-spacing: -.01em; margin: 18px 0 0;
}
.home h1 .em { font-style: italic; font-weight: 500; color: var(--red); }
.home__lead {
  font-size: clamp(16px, 2.3vw, 19px); line-height: 1.65;
  color: var(--ink-soft); max-width: 52ch; margin: 22px auto 0;
}

/* Цифры подкаста — считаются при сборке, не проставляются руками. */
.stats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 46px;
  margin-top: 40px;
}
.stat__num {
  font-family: "Playfair Display", serif; font-weight: 700;
  font-size: 32px; line-height: 1;
}
.stat__label {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; margin-top: 8px;
}

/* На главной цифры центрированы под заголовком, на /podcast/ идут в общей
   левой колонке текста. */
.stats--left { justify-content: flex-start; margin-top: 30px; }

.home__cta { margin-top: 42px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 11px;
  background: var(--ink); color: var(--paper); text-decoration: none;
  font-weight: 700; font-size: 15px; letter-spacing: .02em;
  padding: 15px 26px; border-radius: 999px;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
  box-shadow: 0 8px 24px rgba(22,21,19,.16);
}
.btn:hover { transform: translateY(-2px); background: #000; box-shadow: 0 14px 34px rgba(22,21,19,.24); }
.btn svg { width: 17px; height: 17px; }
.btn--ghost {
  background: transparent; color: var(--ink-soft);
  border: 1px solid var(--line); box-shadow: none;
}
.btn--ghost:hover { background: rgba(255,255,255,.7); color: var(--ink); box-shadow: none; }

/* ── Два раздела сайта крупными плитками (главная) ────────────────────── */

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tile {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(255,255,255,.55); padding: 34px 32px 30px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.tile:hover {
  transform: translateY(-3px); border-color: var(--ink-soft);
  box-shadow: 0 16px 38px rgba(22,21,19,.12);
}
.tile__kicker {
  font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}
.tile__kicker .dot {
  display: inline-block; width: 6px; height: 6px; background: var(--red);
  border-radius: 50%; margin: 0 8px 2px 0; vertical-align: middle;
}
.tile__title {
  font-family: "Playfair Display", serif; font-weight: 700;
  font-size: clamp(32px, 4.4vw, 46px); line-height: 1.05; margin-top: 12px;
}
.tile--accent .tile__title { color: var(--red); }
.tile__text {
  font-size: 15px; line-height: 1.62; color: var(--ink-soft);
  margin-top: 14px; flex: 1;
}
.tile__more {
  font-weight: 700; font-size: 14.5px; margin-top: 22px;
  border-top: 1px solid var(--line); padding-top: 16px;
}
.tile:hover .tile__more { color: var(--red); }

/* ── Как устроен разбор ──────────────────────────────────────────────── */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(255,255,255,.45); padding: 24px 22px;
}
.step__num {
  font-family: "Playfair Display", serif; font-size: 22px; color: var(--red); line-height: 1;
}
.step__title { font-weight: 700; font-size: 16px; margin-top: 14px; }
.step__text { font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); margin-top: 8px; }

/* ── Карточки книг ───────────────────────────────────────────────────── */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 28px 24px; }

.card { text-decoration: none; display: block; }
.card__cover {
  width: 100%; aspect-ratio: 662 / 1000; object-fit: cover; display: block;
  border-radius: 3px 8px 8px 3px; background: var(--paper-2);
  box-shadow:
    inset 5px 0 10px -7px rgba(0,0,0,.5),
    0 12px 30px rgba(22,21,19,.16),
    0 2px 8px rgba(22,21,19,.08);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover .card__cover {
  transform: translateY(-4px);
  box-shadow: inset 5px 0 10px -7px rgba(0,0,0,.5), 0 20px 40px rgba(22,21,19,.24);
}
.card__cover--empty {
  display: grid; place-items: center; border: 1px solid var(--line);
  font-family: "Playfair Display", serif; font-size: 38px; color: var(--line);
}
.card__title {
  font-family: "Playfair Display", serif; font-weight: 700;
  font-size: 17px; line-height: 1.25; margin-top: 14px;
}
.card__author { font-size: 13.5px; color: var(--ink-soft); margin-top: 5px; }
.card__meta { font-size: 12.5px; color: var(--muted); margin-top: 7px; font-variant-numeric: tabular-nums; }

.empty-note {
  border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 28px 24px; text-align: center;
  font-size: 15px; color: var(--muted);
}

/* ── Площадки ────────────────────────────────────────────────────────── */

.platforms { display: flex; flex-wrap: wrap; gap: 10px; }
.platform {
  border: 1px solid var(--line); background: rgba(255,255,255,.5);
  border-radius: 999px; padding: 10px 18px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft); text-decoration: none;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.platform:hover { border-color: var(--ink-soft); color: var(--ink); background: rgba(255,255,255,.85); }

/* ── Курсы ───────────────────────────────────────────────────────────── */

.courses {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.course {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(255,255,255,.5);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.course__img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block;
  background: var(--paper-2);
}
.course__img--empty {
  display: flex; align-items: center; justify-content: center;
  color: var(--line);
}
.course__img--empty svg { width: 40px; height: 40px; }
.course__body { padding: 24px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.course__title {
  font-family: "Playfair Display", serif; font-weight: 700;
  font-size: 22px; line-height: 1.25;
}
.course__meta { font-size: 12.5px; color: var(--muted); margin-top: 8px; letter-spacing: .03em; }
.course__desc { font-size: 14.5px; line-height: 1.62; color: var(--ink-soft); margin-top: 14px; flex: 1; }
.course__cta {
  margin-top: 20px; align-self: flex-start;
  border: none; cursor: pointer; font: inherit;
  background: var(--ink); color: var(--paper);
  font-weight: 700; font-size: 14px;
  padding: 12px 22px; border-radius: 999px;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
  box-shadow: 0 6px 18px rgba(22,21,19,.16);
}
.course__cta:hover { transform: translateY(-2px); background: #000; box-shadow: 0 10px 24px rgba(22,21,19,.22); }

/* Карточка курса — ссылка на отдельную страницу. */
.course--link { text-decoration: none; color: inherit; transition: border-color .2s ease, transform .2s ease; }
.course--link:hover { border-color: var(--ink-soft); transform: translateY(-2px); }
.course__more {
  margin-top: 18px; font-size: 13.5px; font-weight: 700; color: var(--red);
}

/* ── Страница курса ──────────────────────────────────────────────────── */

/* Фото автора вместо книжной обложки: другое соотношение, без корешка. */
.hero__cover--photo {
  aspect-ratio: 62 / 93;
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(22,21,19,.20), 0 3px 10px rgba(22,21,19,.10);
}
.btn--enroll {
  margin-top: 26px; border: none; cursor: pointer; font: inherit;
  background: var(--red); color: #fff; font-weight: 700; font-size: 15px;
  padding: 15px 28px; border-radius: 999px;
  box-shadow: 0 8px 22px rgba(226,35,26,.28);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn--enroll:hover { transform: translateY(-2px); background: #c81d15; box-shadow: 0 12px 30px rgba(226,35,26,.36); }
.hero__note { font-size: 12.5px; color: var(--muted); margin-top: 12px; }

.prose { max-width: 68ch; }
.prose p { font-size: 15.5px; line-height: 1.72; color: var(--ink-soft); }
.prose p + p { margin-top: 14px; }

.benefits { max-width: 68ch; list-style: none; }
.benefits li {
  position: relative; padding-left: 30px; margin-bottom: 12px;
  font-size: 15.5px; line-height: 1.6; color: var(--ink-soft);
}
.benefits li::before {
  content: ""; position: absolute; left: 0; top: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--red);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9.55 17.05 4.5 12l1.4-1.4 3.65 3.6 8.15-8.15L19.1 7.5z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9.55 17.05 4.5 12l1.4-1.4 3.65 3.6 8.15-8.15L19.1 7.5z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.program { list-style: none; counter-reset: none; }
.lesson {
  display: flex; gap: 18px; padding: 20px 0;
  border-top: 1px solid var(--line);
}
.lesson:last-child { border-bottom: 1px solid var(--line); }
.lesson__n {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center;
  font-family: "Playfair Display", serif; font-size: 16px; font-weight: 700;
}
.lesson__title { font-family: "Playfair Display", serif; font-weight: 700; font-size: 18px; }
.lesson__points { margin-top: 8px; padding-left: 18px; }
.lesson__points li { font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); margin-bottom: 4px; }

.book-list { list-style: none; max-width: 68ch; }
.book-list li {
  padding: 12px 0; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 2px;
}
.book-list li:last-child { border-bottom: 1px solid var(--line); }
.book-list b { font-weight: 700; font-size: 15px; }
.book-list span { font-size: 13.5px; color: var(--muted); }

.author-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(255,255,255,.5); padding: 24px 26px; max-width: 68ch;
}
.author-card__name { font-family: "Playfair Display", serif; font-weight: 700; font-size: 19px; }
.author-card__bio { font-size: 14.5px; line-height: 1.68; color: var(--ink-soft); margin-top: 10px; }

.enroll-cta {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(255,255,255,.5); padding: 32px 30px; text-align: center;
}
.enroll-cta h2 {
  font-family: "Playfair Display", serif; font-weight: 700; font-size: 24px;
}
.enroll-cta p { font-size: 14.5px; color: var(--ink-soft); margin-top: 8px; }
.enroll-cta .btn--enroll { margin-top: 20px; }

/* ── Модалка записи на курс ──────────────────────────────────────────── */

.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(22,21,19,.45);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.is-open { display: flex; }
.modal {
  background: var(--paper); border-radius: var(--radius);
  max-width: 440px; width: 100%; max-height: 90vh; overflow-y: auto;
  padding: 32px 28px 28px; position: relative;
  box-shadow: 0 30px 70px rgba(0,0,0,.3);
}
.modal__close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: transparent; cursor: pointer;
  display: grid; place-items: center; color: var(--muted);
  transition: background .18s ease, color .18s ease;
}
.modal__close:hover { background: var(--paper-2); color: var(--ink); }
.modal__close svg { width: 18px; height: 18px; }
.modal h3 {
  font-family: "Playfair Display", serif; font-weight: 700; font-size: 22px;
  padding-right: 28px;
}
.modal__course { font-size: 13.5px; color: var(--red); font-weight: 700; margin-top: 6px; }

.field { margin-top: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 14.5px;
  border: 1px solid var(--line); border-radius: 9px;
  background: rgba(255,255,255,.6);
  padding: 11px 13px; color: var(--ink);
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--ink-soft); background: #fff;
}
.field textarea { resize: vertical; min-height: 76px; }
/* Ловушка для ботов: обычным посетителям не видна и не должна заполняться. */
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.modal__submit {
  margin-top: 22px; width: 100%;
  border: none; cursor: pointer; font: inherit;
  background: var(--ink); color: var(--paper);
  font-weight: 700; font-size: 15px;
  padding: 14px; border-radius: 999px;
  transition: background .2s ease, opacity .2s ease;
}
.modal__submit:hover { background: #000; }
.modal__submit:disabled { opacity: .55; cursor: progress; }

.modal__status { margin-top: 14px; font-size: 13.5px; text-align: center; display: none; }
.modal__status.is-shown { display: block; }
.modal__status.is-error { color: var(--red); }
.modal__status.is-ok { color: #1a7a3c; }

@media (max-width: 720px) {
  .home { padding: 0 20px 64px; }
  .home__hero { padding: 54px 0 0; }
  .home__logo { height: 46px; }
  .home__rule { margin: 32px auto 24px; }
  .steps { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr; gap: 16px; }
  .tile { padding: 28px 24px 24px; }
  .stats { gap: 18px 30px; }
  .stat__num { font-size: 26px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 22px 16px; }
  .courses { grid-template-columns: 1fr; }
  .modal { padding: 26px 20px 22px; }
}

/* Обложка курса на мобильном — во всю ширину колонки, а не маленьким
   прямоугольником слева. Идёт после базовых стилей обложки, чтобы
   переопределить их aspect-ratio (медиазапрос выше по файлу этого не мог). */
@media (max-width: 620px) {
  .hero__cover--photo { width: 100%; aspect-ratio: 3 / 2; object-position: 50% 20%; }
  .hero__cover--emblem { width: 100%; aspect-ratio: 16 / 9; }
  /* В широкой короткой подложке эмблему масштабируем по высоте, чтобы не
     обрезалась сверху и снизу. */
  .hero__cover--emblem .emblem { width: auto; height: 76%; }
}

/* ── Конспекты книг (PDF-саммари) ────────────────────────────────────── */

/* Блок-предложение на главной: текст слева, «лист» конспекта справа. */
.offer {
  display: grid; grid-template-columns: 1fr 232px; gap: 40px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(255,255,255,.55); padding: 38px 36px;
}
.offer__kicker {
  font-size: 12px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}
.offer__kicker .dot {
  display: inline-block; width: 6px; height: 6px; background: var(--red);
  border-radius: 50%; margin: 0 8px 2px 0; vertical-align: middle;
}
.offer h2 {
  font-family: "Playfair Display", serif; font-weight: 700;
  font-size: clamp(26px, 3.4vw, 36px); line-height: 1.1; margin-top: 12px;
}
.offer__text { font-size: 15px; line-height: 1.65; color: var(--ink-soft); margin-top: 14px; }
.offer__cta { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; }

/* Обложка книги справа в блоке-предложении: та же «книжная» подача, что
   у карточек каталога (кромка корешка + тень), плюс ярлык PDF поверх. */
.offer__cover { position: relative; display: block; text-decoration: none; color: inherit; }
.offer__cover-img {
  width: 100%; aspect-ratio: 662 / 1000; object-fit: cover; display: block;
  border-radius: 3px 8px 8px 3px; background: var(--paper-2);
  box-shadow:
    inset 5px 0 10px -7px rgba(0,0,0,.5),
    0 12px 30px rgba(22,21,19,.16),
    0 2px 8px rgba(22,21,19,.08);
  transition: transform .25s ease, box-shadow .25s ease;
}
.offer__cover-img--empty {
  display: grid; place-items: center; padding: 20px; text-align: center;
  border: 1px solid var(--line);
  font-family: "Playfair Display", serif; font-size: 19px; line-height: 1.2;
}
.offer__cover:hover .offer__cover-img {
  transform: translateY(-3px);
  box-shadow:
    inset 5px 0 10px -7px rgba(0,0,0,.5),
    0 18px 40px rgba(22,21,19,.22),
    0 2px 8px rgba(22,21,19,.1);
}
.offer__cover-tag {
  position: absolute; top: 12px; right: -8px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .14em;
  background: var(--red); color: #fff; padding: 5px 9px; border-radius: 4px;
  box-shadow: 0 4px 12px rgba(226,35,26,.3);
}
.offer__cover-meta {
  display: block; margin-top: 12px; text-align: center;
  font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}

/* Блок конспекта на странице книги. */
.summary {
  display: grid; grid-template-columns: 76px 1fr; gap: 24px; align-items: start;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(255,255,255,.55); padding: 26px 26px 28px;
}
.summary__icon {
  display: grid; place-items: center; height: 96px;
  background: var(--ink); color: var(--paper); border-radius: 6px;
  font-size: 13px; font-weight: 700; letter-spacing: .12em;
}
.summary__title { font-weight: 700; font-size: 17px; }
.summary__text { font-size: 14.5px; line-height: 1.62; color: var(--ink-soft); margin-top: 10px; }
.summary__meta { font-size: 12.5px; letter-spacing: .04em; color: var(--muted); margin-top: 12px; }
.summary__body .btn { margin-top: 18px; }
.summary__offer { font-size: 14.5px; line-height: 1.65; color: var(--ink-soft); margin-top: 20px; }

/* Кнопка, которая живёт внутри абзаца и должна читаться как ссылка. */
.link-btn {
  font: inherit; color: var(--red); background: none; border: none; padding: 0;
  font-weight: 700; cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px;
}
.link-btn:hover { color: var(--ink); }

/* Отметка на карточке книги в каталоге. */
.card__badge {
  display: inline-block; margin-top: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--red); border: 1px solid rgba(226,35,26,.3);
  border-radius: 999px; padding: 3px 9px;
}

.modal__hint { font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); margin-top: 10px; }

@media (max-width: 820px) {
  .offer { grid-template-columns: 1fr; gap: 28px; padding: 30px 24px; }
  .offer__cover { max-width: 210px; }
}
@media (max-width: 520px) {
  .summary { grid-template-columns: 1fr; gap: 18px; }
  .summary__icon { height: 64px; width: 76px; }
}

/* Обложка-заглушка: у 21 книги локальной обложки нет, а на CDN лежит один
   логотип подкаста на всех. Вместо копии логотипа — название книги
   типографикой на бумажном фоне. */
.card__cover--empty, .hero__cover--empty {
  display: grid; place-items: center; text-align: center;
  background: var(--paper-2); border: 1px solid var(--line);
  font-family: "Playfair Display", serif; color: var(--ink);
  padding: 14px; overflow: hidden;
}
.card__cover--empty span {
  font-size: 15px; line-height: 1.22; font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}
.hero__cover--empty span { font-size: 22px; line-height: 1.2; font-weight: 700; }

/* ── Поиск и сортировка в каталоге ───────────────────────────────────── */

.filters {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  justify-content: space-between; margin-bottom: 26px;
}
.filters__search { position: relative; flex: 1 1 280px; max-width: 420px; }
.filters__search input {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: rgba(255,255,255,.6); border: 1px solid var(--line);
  border-radius: 999px; padding: 11px 38px 11px 18px;
  transition: border-color .2s ease, background .2s ease;
}
.filters__search input::placeholder { color: var(--muted); }
.filters__search input:focus {
  outline: none; border-color: var(--ink-soft); background: #fff;
}
/* У type="search" свой крестик в WebKit — он конфликтует с нашим. */
.filters__search input::-webkit-search-cancel-button { display: none; }
.filters__clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border: none; background: none; cursor: pointer;
  color: var(--muted); font-size: 21px; line-height: 1; border-radius: 50%;
}
.filters__clear:hover { color: var(--ink); background: var(--paper-2); }

.filters__sort { display: flex; flex-wrap: wrap; gap: 8px; }
.filters__sort button {
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
  background: transparent; border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 16px; cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.filters__sort button:hover { border-color: var(--ink-soft); color: var(--ink); }
.filters__sort button.is-active {
  background: var(--ink); border-color: var(--ink); color: var(--paper);
}

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

@media (max-width: 620px) {
  .filters { gap: 14px; }
  .filters__search { max-width: none; flex-basis: 100%; }
  .filters__sort button { padding: 8px 13px; font-size: 13px; }
}
