/* Оформление сайта Сергея Брыка.
   Замысел: одна спокойная колонка для длинного чтения (около 66 знаков в строке);
   библейские ссылки и рубрики выделены киноварью, как в церковных книгах;
   каталоги — оглавления с тонкими линейками, а не набор карточек. */

/* --- Шрифты (SIL Open Font License, файлы из пакетов @fontsource) ------------ */
@font-face { font-family: "Literata"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/literata-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/literata-latin-400-normal.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; }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/literata-cyrillic-400-italic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/literata-latin-400-italic.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; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/literata-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/literata-latin-600-normal.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; }
@font-face { font-family: "Old Standard TT"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/old-standard-tt-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Old Standard TT"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/old-standard-tt-latin-400-normal.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; }
@font-face { font-family: "Old Standard TT"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/old-standard-tt-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Old Standard TT"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/old-standard-tt-latin-700-normal.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: #f4f5f2;          /* бумага с лёгким холодным оттенком */
  --surface: #ffffff;     /* выделенные блоки */
  --ink: #1c2127;         /* текст */
  --muted: #59616b;       /* подписи, мета */
  --rule: #d6dad5;        /* линейки */
  --rubric: #9c2f1f;      /* киноварь: ссылки на Писание, рубрики */
  --mark: #f4e3a1;        /* подсветка найденного */
  --focus: #2d5fa0;       /* фокус клавиатуры */

  --font-display: "Old Standard TT", "Literata", Georgia, "Times New Roman", serif;
  --font-text: "Literata", Georgia, "Times New Roman", serif;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 40rem;
  --wide: 68rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15181c;
    --surface: #1d2127;
    --ink: #e5e3dd;
    --muted: #a4aab2;
    --rule: #323840;
    --rubric: #e88b74;
    --mark: #5b4a17;
    --focus: #8db6f2;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15181c;
  --surface: #1d2127;
  --ink: #e5e3dd;
  --muted: #a4aab2;
  --rule: #323840;
  --rubric: #e88b74;
  --mark: #5b4a17;
  --focus: #8db6f2;
  color-scheme: dark;
}

/* --- Основа ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-kerning: normal;
  overflow-wrap: break-word;
}
@media (min-width: 48rem) { body { font-size: 1.125rem; } }
img, iframe { max-width: 100%; }
[hidden] { display: none !important; }

a { color: var(--ink); text-decoration-color: var(--rubric); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--rubric); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.main:focus { outline: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 0.75rem; top: -4rem; z-index: 20;
  background: var(--ink); color: var(--bg); padding: 0.6rem 1rem; border-radius: var(--radius);
  font: 600 0.9375rem var(--font-ui);
}
.skip-link:focus { top: 0.75rem; }

.page { display: flex; flex-direction: column; min-height: 100vh; }
.main { flex: 1; width: 100%; padding-inline: var(--gutter); padding-block: 1.75rem 3rem; }

.ext-mark { display: inline-block; margin-left: 0.15em; font-family: var(--font-ui); font-size: 0.8em; line-height: 1; text-decoration: none; }

/* --- Шапка ------------------------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--rule); }
.header-bar {
  max-width: var(--wide); margin: 0 auto;
  display: flex; align-items: center; gap: 0.75rem;
  padding-inline: var(--gutter); padding-block: 0.75rem;
}
.brand {
  font-family: var(--font-display); font-weight: 700; font-size: 1.375rem; line-height: 1.2;
  color: var(--ink); text-decoration: none; letter-spacing: 0.01em; white-space: nowrap;
}
.brand:hover { color: var(--rubric); }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; }
.brand-logo { width: 32px; height: 32px; flex: none; }
.brand-logo[width="40"] { width: 40px; height: 40px; }
.preview-badge {
  font: 600 0.6875rem/1.4 var(--font-ui); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--rubric); border: 1px solid currentColor; border-radius: 999px; padding: 0.1rem 0.5rem;
}
.header-verse {
  flex: 1 1 auto; min-width: 0; max-width: 34rem; margin: 0;
  padding-left: 0.85rem; border-left: 1px solid var(--rule);
  font: italic 0.9375rem/1.4 var(--font-text); color: var(--muted); text-wrap: balance;
}
.header-verse-ref { margin-left: 0.3rem; font: 600 0.8125rem/1 var(--font-ui); color: var(--rubric); white-space: nowrap; }
.header-actions { margin-left: auto; display: flex; gap: 0.25rem; }
.icon-button {
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; min-width: 44px;
  justify-content: center; padding: 0 0.75rem; border-radius: 999px; border: 1px solid transparent;
  background: none; color: var(--ink); font: 500 0.9375rem var(--font-ui); text-decoration: none; cursor: pointer;
}
.icon-button:hover, .icon-button[aria-current] { border-color: var(--rule); background: var(--surface); color: var(--ink); }
.menu-toggle { display: none; }

.site-nav ul {
  list-style: none; margin: 0 auto; max-width: var(--wide);
  padding-inline: var(--gutter); padding-block: 0 0.6rem;
  display: flex; flex-wrap: wrap; gap: 0.15rem 1.25rem;
  font: 0.9375rem/1.4 var(--font-ui);
}
.site-nav a {
  display: inline-block; padding-block: 0.35rem; color: var(--muted); text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current] { color: var(--ink); border-bottom-color: var(--rubric); }

@media (max-width: 47.99rem) {
  .header-bar { flex-wrap: wrap; row-gap: 0.4rem; }
  .header-verse { order: 3; flex-basis: 100%; max-width: none; padding-left: 0; border-left: 0; font-size: 0.875rem; }
  .js .menu-toggle { display: inline-flex; }
  .js .site-nav:not(.is-open) { display: none; }
  .js .site-nav ul { flex-direction: column; gap: 0; padding-block: 0 0.75rem; }
  .js .site-nav li + li { border-top: 1px solid var(--rule); }
  .js .site-nav a { display: block; padding-block: 0.75rem; font-size: 1.0625rem; color: var(--ink); border-bottom: 0; }
  .js .site-nav a[aria-current] { color: var(--rubric); }
}
@media (max-width: 30rem) {
  .icon-button-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .icon-button { padding: 0; }
}

/* --- Кнопки и формы -------------------------------------------------------------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 44px; padding: 0 1.1rem; border-radius: 999px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--bg);
  font: 600 0.9375rem var(--font-ui); text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--rubric); border-color: var(--rubric); color: var(--bg); }
.button-quiet { background: transparent; color: var(--ink); border-color: var(--rule); min-height: 40px; padding: 0 0.9rem; font-weight: 500; }
.button-quiet:hover { background: var(--surface); color: var(--ink); border-color: var(--ink); }

.search-label { display: block; font: 600 0.875rem/1.4 var(--font-ui); margin: 0 0 0.5rem; padding: 0; }
.search-row { display: flex; gap: 0.5rem; }
.search-input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0.6rem 0.9rem;
  font: 1.0625rem var(--font-ui); color: var(--ink); background: var(--bg);
  border: 1px solid var(--muted); border-radius: var(--radius);
}
.search-input::placeholder { color: var(--muted); opacity: 0.85; }
.search-input:focus-visible { outline-offset: 0; }

.copy-field {
  display: block; width: 100%; margin-top: 0.5rem; padding: 0.5rem 0.6rem;
  font: 0.875rem var(--font-ui); color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule); border-radius: var(--radius);
}

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 30;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  max-width: calc(100% - 2rem); padding: 0.6rem 1.1rem; border-radius: 999px;
  background: var(--ink); color: var(--bg); font: 0.9375rem var(--font-ui);
}

/* --- Общие элементы -------------------------------------------------------------- */
.section-label {
  margin: 0 0 1rem;
  font: 700 0.78rem/1.3 var(--font-ui); letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--rubric);
}
.eyebrow {
  margin: 0 0 0.3rem;
  font: 600 0.72rem/1.3 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.ref {
  color: var(--rubric); font-family: var(--font-ui); font-weight: 600;
  font-variant-numeric: tabular-nums; white-space: nowrap; text-decoration: none;
}
a.ref:hover { text-decoration: underline; }
.sep { color: var(--muted); }

.crumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; font: 0.875rem/1.5 var(--font-ui); color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--rubric); text-decoration: underline; }

.page-title {
  margin: 0.25rem 0 1rem;
  font-family: var(--font-display); font-weight: 700; line-height: 1.1;
  font-size: clamp(2rem, 1.45rem + 2.3vw, 2.8rem); text-wrap: balance;
}

/* Оглавление: список статей с краткими описаниями */
.cards { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.card { padding-block: 0.9rem; border-bottom: 1px solid var(--rule); }
.card-link { font-weight: 600; font-size: 1.0625rem; line-height: 1.35; color: var(--ink); text-decoration: none; }
.card-link:hover { color: var(--rubric); text-decoration: underline; }
.card-summary { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.9375rem; line-height: 1.5; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip, .chip-radio span {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 0.85rem;
  border: 1px solid var(--rule); border-radius: 999px; background: var(--surface);
  font: 0.875rem/1.3 var(--font-ui); color: var(--ink); text-decoration: none; cursor: pointer;
}
.chip:hover, .chip-radio:hover span { border-color: var(--ink); color: var(--ink); }

.questions { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.questions a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding-block: 0.8rem; border-bottom: 1px solid var(--rule);
  color: var(--ink); text-decoration: none; line-height: 1.45;
}
.questions a:hover .question-label { color: var(--rubric); text-decoration: underline; text-decoration-thickness: 1px; }
.question-arrow { color: var(--rubric); font-family: var(--font-ui); flex: none; }

.link-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0 0; font-family: var(--font-ui); }
.link-row a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem;
  border: 1px solid var(--ink); border-radius: 999px;
  font-size: 0.9375rem; font-weight: 600; color: var(--ink); text-decoration: none;
}
.link-row a:first-child { background: var(--ink); color: var(--bg); }
.link-row a:hover { background: var(--rubric); border-color: var(--rubric); color: var(--bg); }

/* --- Текст статьи ---------------------------------------------------------------- */
.prose { max-width: var(--measure); margin-inline: auto; hyphens: auto; -webkit-hyphens: auto; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.1em; }
.prose h2 { margin: 2em 0 0.6em; font-family: var(--font-display); font-size: 1.55rem; line-height: 1.2; text-wrap: balance; hyphens: manual; }
.prose blockquote {
  margin: 1.6em 0; padding: 0.15em 0 0.15em 1.2em;
  border-left: 2px solid var(--rubric); font-size: 1.04em;
}
.prose blockquote p { margin: 0 0 0.6em; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li + li { margin-top: 0.35em; }

/* Киноварный инициал в начале статьи */
.article .prose > p:first-of-type::first-letter {
  float: left; margin: 0.06em 0.09em 0 0;
  font-family: var(--font-display); font-weight: 700; font-size: 3.3em; line-height: 0.82;
  color: var(--rubric);
}

.article-header { max-width: var(--measure); margin: 0 auto 2.25rem; }
.article-title {
  margin: 0.5rem 0 1rem;
  font-family: var(--font-display); font-weight: 700; line-height: 1.12; letter-spacing: -0.005em;
  font-size: clamp(1.9rem, 1.3rem + 2.6vw, 2.75rem); text-wrap: balance;
}
.article-meta {
  display: flex; flex-wrap: wrap; gap: 0.2rem 0.5rem; margin: 0 0 0.75rem;
  font: 0.875rem/1.5 var(--font-ui); color: var(--muted);
}
.author { color: var(--ink); font-weight: 600; }
.article-passages { margin: 0 0 1.1rem; font: 0.9375rem/1.7 var(--font-ui); }
.passages-label { color: var(--muted); margin-right: 0.35rem; }
.article-tools { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.article-footer {
  max-width: var(--measure); margin: 3rem auto 0; padding-top: 2rem;
  border-top: 1px solid var(--rule); display: grid; gap: 2.5rem;
}
.source-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; font: 0.9375rem/1.5 var(--font-ui); }
.source-list a { color: var(--ink); }
.sources-intro { margin: 1.25rem 0 0.5rem; font: 0.875rem/1.5 var(--font-ui); color: var(--muted); }
.source-list-origin { color: var(--muted); }

/* --- Видео ----------------------------------------------------------------------- */
.video-list { display: grid; gap: 1rem; }
.video {
  min-width: 0; padding: 1.1rem 1.25rem; background: var(--surface);
  border: 1px solid var(--rule); border-radius: var(--radius); scroll-margin-top: 1rem;
}
.video:target { border-color: var(--rubric); }
.video-title { margin: 0 0 0.35rem; font-family: var(--font-text); font-size: 1.125rem; font-weight: 600; line-height: 1.35; }
.video-desc { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.9375rem; line-height: 1.5; }
.video-player { margin: 0.25rem 0 0.75rem; }
.video-player.is-playing { aspect-ratio: 16 / 9; width: 100%; max-width: 100%; }
.video-player iframe { display: block; width: 100%; height: 100%; border: 0; border-radius: 4px; background: #000; }
.video-link { margin: 0; font: 0.9375rem/1.5 var(--font-ui); }
.video-more { margin: 0.7rem 0 0; font: 0.875rem/1.5 var(--font-ui); }
/* Ссылка на нужное место видео в тексте статьи: <p class="video-cue" data-video="vNN" data-t="секунды"></p> */
.prose .video-cue { margin: -0.2rem 0 1.5rem; }
.prose .video-cue a {
  display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.6rem 0.9rem 0.65rem 0.65rem;
  border: 1px solid var(--rule); border-left: 3px solid var(--rubric); border-radius: 8px;
  background: var(--surface); color: var(--ink); text-decoration: none; font: 0.875rem/1.45 var(--font-ui);
}
.prose .video-cue a:hover { border-color: var(--rubric); }
.video-cue-play {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.8rem; height: 1.8rem;
  margin-top: 0.05rem; border-radius: 50%; background: var(--rubric); color: var(--bg);
}
.video-cue-body { display: grid; gap: 0.05rem; min-width: 0; }
.video-cue-head { font-weight: 700; color: var(--rubric); font-variant-numeric: tabular-nums; }
.video-cue-title { color: var(--muted); font-size: 0.8125rem; }
.timestamps { list-style: none; margin: 0.85rem 0 0; padding: 0.75rem 0 0; border-top: 1px solid var(--rule); display: grid; gap: 0.45rem; font: 0.9375rem/1.45 var(--font-ui); }
.timestamps li { display: grid; grid-template-columns: 3.5rem 1fr; gap: 0.75rem; }
.timestamps-long li { grid-template-columns: 4.6rem 1fr; }
.timestamp { color: var(--rubric); font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; white-space: nowrap; }
.timestamp:hover { text-decoration: underline; }
.timestamp-desc { min-width: 0; }
.video-related { margin-top: 0.9rem; padding-top: 0.75rem; border-top: 1px solid var(--rule); font: 0.9375rem/1.5 var(--font-ui); }
.video-related-label { margin: 0 0 0.35rem; color: var(--muted); font-size: 0.8125rem; }
.video-related ul { margin: 0; padding-left: 1.1em; display: grid; gap: 0.3rem; }

/* --- Тема ---------------------------------------------------------------------- */
.topic { max-width: var(--measure); margin: 0 auto; }
.topic-title {
  margin: 0.5rem 0 1.25rem;
  font-family: var(--font-display); font-weight: 700; line-height: 1.1;
  font-size: clamp(1.9rem, 1.3rem + 2.6vw, 2.8rem);
  text-transform: uppercase; letter-spacing: 0.05em; text-wrap: balance;
}
.confession {
  margin: 0 0 2.75rem; padding: 1.4rem 1.5rem 1.2rem;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
}
.confession-text { margin: 0; font-size: 1.22rem; line-height: 1.55; }
.confession-note { margin: 1rem 0 0; font: 0.8125rem/1.5 var(--font-ui); color: var(--muted); }
.confession-note a { color: var(--muted); }
.topic-block { margin: 0 0 2.75rem; }
.key-verses { margin: 0; border-top: 1px solid var(--rule); }
.key-verse { display: grid; grid-template-columns: 8.5rem 1fr; gap: 0.2rem 1rem; padding-block: 0.7rem; border-bottom: 1px solid var(--rule); }
.key-verse dt a { color: var(--rubric); font-family: var(--font-ui); font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; }
.key-verse dt a:hover { text-decoration: underline; }
.key-verse dd { margin: 0; min-width: 0; }
.topic-all { margin: 0; font: 0.9375rem var(--font-ui); }

/* --- Главная ------------------------------------------------------------------- */
.hero { max-width: var(--measure); margin: 0.75rem auto 2rem; }
.hero-author { display: flex; align-items: center; gap: 0.9rem; margin: 0 0 1.35rem; }
.hero-photo {
  width: 72px; height: 72px; flex: none; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--rule);
}
.hero-name {
  margin: 0; font-family: var(--font-display); font-weight: 700; line-height: 1.2;
  font-size: 1.875rem;
}
.hero-role { margin: 0.25rem 0 0; font: 0.9375rem/1.4 var(--font-ui); color: var(--muted); }
@media (max-width: 30rem) {
  .hero-photo { width: 64px; height: 64px; }
  .hero-name { font-size: 1.625rem; }
  .hero-author { gap: 0.75rem; }
}
.author-photo {
  display: block; width: 160px; height: 160px; margin: 0 0 1.5rem; border-radius: 50%;
  object-fit: cover; border: 1px solid var(--rule);
}
.hero-lead p { margin: 0 0 0.9em; }
.hero-lead p:first-child { font-size: 1.0625em; }
.intro-next { padding-top: 1rem; border-top: 1px solid var(--rule); font: 1rem/1.5 var(--font-ui); }
.home-search {
  max-width: var(--measure); margin: 0 auto 2.75rem; padding: 1.1rem 1.25rem 1.25rem;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
}
.home-block { max-width: var(--measure); margin: 0 auto 2.75rem; }
.home-start { scroll-margin-top: 1.5rem; }
.home-start .card-summary { color: var(--ink); }
.home-block .link-row { margin-top: 0; }
.home-block .link-row a:first-child { background: transparent; color: var(--ink); }
.home-block .link-row a:hover { background: var(--rubric); color: var(--bg); }
.topic-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.topic-tile {
  display: flex; flex-direction: column; gap: 0.3rem; height: 100%; padding: 0.85rem 1rem;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  color: var(--ink); text-decoration: none;
}
.topic-tile:hover { border-color: var(--ink); color: var(--ink); }
.topic-tile-title { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; line-height: 1.2; }
.topic-tile-meta { font: 0.8125rem/1.4 var(--font-ui); color: var(--muted); }

/* --- Текстовые страницы -------------------------------------------------------- */
.text-page { max-width: var(--measure); margin: 0 auto; }
.prose-page .link-row { margin: -0.4em 0 0; }
.prose-page .link-row a, .prose-page .link-row a:first-child {
  min-height: 0; padding: 0; border: 0; background: none; color: var(--rubric);
  font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em;
}
.prose-page .link-row a:hover { background: none; color: var(--ink); }
.prose-page .link-row { gap: 0.4rem 1.25rem; }
.page-note {
  margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--rule);
  font: 0.875rem/1.55 var(--font-ui); color: var(--muted); hyphens: manual;
}

/* --- Каталоги ------------------------------------------------------------------ */
.catalog { max-width: var(--measure); margin: 0 auto; }
.catalog-intro p { margin: 0 0 1em; color: var(--muted); }
.jump { margin: 1.25rem 0 2.25rem; }
.jump-label { margin: 1rem 0 0.4rem; font: 600 0.72rem/1.3 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.jump-label:first-child { margin-top: 0; }
.chips-books .chip { min-height: 34px; padding: 0 0.6rem; font-variant-numeric: tabular-nums; }
.catalog-group { margin: 0 0 2.5rem; scroll-margin-top: 1rem; }
.group-title { margin: 0 0 0.75rem; font-family: var(--font-display); font-size: 1.5rem; line-height: 1.2; }
.group-title a { color: var(--ink); text-decoration: none; }
.group-title a:hover { color: var(--rubric); }
.group-count { font: 0.875rem var(--font-ui); color: var(--muted); vertical-align: 0.15em; margin-left: 0.25rem; }

.topic-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.topic-entry { padding-block: 1.2rem; border-bottom: 1px solid var(--rule); }
.topic-entry-title { margin: 0 0 0.35rem; font-family: var(--font-display); font-size: 1.5rem; line-height: 1.2; }
.topic-entry-title a { color: var(--ink); text-decoration: none; }
.topic-entry-title a:hover { color: var(--rubric); text-decoration: underline; }
.topic-entry-text { margin: 0 0 0.4rem; }
.topic-entry-meta { margin: 0; font: 0.8125rem/1.4 var(--font-ui); color: var(--muted); }

.catalog-scripture .search-form { margin: 0.5rem 0 1.5rem; }
.testament {
  margin: 2.5rem 0 1rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--ink);
  font-family: var(--font-display); font-size: 1.75rem; line-height: 1.2;
}
.book { margin: 0 0 1.75rem; scroll-margin-top: 1rem; }
.book-title { margin: 0 0 0.4rem; font: 700 0.8125rem/1.3 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.passage-list { list-style: none; margin: 0; padding: 0; }
.passage {
  display: grid; grid-template-columns: 9.5rem 1fr; gap: 0.2rem 1rem;
  padding-block: 0.6rem; border-top: 1px solid var(--rule); scroll-margin-top: 1rem;
}
.passage:target { background: var(--mark); box-shadow: 0 0 0 0.5rem var(--mark); }
.passage-ref { padding-top: 0.1em; white-space: normal; }   /* длинный отрывок «Быт. 18:22–19:13» переносится, а не залезает на название статьи */
.passage-articles { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; min-width: 0; line-height: 1.45; }
.video-list-full { margin-top: 1.5rem; }

/* --- Поиск -------------------------------------------------------------------- */
.search-page { max-width: var(--measure); margin: 0 auto; }
.topic-filter { margin: 1rem 0 0; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.topic-filter .search-label { margin: 0; }
.topic-select {
  min-height: 44px; min-width: 0; max-width: 100%; padding: 0.4rem 2rem 0.4rem 0.75rem;
  font: 1rem var(--font-ui); color: var(--ink); background-color: var(--surface);
  border: 1px solid var(--rule); border-radius: var(--radius);
}
.search-hint { margin: 1rem 0 0; font: 0.875rem/1.5 var(--font-ui); color: var(--muted); }
.search-status { margin: 1.75rem 0 0.6rem; font: 0.9375rem/1.5 var(--font-ui); color: var(--muted); }
.results { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.results:empty { border-top: 0; }
.result { padding-block: 1rem; border-bottom: 1px solid var(--rule); }
.result-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; margin: 0 0 0.25rem; font: 0.8125rem/1.4 var(--font-ui); color: var(--muted); }
.result-type { font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.result-meta .ref { white-space: normal; }
.result-heading { margin: 0 0 0.3rem; font-family: var(--font-text); font-size: 1.125rem; font-weight: 600; line-height: 1.35; }
.result-title { color: var(--ink); text-decoration: none; }
.result-title:hover { color: var(--rubric); text-decoration: underline; }
.result-snippet { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: var(--muted); }
mark { background: var(--mark); color: var(--ink); padding: 0 0.1em; border-radius: 2px; }

/* --- Подвал ------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--rule); padding-inline: var(--gutter); padding-block: 2rem 3rem;
  font: 0.875rem/1.6 var(--font-ui); color: var(--muted);
}
.footer-inner { max-width: var(--wide); margin: 0 auto; display: grid; gap: 0.35rem; }
.footer-brand { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; color: var(--ink); }
.footer-text { margin: 0; }
.footer-nav { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
.footer-nav a { color: var(--muted); }
.footer-nav a:hover { color: var(--rubric); }

/* --- Узкие экраны -------------------------------------------------------------- */
@media (max-width: 30rem) {
  .key-verse, .passage { grid-template-columns: 1fr; }
  .confession { padding: 1.1rem 1.1rem 1rem; }
  .confession-text { font-size: 1.12rem; }
  .video { padding: 1rem; }
  .home-search { padding: 1rem; }
  .search-row .button { padding: 0 0.9rem; }
}
@media (max-width: 22rem) {
  .topic-grid { grid-template-columns: 1fr; }
  .preview-badge { display: none; }
}

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

@media print {
  .site-header, .site-footer, .article-tools, .video-player, .skip-link, .toast { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .prose a::after { content: ""; }
}

/* --- Слушать, поделиться, оглавление, всплывающие стихи (5 октября 2026) ------------------- */
.article-tools { margin-top: 1.1rem; }
.listen-button { padding-inline: 1rem 1.2rem; }
.listen-button[aria-pressed="true"] { background: var(--rubric); border-color: var(--rubric); }

.toc { max-width: var(--measure); margin: 0 auto 2rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.toc summary {
  display: flex; align-items: baseline; gap: 0.6rem; padding: 0.75rem 0; cursor: pointer; list-style: none;
  font: 700 0.78rem/1.3 var(--font-ui); letter-spacing: 0.09em; text-transform: uppercase; color: var(--rubric);
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "+"; margin-left: auto; font-size: 1.1rem; font-weight: 400; color: var(--muted); }
.toc details[open] summary::after { content: "−"; }
.toc-count { font-weight: 500; letter-spacing: 0.02em; text-transform: none; color: var(--muted); }
.toc ol { margin: 0 0 1rem; padding-left: 1.4em; font: 0.95rem/1.45 var(--font-ui); }
.toc li + li { margin-top: 0.35rem; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--rubric); text-decoration: underline; }
.prose h2[id] { scroll-margin-top: 1.5rem; }

.article-end { margin: 0 0 2.5rem; padding: 1.25rem 1.25rem 1.1rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.article-end p { margin: 0 0 0.9rem; }
.article-end .article-tools { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--rule); }

.vref {
  cursor: pointer; color: var(--rubric); text-decoration: underline dotted; text-underline-offset: 0.18em;
  -webkit-tap-highlight-color: transparent;
}
.vref:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.vref:hover, .vref[aria-expanded="true"] { text-decoration-style: solid; }
.vpop {
  position: absolute; z-index: 40; max-width: calc(100vw - 2rem);
  padding: 0.9rem 1rem 0.8rem; background: var(--surface); color: var(--ink);
  border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: 0 10px 30px rgb(0 0 0 / 0.18);
  font-size: 1rem; line-height: 1.55;
}
.vpop-sheet {
  position: fixed; left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto !important; max-width: none;
  max-height: 60vh; overflow: auto; border-radius: 14px 14px 0 0;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}
.vpop-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.vpop-title { margin: 0; font: 700 0.95rem var(--font-ui); color: var(--rubric); }
.vpop-close { margin-left: auto; display: inline-flex; padding: 0.35rem; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 999px; }
.vpop-close:hover { color: var(--ink); background: var(--bg); }
.vpop-text p { margin: 0 0 0.5em; }
.vpop-text sup { font: 600 0.7rem var(--font-ui); color: var(--muted); }
.vpop-foot { display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; margin: 0.4rem 0 0; font: 0.8125rem var(--font-ui); color: var(--muted); }
.vpop-foot a { color: var(--rubric); }

.is-speaking { background: var(--mark); box-shadow: 0 0 0 0.35em var(--mark); border-radius: 2px; }
.listen-bar {
  position: fixed; z-index: 35; left: 50%; transform: translateX(-50%);
  bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 0.25rem; max-width: calc(100% - 1.5rem);
  padding: 0.35rem 0.5rem; border-radius: 999px; background: var(--ink); color: var(--bg);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.25); font: 0.875rem var(--font-ui);
}
.listen-bar button {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px;
  padding: 0 0.4rem; border: 0; border-radius: 999px; background: none; color: inherit; font: inherit; cursor: pointer;
}
.listen-bar button:hover { background: rgb(255 255 255 / 0.12); }
.listen-bar .listen-main { background: var(--rubric); }
.listen-rate { font-weight: 700 !important; font-variant-numeric: tabular-nums; }
.listen-status { padding: 0 0.4rem; white-space: nowrap; opacity: 0.85; }
@media (max-width: 30rem) { .listen-status, .listen-restart { display: none !important; } }
.listen-time { padding: 0 0.35rem; white-space: nowrap; font-variant-numeric: tabular-nums; opacity: 0.9; }

/* Таблицы в тексте статьи: <div class="table-wrap"><table>…</table></div> */
.prose .table-wrap { margin: 1.5rem 0; overflow-x: auto; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font: 0.92rem/1.5 var(--font-ui); }
.prose th, .prose td { padding: 0.7rem 0.85rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.prose th { font-weight: 600; color: var(--muted); font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; }
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child { white-space: nowrap; font-weight: 600; color: var(--rubric); }
@media (max-width: 34rem) { .prose td:first-child { white-space: normal; } }

/* Схема хиазма: <figure class="chiasm"> — строки в порядке текста, отступ растёт к центру и убывает после него */
.chiasm { --step: clamp(0.55rem, 2.8vw, 1.7rem); margin: 2rem 0 2.25rem; font-family: var(--font-ui); }
.chiasm-cap { display: block; margin-bottom: 1rem; }
.chiasm-title { display: block; font: 700 1.35rem/1.25 var(--font-display); color: var(--ink); }
.chiasm-sub { display: block; margin-top: 0.3rem; font-size: 0.875rem; line-height: 1.5; color: var(--muted); }
.prose .chiasm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.prose .chiasm-list li + li { margin-top: 0; }
.chi {
  --tone: color-mix(in srgb, var(--rubric) calc(var(--depth) * 13%), var(--rule));
  display: grid; grid-template-columns: 2.1rem 6.6rem minmax(0, 1fr); align-items: center; column-gap: 0.7rem;
  margin: 0 0 0 calc((var(--depth) - 1) * var(--step)); padding: 0.55rem 0.85rem 0.55rem 0.55rem;
  background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--tone); border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.chi-1 { --depth: 1; } .chi-2 { --depth: 2; } .chi-3 { --depth: 3; } .chi-4 { --depth: 4; }
.chi-5 { --depth: 5; } .chi-6 { --depth: 6; } .chi-7 { --depth: 7; }
.chi-mark {
  display: inline-flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  font: 700 1.05rem/1 var(--font-display); color: var(--rubric); background: var(--bg); border: 1px solid var(--tone);
}
.chi-ref { font-size: 0.8rem; font-weight: 700; color: var(--rubric); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chi-text { font: 1rem/1.4 var(--font-text); color: var(--ink); }
.chi-center {
  --depth: 8; grid-template-columns: 2.1rem minmax(0, 1fr); margin: 0.35rem 0 0.35rem calc(7 * var(--step));
  padding: 0.85rem 1rem 0.9rem 0.7rem; border: 0; border-radius: 12px; background: var(--rubric); color: var(--bg);
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.12);
}
.chi-center .chi-mark { grid-row: 1 / 3; background: none; border: 1px solid currentColor; color: inherit; font-size: 0.95rem; }
.chi-center .chi-ref { color: inherit; opacity: 0.9; font-size: 0.78rem; }
.chi-kicker { letter-spacing: 0.08em; text-transform: uppercase; }
.chi-center .chi-text { color: inherit; font: 700 1.15rem/1.35 var(--font-display); }
.chi-center .vref { color: inherit; text-decoration-color: currentColor; }
/* пара подсвечивается, когда на одну из её строк наводят указатель */
.chiasm-list:has([data-pair="a"]:hover) [data-pair="a"], .chiasm-list:has([data-pair="b"]:hover) [data-pair="b"],
.chiasm-list:has([data-pair="c"]:hover) [data-pair="c"], .chiasm-list:has([data-pair="d"]:hover) [data-pair="d"],
.chiasm-list:has([data-pair="e"]:hover) [data-pair="e"], .chiasm-list:has([data-pair="f"]:hover) [data-pair="f"],
.chiasm-list:has([data-pair="g"]:hover) [data-pair="g"] {
  border-color: var(--rubric); box-shadow: 0 0 0 2px color-mix(in srgb, var(--rubric) 35%, transparent);
}
.chiasm-note { margin: 0.9rem 0 0; font-size: 0.85rem; line-height: 1.55; color: var(--muted); }
@media (max-width: 34rem) {
  .chi { grid-template-columns: 1.9rem minmax(0, 1fr); row-gap: 0.1rem; padding: 0.5rem 0.7rem 0.55rem 0.5rem; }
  .chi-mark { grid-row: 1 / 3; width: 1.9rem; height: 1.9rem; font-size: 0.95rem; }
  .chi-ref { font-size: 0.75rem; }
  .chi-text { font-size: 0.95rem; }
  .chi-center .chi-text { font-size: 1.05rem; }
}
@media print { .chi, .chi-center { break-inside: avoid; box-shadow: none; } }

/* Плеер готовой записи (assets/js/listen.js, записи assets/audio/) */
.audio-player {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.3rem 0.9rem;
  margin-top: 1.1rem; padding: 0.85rem 1rem; border: 1px solid var(--rule); border-radius: 14px;
  background: var(--surface); font-family: var(--font-ui);
}
.ap-play {
  grid-column: 1; grid-row: 1 / 3; display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border: 0; border-radius: 50%; background: var(--ink); color: var(--bg); cursor: pointer;
}
.ap-play:hover { background: var(--rubric); }
.ap-play svg { width: 22px; height: 22px; }
.ap-title { grid-column: 2; grid-row: 1; margin: 0; font-size: 1rem; font-weight: 600; line-height: 1.3; }
.ap-sub { display: block; margin-top: 0.1rem; font-size: 0.85rem; font-weight: 400; color: var(--muted); }
.ap-tools { grid-column: 3; grid-row: 1; display: flex; align-items: center; gap: 0.15rem; }
.ap-tools button {
  display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0;
  border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer;
}
.ap-tools button:hover { color: var(--ink); background: var(--bg); }
.ap-tools .ap-rate { padding: 0 0.65rem; background: var(--bg); color: var(--ink); font: 600 0.85rem var(--font-ui); font-variant-numeric: tabular-nums; }
.ap-track { grid-column: 2 / 4; grid-row: 2; display: flex; align-items: center; gap: 0.6rem; }
.ap-time, .ap-dur { min-width: 2.6em; font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ap-dur { text-align: right; }
.ap-seek { flex: 1; min-width: 0; height: 24px; margin: 0; accent-color: var(--rubric); cursor: pointer; }
@media (max-width: 34rem) {
  .audio-player { grid-template-columns: auto 1fr; gap: 0.5rem 0.75rem; padding: 0.8rem 0.85rem 0.6rem; }
  .ap-play { grid-row: 1; width: 48px; height: 48px; }
  .ap-title { grid-column: 2; }
  .ap-track { grid-column: 1 / 3; grid-row: 2; }
  .ap-tools { grid-column: 1 / 3; grid-row: 3; justify-content: center; gap: 1.25rem; }
}

.read-progress {
  position: fixed; z-index: 25; top: 0; left: 0; right: 0; height: 3px;
  background: var(--rubric); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none;
}
.to-top {
  position: fixed; z-index: 20; right: calc(1rem + env(safe-area-inset-right, 0px)); bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 999px; background: var(--surface); color: var(--ink); border: 1px solid var(--rule);
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.12);
}
.to-top:hover { color: var(--rubric); border-color: var(--rubric); }
.subscribe { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0 0 2rem; }
@media (prefers-reduced-motion: no-preference) { .read-progress { transition: transform 0.08s linear; } }
@media print {
  .toc, .article-end, .listen-bar, .audio-player, .read-progress, .to-top, .vpop, .video-cue { display: none !important; }
  .vref { color: inherit; text-decoration: none; }
  .is-speaking { background: none; box-shadow: none; }
}

/* Ответ под заголовком статьи: <p class="article-lead">, подпись «Мой ответ:» ставит tools/sitegen.py */
.article-title:has(+ .article-lead) { margin-bottom: 0.7rem; }
.article-lead { margin: 0 0 1rem; max-width: 38rem; font: 400 1.1rem/1.5 var(--font-text); color: var(--ink); text-wrap: pretty; }
.lead-label { font-weight: 600; color: var(--rubric); }

/* «Разделы»: кнопка внизу экрана и список разделов статьи (assets/js/site.js, берётся из оглавления) */
.sections-fab {
  position: fixed; z-index: 20; bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  right: calc(1rem + 44px + 0.5rem + env(safe-area-inset-right, 0px));
  display: inline-flex; align-items: center; gap: 0.45rem; height: 44px; padding: 0 1rem 0 0.85rem;
  border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--ink);
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.12); font: 600 0.9rem var(--font-ui); cursor: pointer;
}
.sections-fab[hidden] { display: none; }
.sections-fab:hover { color: var(--rubric); border-color: var(--rubric); }
.sections-pos { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.sections-sheet {
  width: 100%; max-width: 100%; max-height: min(75vh, 42rem); margin: auto auto 0; padding: 0; overflow: auto;
  border: 0; border-radius: 16px 16px 0 0; background: var(--surface); color: var(--ink);
  box-shadow: 0 -8px 30px rgb(0 0 0 / 0.2); overscroll-behavior: contain;
}
.sections-sheet::backdrop { background: rgb(0 0 0 / 0.35); }
@media (min-width: 48rem) {
  .sections-sheet { width: min(34rem, calc(100% - 2rem)); margin: auto; border-radius: 14px; }
}
.sheet-head {
  position: sticky; top: 0; display: flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 0.5rem 0.45rem 1rem; background: var(--surface); border-bottom: 1px solid var(--rule);
}
.sheet-title { flex: 1; font: 700 0.78rem/1.3 var(--font-ui); letter-spacing: 0.09em; text-transform: uppercase; color: var(--rubric); }
.sheet-top { padding: 0.5rem; font: 0.9rem var(--font-ui); color: var(--muted); text-decoration: none; }
.sheet-top:hover { color: var(--rubric); }
.sheet-close {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer;
}
.sheet-close:hover { color: var(--ink); background: var(--bg); }
.sheet-list { list-style: none; margin: 0; padding: 0 1rem 1rem; counter-reset: section; }
.sheet-list li { counter-increment: section; }
.sheet-list li + li { border-top: 1px solid var(--rule); }
.sheet-list a {
  display: grid; grid-template-columns: 1.7rem 1fr; gap: 0.3rem; padding: 0.65rem 0.2rem;
  color: var(--ink); text-decoration: none; font: 0.98rem/1.38 var(--font-ui);
}
.sheet-list a::before { content: counter(section); color: var(--muted); font-variant-numeric: tabular-nums; }
.sheet-list a:hover { color: var(--rubric); }
.sheet-list .is-here a, .sheet-list .is-here a::before { color: var(--rubric); font-weight: 600; }
.sheet-here { display: block; margin-top: 0.1rem; font: 500 0.78rem var(--font-ui); color: var(--muted); }
@media print { .sections-fab, .sections-sheet { display: none !important; } }
.to-top[hidden] + .sections-fab { right: calc(1rem + env(safe-area-inset-right, 0px)); }

/* Ясный путь от знакомства к чтению. Общая книжная палитра сохранена. */
.hero { margin-top: 1rem; margin-bottom: 2.75rem; }
.hero-author { gap: 1.25rem; margin-bottom: 1.75rem; }
.hero-photo { width: 104px; height: 104px; }
.hero-name { font-size: clamp(1.875rem, 1.4rem + 1vw, 2.3rem); }
.hero-lead p:first-child { font-size: 1.18em; line-height: 1.55; }
.hero-lead .hero-purpose { margin-top: 1.35rem; color: var(--muted); font-size: 0.9375rem; line-height: 1.65; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 0.9rem 1.5rem; margin-top: 1.5rem; }
.hero-actions .button { gap: 0.7rem; }
.hero-question { font: 500 0.9375rem/1.5 var(--font-ui); padding-block: 0.65rem; }
.start-intro { margin: -0.25rem 0 1.25rem; color: var(--muted); font-size: 0.9375rem; }
.start-cards .card { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: 0.75rem; padding-block: 1.25rem; }
.start-number { font: 400 1.5rem/1.4 var(--font-display); color: var(--rubric); font-variant-numeric: tabular-nums; }
.start-cards .card-link { font-size: 1.125rem; }
.start-cards .card-summary { margin-top: 0.45rem; color: var(--muted); }
.card-meta { margin: 0 0 0.35rem; color: var(--muted); font: 0.8rem/1.5 var(--font-ui); }
.start-cards .card-meta { margin: 0.5rem 0 0; }
@media (max-width: 30rem) {
  .hero-photo { width: 80px; height: 80px; }
  .hero-author { gap: 1rem; margin-bottom: 1.4rem; }
  .hero-role { font-size: 0.875rem; }
  .start-cards .card { grid-template-columns: 1.8rem minmax(0, 1fr); gap: 0.55rem; }
  .header-actions a.icon-button { padding-inline: 0.4rem; }
  .header-actions a .icon-button-label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
}

/* Один материал — одна строка каталога; фильтры работают поверх обычного HTML. */
.catalog-filter { margin: 1.5rem 0 1rem; padding: 1.25rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.catalog-selects { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1rem; }
.catalog-selects label { flex: 1 1 12rem; min-width: 0; display: grid; gap: 0.4rem; font: 500 0.875rem/1.4 var(--font-ui); }
.catalog-selects select { width: 100%; min-width: 0; min-height: 44px; padding: 0.55rem 0.65rem; border: 1px solid var(--muted); border-radius: 4px; background: var(--bg); color: var(--ink); font: 0.9375rem var(--font-ui); }
.catalog-reset { margin-top: 0.65rem; min-height: 44px; padding: 0; border: 0; background: none; color: var(--rubric); text-decoration: underline; text-underline-offset: 0.2em; font: 0.875rem var(--font-ui); cursor: pointer; }
.catalog-guides { margin-bottom: 1.5rem; font: 0.9375rem/1.5 var(--font-ui); }
.catalog-guides summary { padding-block: 0.65rem; cursor: pointer; }
.catalog-guides .chips { padding-block: 0.5rem; }
.catalog-status { margin: 1.25rem 0 0.75rem; color: var(--muted); font: 0.875rem/1.5 var(--font-ui); }
.catalog-list .card { padding-block: 1.2rem; }
.catalog-list .card-link { font-size: 1.125rem; }
.catalog-list .card-summary { margin-top: 0.45rem; }
.card-updated { display: none; margin: 0.5rem 0 0; color: var(--muted); font: 0.8rem/1.5 var(--font-ui); }
.is-date-order .card-updated { display: block; }
.catalog-empty { margin-top: 1.5rem; }
@media (max-width: 30rem) { .catalog-filter { padding: 1rem; } }

/* Заголовок, маршрут знакомства и продолжение чтения. */
.article-title-main { display: block; }
.article-subtitle { display: block; margin-top: 0.55rem; font: 400 clamp(1.15rem, 1rem + 0.5vw, 1.4rem)/1.45 var(--font-text); letter-spacing: 0; text-wrap: pretty; }
.intro-route { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: 0 0 1.15rem; color: var(--muted); font: 0.8125rem/1.5 var(--font-ui); }
.intro-route a { color: var(--rubric); }
.prose .intro-next { margin: 2rem 0 0; padding: 1.2rem 1.3rem; background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--rubric); border-radius: var(--radius); color: var(--muted); font: 0.875rem/1.5 var(--font-ui); hyphens: manual; }
.intro-next a { display: block; margin-top: 0.4rem; font: 600 1.125rem/1.45 var(--font-text); }
.article-footer { gap: 1.75rem; margin-top: 2.25rem; padding-top: 1.5rem; }
.article-footer .section-label { margin-bottom: 0.8rem; }
.article-footer .article-end { margin: 0; padding: 1rem 1.2rem; }
.article-end p:last-child { margin-bottom: 0; }
.article-end p { font-size: 0.9375rem; }
.source-details, .video-details, .more-videos { font: 0.9375rem/1.5 var(--font-ui); }
.source-details summary, .video-details summary, .more-videos > summary { padding-block: 0.65rem; min-height: 44px; cursor: pointer; color: var(--muted); }
.source-details .source-list { margin-top: 0.6rem; }
.video-details[open] { margin-top: 0.7rem; border-top: 1px solid var(--rule); }
.video-original-title { margin: 0.5rem 0; font-weight: 600; color: var(--ink); }
.more-videos .video-list { margin-top: 0.6rem; }
.article-videos .video-link { margin-bottom: 0; }
.toc a[aria-current="location"] { color: var(--rubric); font-weight: 600; }

/* На широком экране оглавление занимает поле рядом с прежней колонкой текста. */
@media (min-width: 80rem) {
  .article-reading { display: grid; grid-template-columns: 15rem minmax(0, 40rem) 15rem; column-gap: 2rem; max-width: 74rem; margin-inline: auto; align-items: start; }
  .article-reading > .prose { grid-column: 2; grid-row: 1; width: 100%; min-width: 0; }
  .article-reading > .toc { grid-column: 1; grid-row: 1; position: sticky; top: 1.25rem; margin: 0; width: 100%; max-height: calc(100dvh - 2.5rem); overflow-y: auto; border-bottom: 0; }
  .article-reading .toc summary { gap: 0.4rem; flex-wrap: wrap; }
  .article-reading .toc ol { padding-left: 1.5rem; padding-right: 0.5rem; font-size: 0.875rem; line-height: 1.5; }
  .article-reading .toc li + li { margin-top: 0.6rem; }
  .article-reading .toc a { display: block; padding-block: 0.1rem; }
  .sections-fab { display: none !important; }
}
@media print {
  .article-reading { display: block; }
  .catalog-filter, .catalog-guides, .intro-route, .intro-next { display: none !important; }
}

/* --- «Комменты на YouTube»: папки с комментариями и ответы ----------------------------------------- */
.yt-folders { margin-top: 1.75rem; }
.yt-folders-other { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.yt-folder-list {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 1.6rem 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}
/* папка с ярлычком сверху */
.yt-folder {
  position: relative; margin-top: 0.8rem; padding: 1rem 1.1rem 0.9rem;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 0 var(--radius) var(--radius) var(--radius);
}
.yt-folder::before {
  content: ""; position: absolute; left: -1px; top: -0.8rem; width: 6.5rem; height: 0.8rem;
  background: var(--surface); border: 1px solid var(--rule); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0;
}
.yt-folder:hover, .yt-folder:focus-within { border-color: var(--rubric); }
.yt-folder:hover::before, .yt-folder:focus-within::before { border-color: var(--rubric); }
.yt-folder-link {
  display: grid; grid-template-columns: auto 1fr; column-gap: 0.7rem; align-items: center;
  color: var(--ink); text-decoration: none;
}
.yt-folder-link::after { content: ""; position: absolute; inset: -0.8rem 0 0; } /* вся папка — ссылка */
.yt-folder-icon { grid-row: span 2; display: flex; color: var(--rubric); }
.yt-folder-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; line-height: 1.2; }
.yt-folder-count { font: 0.8125rem/1.4 var(--font-ui); color: var(--muted); }
.yt-folder-link:hover .yt-folder-title { color: var(--rubric); }
.yt-folder-preview {
  position: relative; z-index: 1; list-style: none; margin: 0.8rem 0 0; padding: 0.65rem 0 0;
  border-top: 1px dashed var(--rule); font-size: 0.9375rem; line-height: 1.4;
}
.yt-folder-preview li + li { margin-top: 0.45rem; }
.yt-folder-preview a { color: var(--muted); text-decoration: none; }
.yt-folder-preview a:hover { color: var(--rubric); text-decoration: underline; }

/* страница папки: комментарий — «облачко», ответ раскрывается */
.prose .yt-folder-desc { color: var(--muted); font-size: 1.0625rem; }
.yt-thread { margin-top: 2.25rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); scroll-margin-top: 1rem; }
.prose .yt-q { margin: 0 0 0.85rem; font-size: 1.35rem; }
.yt-q-link { color: inherit; text-decoration: none; }
.yt-q-link:hover { color: var(--rubric); }
.yt-comment {
  padding: 0.8rem 1rem 0.9rem; background: var(--surface); border: 1px solid var(--rule);
  border-radius: 1.1rem 1.1rem 1.1rem 0.3rem;
}
.prose .yt-comment p { margin: 0.35rem 0 0; }
.prose .yt-comment .yt-who { margin: 0; display: flex; align-items: center; gap: 0.4rem; font: 0.8125rem/1.4 var(--font-ui); color: var(--muted); }
.yt-who svg { color: var(--rubric); flex: none; }
.yt-answer { margin-top: 0.8rem; }
.yt-answer > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 0.6rem; width: fit-content; margin-left: auto;
  padding: 0.35rem 0.9rem 0.35rem 0.35rem; border: 1px solid var(--rule); border-radius: 999px;
  font: 600 0.9375rem/1.3 var(--font-ui); color: var(--ink); background: var(--bg);
}
.yt-answer > summary::-webkit-details-marker { display: none; }
.yt-answer > summary:hover { border-color: var(--rubric); }
.yt-answer[open] > summary { margin-left: 0; }
.yt-avatar { width: 2.25rem; height: 2.25rem; border-radius: 50%; object-fit: cover; }
.yt-answer-hint { font-weight: 500; color: var(--rubric); }
.yt-answer-hint::before { content: "· читать"; }
.yt-answer[open] .yt-answer-hint::before { content: "· свернуть"; }
.yt-answer-body { margin-top: 0.85rem; padding-left: 1rem; border-left: 3px solid var(--rubric); }
.prose .yt-answer-body .comment-more { font-size: 0.9375rem; color: var(--muted); }
@media print {
  .yt-answer > summary { display: none; }
}

/* --- Лента времени в статье (например, история движения в «Что такое библейский унитаризм») ------------ */
.prose .timeline { list-style: none; margin: 1.6em 0 1.8em; padding: 0 0 0 1.5rem; border-left: 2px solid var(--rule); }
.prose .timeline > li { position: relative; margin: 0 0 1.25em; }
.prose .timeline > li::before {
  content: ""; position: absolute; left: calc(-1.5rem - 7px); top: 0.3em; width: 12px; height: 12px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--rubric);
}
.timeline-when { display: block; margin-bottom: 0.15em; font: 700 0.875rem/1.4 var(--font-ui); letter-spacing: 0.03em; color: var(--rubric); }
