/*
Theme Name: АМДН
Theme URI: https://amdn.org
Description: Лёгкая современная тема для amdn.org: удобное чтение, тёмный режим, быстрая мобильная версия.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: amdn
*/

@font-face {
  font-family: Onest; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(fonts/onest-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Onest; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(fonts/onest-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f6f6f1;
  --surface: #ffffff;
  --ink: #15181c;
  --ink-2: #4c545e;
  --ink-3: #7b838d;
  --line: #e4e4dc;
  --accent: #0b8f4d;
  --accent-ink: #087a41;
  --accent-soft: #e3f4ea;
  --on-accent: #ffffff;
  --shadow: 0 1px 2px rgba(20, 24, 28, .05), 0 8px 24px -12px rgba(20, 24, 28, .18);
  --r: 18px;
  --r-sm: 12px;
  --wrap: 1240px;
  --gut: clamp(16px, 4vw, 32px);
  --font: Onest, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1113; --surface: #171b1f; --ink: #eceef0; --ink-2: #b1b8c0; --ink-3: #838b94; --line: #262c32;
    --accent: #35c27a; --accent-ink: #4fd08c; --accent-soft: #14301f; --on-accent: #06210f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -14px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1113; --surface: #171b1f; --ink: #eceef0; --ink-2: #b1b8c0; --ink-3: #838b94; --line: #262c32;
  --accent: #35c27a; --accent-ink: #4fd08c; --accent-soft: #14301f; --on-accent: #06210f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -14px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--font); font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-wrap: break-word;
}
img, video, iframe, embed, object { max-width: 100%; }
img { height: auto; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .18em; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.015em; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.lock { overflow: hidden; }
[hidden] { display: none !important; }

.sr, .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--accent); color: var(--on-accent); border-radius: 10px; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.wrap--narrow { max-width: calc(760px + var(--gut) * 2); }
.main { display: block; padding-bottom: 56px; min-height: 60vh; }

/* ——— Шапка ——— */
.top {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.top--stuck { border-bottom-color: var(--line); }
.top__in { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.logo { display: flex; flex-direction: column; line-height: 1; color: var(--accent); flex: none; }
.logo:hover { text-decoration: none; }
.logo__mark { display: inline-flex; align-items: center; gap: .16em; font-weight: 800; font-size: 26px; letter-spacing: .01em; color: var(--accent); }
.logo__mark svg { width: .82em; height: .82em; fill: none; stroke: currentColor; stroke-width: 2.2; }
.logo__tag { margin-top: 5px; font-size: 9.5px; letter-spacing: .34em; text-transform: lowercase; color: var(--ink-3); white-space: nowrap; }

.nav { flex: 1; min-width: 0; }
.nav .menu { display: flex; justify-content: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav .menu a {
  display: block; padding: 8px 12px; border-radius: 999px; color: var(--ink-2);
  font-size: 14.5px; font-weight: 550; white-space: nowrap; text-transform: lowercase;
}
.nav .menu a::first-letter { text-transform: uppercase; }
.nav .menu a:hover { background: var(--surface); color: var(--ink); text-decoration: none; }
.nav .current-menu-item > a, .nav .current-post-ancestor > a, .nav .current-category-ancestor > a { background: var(--accent-soft); color: var(--accent-ink); }

.top__tools { display: flex; gap: 4px; margin-left: auto; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer;
}
.icon-btn:hover { background: var(--surface); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .i-moon { display: block; } :root:not([data-theme="light"]) .i-sun { display: none; } }
:root[data-theme="dark"] .i-moon { display: block; }
:root[data-theme="dark"] .i-sun { display: none; }
.burger { display: none; }

/* ——— Выдвижные панели ——— */
.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(8, 10, 12, .5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade .18s ease; }
.sheet__panel {
  position: absolute; inset: 0 0 0 auto; width: min(360px, 88vw); padding: 14px 20px calc(24px + env(safe-area-inset-bottom));
  background: var(--bg); overflow-y: auto; display: flex; flex-direction: column; gap: 10px; animation: slide .24s cubic-bezier(.2, .8, .2, 1);
}
.sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sheet .menu { list-style: none; margin: 0 0 12px; padding: 0; }
.sheet .menu a { display: block; padding: 13px 4px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 19px; font-weight: 600; text-transform: lowercase; }
.sheet .menu a::first-letter { text-transform: uppercase; }
.sheet .menu a:hover { text-decoration: none; color: var(--accent-ink); }
.sheet--search .sheet__panel {
  inset: 0 0 auto 0; width: auto; flex-direction: row; align-items: center; gap: 8px;
  padding: 14px var(--gut); border-bottom: 1px solid var(--line); animation-name: drop;
}
.sheet--search .sform { flex: 1; max-width: 760px; margin-inline: auto; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
@keyframes drop { from { transform: translateY(-16px); opacity: 0; } }

/* ——— Кнопки, поля, метки ——— */
.btn, .es_submit_button, .wp-block-button__link, input[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px;
  border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-weight: 650; font-size: 15.5px; cursor: pointer; transition: filter .15s, transform .15s;
}
.btn:hover, .es_submit_button:hover, input[type="submit"]:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
input[type="search"], input[type="text"], input[type="email"], input[type="url"], textarea {
  width: 100%; min-height: 46px; padding: 10px 16px; border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--ink); outline: 0; transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.sform { display: flex; gap: 8px; }
.sform input { flex: 1; min-width: 0; border-radius: 999px; padding-inline: 20px; }
.sform .btn { flex: none; }

.chip {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; line-height: 1.4;
}
.chip:hover { text-decoration: none; filter: brightness(.96); }
.chip--lg { padding: 9px 16px; font-size: 13px; background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
.chip--lg:hover { color: var(--accent-ink); box-shadow: inset 0 0 0 1.5px var(--accent); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-block: 4px; margin-block: 28px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.page-head .chips { margin: 16px 0 0; }

/* ——— Карточки ——— */
.card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.card__media {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r);
  background: var(--line); box-shadow: var(--shadow);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.card:hover .card__media img { transform: scale(1.04); }
.cover-blank {
  display: grid; place-items: center; width: 100%; height: 100%; font-size: 56px; color: rgba(255, 255, 255, .85);
  background: linear-gradient(135deg, hsl(var(--h) 45% 38%), hsl(calc(var(--h) + 50) 55% 24%));
}
.card__play {
  position: absolute; left: 12px; bottom: 12px; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(12, 14, 16, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.card__play::after { content: ""; position: absolute; left: 15px; top: 12px; border: 7px solid transparent; border-left: 11px solid #fff; border-right: 0; }
.card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 4px 0; }
.card__title { font-size: 18px; font-weight: 650; line-height: 1.3; }
.card__title a { color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card__title a:hover { text-decoration: none; color: var(--accent-ink); }
.card .chip { position: relative; z-index: 2; }
.card__date { font-size: 13px; color: var(--ink-3); }
.card__excerpt { margin: 0; color: var(--ink-2); font-size: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.card--row { flex-direction: row; gap: 14px; align-items: center; }
.card--row .card__media { flex: none; width: 132px; border-radius: var(--r-sm); }
.card--row .card__body { padding: 0; gap: 6px; }
.card--row .card__title { font-size: 16px; font-weight: 600; }
.card--row .card__play { width: 28px; height: 28px; left: 8px; bottom: 8px; }
.card--row .card__play::after { left: 11px; top: 9px; border-width: 5px; border-left-width: 8px; }

.card--hero .card__title { font-size: clamp(24px, 3.2vw, 38px); font-weight: 750; line-height: 1.12; letter-spacing: -.025em; }
.card--hero .card__body { padding-top: 18px; gap: 10px; }

/* ——— Главная ——— */
.lead { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); padding-top: 20px; }
.lead__side { display: flex; flex-direction: column; gap: 18px; padding-left: clamp(0px, 2vw, 28px); border-left: 1px solid var(--line); }
.lead__side .card--row + .card--row { padding-top: 18px; border-top: 1px solid var(--line); }

.block { margin-top: clamp(40px, 6vw, 68px); }
.block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.block__title { font-size: clamp(22px, 2.6vw, 30px); font-weight: 750; }
.block__title::before { content: ""; display: inline-block; width: .42em; height: .42em; margin-right: .42em; border-radius: 50%; background: var(--accent); vertical-align: .12em; }
.more { font-size: 15px; font-weight: 600; white-space: nowrap; }

.grid { display: grid; gap: clamp(22px, 2.6vw, 34px) clamp(16px, 2vw, 28px); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.top-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; counter-reset: n; }
.top-list li { counter-increment: n; display: flex; gap: 16px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); }
.top-list li::before { content: counter(n, decimal-leading-zero); font-weight: 800; font-size: 22px; color: var(--accent); font-variant-numeric: tabular-nums; }
.top-list a { color: var(--ink); font-weight: 600; font-size: 17px; line-height: 1.35; }

.page-head { padding: 28px 0 28px; }
.page-head__title { font-size: clamp(28px, 4.4vw, 46px); font-weight: 800; letter-spacing: -.03em; }
.page-head__note { margin-top: 10px; color: var(--ink-2); max-width: 70ch; }
.page-head .sform { margin-top: 18px; max-width: 560px; }
.block:has(> .page-head) { margin-top: 0; }
.empty { color: var(--ink-2); }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 44px; }
.pager .page-numbers, .pager > a, .pager > span {
  display: inline-grid; place-items: center; min-width: 46px; height: 46px; padding: 0 12px; border-radius: 999px;
  background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line);
}
.pager a:hover { text-decoration: none; box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent-ink); }
.pager .current { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.pager .dots { background: none; box-shadow: none; min-width: 20px; padding: 0; }

/* ——— Запись ——— */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 50; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }

.article { max-width: calc(760px + var(--gut) * 2); margin-inline: auto; padding: clamp(20px, 4vw, 44px) var(--gut) 0; }
.post__cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.post__title { font-size: clamp(28px, 5vw, 46px); font-weight: 800; line-height: 1.1; letter-spacing: -.03em; }
.post__meta { display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: 18px; color: var(--ink-3); font-size: 14.5px; }
.post__meta > * + *::before { content: "·"; margin: 0 .6em; }
.post__meta a { color: inherit; }

.post__content { margin-top: clamp(22px, 3.4vw, 36px); font-size: clamp(17.5px, 1.2vw + 14px, 19.5px); line-height: 1.72; color: var(--ink); }
.post__content > * { margin-block: 0 1.15em; }
.post__content h2, .post__content h3, .post__content h4 { margin-top: 1.7em; margin-bottom: .6em; font-weight: 750; }
.post__content h2 { font-size: 1.5em; }
.post__content h3 { font-size: 1.25em; }
.post__content h4 { font-size: 1.1em; }
.post__content a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-underline-offset: .2em; text-decoration-thickness: 1.5px; }
.post__content a:hover { text-decoration-color: currentColor; }
.post__content img { border-radius: var(--r-sm); }
.post__content figure { margin-inline: 0; max-width: 100%; }
/* Записи колонки «Пилигрим»: главная фотография и галерея под текстом */
.post__content .tg-cover { margin: 0 0 1.4em; }
.post__content .tg-cover img { display: block; width: 100%; height: auto; max-height: 620px; object-fit: cover; box-shadow: var(--shadow); }
.post__content .tg-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 2em; }
.post__content .tg-gallery a { display: block; overflow: hidden; border-radius: var(--r-sm); }
.post__content .tg-gallery img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0; transition: transform .3s; }
.post__content .tg-gallery a:hover img { transform: scale(1.04); }
@media (max-width: 560px) { .post__content .tg-gallery { grid-template-columns: repeat(2, 1fr); gap: 6px; } }
.post__content .wp-caption { max-width: 100% !important; width: auto !important; }
.post__content figcaption, .post__content .wp-caption-text { margin-top: 8px; font-size: .8em; color: var(--ink-3); text-align: center; }
.post__content .aligncenter { display: block; margin-inline: auto; }
.post__content .alignleft { float: left; margin: .3em 1.4em 1em 0; max-width: 46%; }
.post__content .alignright { float: right; margin: .3em 0 1em 1.4em; max-width: 46%; }
.post__content blockquote {
  margin-inline: 0; padding: 18px 22px; border-left: 4px solid var(--accent); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--surface); color: var(--ink-2);
}
.post__content blockquote > :last-child { margin-bottom: 0; }
.post__content ul, .post__content ol { padding-left: 1.3em; }
.post__content li { margin-bottom: .45em; }
.post__content li::marker { color: var(--accent); }
.post__content hr { border: 0; height: 1px; background: var(--line); margin-block: 2em; }
.post__content pre { overflow-x: auto; padding: 16px; border-radius: var(--r-sm); background: var(--surface); font-size: .85em; }
.post__content::after { content: ""; display: block; clear: both; }
/* Старые записи с жёстко заданными цветами и шрифтами приводим к общему виду */
.post__content span[style*="font-family"], .post__content p[style*="font-family"], .post__content font { font-family: inherit !important; }
.post__content [style*="font-size"] { font-size: inherit !important; }
.post__content [style*="color: #000"], .post__content [style*="color:#000"], .post__content [style*="color: black"],
.post__content [style*="color: #333"], .post__content [style*="color: #222"], .post__content [style*="color: #111"] { color: inherit !important; }
.post__content [style*="background-color: #fff"], .post__content [style*="background: #fff"], .post__content [style*="background-color: white"] { background: transparent !important; }

/* Видео */
.post__content iframe, .post__content embed, .post__content object, .post__content video, .rll-youtube-player {
  display: block; width: 100%; height: auto !important; aspect-ratio: 16 / 9; border: 0; border-radius: var(--r); background: #000; box-shadow: var(--shadow);
}
.post__content iframe[src*="soundcloud"], .post__content iframe[src*="podfm"], .post__content iframe[src*="instagram"] { aspect-ratio: auto; min-height: 170px; }
.rll-youtube-player { position: relative; overflow: hidden; cursor: pointer; padding: 0 !important; margin-bottom: 0 !important; }
.rll-youtube-player img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; margin: 0; }
.rll-youtube-player iframe { position: absolute; inset: 0; height: 100%; box-shadow: none; border-radius: 0; }
/* Кнопка запуска: плагин отложенной загрузки делает её на всю площадь ролика — рисуем значок поверх */
.rll-youtube-player .play { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background-image: none !important; cursor: pointer; z-index: 2; }
.rll-youtube-player .play::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 74px; height: 74px; margin: -37px 0 0 -37px; border-radius: 50%;
  background: rgba(12, 14, 16, .62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform .2s, background .2s;
}
.rll-youtube-player .play::after { content: ""; position: absolute; left: 50%; top: 50%; margin: -14px 0 0 -8px; border: 14px solid transparent; border-left: 22px solid #fff; border-right: 0; }
.rll-youtube-player:hover .play::before { transform: scale(1.08); background: var(--accent); }
.wp-block-embed__wrapper { position: static; }
.wp-block-embed__wrapper::before { display: none !important; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.post__content table { border-collapse: collapse; width: 100%; font-size: .88em; }
.post__content td, .post__content th { padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; }
.wpusb { display: none !important; }
.post-views { display: none; }

.post__foot { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 22px; }
.post__tags { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.htag { color: var(--ink-2); font-size: 15px; }
.htag:hover { color: var(--accent-ink); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share__label { margin-right: 6px; color: var(--ink-3); font-size: 14.5px; }
.share__btn {
  display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border: 0; border-radius: 999px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font-size: 14.5px; font-weight: 600; cursor: pointer;
}
.share__btn:hover { text-decoration: none; box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent-ink); }

.neighbors { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 36px; }
.neighbors__a {
  display: block; padding: 18px 20px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink); font-weight: 600; line-height: 1.35; font-size: 16px;
}
.neighbors__a small { display: block; margin-bottom: 6px; color: var(--ink-3); font-weight: 500; font-size: 13px; }
.neighbors__a--next { text-align: right; grid-column: 2; }
.neighbors__a:hover { text-decoration: none; box-shadow: inset 0 0 0 1.5px var(--accent); }

.comments { margin-top: 48px; }
.comments__list, .comments__list .children { list-style: none; margin: 20px 0; padding: 0; }
.comments__list .children { padding-left: 20px; border-left: 2px solid var(--line); }
.comments__list .comment-body { padding: 16px 0; border-bottom: 1px solid var(--line); }
.comments__list .avatar { border-radius: 50%; float: left; margin-right: 12px; }
.comment-metadata { font-size: 13px; color: var(--ink-3); }
.comment-metadata a { color: inherit; }
.comment-form { display: grid; gap: 12px; }
.comment-form label { display: block; margin-bottom: 4px; font-size: 14px; color: var(--ink-2); }
.comment-form p { margin: 0; }
.comments__n { color: var(--ink-3); font-weight: 500; }

.notfound { padding-top: 48px; text-align: center; }
.notfound__code { margin: 0; font-size: clamp(80px, 18vw, 160px); font-weight: 800; line-height: 1; color: var(--accent); letter-spacing: -.05em; }
.notfound .sform { margin: 24px auto 0; max-width: 520px; }

/* ——— Подвал ——— */
.foot { margin-top: 40px; padding: clamp(36px, 5vw, 60px) 0 calc(24px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.foot__grid { display: grid; grid-template-columns: 1.1fr .8fr 1.2fr 1.2fr; gap: 36px clamp(24px, 3vw, 48px); }
.foot__col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.foot__col p { margin: 0; }
.foot__title { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.foot .menu { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 24px; width: 100%; }
.foot .menu a { display: inline-block; padding: 5px 0; color: var(--ink); text-transform: lowercase; }
.foot .menu a::first-letter { text-transform: uppercase; }
.foot__about .btn { min-height: 42px; }
.video-alt { display: block; margin-top: 8px; font-size: 14px; color: var(--ink-3); }
.video-alt a { font-weight: 600; }

/* Просмотр фотографий записи поверх страницы */
.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: rgba(8, 9, 11, .94); }
.lb[hidden] { display: none; }
.lb__img { max-width: min(94vw, 1500px); max-height: 90vh; border-radius: 6px; box-shadow: 0 10px 50px rgba(0, 0, 0, .6); cursor: pointer; transition: opacity .2s; user-select: none; }
.lb__img.is-loading { opacity: .4; }
.lb__btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0 0 4px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font: 400 30px/1 system-ui, sans-serif; cursor: pointer; }
.lb__btn:hover { background: rgba(255, 255, 255, .26); }
.lb__close { top: max(14px, env(safe-area-inset-top)); right: 14px; }
.lb__prev { left: 14px; top: 50%; margin-top: -24px; }
.lb__next { right: 14px; top: 50%; margin-top: -24px; }
.lb__count { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); padding: 4px 12px; border-radius: 999px; background: rgba(0, 0, 0, .5); color: #dfe3e8; font-size: 13.5px; }
.lb--one .lb__prev, .lb--one .lb__next, .lb--one .lb__count { display: none; }
@media (max-width: 640px) { .lb__img { max-width: 100vw; max-height: 82vh; border-radius: 0; } .lb__prev, .lb__next { top: auto; bottom: 12px; margin: 0; } }

/* Шумановские резонансы: карточка всегда тёмная — у графиков обсерватории чёрный фон */
.shm__card { width: 100%; padding: 14px; border-radius: var(--r-sm); background: #0a0c0f; color: #c9d0d8; border: 1px solid #1d2329; }
.shm__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.shm__title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 15px; font-weight: 700; color: #fff; }
.shm__dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgba(61, 220, 132, .6); animation: shm-pulse 2.4s ease-out infinite; }
@keyframes shm-pulse { 70% { box-shadow: 0 0 0 9px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }
.shm__tabs { display: flex; width: 100%; gap: 1px; padding: 3px; border-radius: 999px; background: #161b21; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.shm__tabs::-webkit-scrollbar { display: none; }
.shm__tab { flex: 1 0 auto; min-height: 28px; padding: 0 4px; border: 0; border-radius: 999px; background: none; color: #a9b2bc; font: inherit; font-size: 11px; font-weight: 600; letter-spacing: -.01em; cursor: pointer; }
.shm__tab:hover { color: #fff; }
.shm__tab.is-on { background: #fff; color: #0a0c0f; }
.shm__view { display: block; border-radius: 8px; overflow: hidden; background: #000; }
.shm__img { display: block; width: 100%; height: auto; transition: opacity .25s; }
.shm__img.is-loading { opacity: .35; }
.foot .shm__note, .foot .shm__fail { margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: #8f99a4; }
.shm__note a, .shm__fail a { color: #c9d0d8; text-decoration: underline; }
.shm__desc { display: none; }
@media (prefers-reduced-motion: reduce) { .shm__dot { animation: none; } }
.foot__sub .emaillist, .foot__sub form { width: 100%; }
.foot__sub form { display: flex; flex-wrap: wrap; gap: 8px; }
.foot__sub .es-field-wrap { flex: 1 1 180px; margin: 0; }
.foot__sub .es-field-wrap label { display: block; }
.foot__sub .es_caption, .foot__sub .es_spinner_image { display: none; }
.foot__sub input[type="email"] { border-radius: 999px; background: var(--bg); }
.foot__sub label[aria-hidden="true"] { position: absolute; left: -9999px; }
.es_subscription_message { display: block; margin-top: 8px; font-size: 14px; }
.foot__bottom { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-3); }
.foot__bottom span { margin-right: auto; }
.foot__bottom a { color: var(--ink-2); }

/* ——— Планшет и телефон ——— */
@media (max-width: 1080px) {
  .nav { display: none; }
  .burger { display: inline-grid; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .lead { grid-template-columns: 1fr; }
  .lead__side { padding-left: 0; border-left: 0; padding-top: 20px; border-top: 1px solid var(--line); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  body { font-size: 16.5px; }
  .top__in { min-height: 58px; gap: 8px; }
  .logo__mark { font-size: 23px; }
  .logo__tag { font-size: 8px; letter-spacing: .3em; }
  .grid--3, .grid--4 { grid-template-columns: 1fr; gap: 0; }
  .top-list { grid-template-columns: 1fr; }
  /* На телефоне карточки в списках — компактной строкой: больше материалов на экран, меньше трафика */
  .grid .card { flex-direction: row; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
  .grid .card:first-child { border-top: 0; padding-top: 0; }
  .grid .card__media { flex: none; width: 118px; border-radius: var(--r-sm); box-shadow: none; }
  .grid .card__body { padding: 0; gap: 5px; }
  .grid .card__title { font-size: 16px; font-weight: 600; line-height: 1.28; }
  .grid .card .chip { padding: 0; background: none; font-size: 10.5px; }
  .grid .card__play { width: 26px; height: 26px; left: 6px; bottom: 6px; }
  .grid .card__play::after { left: 10px; top: 8px; border-width: 5px; border-left-width: 8px; }
  .card--row .card__media { width: 118px; }
  .lead .card--hero .card__media { margin-inline: calc(var(--gut) * -1); border-radius: 0; box-shadow: none; }
  .lead { padding-top: 0; }
  .post__content iframe, .post__content embed, .post__content object, .post__content video, .rll-youtube-player,
  .post__content > p > img:only-child, .post__content > figure > img, .post__content > img {
    width: calc(100% + var(--gut) * 2); max-width: none !important; margin-inline: calc(var(--gut) * -1); border-radius: 0; box-shadow: none;
  }
  .post__content .alignleft, .post__content .alignright { float: none; display: block; margin: 0 auto 1em; max-width: 100%; }
  .neighbors { grid-template-columns: 1fr; }
  .neighbors__a--next { grid-column: 1; text-align: left; }
  .foot__grid { grid-template-columns: 1fr; }
  .share__label { width: 100%; }
}
@media (hover: none) { .card:hover .card__media img { transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .top, .foot, .sheet, .share, .neighbors, .progress, .block { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Старые записи: выравнивание по ширине на узком экране рвёт строки — выравниваем по левому краю */
.post__content [style*="justify"], .post__content [align="justify"] { text-align: left !important; }
.post__content pre { white-space: pre-wrap; }

/* Плашка на месте удалённого видео (модуль amdn-video-fix) */
.video-gone {
  display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; border-radius: var(--r);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: .86em; line-height: 1.5; color: var(--ink-2);
}
.video-gone strong { color: var(--ink); font-size: 1.08em; }
.video-gone__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.video-gone__links a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; text-decoration: none;
}
.video-gone__links a:hover { filter: brightness(.96); }
.video-note { display: block; margin-top: 8px; font-size: .78em; color: var(--ink-3); }

/* Обложка статьи из набора темы и подпись с автором снимка */
.post__cover { margin: clamp(20px, 3vw, 32px) 0 0; }
.post__cover img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: cover; border-radius: var(--r); box-shadow: var(--shadow); }
.post__cover figcaption { margin-top: 8px; font-size: 12.5px; color: var(--ink-3); }
.post__cover figcaption a { color: inherit; text-decoration: underline; }
@media (max-width: 600px) {
  .post__cover img { width: calc(100% + var(--gut) * 2); max-width: none; margin-inline: calc(var(--gut) * -1); border-radius: 0; box-shadow: none; }
}

/* ═══════ Доработки 13.10.2026: главное, рубрики, «Читают сейчас», «Поделиться», навигация ═══════ */

/* ——— Первый экран главной: главная запись крупно, заголовок поверх картинки ——— */
.lead { align-items: stretch; }
.lead .card--hero { position: relative; border-radius: calc(var(--r) + 4px); overflow: hidden; box-shadow: var(--shadow); isolation: isolate; }
.lead .card--hero .card__media { aspect-ratio: auto; height: 100%; min-height: clamp(320px, 38vw, 500px); border-radius: 0; box-shadow: none; }
.lead .card--hero .card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 10, 12, 0) 30%, rgba(8, 10, 12, .55) 62%, rgba(8, 10, 12, .9) 100%); }
.lead .card--hero .card__play { left: auto; right: 16px; top: 16px; bottom: auto; }
.lead .card--hero .card__body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: clamp(18px, 2.6vw, 32px); gap: 10px; pointer-events: none; }
.lead .card--hero .card__body > * { pointer-events: auto; }
.lead .card--hero .chip { background: var(--accent); color: #fff; }
.lead .card--hero .card__title { font-size: clamp(23px, 3vw, 38px); }
.lead .card--hero .card__title a, .lead .card--hero .card__title a:hover { color: #fff; }
.lead .card--hero .card__excerpt { color: rgba(255, 255, 255, .84); font-size: 15.5px; -webkit-line-clamp: 2; }
.lead .card--hero .card__date { color: rgba(255, 255, 255, .7); }
.lead__side { justify-content: flex-start; gap: 0; }
.lead__side .card--row { flex: 1; }
.lead__label { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); }
.lead__label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.lead__side .card--row { padding: 14px 0; border-top: 1px solid var(--line); }
.lead__side .card--row + .card--row { padding-top: 14px; }
.lead__side .card--row .card__media { width: 124px; }

/* ——— Заголовки блоков ——— */
.block__head { align-items: flex-end; }
.more { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 8px 14px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.more:hover { text-decoration: none; color: var(--accent-ink); box-shadow: inset 0 0 0 1.5px var(--accent); }

/* ——— Колонка «Пилигрим»: отдельный тёмный блок авторского проекта ——— */
.block--pilgrim { position: relative; margin-block: clamp(36px, 5vw, 60px); padding-block: clamp(26px, 3.6vw, 44px); color: #e9ecef; isolation: isolate; }
.block--pilgrim::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); background: radial-gradient(120% 140% at 12% 0%, #1d4a3a 0%, #12251f 46%, #0c1512 100%); }
.block--pilgrim .block__kicker { display: inline-block; margin-bottom: 8px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #9fe0bd; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.block--pilgrim .block__title { color: #fff; }
.block--pilgrim .block__title::before { background: #5fd49a; }
.block--pilgrim .block__note { margin: 6px 0 0; color: #a9b8b1; font-size: 15px; }
.block--pilgrim .card__title a { color: #fff; }
.block--pilgrim .card__title a:hover { color: #9fe0bd; }
.block--pilgrim .card__date { color: #91a199; }
.block--pilgrim .chip { background: rgba(255, 255, 255, .1); color: #9fe0bd; }
.block--pilgrim .more { background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); color: #e9ecef; }
.block--pilgrim .more:hover { color: #fff; box-shadow: inset 0 0 0 1.5px #5fd49a; }
.block--pilgrim .card__media { box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .7); }
.block--pilgrim .grid .card { border-top-color: rgba(255, 255, 255, .12); }

/* ——— «Читают сейчас» ——— */
.hot { padding: clamp(16px, 2.4vw, 24px); border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.hot__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 12px; }
.hot__title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 19px; font-weight: 750; letter-spacing: -.01em; }
.hot__dot { width: 9px; height: 9px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 0 rgba(229, 72, 77, .55); animation: hot-pulse 2.2s ease-out infinite; }
@keyframes hot-pulse { 70% { box-shadow: 0 0 0 8px rgba(229, 72, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); } }
.hot__note { color: var(--ink-3); font-size: 13px; }
.hot__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 22px; counter-reset: hot; }
.hot__item { counter-increment: hot; min-width: 0; }
.hot__link { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-radius: 12px; color: var(--ink); }
.hot__link:hover { text-decoration: none; background: var(--bg); color: var(--accent-ink); }
.hot__link::before { content: counter(hot); flex: none; width: 20px; text-align: center; font: 800 20px/1 Georgia, "Times New Roman", serif; font-style: italic; color: var(--accent); }
.hot__pic { flex: none; width: 64px; height: 44px; border-radius: 8px; overflow: hidden; background: var(--line); }
.hot__pic img, .hot__pic .cover-blank { width: 100%; height: 100%; object-fit: cover; display: block; font-size: 20px; }
.hot__text { min-width: 0; font-size: 14.5px; font-weight: 600; line-height: 1.3; letter-spacing: -.005em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ——— Счётчик просмотров в записи ——— */
.views { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.views svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.post__meta { align-items: center; }
.post__meta > .views::before { content: none; }
.post__meta > .views { margin-left: .75em; }

/* ——— «Поделиться»: кнопка с выпадающим меню ——— */
.share { position: relative; display: inline-block; }
.share__toggle { display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: inherit; font-size: 15.5px; font-weight: 650; cursor: pointer; box-shadow: 0 6px 18px -8px var(--accent); transition: transform .15s, box-shadow .15s; }
.share__toggle:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -8px var(--accent); }
.share__toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.share__menu { position: absolute; left: 0; bottom: calc(100% + 10px); z-index: 30; width: 250px; padding: 6px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 18px 40px -16px rgba(10, 14, 18, .45); animation: share-in .16s ease; }
.share__menu[hidden] { display: none; }
@keyframes share-in { from { opacity: 0; transform: translateY(6px); } }
.share__item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 11px; background: none; color: var(--ink); font: inherit; font-size: 15px; font-weight: 550; text-align: left; cursor: pointer; }
.share__item:hover { text-decoration: none; background: var(--bg); }
.share__ico { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; color: #fff; font-size: 13px; }
.share__ico svg { width: 19px; height: 19px; fill: currentColor; }
.share__ico--tg { background: #2aabee; }
.share__ico--vk { background: #0077ff; font-size: 12px; letter-spacing: -.02em; }
.share__ico--max { background: linear-gradient(135deg, #7b5cff, #3d8bff); font-size: 15px; }
.share__ico--link { background: var(--ink-2); }
.share__ico--link svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ——— Соседние записи и страницы ——— */
.neighbors__a { transition: transform .15s, box-shadow .15s; }
.neighbors__a:hover { transform: translateY(-2px); }
.pager .page-numbers, .pager > a, .pager > span { border-radius: 12px; }

/* ——— Меню на телефоне: компактная карточка под шапкой ——— */
.sheet:not(.sheet--search) .sheet__panel { inset: 8px 8px auto 8px; width: auto; max-height: calc(100dvh - 16px); padding: 12px 14px 14px; border-radius: 22px; gap: 12px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .55); animation: sheet-drop .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes sheet-drop { from { opacity: 0; transform: translateY(-14px) scale(.98); } }
.sheet:not(.sheet--search) .sheet__head { margin: 0; }
.sheet:not(.sheet--search) .sheet__head .logo__mark { font-size: 21px; }
.sheet .menu { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0; }
.sheet .menu a { display: block; padding: 12px 12px; border: 0; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 15px; font-weight: 600; line-height: 1.2; }
.sheet .menu a:hover { background: var(--accent-soft); }
.sheet .menu .current-menu-item > a { background: var(--accent); box-shadow: none; color: var(--on-accent); }
.sheet:not(.sheet--search) .btn { min-height: 44px; width: 100%; justify-content: center; font-size: 15px; }

@media (max-width: 1080px) {
  .hot__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .lead .card--hero { margin-inline: calc(var(--gut) * -1); border-radius: 0; box-shadow: none; }
  .lead .card--hero .card__media { margin-inline: 0; min-height: 300px; }
  .lead .card--hero .card__excerpt { display: none; }
  .lead__side { padding-top: 16px; border-top: 0; }
  .lead__side .card--row .card__media { width: 108px; }
  .block__head { align-items: center; }
  .more { padding: 7px 12px; font-size: 13px; }
  .block--pilgrim .block__note { font-size: 14px; }
  .hot { padding: 14px 10px; }
  .hot__head { padding-inline: 6px; }
  .hot__list { grid-template-columns: 1fr; gap: 0; }
  .hot__pic { width: 58px; height: 40px; }
  .post__meta > .views { margin-left: 0; margin-top: 6px; }
  .share, .share__toggle { width: 100%; justify-content: center; }
  .share__menu { width: 100%; }
  /* главная фотография колонки «Пилигрим» — во всю ширину экрана, без сдвига */
  .post__content .tg-cover { margin-inline: calc(var(--gut) * -1); max-width: none; }
  .post__content .tg-cover img { width: 100%; max-width: 100% !important; margin-inline: 0; border-radius: 0; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { .hot__dot { animation: none; } }
/* общая рубрика «Статьи» есть у каждой записи — в меню подсвечиваем только тематическую */
.nav .menu-item-1939.current-post-ancestor:not(.current-menu-item) > a { background: none; color: var(--ink-2); }

/* ═══════ Доработки 13.10.2026 (вечер): периоды «Читают сейчас», окно «Предложить новость», подвал ═══════ */
.hot__head { align-items: center; justify-content: space-between; }
.hot__tabs { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.hot__tabs::-webkit-scrollbar { display: none; }
.hot__tab { flex: none; min-height: 32px; padding: 0 13px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.hot__tab:hover { color: var(--ink); }
.hot__tab.is-on { background: var(--accent); color: var(--on-accent); }
.hot__list[hidden] { display: none; }
.hot__link::before { content: none; }
.hot__num { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13.5px; font-weight: 750; font-variant-numeric: tabular-nums; }
.hot__item:nth-child(-n+3) .hot__num { background: var(--accent); color: var(--on-accent); }

/* окно «Предложить новость» */
.sheet--modal { display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.sheet--modal[hidden] { display: none; }
.sheet--modal .sheet__panel.modal { position: relative; inset: auto; width: min(520px, 100%); max-height: none; padding: clamp(18px, 3vw, 26px); border-radius: 22px; background: var(--surface); gap: 16px; box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .6); animation: sheet-drop .22s cubic-bezier(.2, .8, .2, 1); }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal__title { margin: 0; font-size: 22px; font-weight: 750; letter-spacing: -.015em; }
.modal__note { margin: 6px 0 0; color: var(--ink-3); font-size: 14.5px; line-height: 1.45; }
.suggest { display: grid; gap: 12px; }
.suggest .field { display: grid; gap: 6px; }
.suggest .field > span { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.suggest .field > span i { font-style: normal; font-weight: 500; color: var(--ink-3); }
.suggest .field input, .suggest .field textarea { width: 100%; padding: 11px 13px; border: 0; border-radius: 12px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font: inherit; font-size: 16px; line-height: 1.4; }
.suggest .field textarea { resize: vertical; min-height: 110px; }
.suggest .field input:focus, .suggest .field textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.suggest .field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.suggest__msg { margin: 0; padding: 10px 12px; border-radius: 12px; background: #fdecec; color: #a4262c; font-size: 14.5px; }
.suggest__msg.is-ok { background: var(--accent-soft); color: var(--accent-ink); }
.suggest__send { min-height: 48px; width: 100%; justify-content: center; border: 0; background: var(--accent); color: var(--on-accent); font-size: 16px; cursor: pointer; }
.suggest__send:disabled { opacity: .6; cursor: default; }

/* разделы в подвале — плитками */
.foot .menu { columns: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.foot .menu a { display: block; padding: 9px 12px; border-radius: 11px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font-size: 14.5px; font-weight: 550; line-height: 1.2; transition: background .15s, color .15s; }
.foot .menu a:hover { text-decoration: none; background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 0 0 0 1px transparent; }
.foot .menu .current-menu-item > a { background: var(--accent); color: var(--on-accent); box-shadow: none; }

@media (max-width: 600px) {
  .hot__head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .hot__tabs { width: 100%; }
  .hot__tab { flex: 1 0 auto; padding: 0 10px; font-size: 13px; }
  .sheet--modal { padding: 8px; place-items: start center; }
}

/* ═══════ Старые записи со вставленной чужой вёрсткой: ничего не должно вылезать за экран телефона ═══════ */
html, body { overflow-x: clip; }
.post__content { min-width: 0; overflow-wrap: anywhere; }
.post__content :is(div, section, p, blockquote, ul, ol, table, pre, ins, span, h1, h2, h3, h4) { max-width: 100%; }
.post__content ins.adsbygoogle, .post__content h1:empty { display: none !important; }
/* классы из чужой вёрстки совпадают с классами темы — внутри текста записи они ничего не значат */
.post__content .block, .post__content .content, .post__content .wrap { margin: 0; padding: 0; width: auto; max-width: 100%; }
.post__content :is(div, section):not(.tg-gallery):not(.video-gone):not(.table-wrap):not(.rll-youtube-player):not([class*="mejs"]):not(.wp-video) { display: block; min-width: 0; float: none; position: static; }
@media (max-width: 600px) {
  /* ролик или картинка внутри вложенного блока не растягиваются «во весь экран»: у блока свои отступы */
  .post__content :is(div:not(.tg-gallery), section, blockquote, li, td) :is(iframe, embed, object, video, .rll-youtube-player, img:not(.tg-gallery img)) { width: 100% !important; max-width: 100% !important; margin-inline: 0 !important; }
}

/* просмотры за выбранный период в «Читают сейчас»; почта в подвале */
.hot__text { flex: 1; }
.hot__views { display: inline-flex; align-items: center; gap: 4px; flex: none; margin-left: 4px; color: var(--ink-3); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hot__views svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.foot__mail { display: inline-flex; align-items: center; gap: 7px; }
.foot__mail svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* встроенный плеер WordPress и вставки других записей не шире колонки */
.post__content .wp-video, .post__content .mejs-container, .post__content .mejs-inner, .post__content .mejs-mediaelement, .post__content mediaelementwrapper,
.post__content video, .post__content .wp-video-shortcode { width: 100% !important; max-width: 100% !important; min-width: 0 !important; margin-inline: 0 !important; }
.post__content .mejs-container { height: auto !important; aspect-ratio: 16 / 9; }
.post__content .mejs-container video { height: 100% !important; }
.post__content { position: relative; }
.post__content iframe.wp-embedded-content { box-sizing: border-box; width: 100% !important; max-width: 100% !important; margin-inline: 0 !important; }
.post__tags { min-width: 0; }
.htag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ролик, который можно посмотреть только на YouTube */
.video-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; aspect-ratio: 16 / 9; padding: 20px; border-radius: var(--r); background: #14181c center / cover no-repeat; color: #fff; text-align: center; text-decoration: none !important; box-shadow: var(--shadow); }
.video-link strong { font-size: clamp(18px, 2.4vw, 24px); }
.video-link span:last-child { max-width: 420px; color: rgba(255, 255, 255, .78); font-size: 14px; line-height: 1.45; }
.video-link__play { position: relative; width: 62px; height: 62px; border-radius: 50%; background: #e62117; transition: transform .2s; }
.video-link__play::after { content: ""; position: absolute; left: 25px; top: 19px; border: 12px solid transparent; border-left: 19px solid #fff; border-right: 0; }
.video-link:hover .video-link__play { transform: scale(1.08); }

/* Ссылки на телеграм-канал колонки «Пилигрим» */
.block__links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.block--pilgrim .more--tg { background: #2aa0da; box-shadow: none; color: #fff; }
.block--pilgrim .more--tg:hover { background: #1f8cc2; color: #fff; box-shadow: none; }
.tg-follow { display: flex; flex-direction: column; gap: 4px; margin: 28px 0 8px; padding: 16px 20px 16px 64px; border-radius: 14px; background: #2aa0da url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M9.8 15.6 9.4 20c.6 0 .8-.2 1.1-.5l2.6-2.5 5.4 4c1 .5 1.7.3 2-.9l3.6-17c.3-1.5-.6-2.1-1.6-1.7L1.3 9.5c-1.4.6-1.4 1.4-.2 1.8l5.4 1.7L19 5.1c.6-.4 1.1-.2.7.2z'/%3E%3C/svg%3E") no-repeat 20px 50% / 28px; color: #fff; }
.tg-follow:hover { background-color: #1f8cc2; text-decoration: none; color: #fff; }
.tg-follow strong { font-size: 16px; }
.tg-follow span { font-size: 14px; opacity: .9; }
@media (max-width: 560px) { .block--pilgrim .block__head { flex-wrap: wrap; } .block__links { justify-content: flex-start; } }

/* Счётчик плагина Post Views Counter под текстом скрыт: просмотры показывает своя подпись вверху записи (класс .views).
   Плагин продолжает считать просмотры, его настройки не менялись. */
.post-views.entry-meta, .post-views-counter, .pvc_stats, div.post-views { display: none !important; }

/* Увеличенный график Шумановских резонансов во всплывающем окне */
.shm__view { cursor: zoom-in; }
.lb--cap .lb__count { display: block; }
.lb--wide .lb__img { cursor: default; background: #000; }
@media (max-width: 900px) {
  /* на телефоне график показываем в натуральную величину и листаем пальцем вбок — так видны часы и подписи */
  .lb--wide { overflow-x: auto; justify-content: flex-start; -webkit-overflow-scrolling: touch; }
  .lb--wide .lb__img { flex: none; max-width: none; max-height: none; width: auto; height: min(70vh, 460px); margin: 0 12px; border-radius: 4px; }
  .lb--wide .lb__close { position: fixed; }
  .lb--wide .lb__count { position: fixed; }
}

/* «Главное сейчас»: три записи рядом с главной — крупными плитками с заголовком поверх картинки, на всю высоту главной */
.lead__side { gap: 14px; padding-left: 0; border-left: 0; }
.lead__label { margin-bottom: 0; }
.lead__side .card--row,
.lead__side .card--row + .card--row { position: relative; display: block; flex: 1 1 0; min-height: 150px; padding: 0; border: 0; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); isolation: isolate; background: var(--line); }
.lead__side .card--row .card__media { position: absolute; inset: 0; width: auto; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
.lead__side .card--row .card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 10, 12, 0) 25%, rgba(8, 10, 12, .5) 55%, rgba(8, 10, 12, .88) 100%); }
.lead__side .card--row .card__play { left: auto; right: 12px; top: 12px; bottom: auto; width: 32px; height: 32px; }
.lead__side .card--row .card__play::after { left: 12px; top: 10px; border-width: 6px; border-left-width: 9px; }
.lead__side .card--row .card__body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; gap: 6px; padding: 16px 18px; pointer-events: none; }
.lead__side .card--row .card__body > * { pointer-events: auto; }
.lead__side .card--row .card__title { font-size: clamp(16px, 1.45vw, 19px); font-weight: 700; line-height: 1.25; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.lead__side .card--row .card__title a { color: #fff; -webkit-line-clamp: 2; }
.lead__side .card--row .card__title a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.lead__side .card--row .card__date { color: rgba(255, 255, 255, .75); }
@media (max-width: 860px) {
  .lead__side { padding-top: 22px; border-top: 0; }
  .lead__side .card--row, .lead__side .card--row + .card--row { flex: none; min-height: 0; aspect-ratio: 16 / 7; }
}
@media (max-width: 600px) {
  .lead__side .card--row .card__media { width: auto; }
  .lead__side .card--row, .lead__side .card--row + .card--row { aspect-ratio: 16 / 9; }
}

/* Главная запись на компьютере — ниже и уже, чтобы первый экран не был одной картинкой */
@media (min-width: 861px) {
  .lead { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; }
  .lead .card--hero .card__media { min-height: 0; height: clamp(340px, 33vw, 440px); }
  .lead .card--hero .card__title { font-size: clamp(22px, 2.3vw, 31px); }
  .lead .card--hero .card__excerpt { font-size: 15px; }
  .lead__side .card--row, .lead__side .card--row + .card--row { min-height: 110px; }
  .lead__side .card--row .card__body { padding: 12px 16px; gap: 4px; }
}
.lead__side .card--row .card__media::after { background: linear-gradient(180deg, rgba(8, 10, 12, .12) 0%, rgba(8, 10, 12, .58) 48%, rgba(8, 10, 12, .92) 100%); }
@media (max-width: 600px) { .lead__side { gap: 10px; } .lead__side .card--row, .lead__side .card--row + .card--row { aspect-ratio: 2 / 1; } }
