/* ==========================================================================
   Музей Бомжей — базовая таблица стилей
   Дизайн-система снята с макетов (референсная ширина 1920px) и переведена
   в текучую шкалу: на 1920px значения совпадают с макетом, ниже — плавно
   уменьшаются. Всё завязано на переменные, менять систему нужно здесь.
   ========================================================================== */

/* --- 1. Шрифты --------------------------------------------------------- */
/* Golos Text — гротеск Паратайпа, лицензия OFL: бесплатен, в том числе для
   коммерческого использования. Файлы лежат на нашем же хостинге — так сайт
   не зависит от доступности Google Fonts и грузится быстрее.
   Скачать: fonts.google.com/specimen/Golos+Text → положить woff2
   в /wp-content/themes/muzei-bomzhei/assets/fonts/. */
/* Golos Text одним вариативным файлом: в нём ось веса 400–900, то есть
   все начертания, которыми пользуется тема (400, 500, 600, 700, 900),
   приходят за один запрос — 90 КБ вместо четырёх отдельных файлов.

   Формат WOFF, а не WOFF2: woff2 собирается только с brotli, которого
   в сборочной среде нет. Разница около 35 КБ, зато поддержка у WOFF
   вообще везде. Если понадобится woff2 — сконвертируйте
   assets/fonts/golos-text-var.woff любым конвертером и допишите строку
   в src: браузер сам возьмёт первый формат, который понимает.

   Лицензия шрифта — OFL, текст лежит рядом в assets/fonts/OFL.txt. */
@font-face {
  font-family: 'Golos Text';
  src: url('golos-text-var.woff') format('woff-variations'),
       url('golos-text-var.woff') format('woff');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

/* --- 2. Токены --------------------------------------------------------- */
:root {
  /* Палитра. В макете всего два цвета — чёрный и белый; акцент вынесен
     отдельной переменной, чтобы фирменный цвет можно было ввести позже. */
  --ink:            #111111;
  --ink-strong:     #000000;
  --ink-muted:      #6B6B6B;
  --paper:          #FFFFFF;
  --paper-alt:      #F5F4F2;
  --rule:           #DDDDDD;
  --rule-strong:    #111111;
  --accent:         #C91717;
  --inverse-ink:    #FFFFFF;
  --inverse-paper:  #000000;

  /* Сетка */
  --page-max:       1920px;
  --page-pad:       clamp(20px, 4.7vw, 90px);
  /* Ширина текстовой колонки. В макете было 1365 px, но там и кегль был
     под 30 px. При нынешних 19 px такая строка — под 150 знаков, глаз
     теряет начало следующей. 980 px дают привычные 75–80 знаков. */
  --prose-max:      980px;
  --gutter:         clamp(20px, 6.5vw, 125px);

  /* Типографическая шкала */
  --font-sans:      'Golos Text', 'Onest', 'Inter', -apple-system,
                    'Segoe UI', Roboto, Arial, sans-serif;

  /* Каждая шкала — clamp(минимум, наклон, максимум). Минимумы оставлены
     теми же, что были: на телефоне размеры устраивают. Пересчитан только
     наклон, поэтому меняется всё от планшета и шире, а мобильная версия
     остаётся ровно такой, как была.

     Ориентир для десктопа (окно 1600 px): меню 22, текст 19, карточка 26,
     подзаголовок 28, h3 27, h2 38, h1 96, призыв в подвале 56. Раньше на
     том же окне h1 был 139 px и переносился с дефисом посреди слова. */
  --fs-nav:         clamp(0.8125rem, 0.744vw + 0.6625rem, 1.5rem);
  --fs-small:       clamp(0.75rem, 0.19vw + 0.703rem, 0.9375rem);
  --fs-body:        clamp(1.0625rem, 0.165vw + 1.0225rem, 1.1875rem);
  --fs-card:        clamp(1.25rem, 0.463vw + 1.1625rem, 1.75rem);
  --fs-lead:        clamp(1.312rem, 0.529vw + 1.221rem, 1.875rem);
  --fs-h3:          clamp(1.375rem, 0.372vw + 1.316rem, 1.75rem);
  --fs-h2:          clamp(1.75rem, 0.752vw + 1.623rem, 2.5rem);
  --fs-h1:          clamp(2.375rem, 4.628vw + 1.372rem, 6rem);
  --fs-display:     clamp(2rem, 1.86vw + 1.64rem, 3.5rem);

  --lh-body:        1.4;
  --lh-tight:       1.02;

  /* Вертикальный ритм */
  --s-1:  clamp(6px,  0.63vw, 12px);
  --s-2:  clamp(12px, 1.25vw, 24px);
  --s-3:  clamp(20px, 2.08vw, 40px);
  --s-4:  clamp(30px, 3.33vw, 64px);
  --s-5:  clamp(44px, 5.00vw, 96px);
  --s-6:  clamp(60px, 7.29vw, 140px);
  --s-7:  clamp(72px, 9.38vw, 180px);
}

/* --- 3. Сброс ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  /* clip, а не hidden: не ломает position: sticky у шапки,
     но отсекает горизонтальный скролл от полноширинных блоков */
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, video { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }

/* Доступность: видимый фокус с клавиатуры */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 0; top: -120px; z-index: 100;
  background: var(--inverse-paper); color: var(--inverse-ink);
  padding: 12px 20px; font-size: 16px;
  transition: top .15s;
}
.skip-link:focus { top: 0; }

/* --- 4. Раскладка ------------------------------------------------------ */
.shell {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

.prose { max-width: var(--prose-max); }

.section      { margin-block: var(--s-6); }
.section--tight { margin-block: var(--s-5); }

/* Полноширинная картинка — выходит за поля контейнера в край экрана */
.bleed {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
}

/* --- 5. Типографика ---------------------------------------------------- */
.h1, h1 {
  font-size: var(--fs-h1);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--ink-strong);
  margin: 0;
  /* Перенос по слогам, а не разрыв слова: «БРОДЯЖНИЧЕСТВ/А» недопустим.
     Жёсткий разрыв включается только на узких экранах — см. медиазапрос. */
  hyphens: auto;
}

.h2, h2 {
  font-size: var(--fs-h2);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  color: var(--ink-strong);
  margin: 0 0 var(--s-3);
}

/* Название произведения/экспоната — крупно, но без капслока */
.h-work {
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-transform: none;
  color: var(--ink-strong);
  margin: 0 0 var(--s-3);
}

/* Подзаголовок раздела внутри страницы («Список литературы» и т. п.) */
.h-sub {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-transform: none;
  margin: 0 0 var(--s-2);
}

.h3, h3 {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 var(--s-2);
}

.lead {
  font-size: var(--fs-lead);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: var(--s-3) 0 0;
  max-width: 26em;   /* в макете подзаголовок укладывается в одну строку */
}

.display {
  font-size: var(--fs-display);
  font-weight: 900;
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--ink-strong);
  margin: 0;
  max-width: 13em;
  hyphens: auto;
}

/* Текстовый поток, который редактор наполняет из админки.
   Отступ между абзацами равен одной пустой строке — как в макете. */
.rich > * { max-width: var(--prose-max); }
.rich > * + * { margin-top: 1.4em; }

/* ВНИМАНИЕ, ГРАБЛИ. Сброс полей обёрнут в :where() ради нулевой
   специфичности. Раньше тут стояло «.rich p { margin: 0 }» — вес (0,1,1),
   и оно било строчку выше, у которой вес (0,1,0). Из-за этого абзацы
   на всех текстовых страницах шли сплошняком, без отбивки. По той же
   причине «.rich ul» ниже перебивал «.sessions» и сдвигал список
   сеансов на 1,2em вправо от остального текста.
   Любой новый сброс для тегов внутри .rich — только через :where(). */
:where(.rich p) { margin: 0; }

/* Заголовки внутри статьи — скромнее секционных: не капслок и на ступень
   мельче, иначе H2 в 75px разрывает текстовый поток. */
.rich h2 {
  font-size: var(--fs-h3);
  font-weight: 700;
  text-transform: none;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 1.8em 0 0;
}
.rich h3 {
  font-size: calc(var(--fs-body) * 1.15);
  font-weight: 700;
  margin: 1.6em 0 0;
}
:where(.rich ul, .rich ol) { margin: 0; padding-left: 1.2em; }
.rich li + li { margin-top: var(--s-1); }
.rich a {
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.06em;
}
.rich a:hover { color: var(--accent); }
.rich figure { margin: var(--s-4) 0; max-width: 100%; }
.rich figcaption {
  font-size: var(--fs-small);
  color: var(--ink-muted);
  margin-top: var(--s-1);
}
.rich blockquote {
  margin: var(--s-4) 0;
  padding-left: var(--s-3);
  border-left: 2px solid var(--rule-strong);
  font-weight: 500;
}
.rich strong { font-weight: 700; }

/* --- 6. Шапка ---------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule-strong);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding-block: clamp(10px, 1.6vw, 30px);
}

.logo { display: block; flex: 0 0 auto; }
.logo img {
  width: clamp(170px, 21vw, 440px);
  height: auto;
}

.nav { display: flex; align-items: center; gap: clamp(14px, 2.1vw, 40px); }

.nav__link {
  font-size: var(--fs-nav);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  padding-block: 4px;
  border-bottom: 2px solid transparent;
}
.nav__link:hover,
.nav__link[aria-current="page"] { border-bottom-color: var(--ink-strong); }

/* Подменю */
.nav__item { position: relative; }

/* Невидимый мост через зазор между пунктом и выпадающим списком.
   Без него курсор на пути вниз теряет контакт с пунктом, срабатывает
   mouseleave и подменю захлопывается прямо под рукой. */
.nav__item::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 18px;
}
.nav__toggle {
  background: none; border: 0; cursor: pointer; padding: 4px 0;
  display: inline-flex; align-items: center; gap: 0.4em;
  font-size: var(--fs-nav); font-weight: 600; text-transform: uppercase;
  border-bottom: 2px solid transparent;
}
.nav__toggle:hover { border-bottom-color: var(--ink-strong); }
.nav__chevron { width: 0.7em; height: 0.7em; transition: transform .2s; }
.nav__toggle[aria-expanded="true"] .nav__chevron { transform: rotate(180deg); }

.submenu {
  position: absolute;
  top: calc(100% + 14px);
  left: -20px;
  min-width: 300px;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  padding: 10px 0;
  margin: 0;
  list-style: none;
  display: none;
}
.submenu[data-open="true"] { display: block; }
.submenu a {
  display: block;
  padding: 7px 20px;
  font-size: clamp(13px, 0.94vw, 17px);
  line-height: 1.25;
  text-decoration: none;
  font-weight: 500;
}
.submenu a:hover { background: var(--paper-alt); }

/* Бургер */
.burger {
  display: none;
  background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; padding: 10px;
}
.burger span {
  display: block; height: 2px; background: var(--ink-strong);
  margin: 5px 0; transition: transform .25s, opacity .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); }

/* --- 7. Первый экран --------------------------------------------------- */
/* Отступ от шапки. Был --s-5 плюс ещё --s-3 у самих крошек — вместе
   до 136 px пустоты над первой строкой. Теперь крошки, когда они идут
   первыми, своего отступа не добавляют. */
.page-head { padding-top: var(--s-4); }
.page-head > .breadcrumbs:first-child { margin-top: 0; }
.page-head__intro { margin-top: var(--s-4); }

.hero-image { margin-block: var(--s-5); }
.hero-image img {
  width: 100%;
  height: clamp(220px, 32vw, 620px);
  object-fit: cover;
}

/* --- 8. Карточки событий ----------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
  margin: 0;
  padding: 0;
  list-style: none;
}

.card { display: flex; flex-direction: column; }
.card a { text-decoration: none; display: block; }
.card__media {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--paper-alt);
}
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.card a:hover .card__media img { transform: scale(1.03); }

/* Экспонат в плитке показывается целиком, а не обрезается квадратом.
   Открытки лежат и вертикально, и горизонтально: обрезка съедала бы
   у одних поля по бокам, у других верх с низом — а у открытки поля
   часть предмета, там выходные данные и подписи. Плитка при этом
   остаётся квадратной, чтобы сетка не скакала. */
.card--fit .card__media {
  display: grid;
  place-items: center;
  padding: 7%;
  background: var(--paper-alt);
}
.card--fit .card__media img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .18);
}
.card__date {
  font-size: var(--fs-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin-top: var(--s-2);
}
.card__title {
  font-size: var(--fs-card);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-top: var(--s-1);
}
.card a:hover .card__title { text-decoration: underline; text-underline-offset: 0.12em; }

/* --- 9. Страница экспоната --------------------------------------------- */
.exhibit-viewer {
  display: grid;
  grid-template-columns: auto minmax(0, 1100px) auto;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 4vw, 80px);
  margin-block: var(--s-5);
}

.exhibit-viewer__figure { margin: 0; grid-column: 2; }
.exhibit-viewer__figure img {
  width: 100%;
  height: auto;
  margin-inline: auto;
}

.nav-arrow {
  display: grid;
  place-items: center;
  width: clamp(44px, 4.7vw, 90px);
  height: clamp(44px, 4.7vw, 90px);
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink-strong);
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.nav-arrow:hover {
  background: var(--ink-strong);
  border-color: var(--ink-strong);
  color: var(--inverse-ink);
}
.nav-arrow svg { width: 52%; height: 52%; }
.nav-arrow--prev { grid-column: 1; }
.nav-arrow--next { grid-column: 3; }

/* Метаданные экспоната */
.meta { margin: 0; }
.meta__row { display: block; margin-bottom: var(--s-2); }
.meta__row dt {
  display: inline;
  font-weight: 400;
  color: var(--ink);
}
.meta__row dt::after { content: ': '; }
.meta__row dd { display: inline; margin: 0; }

.meta__row--block dt { display: block; margin-bottom: var(--s-1); }
.meta__row--block dd { display: block; }

.keywords { display: flex; flex-wrap: wrap; gap: var(--s-1); margin: 0; padding: 0; list-style: none; }
.keywords a {
  display: inline-block;
  border: 1px solid var(--rule);
  padding: 0.25em 0.8em;
  font-size: var(--fs-small);
  text-decoration: none;
}
.keywords a:hover { border-color: var(--ink-strong); }

.refs { margin: 0; padding-left: 1.4em; font-size: calc(var(--fs-body) * 0.9); }
.refs li + li { margin-top: var(--s-1); }

.gallery-stack {
  display: grid;
  justify-items: center;
  gap: var(--s-3);
  margin-block: var(--s-5);
}
.gallery-stack figure { margin: 0; max-width: 550px; width: 100%; }

/* --- 10. Блок бронирования (YCLIENTS) ---------------------------------- */
.booking {
  max-width: 1040px;
  margin-inline: auto;
  margin-block: var(--s-5);
  min-height: 600px;
}
.booking__placeholder {
  border: 1px dashed var(--rule);
  background: var(--paper-alt);
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--s-5) var(--s-3);
  color: var(--ink-muted);
  font-size: var(--fs-small);
}

/* --- 11. Призыв перед подвалом ----------------------------------------- */
.callout { padding-block: var(--s-6); }

/* --- 12. Подвал -------------------------------------------------------- */
.footer {
  background: var(--inverse-paper);
  color: var(--inverse-ink);
  padding-block: var(--s-4);
}
.footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
}
.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 2.2vw, 42px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer__nav a {
  font-size: var(--fs-nav);
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
}
.footer__nav a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

/* Правовые документы — служебная строка, а не раздел сайта:
   тот же ряд, но без капса и жирности. */
.footer__nav--legal { margin-top: var(--s-2); gap: clamp(12px, 1.4vw, 28px); }
.footer__nav--legal a {
  font-size: var(--fs-small);
  font-weight: 400;
  text-transform: none;
  color: rgba(255,255,255,.72);
}
.footer__nav--legal a:hover,
.footer__nav--legal a:focus-visible { color: #fff; }

.socials { display: flex; gap: var(--s-2); }
/* Кружок — мягкая подложка, а не волосяная обводка: тонкая белая линия
   на тёмном фоне рябит и спорит с залитой иконкой. */
.socials a {
  display: grid; place-items: center;
  width: clamp(36px, 3.3vw, 64px);
  height: clamp(36px, 3.3vw, 64px);
  background: rgba(255,255,255,.12);
  border-radius: 50%;
  transition: background .2s, color .2s;
}
.socials a:hover,
.socials a:focus-visible { background: var(--inverse-ink); color: var(--inverse-paper); }
.socials svg { width: 52%; height: 52%; }

.footer__legal {
  margin-top: var(--s-3);
  font-size: var(--fs-small);
  line-height: 1.45;
  color: rgba(255,255,255,.72);
  max-width: 900px;
}
/* Ссылка в приписке должна читаться как ссылка: цвет здесь приглушён,
   поэтому опознавательный знак — подчёркивание. */
.footer__legal a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: .18em;
  text-decoration-thickness: from-font;
}
.footer__legal a:hover,
.footer__legal a:focus-visible { text-decoration-thickness: 2px; }

/* --- 13. Хлебные крошки ------------------------------------------------ */
.breadcrumbs {
  font-size: var(--fs-small);
  color: var(--ink-muted);
  margin-top: var(--s-3);

  /* Крошки должны лежать ВЫШЕ заголовка, иначе по ним нельзя щёлкнуть.
     У h1 межстрочный интервал (1.02) меньше естественного для шрифта,
     поэтому строчный бокс заголовка вылезает вверх за свои границы и
     накрывает крошки целиком: визуально они на месте, а клик уходит
     в заголовок. Ловится только проверкой elementFromPoint — глазами
     не видно ничего. */
  position: relative;
  z-index: 1;
}
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5em; margin: 0; padding: 0; }
/* Стрелка, а не тире: тире встречается прямо в названиях («Смерть — это
   только начало»), и цепочка сливалась в одну строку текста. */
.breadcrumbs li:not(:last-child)::after { content: '→'; margin-left: 0.5em; }
/* Ссылка должна отличаться от текущей страницы: раньше и то и другое
   было одинаково серым без подчёркивания, и понять, что по крошке можно
   перейти, было нельзя. */
.breadcrumbs a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: from-font;
  text-decoration-color: var(--rule);
}
.breadcrumbs a:hover,
.breadcrumbs a:focus-visible {
  color: var(--ink-strong);
  text-decoration-color: currentColor;
}

/* --- 14. Служебные страницы -------------------------------------------- */
.error-page {
  min-height: 60vh;
  display: grid;
  align-content: center;
  gap: var(--s-3);
  padding-block: var(--s-6);
}

/* --- 15. Адаптив ------------------------------------------------------- */
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1200px) {
  .burger { display: block; }

  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(88vw, 420px);
    background: var(--paper);
    border-left: 1px solid var(--rule-strong);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 88px 24px 40px;
    transform: translateX(100%);
    transition: transform .3s ease;
    overflow-y: auto;
  }
  .nav[data-open="true"] { transform: none; }

  .nav__link, .nav__toggle {
    font-size: 17px;
    padding-block: 14px;
    border-bottom: 1px solid var(--rule);
    width: 100%;
    justify-content: space-between;
  }
  .nav__item { width: 100%; }

  .nav__item::after { display: none; }

  .submenu {
    position: static;
    border: 0;
    min-width: 0;
    padding: 0 0 12px 16px;
  }
  .submenu a { padding: 9px 0; font-size: 15px; line-height: 1.3; }

  .exhibit-viewer {
    grid-template-columns: 1fr;
    gap: var(--s-3);
  }
  .exhibit-viewer__figure { grid-column: 1; order: -1; }
  .nav-arrow--prev, .nav-arrow--next { grid-column: 1; }
  .exhibit-viewer__controls {
    grid-column: 1;
    display: flex;
    justify-content: center;
    gap: var(--s-3);
  }

  .footer__top { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 620px) {
  /* На узком экране длинное слово физически не помещается —
     здесь разрыв допустим, иначе строка уедет за край. */
  .h1, h1, .display, .h-work { overflow-wrap: break-word; }

  .cards { grid-template-columns: 1fr; gap: var(--s-4); }
  .lead { max-width: none; }
  .display { max-width: none; }
  .hero-image img { height: 240px; }
}

/* --- 17. Элементы, появляющиеся в WordPress-шаблонах -------------------- */

/* Кнопка */
.button {
  display: inline-block;
  background: var(--ink-strong);
  color: var(--inverse-ink);
  border: 1px solid var(--ink-strong);
  padding: 0.6em 1.4em;
  font-size: var(--fs-nav);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.button:hover { background: var(--paper); color: var(--ink-strong); }

/* Переключатель «Анонсы / Прошедшие» */
.tabs {
  display: flex;
  gap: var(--s-3);
  margin-top: var(--s-3);
  flex-wrap: wrap;
}
.tabs a {
  font-size: var(--fs-nav);
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  padding-bottom: 6px;
  border-bottom: 2px solid transparent;
  color: var(--ink-muted);
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink-strong); border-bottom-color: var(--ink-strong); }

/* Постраничная навигация */
.pagination {
  margin-top: var(--s-5);
  font-size: var(--fs-nav);
  font-weight: 600;
}
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.pagination .page-numbers {
  display: grid;
  place-items: center;
  min-width: 2.6em;
  height: 2.6em;
  padding: 0 0.6em;
  border: 1px solid var(--rule);
  text-decoration: none;
}
.pagination .page-numbers:hover { border-color: var(--ink-strong); }
.pagination .page-numbers.current {
  background: var(--ink-strong);
  border-color: var(--ink-strong);
  color: var(--inverse-ink);
}
.pagination .dots { border: 0; }

/* Поиск */
.searchform { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-3); }
.searchform input[type="search"] {
  flex: 1 1 260px;
  font: inherit;
  font-size: var(--fs-nav);
  padding: 0.6em 0.9em;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  color: var(--ink);
}

/* Переключатель языков — появится, когда включат второй язык */
.lang-switch { display: flex; gap: var(--s-2); margin-left: var(--s-2); }
.lang-switch a {
  font-size: var(--fs-nav);
  font-weight: 700;
  text-decoration: none;
  opacity: .55;
}
.lang-switch a:hover { opacity: 1; }
.lang-switch a[aria-current="true"] { opacity: 1; text-decoration: underline; text-underline-offset: 0.2em; }

/* Третий уровень меню — на случай, если редактор его заведёт */
.submenu--deep { position: static; border: 0; padding: 0 0 0 16px; display: block; min-width: 0; }
.submenu--deep a { font-size: 0.92em; opacity: .85; }

/* Подсказка администратору, если меню не назначено */
.nav__empty { font-size: var(--fs-small); color: var(--ink-muted); margin: 0; }

/* Заголовок пункта меню, соответствующего текущему разделу */
.nav__toggle.is-current { border-bottom-color: var(--ink-strong); }

/* Подписи к картинкам внутри галереи экспоната */
.gallery-stack figcaption {
  font-size: var(--fs-small);
  color: var(--ink-muted);
  margin-top: var(--s-1);
  text-align: center;
}

/* Блоки редактора WordPress внутри текста */
.rich .wp-block-image { margin: var(--s-4) 0; }
.rich .wp-block-image img { height: auto; }
.rich .wp-block-embed { margin: var(--s-4) 0; }
.rich .alignwide { max-width: min(100%, calc(var(--prose-max) * 1.2)); }
.rich .aligncenter { margin-inline: auto; }

/* Зеркальная вёрстка для арабской версии */
[dir="rtl"] .nav-arrow svg { transform: scaleX(-1); }
[dir="rtl"] .rich blockquote { border-left: 0; border-right: 2px solid var(--rule-strong);
  padding-left: 0; padding-right: var(--s-3); }
[dir="rtl"] .rich ul, [dir="rtl"] .rich ol { padding-left: 0; padding-right: 1.2em; }

/* ==========================================================================
   18. Версия для слабовидящих
   Режимы включаются атрибутами на <html> и переопределяют токены из :root,
   поэтому работают сразу на всех страницах, без отдельной вёрстки.
   ========================================================================== */

/* --- Ступени кегля. Всё измеряется в rem, поэтому хватает одной строки --- */
html[data-a11y-size="2"] { font-size: 125%; }
html[data-a11y-size="3"] { font-size: 150%; }

/* --- Цветовые схемы ----------------------------------------------------- */

/* Белым по чёрному */
html[data-a11y-theme="wb"] {
  --ink:           #FFFFFF;
  --ink-strong:    #FFFFFF;
  --ink-muted:     #CFCFCF;
  --paper:         #000000;
  --paper-alt:     #1A1A1A;
  --rule:          #555555;
  --rule-strong:   #FFFFFF;
  --accent:        #FFE24D;
  --inverse-ink:   #000000;
  --inverse-paper: #FFFFFF;
}

/* Тёмно-коричневым по бежевому — мягче для долгого чтения */
html[data-a11y-theme="beige"] {
  --ink:           #2E2013;
  --ink-strong:    #1F150B;
  --ink-muted:     #6A5540;
  --paper:         #F7F1E1;
  --paper-alt:     #EDE4CE;
  --rule:          #C9B99A;
  --rule-strong:   #2E2013;
  --accent:        #8C3A10;
  --inverse-ink:   #F7F1E1;
  --inverse-paper: #2E2013;
}

/* В спецрежимах убираем декоративные тонкости: разреженные линии и
   отрицательный трекинг мешают читать увеличенный текст. */
html[data-a11y-theme]:not([data-a11y-theme="bw"]) .footer,
html[data-a11y-size]:not([data-a11y-size="1"]) .footer {
  background: var(--inverse-paper);
  color: var(--inverse-ink);
}

html[data-a11y-spacing="wide"] body {
  line-height: 1.8;
  letter-spacing: 0.02em;
  word-spacing: 0.08em;
}
html[data-a11y-spacing="wide"] .h1,
html[data-a11y-spacing="wide"] h1,
html[data-a11y-spacing="wide"] .h2,
html[data-a11y-spacing="wide"] h2,
html[data-a11y-spacing="wide"] .display {
  letter-spacing: 0;
  line-height: 1.15;
}

/* Заголовки капслоком читаются хуже — в спецрежиме снимаем */
html[data-a11y-size]:not([data-a11y-size="1"]) .h1,
html[data-a11y-size]:not([data-a11y-size="1"]) h1,
html[data-a11y-size]:not([data-a11y-size="1"]) .h2,
html[data-a11y-size]:not([data-a11y-size="1"]) h2,
html[data-a11y-size]:not([data-a11y-size="1"]) .display {
  text-transform: none;
  letter-spacing: 0;
}

/* --- Без изображений ---------------------------------------------------- */
/* Прячем изображения содержания. Логотип остаётся: это ориентир,
   по которому человек понимает, что не ушёл с сайта. */
html[data-a11y-images="off"] main img,
html[data-a11y-images="off"] .hero-image { display: none; }

.a11y-alt {
  display: block;
  border: 1px solid var(--rule);
  padding: var(--s-2);
  font-size: var(--fs-small);
  color: var(--ink);
  background: var(--paper-alt);
}

/* --- Без анимаций ------------------------------------------------------- */
html[data-a11y-motion="off"] *,
html[data-a11y-motion="off"] *::before,
html[data-a11y-motion="off"] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Кнопка вызова ------------------------------------------------------ */
.a11y-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.35em 0.9em;
  cursor: pointer;
  font-size: var(--fs-nav);
  font-weight: 600;
  white-space: nowrap;
}
.a11y-toggle:hover { border-color: var(--ink-strong); }
.a11y-toggle svg { width: 1.35em; height: 1.35em; flex: 0 0 auto; }
.a11y-toggle__label { display: none; }

/* --- Панель ------------------------------------------------------------- */
.a11y-panel {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  background: var(--paper);
  border-bottom: 2px solid var(--rule-strong);
  padding: var(--s-3) 0;
  display: none;
}
.a11y-panel[data-open="true"] { display: block; }

.a11y-panel__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: flex-start;
}

.a11y-group { min-width: 180px; }
.a11y-group__title {
  font-size: var(--fs-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.5em;
  color: var(--ink-muted);
}
.a11y-group__row { display: flex; gap: 8px; flex-wrap: wrap; }

.a11y-opt {
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  padding: 0.4em 0.85em;
  font-size: var(--fs-nav);
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;   /* палец попадает без прицеливания */
  min-width: 44px;
}
.a11y-opt:hover { border-color: var(--ink-strong); }
.a11y-opt[aria-pressed="true"] {
  background: var(--ink-strong);
  color: var(--paper);
  border-color: var(--ink-strong);
}

/* Образцы цветовых схем показываем самими цветами, а не словами */
.a11y-opt--bw    { background: #FFF; color: #000; }
.a11y-opt--wb    { background: #000; color: #FFF; }
.a11y-opt--beige { background: #F7F1E1; color: #2E2013; }
.a11y-opt--bw[aria-pressed="true"],
.a11y-opt--wb[aria-pressed="true"],
.a11y-opt--beige[aria-pressed="true"] { outline: 3px solid var(--accent); outline-offset: 2px; }

.a11y-panel__close {
  margin-left: auto;
  align-self: center;
  background: none;
  border: 1px solid var(--rule-strong);
  padding: 0.5em 1.2em;
  font-size: var(--fs-nav);
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
}
.a11y-panel__close:hover { background: var(--ink-strong); color: var(--paper); }

@media (min-width: 1600px) {
  .a11y-toggle__label { display: inline; }
}

@media (max-width: 1199px) {
  .a11y-panel { inset: 0; overflow-y: auto; padding: var(--s-4) 0; }
  .a11y-panel__inner { flex-direction: column; }
  .a11y-panel__close { margin-left: 0; width: 100%; }
}

/* --- Расширенное описание экспоната ------------------------------------- */
.longdesc {
  margin-top: var(--s-3);
  border-top: 1px solid var(--rule);
  padding-top: var(--s-2);
}
.longdesc > summary {
  cursor: pointer;
  font-weight: 600;
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-muted);
}
.longdesc > summary:hover { color: var(--ink); }
.longdesc__body { margin-top: var(--s-2); }
.longdesc__body p { margin: 0 0 0.8em; }

/* В режиме без картинок описание раскрыто по умолчанию — оно заменяет
   собой изображение, прятать его под катом бессмысленно. */
html[data-a11y-images="off"] .longdesc > summary { display: none; }
html[data-a11y-images="off"] .longdesc__body { margin-top: 0; }

/* Крупный кегль: меню всегда в бургере — иначе пункты не помещаются
   в строку ни при какой ширине экрана. */
html[data-a11y-size="2"] .burger,
html[data-a11y-size="3"] .burger { display: block; }

html[data-a11y-size="2"] .nav,
html[data-a11y-size="3"] .nav {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(92vw, 520px);
  background: var(--paper);
  border-left: 1px solid var(--rule-strong);
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 88px 24px 40px;
  transform: translateX(100%);
  transition: transform .3s ease;
  overflow-y: auto;
  z-index: 60;
}
html[data-a11y-size="2"] .nav[data-open="true"],
html[data-a11y-size="3"] .nav[data-open="true"] { transform: none; }

html[data-a11y-size="2"] .nav__link, html[data-a11y-size="3"] .nav__link,
html[data-a11y-size="2"] .nav__toggle, html[data-a11y-size="3"] .nav__toggle {
  padding-block: 14px;
  border-bottom: 1px solid var(--rule);
  width: 100%;
  justify-content: space-between;
}
html[data-a11y-size="2"] .nav__item, html[data-a11y-size="3"] .nav__item { width: 100%; }
html[data-a11y-size="2"] .nav__item::after,
html[data-a11y-size="3"] .nav__item::after { display: none; }

html[data-a11y-size="2"] .submenu, html[data-a11y-size="3"] .submenu {
  position: static;
  border: 0;
  min-width: 0;
  padding: 0 0 12px 16px;
}

/* ==========================================================================
   19. Историческая карта
   ========================================================================== */

.mbmap {
  --pin: #C91717;
  position: relative;
  background: var(--paper-alt);
  border: 1px solid var(--rule-strong);
  overflow: hidden;
}

.mbmap__viewport {
  position: relative;
  width: 100%;
  height: clamp(420px, 70vh, 900px);
  overflow: hidden;
  cursor: grab;
  touch-action: none;   /* жесты обрабатываем сами, иначе страница уезжает */
}
.mbmap.is-dragging .mbmap__viewport { cursor: grabbing; }

.mbmap__world,
.mbmap__pins {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

/* Размеры миру задаёт скрипт, а overflow отсекает добор краевых тайлов:
   ширина скана не кратна 256, и без обрезки справа и снизу торчала бы
   полоса фона. */
.mbmap__world { overflow: hidden; }

.mbmap__pins { inset: 0; pointer-events: none; }

.mbmap.is-zooming .mbmap__world,
.mbmap.is-zooming .mbmap__pins { transition: transform .2s ease-out; }

.mbmap__tile {
  position: absolute;
  top: 0; left: 0;
  transform-origin: 0 0;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* --- Метки -------------------------------------------------------------- */
/* Фильтр по типу места прячет метку через атрибут hidden. Без этой строки
   он не срабатывает: правило display: grid ниже перебивает [hidden] из
   стилей браузера, и метки остаются на карте. */
.mbmap__pin[hidden] { display: none; }

.mbmap__pin {
  position: absolute;
  top: 0; left: 0;
  margin: -14px 0 0 -14px;   /* центр метки на координате */
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  pointer-events: auto;
  display: grid;
  place-items: center;
}

.mbmap__pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--pin);
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.45);
  transition: transform .15s;
}
.mbmap__pin:hover .mbmap__pin-dot,
.mbmap__pin:focus-visible .mbmap__pin-dot { transform: scale(1.35); }

.mbmap__pin-label {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  margin-top: 4px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  padding: 3px 7px;
  /* Плотный фон вместо рамки: на пёстрой карте рамка дробит надпись,
     а сплошная плашка читается и без неё. Тень отделяет от карты. */
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .35);
  opacity: 0;
  transition: opacity .15s;
  pointer-events: none;
  color: #111;
}
.mbmap__pin:hover .mbmap__pin-label,
.mbmap__pin:focus-visible .mbmap__pin-label { opacity: 1; }

/* Метка под курсором поднимается над соседними: иначе длинная надпись
   уходит под чужие точки, которые лежат в потоке позже. */
.mbmap__pin { z-index: 1; }
.mbmap__pin:hover,
.mbmap__pin:focus-visible { z-index: 4; }

/* --- Карточка места ----------------------------------------------------- */
.mbmap__popup {
  position: absolute;
  top: 0; left: 0;
  z-index: 5;
  width: min(340px, 78vw);
  margin: -18px 0 0 22px;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  padding: var(--s-2);
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
  font-size: var(--fs-small);
}
.mbmap__popup-title {
  font-size: calc(var(--fs-small) * 1.25);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 4px;
  padding-right: 24px;
}
.mbmap__popup-address { color: var(--ink-muted); margin: 0 0 8px; }
.mbmap__popup-text p { margin: 0 0 8px; }
.mbmap__popup-link {
  display: inline-block;
  font-weight: 700;
  text-underline-offset: 0.2em;
}
.mbmap__popup-close {
  position: absolute;
  top: 4px; right: 4px;
  width: 32px; height: 32px;
  border: 0; background: none;
  font-size: 20px; line-height: 1;
  cursor: pointer;
}
.mbmap__popup-close:hover { color: var(--pin); }

/* --- Управление --------------------------------------------------------- */
.mbmap__controls {
  position: absolute;
  top: var(--s-2); right: var(--s-2);
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mbmap__controls button {
  width: 44px; height: 44px;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.mbmap__controls button:hover { background: var(--ink-strong); color: var(--paper); }
.mbmap__controls button[data-mbmap-reset] { font-size: 13px; font-weight: 600; }

.mbmap__legend {
  position: absolute;
  left: var(--s-2); bottom: var(--s-2);
  z-index: 4;
  background: rgba(255,255,255,.93);
  border: 1px solid var(--rule);
  padding: 6px 10px;
  font-size: var(--fs-small);
  color: #111;
  max-width: min(420px, 70%);
}

/* --- Фильтры и список мест ---------------------------------------------- */
.mbmap-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--s-2);
}
.mbmap-filters button {
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 0.4em 0.9em;
  font-size: var(--fs-nav);
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
}
.mbmap-filters button:hover { border-color: var(--ink-strong); }
.mbmap-filters button[aria-pressed="true"] {
  background: var(--ink-strong);
  color: var(--paper);
  border-color: var(--ink-strong);
}

.mbmap-list { list-style: none; margin: var(--s-3) 0 0; padding: 0;
  columns: 2; column-gap: var(--gutter); }
.mbmap-list li { break-inside: avoid; margin-bottom: 0.6em; }
.mbmap-list a { text-decoration: none; font-weight: 600; }
.mbmap-list a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.mbmap-list .mbmap-list__kind {
  display: block;
  font-size: var(--fs-small);
  font-weight: 400;
  color: var(--ink-muted);
  text-decoration: none;
  cursor: default;
}

.mbmap-source {
  margin: var(--s-2) 0 0;
  font-size: var(--fs-small);
  color: var(--ink-muted);
}

@media (max-width: 700px) {
  .mbmap-list { columns: 1; }
  .mbmap__legend { display: none; }
  .mbmap__popup { width: min(300px, 82vw); }
}

/* --- Страница места ----------------------------------------------------- */
/* Пары «было — стало» набираем в две колонки: так взгляд сразу
   сопоставляет старый адрес с нынешним. */
.place-facts {
  margin: var(--s-4) 0 0;
  border-top: 1px solid var(--rule);
  max-width: 900px;
}
.place-facts > div {
  display: grid;
  grid-template-columns: minmax(120px, 8em) 1fr;
  gap: var(--s-2);
  padding: var(--s-2) 0;
  border-bottom: 1px solid var(--rule);
}
.place-facts dt {
  font-weight: 700;
  text-transform: uppercase;
  font-size: var(--fs-small);
  letter-spacing: .02em;
}
.place-facts dd { margin: 0; }

.place-back { margin-top: var(--s-3); font-weight: 700; }

@media (max-width: 620px) {
  .place-facts > div { grid-template-columns: 1fr; gap: 2px; }
}

/* Выбор точки в админке */
.mbmap--picker .mbmap__viewport { height: 520px; }
.mbmap--picker .mbmap__pin { cursor: default; }

/* --- 16. Электронная библиотека ---------------------------------------- */

/* Поиск по собранию */
.library-search {
  display: flex;
  gap: var(--s-2);
  margin-top: var(--s-4);
  max-width: 900px;
}
.library-search input {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: var(--fs-body);
  padding: var(--s-2) 0;
  border: 0;
  border-bottom: 2px solid var(--rule-strong);
  background: none;
  color: inherit;
  border-radius: 0;
  -webkit-appearance: none;
}
.library-search input::placeholder { color: var(--ink-muted); }
.library-search button {
  flex: 0 0 auto;
  border: 2px solid var(--rule-strong);
  background: var(--inverse-paper);
  color: var(--inverse-ink);
  font-weight: 700;
  text-transform: uppercase;
  font-size: var(--fs-nav);
  letter-spacing: .02em;
  padding: var(--s-2) var(--s-3);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.library-search button:hover,
.library-search button:focus-visible {
  background: var(--paper);
  color: var(--ink);
}
.library-search--big input { font-size: var(--fs-h3); }

.library-hint {
  margin-top: var(--s-2);
  font-size: var(--fs-small);
  color: var(--ink-muted);
  max-width: 900px;
}
.library-count {
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 700;
  margin: 0 0 var(--s-3);
}
.library-empty { max-width: 900px; }

/* Найденные страницы */
.hit-list { list-style: none; margin: 0; padding: 0; max-width: 1200px; }
.hit + .hit { border-top: 1px solid var(--rule); }
.hit__link {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--s-3);
  padding: var(--s-3) 0;
  text-decoration: none;
  align-items: start;
}
.hit__link:hover .hit__where,
.hit__link:focus-visible .hit__where { text-decoration: underline; text-underline-offset: .2em; }
.hit__thumb {
  display: block;
  background: var(--paper-alt);
  border: 1px solid var(--rule);
}
.hit__thumb img { width: 100%; height: auto; }
.hit__body { display: block; min-width: 0; }
.hit__where {
  display: block;
  font-weight: 700;
  font-size: var(--fs-nav);
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-bottom: 6px;
}
.hit__page { color: var(--ink-muted); text-transform: none; letter-spacing: 0; }
.hit__snippet {
  display: block;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--ink);
}
mark {
  background: rgba(201, 23, 23, .16);
  color: inherit;
  padding: 0 .12em;
  font-weight: 700;
}

/* Издания и выпуски */
.edition-list { list-style: none; margin: 0; padding: 0; }
.edition + .edition { margin-top: var(--s-5); padding-top: var(--s-5); border-top: 1px solid var(--rule); }
.edition__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
}
.edition__title { margin: 0; font-size: var(--fs-h3); }
.edition__title a { text-decoration: none; }
.edition__title a:hover { text-decoration: underline; text-underline-offset: .12em; }
.edition__count {
  margin: 0;
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-muted);
}
.edition__about { margin: var(--s-2) 0 0; max-width: 900px; font-size: var(--fs-small); }

.issue-grid {
  list-style: none;
  margin: var(--s-3) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: var(--s-3);
}
/* На странице библиотеки показываем начало ряда, а не всю подшивку */
.issue-grid--row {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.issue-card a { text-decoration: none; display: block; }
.issue-card__cover {
  display: block;
  background: var(--paper-alt);
  border: 1px solid var(--rule);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  transition: border-color .15s;
}
.issue-card__cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
}
.issue-card a:hover .issue-card__cover,
.issue-card a:focus-visible .issue-card__cover { border-color: var(--rule-strong); }
.issue-card__date {
  display: block;
  margin-top: var(--s-2);
  font-size: var(--fs-small);
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.issue-card__title {
  display: block;
  margin-top: 2px;
  font-weight: 700;
  font-size: var(--fs-nav);
  line-height: 1.25;
}

/* --- Читалка ------------------------------------------------------------ */
.reader {
  margin: var(--s-4) 0 var(--s-5);
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  background: var(--paper);
}
.reader__bar {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
  padding: var(--s-2) var(--page-pad);
  border-bottom: 1px solid var(--rule);
}
.reader__group { display: flex; align-items: center; gap: var(--s-1); }
.reader__group--tools { margin-left: auto; }

.reader__btn {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--rule);
  background: var(--paper);
  cursor: pointer;
  font-size: var(--fs-nav);
  line-height: 1;
  transition: background .15s, color .15s, border-color .15s;
}
.reader__btn svg { width: 18px; height: 18px; }
.reader__btn:hover,
.reader__btn:focus-visible {
  background: var(--inverse-paper);
  color: var(--inverse-ink);
  border-color: var(--rule-strong);
}
.reader__btn--text {
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .03em;
  font-size: var(--fs-small);
}
.reader__btn[aria-expanded="true"] {
  background: var(--inverse-paper);
  color: var(--inverse-ink);
  border-color: var(--rule-strong);
}

.reader__counter {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: var(--fs-small);
  color: var(--ink-muted);
  white-space: nowrap;
}
.reader__current {
  width: 3.5em;
  text-align: center;
  font: inherit;
  font-size: var(--fs-nav);
  font-weight: 700;
  color: var(--ink);
  padding: 4px 2px;
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: 0;
}

.reader__find { display: flex; align-items: center; gap: var(--s-1); flex: 1 1 260px; min-width: 0; }
.reader__find input {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: var(--fs-small);
  padding: 8px 10px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: inherit;
  border-radius: 0;
  -webkit-appearance: none;
}
.reader__find input:focus { border-color: var(--rule-strong); outline: none; }
.reader__find-status {
  font-size: var(--fs-small);
  color: var(--ink-muted);
  white-space: nowrap;
}

.reader__body {
  display: grid;
  grid-template-columns: 0 1fr 0;
  transition: grid-template-columns .22s ease;
  height: clamp(420px, 78vh, 1000px);
}
.reader.thumbs-open .reader__body { grid-template-columns: minmax(0, 280px) 1fr 0; }
.reader.text-open .reader__body { grid-template-columns: 0 1fr minmax(0, 380px); }
.reader.thumbs-open.text-open .reader__body {
  grid-template-columns: minmax(0, 250px) 1fr minmax(0, 340px);
}

.reader__thumbs,
.reader__text {
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--paper-alt);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s;
}

/* Найденное и лента страниц прокручиваются каждое само по себе.
   С общей прокруткой переход к следующему совпадению утаскивал список
   результатов за верхний край — читатель терял из виду то, что нашёл. */
.reader__thumbs {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.reader.thumbs-open .reader__thumbs,
.reader.text-open .reader__text { opacity: 1; visibility: visible; }
.reader__thumbs { border-right: 1px solid var(--rule); }
.reader__text { border-left: 1px solid var(--rule); padding: var(--s-3); }

.reader__thumb-list,
.reader__hits { list-style: none; margin: 0; padding: 0; }
.reader__thumb-list {
  padding: var(--s-2);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
  align-content: start;
  flex: 1 1 auto;
  overflow: auto;
  overscroll-behavior: contain;
}
.reader__thumb button {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--rule);
  background: var(--paper);
  cursor: pointer;
  text-align: center;
}
.reader__thumb img { width: 100%; height: auto; background: var(--paper-alt); }
.reader__thumb span {
  display: block;
  padding: 4px 0;
  font-size: var(--fs-small);
  color: var(--ink-muted);
}
.reader__thumb.is-current button { border-color: var(--rule-strong); border-width: 2px; }
.reader__thumb.is-current span { color: var(--ink); font-weight: 700; }

/* Результаты поиска внутри выпуска встают над лентой страниц */
.reader__hits:not(:empty) {
  padding: var(--s-2);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  flex: 0 1 auto;
  max-height: 48%;
  overflow: auto;
  overscroll-behavior: contain;
}
.reader__hit {
  display: block;
  padding: var(--s-2) 0;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.reader__hits li:last-child .reader__hit { border-bottom: 0; }
.reader__hit-page {
  display: block;
  font-size: var(--fs-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.reader__hit-text {
  display: block;
  font-size: var(--fs-small);
  line-height: 1.45;
  color: var(--ink-muted);
}
.reader__hit.is-current { background: var(--paper-alt); box-shadow: inset 3px 0 0 var(--accent); padding-left: 8px; }
.reader__hit.is-current .reader__hit-text { color: var(--ink); }

/* Поле просмотра.
   Фон светлый, как весь сайт. Чтобы край страницы при этом не растворялся
   в фоне, у скана есть тонкая рамка и мягкая тень — иначе белая газета
   на белом поле выглядит обрезанной по краю экрана.
   Выделение здесь выключено: при перетаскивании и двойном щелчке браузер
   иначе подсвечивает картинку синим, будто её выделили как текст. */
.reader__stage {
  position: relative;
  overflow: hidden;
  background: var(--paper-alt);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
/* Слой только сдвигается, масштаб задаётся настоящим размером страницы.
   will-change здесь намеренно нет: он закрепляет слой в отдельном растре,
   а закреплённый растр браузер при увеличении растягивает вместо того,
   чтобы перерисовать, — страница становится мыльной. */
.reader__frame {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-2);
}
.reader.is-dragging .reader__frame { cursor: grabbing; }
.reader.is-zoomed .reader__stage { cursor: grab; touch-action: none; }

.reader__page {
  position: relative;
  height: 100%;
  width: auto;
  max-width: 100%;
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: 0 2px 18px rgba(0, 0, 0, .14);
}
/* При увеличении странице задаётся настоящая ширина, поэтому потолки
   вёрстки нужно снять — иначе она упрётся в размер окна просмотра. */
.reader.is-zoomed .reader__page {
  height: auto;
  max-width: none;
  flex: 0 0 auto;
}

.reader__img {
  width: 100%;
  height: 100%;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

.reader__marks { position: absolute; inset: 0; pointer-events: none; }
.reader__mark {
  position: absolute;
  background: rgba(201, 23, 23, .26);
  outline: 1px solid rgba(201, 23, 23, .55);
  mix-blend-mode: multiply;
  border-radius: 1px;
}

.reader__text-note {
  margin: 0 0 var(--s-2);
  font-size: var(--fs-small);
  color: var(--ink-muted);
  padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--rule);
}
.reader__text-body {
  font-size: var(--fs-small);
  line-height: 1.55;
  white-space: pre-wrap;
  hyphens: auto;
}

.reader__fallback { padding: var(--s-3) var(--page-pad); display: flex; gap: var(--s-3); }
.reader__meta { max-width: 1200px; }
.reader__rights {
  margin-top: var(--s-3);
  font-size: var(--fs-small);
  color: var(--ink-muted);
  max-width: 900px;
}

.reader.is-broken .reader__stage::after {
  content: 'Не удалось загрузить опись выпуска';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: var(--s-2);
  text-align: center;
  background: var(--accent);
  color: #fff;
  font-size: var(--fs-small);
}

/* Во весь экран читалка занимает его целиком */
.reader:fullscreen { margin: 0; border: 0; display: flex; flex-direction: column; }
.reader:fullscreen .reader__body { height: auto; flex: 1 1 auto; }

@media (max-width: 900px) {
  /* Панели перестают делить ширину и ложатся поверх: на телефоне
     колонка в 280px не оставила бы месту странице ничего */
  .reader__body { grid-template-columns: 1fr !important; position: relative; }
  .reader__thumbs,
  .reader__text {
    position: absolute;
    inset: 0;
    z-index: 3;
    border: 0;
  }
  .reader__thumb-list { grid-template-columns: repeat(3, 1fr); }
  .reader__bar { gap: var(--s-2); }
  .reader__find { order: 3; flex-basis: 100%; }
  .reader__group--tools { margin-left: auto; }
  .hit__link { grid-template-columns: 64px 1fr; gap: var(--s-2); }
}

/* Режим «заменить изображения описанием»: скан — это и есть весь выпуск,
   поэтому вместо него разворачиваем распознанный текст на всю ширину. */
:root[data-a11y-images="off"] .reader__body {
  grid-template-columns: 0 0 1fr !important;
}
:root[data-a11y-images="off"] .reader__stage { display: none; }
:root[data-a11y-images="off"] .reader__text { border-left: 0; }
:root[data-a11y-images="off"] .reader__group--tools [data-reader="zoom-in"],
:root[data-a11y-images="off"] .reader__group--tools [data-reader="zoom-out"],
:root[data-a11y-images="off"] .reader__group--tools [data-reader="fit"] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .reader__body { transition: none; }
}

/* --- 17. Печать -------------------------------------------------------- */
@media print {
  .header, .footer, .nav-arrow, .booking,
  .a11y-panel, .a11y-toggle,
  .mbmap__controls, .mbmap-filters { display: none; }
  body { font-size: 12pt; color: #000; }
}

/* ==========================================================================
   20. Афиша: список мероприятий
   ========================================================================== */

.playbill { list-style: none; margin: 0; padding: 0; }

.playbill > li {
  display: grid;
  grid-template-columns: minmax(200px, 27%) 1fr;
  gap: var(--gutter);
  padding-block: var(--s-4);
  border-top: 1px solid var(--rule);
  align-items: start;
}
.playbill > li:last-child { border-bottom: 1px solid var(--rule); }

.playbill__media {
  display: block;
  text-decoration: none;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--paper-alt);
}
.playbill__media img { width: 100%; height: 100%; object-fit: cover; }

.playbill__when {
  font-size: var(--fs-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin: 0;
}

.playbill__title {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: var(--s-1) 0 0;
}
.playbill__title a { text-decoration: none; }
.playbill__title a:hover { text-decoration: underline; text-underline-offset: 0.12em; }

.playbill__who {
  margin: var(--s-2) 0 0;
  font-size: var(--fs-small);
  color: var(--ink-muted);
  max-width: 46em;
}

.playbill__desc { margin: var(--s-2) 0 0; max-width: 40em; }

.playbill__foot {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin-top: var(--s-3);
  font-size: var(--fs-small);
}

.playbill__more { font-weight: 600; text-underline-offset: 0.2em; }

/* Заглушка вместо афиши: тип мероприятия и крупная дата. */
.typeplate {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: var(--s-3);
  border: 1px solid var(--rule);
  box-sizing: border-box;
}
.typeplate__kind {
  font-size: var(--fs-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}
.typeplate__day {
  font-size: clamp(2rem, 4vw, 4.5rem);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.03em;
  color: var(--ink-strong);
}
.typeplate__day--word {
  font-size: clamp(1.5rem, 2.4vw, 2.5rem);
  line-height: 1.05;
  text-transform: uppercase;
}
.typeplate__day span {
  display: block;
  font-size: 0.26em;
  letter-spacing: 0.04em;
  font-weight: 700;
}

/* Сеансы: каждый показ отдельной клеткой. */
.sessions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: var(--s-2) 0 0;
  padding: 0;
  list-style: none;
}
.sessions li {
  font-size: var(--fs-small);
  font-weight: 600;
  border: 1px solid var(--rule-strong);
  padding: 0.25em 0.7em;
  white-space: nowrap;
}
.sessions li a { text-decoration: none; }
.sessions li a:hover { text-decoration: underline; }
.sessions li.is-past {
  border-color: var(--rule);
  color: var(--ink-muted);
  text-decoration: line-through;
}
.sessions li.is-next { background: var(--ink-strong); color: var(--inverse-ink); }

/* Цена, «мест нет», «отменено». */
.event-price { font-weight: 600; }

.event-flag {
  font-size: var(--fs-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.event-flag--off { color: var(--accent); }

.event-banner {
  border-left: 4px solid var(--rule-strong);
  padding: var(--s-2) var(--s-3);
  background: var(--paper-alt);
  font-size: var(--fs-small);
  font-weight: 600;
  margin: 0 0 var(--s-3);
}
.event-banner--off { border-left-color: var(--accent); color: var(--accent); }
.event-banner a { margin-left: 0.5em; }

/* Счётчик прошедших в переключателе. */
.tabs__count {
  font-size: 0.7em;
  vertical-align: super;
  font-weight: 600;
  margin-left: 0.2em;
}

/* Страница мероприятия: афиша сбоку от текста. */
.event-layout {
  display: grid;
  grid-template-columns: minmax(200px, 300px) minmax(0, 1fr);
  gap: var(--gutter);
  align-items: start;
  margin-top: var(--s-4);
}
.event-layout > .event-main:only-child { grid-column: 1 / -1; max-width: var(--prose-max); }
.event-poster { margin: 0; }
.event-poster img { width: 100%; height: auto; border: 1px solid var(--rule); }
.event-sub { font-size: var(--fs-h3); margin-top: var(--s-4); }

@media (max-width: 900px) {
  .playbill > li { grid-template-columns: 1fr; gap: var(--s-3); }
  .playbill__media { max-width: 320px; }
  .event-layout { grid-template-columns: 1fr; }
  .event-poster { max-width: 320px; }
}

/* Запись мероприятия --------------------------------------------------- */

.record { margin: var(--s-4) 0 0; max-width: 40em; }

.record__frame,
.record iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--rule);
  background: var(--paper-alt);
}

/* Панель, а не кадр из видео: квадратную афишу пришлось бы обрезать
   по краям, и кнопка «смотреть» вставала бы поверх её же текста. */
.record__frame {
  display: grid;
  place-content: center;
  padding: 0;
  cursor: pointer;
  background: var(--ink-strong);
  border-color: var(--ink-strong);
  color: var(--inverse-ink);
  transition: opacity .2s;
}
.record__frame:hover { opacity: 0.85; }

/* Если у записи есть своя обложка 16:9 — она и есть кадр. Резать нечего,
   поэтому вместо панели показываем картинку, а затемнение оставляем
   символическое: только чтобы белый кружок не терялся на светлом. */
.record__frame--cover {
  position: relative;
  display: block;
  background-image: none;
  background-color: var(--ink-strong);
  background-size: cover;
  background-position: center;
  border-color: var(--ink-strong);
}
.record__frame--cover:hover { opacity: 1; }
.record__frame--cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .18);
  transition: background .2s;
}
.record__frame--cover:hover::after,
.record__frame--cover:focus-visible::after { background: rgba(0, 0, 0, .04); }
/* Кнопка в нижнем левом углу, а не по центру: на обложках музея
   заголовок набран слева вверху, и кружок по центру ложится прямо
   на слова. В углу под ним остаётся фон. */
.record__frame--cover .record__play {
  position: absolute;
  left: var(--s-1);
  bottom: var(--s-1);
  z-index: 1;
  width: clamp(44px, 3.4vw, 58px);
  height: clamp(44px, 3.4vw, 58px);
  margin: 0;
  box-shadow: 0 2px 16px rgba(0, 0, 0, .45);
  transition: transform .2s;
}
.record__frame--cover:hover .record__play { transform: scale(1.06); }

.record__play {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto var(--s-2);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink-strong);
}

.record__label {
  display: block;
  font-size: var(--fs-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.record iframe { border: 0; }

.record__note {
  margin-top: var(--s-1);
  font-size: var(--fs-small);
  color: var(--ink-muted);
}

/* Пометка в списке: у прошедшего мероприятия есть запись */
.event-rec {
  font-size: var(--fs-small);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}
.event-rec::before {
  content: '';
  width: 0; height: 0;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent currentColor;
}

@media print {
  .record__frame { display: none; }
}

/* ==========================================================================
   21. Подкасты: записи мероприятий
   ========================================================================== */

.podcasts { list-style: none; margin: 0; padding: 0; }

/* Подзаголовок с месяцем. Шестнадцать записей подряд сливаются в ленту,
   а так сразу видно, что было когда. */
.podcasts__period {
  font-size: var(--fs-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-top: var(--s-5);
  padding-bottom: var(--s-1);
  border-bottom: 1px solid var(--rule-strong);
}
.podcasts__period:first-child { margin-top: var(--s-2); }

.podcast {
  display: grid;
  grid-template-columns: minmax(280px, 38%) 1fr;
  gap: var(--gutter);
  padding-block: var(--s-4);
  border-top: 1px solid var(--rule);
  align-items: start;
}
.podcast:first-of-type { border-top: 0; }

/* Кадр 16:9 — привычная рамка для видео. Проигрыватель подставляется
   по щелчку: страница с шестнадцатью записями не должна тянуть
   шестнадцать чужих плееров. */
.podcast__frame,
.podcast iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: var(--ink-strong);
}

.podcast__frame {
  position: relative;
  padding: 0;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  color: var(--inverse-ink);
  overflow: hidden;
}

/* Афиша под кнопкой обрезается по краям, поэтому затемняем её сильно:
   иначе текст на афише спорит с треугольником и читаются оба плохо. */
.podcast__frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  transition: background .2s;
}
.podcast__frame:hover::after,
.podcast__frame:focus-visible::after { background: rgba(0, 0, 0, .35); }

/* Своя обложка записи нарисована под этот же кадр: ничего не обрезается,
   и затемнять её значит прятать работу художника. Оставляем лёгкую
   вуаль, чтобы белый кружок держался и на светлой обложке. */
.podcast__frame--cover::after { background: rgba(0, 0, 0, .18); }
.podcast__frame--cover:hover::after,
.podcast__frame--cover:focus-visible::after { background: rgba(0, 0, 0, .04); }

/* На обложке кнопка уходит в угол. По центру она встаёт ровно поверх
   названия — у всех обложек музея заголовок набран слева, — а в нижнем
   левом углу под ней только фон. */
.podcast__frame--cover .podcast__play {
  position: absolute;
  left: var(--s-1);
  bottom: var(--s-1);
  /* Кружок уменьшается вместе с кадром: на телефоне кадр втрое уже,
     и кнопка постоянного размера наезжала бы на имя спикера. */
  width: clamp(40px, 3.4vw, 54px);
  height: clamp(40px, 3.4vw, 54px);
  margin: 0;
  box-shadow: 0 2px 16px rgba(0, 0, 0, .45);
}

.podcast__play {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink-strong);
  transition: transform .2s;
}
.podcast__frame:hover .podcast__play { transform: scale(1.08); }

.podcast__when {
  margin: 0;
  font-size: var(--fs-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.podcast__title {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: var(--s-1) 0 0;
}

.podcast__who {
  margin: var(--s-2) 0 0;
  font-size: var(--fs-small);
  color: var(--ink-muted);
}

.podcast__text { margin-top: var(--s-2); }
.podcast__text p { margin: 0 0 0.6em; }
.podcast__text p:last-child { margin-bottom: 0; }

.podcast__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin: var(--s-3) 0 0;
  font-size: var(--fs-small);
  font-weight: 600;
}
.podcast__links a { text-underline-offset: 0.2em; }

/* На узком экране кадр и текст встают друг под друга, а видео
   разворачивается во всю ширину — смотреть с телефона так удобнее. */
@media (max-width: 900px) {
  .podcast { grid-template-columns: 1fr; gap: var(--s-3); }
  .podcasts__period { margin-top: var(--s-4); }
  .podcast__play { width: 54px; height: 54px; }
}
