/* ============================================================
   МегаБлог — основные стили.
   Сетка и компоненты повторяют каталог; тело статьи свёрстано
   под чтение: колонка 720px, кегль 18px.
   ============================================================ */

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

/* Якоря оглавления не должны уходить под липкую шапку. */
html { scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  /* Подвал прижат к низу окна даже на короткой странице. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }

/* Поля и кнопки форм по умолчанию берут системный шрифт. */
button, input, select, textarea { font: inherit; }

a { color: var(--link); text-decoration: none; } /* подчёркивания при наведении нет: цвет меняется плавно */
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
img { max-width: 100%; height: auto; }

.c { max-width: var(--cw); margin: 0 auto; padding: 0 12px; }

.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--white); padding: 10px 16px;
}
.skip-link:focus { left: 8px; top: 8px; }

:focus-visible {
  /* Тёмное кольцо с белой подложкой читается на любом фоне темы:
     12.8:1 на белом, 5:1 на голубом, 5.2:1 на оранжевом. */
  outline: 2px solid var(--text);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--white);
}

/* Подписи капсом: не мельче 12px. */
.label-caps {
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}

/* ---------- иконки ---------- */
.ic {
  width: 14px; height: 14px; flex: none;
  stroke: currentColor; fill: none; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -2px;
}
.ic-s { width: 16px; height: 16px; color: var(--muted); }

/* ---------- шапка ---------- */
.hdr {
  height: var(--header-h); display: flex; align-items: center; background: var(--white);
  border-bottom: 1px solid var(--edge); box-shadow: var(--shadow);
  position: relative; z-index: 5;
}
.hdr.sticky { position: sticky; top: 0; }
.hdr > .c { display: flex; align-items: center; gap: 12px; width: 100%; }

.logo {
  display: block; width: 200px; height: 31px; flex: none;
  background: url(../img/logoblog.svg) 0 50% / contain no-repeat;
  text-indent: -200em; overflow: hidden;
}

.fld {
  background: var(--field); border-radius: var(--r-ctl); height: 40px;
  display: flex; align-items: center; gap: 8px; padding: 0 14px;
  color: var(--muted); font-size: 14px; border: 0;
}
.fld input {
  border: 0; background: none; color: var(--text);
  width: 100%; outline: none; /* фокус рисует контейнер поля */
}
.fld input::placeholder { color: var(--placeholder); opacity: 1; }
.fld:focus-within {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--white);
}
.fld-search { flex: 1; max-width: 420px; }

/* Кнопка-лупа: только на мобильных, где поле не помещается в шапку. */
.search-toggle {
  display: none; width: 44px; height: 44px; flex: none; margin-left: auto;
  align-items: center; justify-content: center;
  border: 0; border-radius: var(--r-ctl); background: var(--field); color: var(--text); cursor: pointer;
}
.search-toggle .ic { width: 20px; height: 20px; }

/* Прогресс чтения — на нижней кромке липкой шапки, поэтому виден всё время чтения. */
.hdr .progress {
  position: absolute; left: 0; right: 0; bottom: -4px; height: 3px;
  pointer-events: none;
}
.hdr .progress i {
  display: block; height: 3px; width: 0; background: var(--orange);
  border-radius: 0 2px 2px 0;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 20px; font-size: 15px; font-weight: 700; line-height: 1.25;
  border-radius: var(--r-ctl); border: 0; text-align: center;
  white-space: nowrap; cursor: pointer; font-family: var(--font);
  transition: background var(--dur) var(--ease), transform var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn-primary,
.btn-primary:visited,
.btn-primary:hover { background: var(--blue); color: var(--on-blue); }
.btn-primary:hover { background: var(--blue-h); }
.btn-promo,
.btn-promo:visited,
.btn-promo:hover { background: var(--orange); color: var(--on-orange); }
.btn-promo:hover { background: var(--orange-h); }
.hdr .btn { margin-left: auto; }

/* ---------- полоса рубрик ---------- */
.cats { background: var(--blue); }
.cats .c {
  display: flex; align-items: center; height: 46px; gap: 2px;
  overflow-x: auto; scrollbar-width: none;
}
.cats .c::-webkit-scrollbar { display: none; }
.cats a {
  position: relative; color: var(--on-blue); font-size: 16px; font-weight: 700;
  padding: 0 13px; line-height: 46px; white-space: nowrap; flex: none;
  border-radius: 6px 6px 0 0; transition: background var(--dur) var(--ease);
}
.cats a:hover { background: var(--blue-h); } /* с белым текстом наведение затемняет, а не осветляет */
/* Полоса прокручивается и обрезает внешнее кольцо — рисуем его внутри пункта. */
.cats a:focus-visible { outline-offset: -4px; box-shadow: none; }
.cats a.on::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 0;
  height: 3px; background: var(--on-blue); border-radius: 2px 2px 0 0;
}

/* Десктоп: ни одна рубрика не должна прятаться за краем. Если названия не влезают
   в строку, полоса переносится, а не уезжает в невидимую прокрутку. */
@media (min-width: 1001px) {
  .cats .c { flex-wrap: wrap; height: auto; min-height: 46px; overflow: visible; }
}

/* ---------- крошки и заголовки секций ---------- */
.crumbs { font-size: 13px; color: var(--muted); padding: 14px 0 0; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--link); }
.crumbs i { font-style: normal; margin: 0 6px; }

.shead { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding: 18px 0 14px; }
.shead h1, .shead h2 { font-size: 20px; color: var(--grey); }
.shead .cnt { font-size: 14px; color: var(--link); }
.shead .btn { margin-left: auto; align-self: center; }

/* ---------- мета-строки ---------- */
/* Разделители рисуются псевдоэлементом: нет висящих «·» и скринридер их не читает. */
.meta, .post-meta { display: flex; align-items: center; gap: 0; color: var(--muted); }
.meta > * + *::before {
  content: "·"; display: inline-block; margin: 0 8px; opacity: .6;
}
/* Мета статьи переносится на телефоне. Точка стоит перед каждым элементом, а сама строка
   сдвинута влево на ширину разделителя и обрезана: точка в начале любой строки не видна. */
.post-meta { margin-left: -18px; overflow: hidden; }
.post-meta > *::before {
  content: "·"; display: inline-block; width: 18px; text-align: center; opacity: .6;
}
.rubric { color: var(--link); font-weight: 700; }

/* ---------- карточки ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.art { display: flex; flex-direction: column; min-width: 0; }
.art .pic {
  position: relative; display: block; aspect-ratio: 16 / 9;
  border-radius: var(--r-img); margin-bottom: 14px;
}
.art .pic .mask { position: absolute; inset: 0; border-radius: var(--r-img); overflow: hidden; }
.art .pic img,
.art .pic .inner {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform .45s var(--ease);
}
.art:hover .pic img,
.art:hover .pic .inner { transform: scale(1.025); }
.art .pic .is-empty {
  background: var(--field);
  background-image: linear-gradient(135deg, transparent 46%, #DDE2E7 46%, #DDE2E7 54%, transparent 54%);
  background-size: 22px 22px;
}

.art .name { font-size: 16px; line-height: 1.3; margin: 0 0 7px; font-weight: 700; }
.art .name a { color: var(--text); }
.art .name a:hover { color: var(--link); }
.art .excerpt { margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: var(--grey); }
.grid:not(.grid-3):not(.grid-2) .excerpt {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
/* Мета карточки — всегда одна строка: в ряду сетки базовые линии совпадают. */
.art .meta {
  font-size: 13px; margin-top: auto; padding-top: 2px;
  white-space: nowrap; min-width: 0;
}
.art .meta > * { flex: none; }
.art .meta > .rubric,
.art .meta > .city { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ведущая статья и боковой список */
.lead-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 20px; padding-top: 4px; }
.lead-art .name { font-size: 24px; line-height: 1.25; margin-bottom: 10px; }
.lead-art > p { margin: 0 0 10px; font-size: 15px; color: var(--grey); line-height: 1.5; }
.side-list { display: flex; flex-direction: column; gap: 16px; }
.art.side { display: grid; grid-template-columns: 132px 1fr; gap: 14px; align-items: start; }
.art.side .pic { margin-bottom: 0; }
.art.side .name { font-size: 16px; margin-bottom: 6px; }

/* ---------- плитка рубрик ---------- */
.rubs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.rub {
  display: flex; flex-direction: column; gap: 5px;
  border: 1px solid var(--edge); border-radius: var(--r-ctl);
  padding: 15px 17px; background: var(--white);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.rub:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.rub .row { display: flex; align-items: baseline; gap: 8px; }
.rub b { font-size: 16px; color: var(--text); }
.rub:hover b { color: var(--link); }
.rub .row span { font-size: 13px; color: var(--muted); margin-left: auto; font-variant-numeric: tabular-nums; }
.rub em { font-style: normal; font-size: 13.5px; line-height: 1.45; color: var(--muted); }

/* ---------- архивы, поиск, пустые состояния ---------- */
.arch .shead { padding-bottom: 6px; }
.arch .intro { font-size: 14px; color: var(--grey); line-height: 1.6; max-width: 78ch; margin: 0 0 26px; }
.arch .shead + .grid { margin-top: 14px; }

.empty {
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  margin: 6px 0 30px; padding: 22px 24px;
  background: var(--field); border-radius: var(--r-img);
}
.empty p { margin: 0; color: var(--grey); font-size: 16px; line-height: 1.5; max-width: 60ch; }
.empty .fld-search { width: 100%; max-width: 480px; background: var(--white); }

.pager { display: flex; gap: 6px; justify-content: center; padding: 26px 0 8px; }
.pager a, .pager span {
  min-width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--edge); border-radius: var(--r-ctl);
  font-size: 14px; font-weight: 700; color: var(--grey);
  font-variant-numeric: tabular-nums;
}
.pager a:hover { border-color: var(--blue); color: var(--link); }
.pager .current { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }

.cross {
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  background: var(--field); border-radius: var(--r-img);
  padding: 20px 22px; margin-top: 26px;
}
.cross b { font-size: 17px; display: block; margin-bottom: 3px; }
.cross span { font-size: 14px; color: var(--grey); }
.cross .btn { margin-left: auto; }

/* ---------- статья ---------- */
.post-cover { border-radius: var(--r-img); aspect-ratio: 21 / 9; margin: 16px 0 20px; overflow: hidden; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post h1 { font-size: 32px; line-height: 1.2; margin: 0 0 12px; max-width: 30ch; text-wrap: balance; }
/* Без обложки заголовок не должен прилипать к крошкам. */
.post .crumbs + h1 { margin-top: 22px; }
.post-meta { flex-wrap: wrap; font-size: 13.5px; padding-bottom: 26px; row-gap: 4px; }

.post-layout { display: grid; grid-template-columns: 212px minmax(0, 720px); gap: 48px; padding-bottom: 10px; }
.post-layout.is-single-column { grid-template-columns: minmax(0, 720px); }

/* Блок оглавления стоит внутри текста, а показывается слева от него. */
.post-layout > .toc { grid-column: 1; grid-row: 1; margin: 0; }
.post-layout > .post-main { grid-column: 2; grid-row: 1; min-width: 0; }
.post-layout.is-single-column > .post-main { grid-column: 1; }

/* Оглавление. Липнет только при включённой настройке блока «Закреплять сбоку». */
.toc { align-self: start; font-size: 14px; }
.toc.is-sticky {
  position: sticky; top: calc(var(--header-h) + 16px);
  max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto;
}
.toc .t { margin-bottom: 10px; }
.toc summary { list-style: none; cursor: default; display: flex; align-items: center; min-height: 24px; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--edge); }
.toc a {
  display: block; padding: 6px 0 6px 14px; margin-left: -2px;
  border-left: 2px solid transparent; color: var(--grey); line-height: 1.35;
}
.toc a:hover { color: var(--text); }
.toc a.on { color: var(--link); border-left-color: var(--blue); font-weight: 700; }
.toc li.sub a { padding-left: 26px; font-size: 13.5px; }
.toc .toc-count { display: none; }

.body { font-size: 18px; line-height: 1.72; color: var(--text); overflow-wrap: anywhere; }
.body > p { margin: 0 0 22px; }
.body h2 { font-size: 26px; margin: 38px 0 14px; line-height: 1.25; }
.body h3 { font-size: 20px; margin: 28px 0 10px; line-height: 1.3; }
/* Подчёркиваем только ссылки в тексте — не кнопки, карточки и служебные блоки. */
.body p a:not(.btn),
.body li a,
.body td a,
.body figcaption a,
.body blockquote a { text-decoration: underline; text-underline-offset: 2px; }
.body .wp-element-button,
.body .wp-block-button__link { text-decoration: none; }
.body ul, .body ol { margin: 0 0 22px; padding-left: 24px; }
.body li { margin-bottom: 8px; }
.body figure { margin: 26px 0; }
.body figure img { border-radius: var(--r-img); }
.body figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; line-height: 1.5; }

/* Стандартная таблица WordPress — в светлых линиях темы. Тень у правого края
   подсказывает, что широкую таблицу можно листать. */
.body .wp-block-table {
  overflow-x: auto; margin: 26px 0;
  background:
    linear-gradient(to right, var(--white) 30%, rgba(255, 255, 255, 0)),
    linear-gradient(to left, rgba(50, 50, 50, .12), rgba(50, 50, 50, 0) 14px) right / 14px 100% no-repeat;
  background-attachment: local, scroll;
}
.body table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
.body .wp-block-table th,
.body .wp-block-table td {
  border: 0; border-bottom: 1px solid var(--edge);
  padding: 10px 14px 10px 0; text-align: left; vertical-align: top;
}
.body .wp-block-table thead { border: 0; }
.body .wp-block-table thead th {
  border-bottom: 2px solid var(--edge); font-size: 13px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; white-space: nowrap;
}
.body .wp-block-table figcaption { text-align: left; }

/* Стандартная цитата WordPress — как «Цитата эксперта». */
.body .wp-block-quote {
  margin: 26px 0; padding: 4px 0 4px 20px;
  border-left: 4px solid var(--blue); color: var(--grey); font-size: 19px; font-style: italic;
}
.body .wp-block-quote p { margin: 0 0 10px; }
.body .wp-block-quote cite {
  display: block; font-size: 14px; font-style: normal; color: var(--muted);
}

/* ---------- низ статьи: поделиться и похожие ---------- */
.post-foot { margin-top: 34px; }
.post-foot .label-caps { display: block; margin: 0 0 12px; }
.share {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin: 0 0 34px; padding: 16px 0;
  border-top: 1px solid var(--edge); border-bottom: 1px solid var(--edge);
}
.share .label-caps { margin: 0 4px 0 0; }
.share .sb {
  display: inline-flex; align-items: center; min-height: 40px;
  font-size: 13.5px; font-weight: 700; line-height: 1.2; padding: 0 15px;
  border: 1px solid var(--edge); border-radius: var(--r-ctl);
  color: var(--grey); background: none; cursor: pointer;
}
.share .sb:hover { border-color: var(--blue); color: var(--link); }
.share .copy-status { font-size: 13px; color: var(--muted); }

/* ---------- подписка и подвал ---------- */
.subs { background: var(--blue); color: var(--on-blue); margin-top: 34px; }
.subs .c { display: flex; align-items: center; gap: 12px 20px; padding: 14px 12px; flex-wrap: wrap; }
.subs .txt { font-size: 16px; font-weight: 700; line-height: 1.35; }
.subs .txt small { display: block; font-weight: 400; font-size: 14px; margin-top: 2px; }
.subs form { display: flex; gap: 8px; margin-left: auto; }
.subs > .c > .btn { margin-left: auto; }
.subs .fld { background: var(--white); width: 230px; }

.ftr {
  background: var(--white); color: var(--grey); font-size: 13.5px;
  border-top: 1px solid var(--edge);
}
.ftr .c { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; padding: 14px 12px; }
.ftr a { color: var(--grey); }
.ftr a:hover { color: var(--link); }
.ftr .ph { margin-left: auto; font-size: 17px; font-weight: 700; color: var(--text); }

/* ---------- адаптив ---------- */
@media (max-width: 1000px) {
  .grid, .rubs { grid-template-columns: repeat(2, 1fr); }
  .lead-row { grid-template-columns: 1fr; }
  /* minmax(0, …) обязателен: при простом 1fr широкая таблица раздувает колонку. */
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  /* Снимаем раскладку «оглавление слева, текст справа», иначе остаётся неявная вторая колонка. */
  .post-layout > .toc,
  .post-layout > .post-main { grid-column: 1; grid-row: auto; }
  .post-layout > .toc { margin: 0 0 24px; }
  .toc.is-sticky { position: static; max-height: none; overflow: visible; }
  .post h1 { max-width: none; }

  /* Оглавление на узком экране свёрнуто в одну строку «Содержание (N)». */
  .toc details:not([open]) ol { display: none; }
  .toc summary {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    cursor: pointer; min-height: 44px; padding: 0 14px;
    background: var(--field); border-radius: var(--r-ctl);
  }
  .toc summary::after {
    content: "▾"; color: var(--muted); font-size: 14px;
    transition: transform var(--dur) var(--ease);
  }
  .toc details[open] summary::after { transform: rotate(180deg); }
  .toc details[open] ol { animation: mb-drop var(--dur) var(--ease); }
  .toc details[open] summary { margin-bottom: 10px; }
  /* На сером фоне кнопки подпись тёмная: серый #6B7278 на #EDEEF0 — только 4.2:1. */
  .toc summary .t { margin: 0; color: var(--text); }
  .toc .toc-count { display: inline; }
}

@media (max-width: 640px) {
  .grid, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  /* Плитка рубрик в две колонки без описаний — иначе 8 плашек занимают три экрана. */
  .rubs { grid-template-columns: 1fr 1fr; gap: 8px; }
  .rub { padding: 12px 14px; }
  .rub em { display: none; }

  .logo { width: 170px; }
  .search-toggle { display: inline-flex; }
  .hdr .btn { margin-left: 0; }
  .fld-search { display: none; }
  .hdr.is-search-open .fld-search {
    display: flex; position: absolute; left: 12px; right: 12px; top: calc(100% + 8px);
    max-width: none; height: 48px; background: var(--white);
    box-shadow: 0 6px 20px rgba(50, 50, 50, .18); z-index: 6;
  }
  /* 16px в поле: иначе iOS увеличивает страницу при фокусе. */
  .fld { font-size: 16px; }

  .btn { min-height: 44px; }
  .share .sb { min-height: 44px; }
  .ftr a { padding: 10px 0; }
  .ftr .ph { margin-left: 0; }

  .post h1 { font-size: 25px; }
  .post-cover { aspect-ratio: 16 / 9; }
  .subs form { margin-left: 0; width: 100%; }
  .subs .fld { flex: 1; width: auto; }
  .subs > .c > .btn { margin-left: 0; }
  .cross .btn { margin-left: 0; }
}


/* ============================================================
   Анимации и плавность — умеренно.
   Только transform и opacity: без перерисовки сетки, CLS не растёт.
   Всё выключается при prefers-reduced-motion (правило в конце файла).
   ============================================================ */

@keyframes mb-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes mb-fade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Цвет ссылок и подписей меняется плавно, а не рывком. */
a,
.share .sb,
.pager a,
.toc a,
.search-toggle { transition: color var(--dur-fast) var(--ease), background-color var(--dur) var(--ease), border-color var(--dur) var(--ease); }

/* Кнопки: нажатие чуть утапливает, стрелка «Вся лента» подаётся вперёд. */
.btn:active,
.share .sb:active,
.search-toggle:active { transform: translateY(1px); }
.btn .ic { transition: transform var(--dur) var(--ease); }

/* Наведение — только там, где есть мышь: на телефоне «залипшая» приподнятая карточка мешает. */
@media (hover: hover) {
  .btn:hover .ic { transform: translateX(3px); }

  /* Карточка едва приподнимается, под обложкой — лёгкая тень. */
  .art { transition: transform .3s var(--ease); }
  .art .pic { transition: box-shadow .3s var(--ease); }
  .art:hover { transform: translateY(-2px); }
  .art:hover .name a { color: var(--link); }
  .art:hover .pic { box-shadow: 0 6px 16px -10px rgba(27, 36, 48, .22); }
  .art.side:hover { transform: translateY(-1px); }
  .art.side:hover .pic { box-shadow: 0 4px 12px -8px rgba(27, 36, 48, .2); }

  .rub:hover { transform: translateY(-1px); }
}

/* Поиск на телефоне выезжает из-под шапки. */
.hdr.is-search-open .fld-search { animation: mb-drop var(--dur) var(--ease); }

/* «Ссылка скопирована» проявляется. */
.share .copy-status:not(:empty) { animation: mb-fade var(--dur) var(--ease); }

/* ---------- проявление карточек в лентах ----------
   Класс mb-reveal ставит скрипт, только если браузер умеет IntersectionObserver
   и пользователь не просил уменьшить движение. Без скрипта всё видно сразу.
   Сдвиг задан свойством translate, а не transform: transform занят наведением. */
.mb-reveal [data-reveal] {
  opacity: 0;
  translate: 0 18px;
  transition:
    opacity var(--dur-slow) var(--ease) var(--reveal-delay, 0s),
    translate var(--dur-slow) var(--ease) var(--reveal-delay, 0s),
    transform var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}
.mb-reveal [data-reveal].is-in { opacity: 1; translate: none; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .art:hover, .rub:hover, .btn:hover .ic { transform: none !important; }
  [data-reveal] { opacity: 1 !important; translate: none !important; }
}

/* Цели программного фокуса (main после skip-link, заголовок после перехода из оглавления)
   не обводим рамкой: фокус там нужен скринридеру и для следующего Tab, а не глазу. */
main:focus,
[tabindex="-1"]:focus { outline: none; box-shadow: none; }
