/* Нервная клетка. Палитра из «Стиль канала.html»: лён, песок, шалфей, мох, туман, озеро, абрикос, терракота, орех, кора. */

@font-face { font-family: "Literata"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(/fonts/literata-cyrillic-wght-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: 200 900; font-display: swap;
  src: url(/fonts/literata-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, 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: 200 900; font-display: swap;
  src: url(/fonts/literata-cyrillic-wght-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: 200 900; font-display: swap;
  src: url(/fonts/literata-latin-wght-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/fonts/manrope-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/fonts/manrope-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --linen: #F3EEE4; --sand: #E4D5BD; --sage: #A3B18A; --moss: #6F7F5B; --mist: #A9C0CC;
  --lake: #5F7F8E; --apricot: #E8B08A; --terracotta: #C8845E; --walnut: #7B5B45; --bark: #3B3631;

  --bg: var(--linen);
  --bg-tint: #ECE5D7;
  --surface: #F8F4EC;
  --line: #DDD0B8;
  --text: var(--bark);
  --muted: #6B6258;
  --heading: var(--walnut);
  --accent: #56663F;          /* мох потемнее: ссылки читаются на льне */
  --accent-soft: #DCE2CF;
  --warm: var(--terracotta);
  --brand: #D2604B;           /* коралл логотипа */
  --warm-soft: #F4DFCF;
  --cool-soft: #DDE7EC;
  --shadow: 0 1px 2px rgb(59 54 49 / .06), 0 8px 24px -12px rgb(59 54 49 / .18);

  --serif: "Literata", Georgia, "PT Serif", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1120px;
  --narrow: 760px;
  --prose: 680px;
  --radius: 14px;
  color-scheme: light;
}


:root[data-theme="dark"] {
  --bg: #23201C; --bg-tint: #2A2622; --surface: #2E2A25; --line: #423B33;
  --text: #E9E1D3; --muted: #A99F91; --heading: #EBC9A6; --accent: #B5C39C;
  --accent-soft: #343A2C; --brand: #EE8A70; --warm: #E0A07A; --warm-soft: #3A2E26; --cool-soft: #26323A;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .5);
  color-scheme: dark;
}

/* Тональности рубрик: утро у озера, лесная опушка, осенний сад */
.tone-lake   { --tone: var(--lake);  --tone-soft: var(--cool-soft); --tone-dot: var(--mist); }
.tone-forest { --tone: var(--moss);  --tone-soft: var(--accent-soft); --tone-dot: var(--sage); }
.tone-garden { --tone: var(--terracotta); --tone-soft: var(--warm-soft); --tone-dot: var(--apricot); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.7 var(--sans); font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--apricot); color: var(--bark); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--heading); line-height: 1.2; letter-spacing: -.01em; }
em { font-style: italic; }
.nowrap { white-space: nowrap; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: var(--narrow); }

.eyebrow { display: block; font: 600 12.5px/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--tone, var(--muted)); margin: 0 0 10px; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.meta { font-size: 14px; color: var(--muted); margin: 0; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px;
  background: var(--moss); color: #F8F4EC; font: 600 15px/1.2 var(--sans); text-decoration: none;
  border: 1px solid var(--moss); transition: background .2s, transform .2s;
}
.btn:hover { background: #5E6D4C; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface); }

/* Шапка */
.masthead {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.masthead__inner { max-width: var(--wrap); margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--heading); margin-right: auto; }
.brand__mark {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 60% 42%, var(--apricot) 0 22%, transparent 23%), var(--sage);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--moss) 40%, transparent);
}
.brand__name { font: 500 21px/1 var(--serif); letter-spacing: -.01em; white-space: nowrap; }
.brand__name em { color: var(--brand); }
.brand__logo { width: 44px; height: 44px; flex: none; margin: -6px 0; }
.theme-toggle { border: 1px solid var(--line); background: transparent; color: var(--muted); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.theme-toggle:hover { color: var(--text); background: var(--surface); }

/* Главная */
.hero { position: relative; overflow: hidden; padding: 88px 0 72px; border-bottom: 1px solid var(--line); }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70%; aspect-ratio: 1; pointer-events: none;
  background:
    radial-gradient(closest-side, color-mix(in srgb, var(--sage) 38%, transparent), transparent 70%) 10% 30% / 60% 60% no-repeat,
    radial-gradient(closest-side, color-mix(in srgb, var(--mist) 40%, transparent), transparent 70%) 70% 20% / 55% 55% no-repeat,
    radial-gradient(closest-side, color-mix(in srgb, var(--apricot) 32%, transparent), transparent 70%) 50% 70% / 45% 45% no-repeat;
  filter: blur(8px); opacity: .9;
}
.hero__inner { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.hero__title { font-size: clamp(42px, 7.4vw, 84px); line-height: 1.02; margin: 0 0 24px; max-width: 12ch; letter-spacing: -.025em; }
.hero__title em { color: var(--accent); font-weight: 400; }
.hero__lead { font: 400 clamp(18px, 2.1vw, 22px)/1.6 var(--serif); max-width: 36em; margin: 0 0 32px; color: var(--text); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 28px; }
.hero__by { font-size: 14px; color: var(--muted); margin: 0; }

.section { padding: 72px 0; }
.section--tint { background: var(--bg-tint); border-block: 1px solid var(--line); }
.section__head { margin-bottom: 32px; max-width: 42em; }
.section__head--row { display: flex; align-items: baseline; justify-content: space-between; max-width: none; gap: 16px; }
.section__title { font-size: clamp(28px, 3.6vw, 40px); margin: 0 0 10px; }
.section__lead { color: var(--muted); margin: 0; }
.more { font-weight: 600; font-size: 15px; white-space: nowrap; }

.rubrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.rubric {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 26px 24px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--text); overflow: hidden; transition: transform .25s, box-shadow .25s;
}
.rubric::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: linear-gradient(90deg, var(--tone), var(--tone-dot)); }
.rubric:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.rubric__count { position: absolute; top: 18px; right: 20px; font: italic 500 30px/1 var(--serif); color: color-mix(in srgb, var(--tone) 55%, transparent); }
.rubric__title { font: 500 23px/1.25 var(--serif); color: var(--heading); padding-right: 40px; }
.rubric__lead { font-size: 15px; line-height: 1.55; color: var(--muted); }
.rubric__list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 14.5px; line-height: 1.4; }
.rubric__list span { position: relative; padding-left: 16px; }
.rubric__list span::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--tone-dot); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--text); }
.card__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--tone-soft); }
.card__img--blank { display: block; background: radial-gradient(circle at 30% 40%, var(--tone-dot), transparent 60%), var(--tone-soft); }
.card__body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; flex: 1; }
.card__body .eyebrow { margin: 0; }
.card__title { font: 500 21px/1.3 var(--serif); color: var(--heading); }
.card__desc { font-size: 15px; line-height: 1.55; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { margin-top: auto; padding-top: 6px; font-size: 13.5px; }
.card--lead { grid-column: span 2; }
.card--lead .card__link { flex-direction: row; }
.card--lead .card__img { width: 48%; aspect-ratio: auto; min-height: 100%; }
.card--lead .card__body { padding: 30px 30px 28px; justify-content: center; }
.card--lead .card__title { font-size: 28px; }

/* Списки статей */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row { border-bottom: 1px solid var(--line); }
.row > a { display: flex; gap: 20px; align-items: baseline; padding: 22px 4px; text-decoration: none; color: var(--text); transition: background .2s; }
.row > a:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.row > a:hover .row__title { color: var(--accent); }
.row__n { font: italic 400 26px/1 var(--serif); color: var(--tone, var(--sage)); min-width: 2ch; }
.row__text { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.row__text .eyebrow { margin: 0; }
.row__title { font: 500 21px/1.3 var(--serif); color: var(--heading); transition: color .2s; }
.row__desc { font-size: 15px; line-height: 1.55; color: var(--muted); }
.row__meta { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.empty { color: var(--muted); padding: 24px 0; }

.search input {
  width: 100%; margin-top: 22px; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: 16px/1.4 var(--sans);
}
.search input:focus { outline: 2px solid var(--sage); border-color: var(--sage); }

.page-head { padding: 64px 0 8px; }
.page-head__title { font-size: clamp(34px, 5.4vw, 56px); margin: 0 0 14px; letter-spacing: -.02em; }
.page-head__lead { font: 400 19px/1.6 var(--serif); color: var(--text); margin: 0 0 14px; max-width: 34em; }
.page-head + .section { padding-top: 32px; }

/* Статья */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 30; pointer-events: none; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--tone, var(--sage)), var(--tone-dot, var(--apricot))); transform-origin: 0 50%; transform: scaleX(0); }
.article { max-width: calc(var(--prose) + 48px); margin: 0 auto; padding: 64px 24px 48px; }
.article__head { margin-bottom: 36px; }
.article__title { font-size: clamp(32px, 5vw, 50px); line-height: 1.12; margin: 0 0 20px; letter-spacing: -.02em; }
.article__lead { font: italic 400 20px/1.55 var(--serif); color: var(--muted); margin: 0 0 20px; }
.article__cover { margin: 0 0 40px; }
.article__cover img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.article__cover--square img { max-width: 520px; margin: 0 auto; }

.toc { background: var(--tone-soft, var(--accent-soft)); border-radius: var(--radius); padding: 22px 26px; margin: 0 0 40px; }
.toc__title { font: 600 12.5px/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--tone, var(--muted)); margin: 0 0 10px; }
.toc ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

.prose { font-size: 18px; line-height: 1.75; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.prose > * { margin: 0 0 1.1em; }
.prose h2 { font-size: 28px; margin: 1.9em 0 .6em; color: var(--heading); }
.prose h2 + h2 { margin-top: .4em; font-size: 23px; }
.prose h3 { font-size: 22px; margin: 1.6em 0 .5em; }
.prose strong { font-weight: 700; color: color-mix(in srgb, var(--text) 92%, var(--heading)); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .45em 0; padding-left: .2em; }
.prose ul { list-style: none; padding-left: 1.3em; }
.prose ul > li { position: relative; }
.prose ul > li::before { content: ""; position: absolute; left: -1.05em; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--tone-dot, var(--sage)); }
.prose ol > li::marker { font-family: var(--serif); font-style: italic; color: var(--tone, var(--moss)); font-weight: 600; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--apricot); font: italic 400 20px/1.6 var(--serif); color: var(--heading); }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--accent-soft); font-weight: 600; }

.article__foot { margin-top: 56px; display: grid; gap: 28px; }
.discuss { margin: 0; padding: 18px 22px; border: 1px dashed var(--line); border-radius: var(--radius); font-size: 15.5px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pager a { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--heading); font: 500 17px/1.35 var(--serif); }
.pager a:hover { box-shadow: var(--shadow); }
.pager span { font: 600 12px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pager__next { text-align: right; grid-column: 2; }
.disclaimer { font-size: 14px; color: var(--muted); margin: 0; }

.author { display: flex; gap: 22px; align-items: flex-start; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.author__photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex: none; }
.author__name { font: 500 24px/1.2 var(--serif); color: var(--heading); margin: 0 0 6px; }
.author__role { margin: 0 0 16px; color: var(--muted); font-size: 15.5px; }
.author__links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0; }
.author__reviews { font-size: 14px; }
.author--compact { padding: 22px; }
.author--compact .author__photo { width: 72px; height: 72px; }
.author--compact .author__name { font-size: 20px; }

/* Подвал */
.footer { background: var(--bg-tint); border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 14.5px; color: var(--muted); }
.footer__inner { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; }
.footer p { margin: 0 0 10px; }
.footer__name { font: 500 22px/1.2 var(--serif); color: var(--heading); }
.footer__name em { color: var(--brand); }
.footer__name { display: flex; align-items: center; gap: 10px; }
.footer a { color: var(--text); }
.footer__copy { margin-top: 18px !important; }

/* Планшет и телефон */
@media (max-width: 960px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .card--lead { grid-column: span 2; }
}
@media (max-width: 680px) {
  body { font-size: 16.5px; }
  .wrap, .hero__inner, .masthead__inner, .footer__inner { padding-left: 16px; padding-right: 16px; }
  .masthead__inner { gap: 12px; padding-top: 10px; padding-bottom: 10px; }
  .brand__name { font-size: 19px; }
  .hero { padding: 56px 0 48px; }
  .hero__lead { font-size: 18px; }
  .section { padding: 52px 0; }
  .rubrics { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; gap: 16px; }
  .card--lead { grid-column: auto; }
  .card--lead .card__link { flex-direction: column; }
  .card--lead .card__img { width: 100%; aspect-ratio: 3 / 2; }
  .card--lead .card__body { padding: 20px 22px 22px; }
  .card--lead .card__title { font-size: 22px; }
  .row > a { gap: 14px; padding: 18px 2px; flex-wrap: wrap; }
  .row__meta { width: 100%; order: 3; padding-left: 0; }
  .row__n + .row__text + .row__meta { padding-left: calc(2ch + 14px); }
  .row__title { font-size: 19px; }
  .article { padding: 40px 16px 32px; }
  .article__lead { font-size: 18px; }
  .prose { font-size: 17px; line-height: 1.72; }
  .prose h2 { font-size: 24px; }
  .toc { padding: 18px 20px; }
  .pager { grid-template-columns: 1fr; }
  .pager__next { grid-column: 1; text-align: left; }
  .author { flex-direction: column; padding: 22px; }
  .footer__inner { grid-template-columns: 1fr; gap: 24px; }
  .page-head { padding-top: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .masthead, .footer, .progress, .pager, .discuss, .author, .toc, .section--tint { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
}

/* ===== Навигация v2: выпадающие меню, иконки, бургер ===== */
.masthead__inner { gap: 10px; }
.topnav { display: flex; align-items: center; gap: 2px; font-size: 15px; margin-right: 6px; }
.topnav > a, .dd__btn { display: inline-flex; align-items: center; gap: 5px; padding: 8px 12px; border-radius: 999px; border: 0; color: var(--text); text-decoration: none; font-weight: 500; }
.topnav > a:hover, .dd__btn:hover, .dd:focus-within .dd__btn { background: var(--surface); }
.topnav > a[aria-current="page"], .dd__btn.is-current { background: var(--accent-soft); }
.dd__btn svg { opacity: .6; transition: transform .2s; }
.dd { position: relative; }
.dd:hover .dd__btn svg, .dd:focus-within .dd__btn svg { transform: rotate(180deg); }
.dd__panel {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 300px; padding: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .18s, transform .18s, visibility .18s; z-index: 40;
}
.dd::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }
.dd:hover .dd__panel, .dd:focus-within .dd__panel { opacity: 1; visibility: visible; transform: none; }
.dd__panel--wide { width: min(640px, 80vw); left: -40px; padding: 18px; }
.dd__title { margin: 0 4px 12px; font-size: 13px; color: var(--muted); }
.dd__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dd__grid a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 10px 14px; border-radius: 10px; text-decoration: none; color: var(--text); border-left: 3px solid var(--tone-dot); }
.dd__grid a:hover { background: var(--tone-soft); }
.dd__grid b { font: 500 16px/1.3 var(--serif); color: var(--heading); }
.dd__grid span { font-size: 13px; line-height: 1.4; color: var(--muted); }
.dd__list { list-style: none; margin: 0; padding: 0; }
.dd__list a, .mnav__list a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--text); font-size: 15px; }
.dd__list a:hover { background: var(--tone-soft); }
.dd__list i, .mnav__list i, .chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--tone-dot); flex: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--tone) 25%, transparent); }
.dd__list small { margin-left: auto; color: var(--muted); font-size: 12.5px; }

.icon-btn { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--text); background: var(--surface); }
.burger { display: none; }
.mnav { border-top: 1px solid var(--line); background: var(--bg); max-height: calc(100dvh - 60px); overflow-y: auto; }
.mnav__inner { padding: 8px 16px 28px; }
.mnav__h { margin: 18px 4px 6px; font: 600 12px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.mnav__list { list-style: none; margin: 0; padding: 0; }
.mnav__list a { padding: 11px 8px; font-size: 16px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); border-radius: 0; }
.mnav__links { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.mnav__links a { padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--text); font-size: 15px; }
body.menu-open { overflow: hidden; }

@media (max-width: 960px) {
  .topnav { display: none; }
  .burger { display: grid; }
}

/* ===== Все статьи: вкладки, фильтры, карточки-строки ===== */
.wrap--mid { max-width: 920px; }
.section--flush { padding-top: 24px; }
.search { position: relative; display: block; margin-top: 22px; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { margin-top: 0; padding-left: 46px; }

.filters { display: grid; gap: 14px; margin-bottom: 18px; }
.tabs { display: inline-flex; padding: 4px; gap: 4px; background: var(--bg-tint); border: 1px solid var(--line); border-radius: 999px; justify-self: start; }
.tab { border: 0; background: transparent; color: var(--muted); font: 600 15px/1 var(--sans); padding: 10px 18px; border-radius: 999px; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(59 54 49 / .12); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips[hidden] { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 500 14.5px/1.25 var(--sans); text-decoration: none;
  transition: background .15s, border-color .15s;
}
.chip:hover { border-color: var(--tone, var(--sage)); }
.chip small { color: var(--muted); font-size: 12.5px; }
.chip.is-on { background: var(--tone-soft, var(--accent-soft)); border-color: var(--tone, var(--moss)); box-shadow: inset 0 0 0 1px var(--tone, var(--moss)); }
.chips--sub { padding: 14px 16px; border-radius: var(--radius); background: var(--bg-tint); border: 1px dashed var(--line); }
.chips__label { align-self: center; font-size: 13.5px; color: var(--muted); margin-right: 2px; }
.chip--sub { background: var(--bg); font-size: 14px; }
.count { font-size: 14px; color: var(--muted); margin: 6px 0 14px; }

.lcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.lcard[hidden] { display: none; }
.lcard > a {
  display: flex; gap: 20px; padding: 16px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--tone-dot);
  border-radius: var(--radius); transition: transform .2s, box-shadow .2s;
}
.lcard > a:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.lcard > a:hover .lcard__title { color: var(--accent); }
.lcard__img { width: 132px; height: 132px; object-fit: cover; border-radius: 10px; flex: none; background: var(--tone-soft); }
.lcard__img--blank { display: block; background: radial-gradient(circle at 35% 40%, var(--tone-dot), transparent 62%), var(--tone-soft); }
.lcard__body { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.lcard__title { font: 500 21px/1.3 var(--serif); color: var(--heading); transition: color .2s; }
.lcard__desc { font-size: 15px; line-height: 1.55; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lcard .meta { margin-top: auto; font-size: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font: 600 11.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; background: var(--tone-soft); color: var(--tone); }
:root[data-theme="dark"] .tag { color: var(--tone-dot); }


/* ===== Навигатор «Что беспокоит» ===== */
.tree { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tree__node { background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--tone-dot); border-radius: var(--radius); padding: 22px 22px 18px; }
.tree__head h2 { font-size: 24px; margin: 0 0 4px; }
.tree__head h2 a { color: var(--heading); text-decoration: none; }
.tree__head h2 a:hover { color: var(--accent); }
.tree__head p { margin: 0 0 14px; color: var(--muted); font-size: 14.5px; }
.tree__branches { list-style: none; margin: 0; padding: 0; }
.tree__branch { position: relative; padding: 10px 0 8px 22px; border-left: 2px solid var(--tone-soft); }
.tree__branch::before { content: ""; position: absolute; left: -2px; top: 21px; width: 14px; height: 2px; background: var(--tone-soft); }
.tree__branch:last-child { border-left-color: transparent; }
.tree__branch:last-child::after { content: ""; position: absolute; left: -2px; top: 0; height: 22px; border-left: 2px solid var(--tone-soft); }
.tree__q { margin: 0 0 6px; font-weight: 600; font-size: 15.5px; }
.tree__leaves { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.tree__leaves li { font-size: 15px; line-height: 1.45; padding-left: 14px; position: relative; }
.tree__leaves li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--tone-dot); }
.tree__leaves .meta { font-size: 12.5px; white-space: nowrap; }
.tree__note { margin: 28px 0; padding: 16px 20px; border-radius: var(--radius); background: var(--warm-soft); font-size: 15px; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.branch { margin: 8px 0 40px; scroll-margin-top: 90px; }
.branch__title { font-size: 26px; margin: 0 0 16px; }
.other { margin: 28px 0 0; font-size: 15px; color: var(--muted); line-height: 1.9; }

/* Главная: вход через состояние */
.states-home { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.state-link { display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 16px; border-radius: var(--radius); text-decoration: none; color: var(--text); background: var(--tone-soft); border: 1px solid color-mix(in srgb, var(--tone) 18%, transparent); transition: transform .2s, box-shadow .2s; }
.state-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.state-link b { font: 500 18px/1.3 var(--serif); color: var(--heading); }
.state-link span { font-size: 13.5px; line-height: 1.45; color: var(--muted); }

@media (max-width: 960px) {
  .states-home { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .tree { grid-template-columns: 1fr; }
  .lcard > a { gap: 14px; padding: 12px; }
  .lcard__img { width: 84px; height: 84px; }
  .lcard__title { font-size: 18px; }
  .lcard__desc { display: none; }
  .tab { padding: 9px 14px; font-size: 14.5px; }
  .chips { gap: 6px; }
  .chip { padding: 7px 12px; font-size: 14px; }
  .states-home { grid-template-columns: 1fr; }
  .icon-btn { width: 36px; height: 36px; }
}


/* ===== Лонгриды и уроки: книжная шапка ===== */
.book-head { margin-bottom: 32px; }
.book-head__kicker { font: 600 13px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--brand); margin: 18px 0 10px; }
.book-head__title { font-size: clamp(36px, 6vw, 60px); line-height: 1.06; margin: 0 0 14px; letter-spacing: -.025em; }
.book-head__subtitle { font: italic 400 clamp(20px, 2.4vw, 24px)/1.4 var(--serif); color: var(--accent); margin: 0 0 22px; }
.book-head__lead { font: italic 400 clamp(18px, 2vw, 21px)/1.6 var(--serif); color: var(--text); margin: 0 0 24px; padding-left: 18px; border-left: 3px solid var(--tone-dot, var(--sage)); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; margin: 0 0 22px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.facts > div { background: var(--surface); padding: 12px 16px; }
.facts dt { font: 600 11.5px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.facts dd { margin: 0; font: 500 16.5px/1.4 var(--serif); color: var(--heading); }

.steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 34px; }
.steps__dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; font: 600 13px/1 var(--sans); color: var(--muted); border: 1px solid var(--line); background: var(--surface); }
.steps__dot:hover { border-color: var(--tone); color: var(--text); }
.steps__dot.is-done { background: var(--tone-soft); color: var(--tone); border-color: transparent; }
.steps__dot.is-current { background: var(--tone); color: #F8F4EC; border-color: var(--tone); }

/* ===== Блоки брошюр ===== */
.prose--book .lede { font: 400 20px/1.65 var(--serif); color: var(--heading); }
.prose--book h2 { counter-increment: ch; }
.prose--book { counter-reset: ch; }
.prose--book h2 em, .prose h2 em { color: var(--brand); font-weight: 400; }
.prose h3 { font-size: 21px; }
.prose img { border-radius: var(--radius); margin: 1.6em auto; box-shadow: var(--shadow); }

.box { margin: 1.6em 0; padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: 17px; line-height: 1.65; }
.box > :first-child { margin-top: 0; }
.box > :last-child { margin-bottom: 0; }
.box > * { margin: 0 0 .8em; }
.box__label { font: 600 12px/1.3 var(--sans) !important; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin: 0 0 8px !important; }
.box strong:first-child { font-family: var(--serif); font-weight: 500; font-size: 20px; color: var(--heading); }
.box--accent { background: transparent; border: 0; border-left: 3px solid var(--brand); border-radius: 0; padding: 4px 0 4px 20px; }
.box--soft { background: var(--tone-soft, var(--accent-soft)); border-color: transparent; }
.box--soft .box__label { color: var(--tone, var(--moss)); }
.box--warn { background: var(--warm-soft); border-color: color-mix(in srgb, var(--terracotta) 35%, transparent); }
.box--warn .box__label { color: var(--terracotta); }
.box ul, .box ol { padding-left: 1.3em; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 1.6em 0; }
.cards > div { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: 16px; line-height: 1.6; position: relative; }
.cards > div > * { margin: 0 0 .6em; }
.cards > div > :last-child { margin-bottom: 0; }
.cards h3 { font-size: 19px; line-height: 1.3; margin: 0 0 .5em !important; color: var(--heading); }
.cards--flow > div:not(:last-child)::after { content: "→"; position: absolute; right: -11px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 50%; background: var(--bg); color: var(--brand); display: grid; place-items: center; font-size: 13px; z-index: 1; }

.kv { display: grid; grid-template-columns: minmax(140px, 30%) 1fr; margin: 1.4em 0; border-top: 1px solid var(--line); font-size: 17px; }
.kv dt, .kv dd { margin: 0; padding: 13px 0; border-bottom: 1px solid var(--line); }
.kv dt { font: 600 12.5px/1.45 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--brand); padding-right: 18px; padding-top: 16px; }
.kv dd { line-height: 1.6; }
.box .kv { margin: .6em 0 0; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 1.6em 0; }
.cols > div { padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.cols > div > :first-child { margin-top: 0; }
.cols .kv { grid-template-columns: minmax(90px, 34%) 1fr; font-size: 16px; }

.prose table { font-size: 15.5px; border: 1px solid var(--line); border-radius: 12px; }
.prose td { background: var(--surface); }

/* ===== Страница курса ===== */
.lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: none; }
.lesson > a { display: flex; gap: 22px; padding: 22px 24px; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .2s, box-shadow .2s; }
.lesson > a:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.lesson > a:hover .lesson__title { color: var(--accent); }
.lesson__n { font: italic 400 46px/1 var(--serif); color: var(--brand); min-width: 1.6em; }
.lesson__body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.lesson__kicker { font: 600 11.5px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lesson__title { font: 500 24px/1.25 var(--serif); color: var(--heading); transition: color .2s; }
.lesson__sub { font: italic 400 17px/1.4 var(--serif); color: var(--accent); }
.lesson__lead { font-size: 15px; line-height: 1.55; color: var(--muted); margin-top: 4px; }
.lesson .meta { margin-top: 4px; font-size: 13px; }
.course-note { margin-top: 28px; }
.course-head .hero__actions { margin: 20px 0 0; }

.card__img--blank, .lcard__img--blank { display: grid !important; place-items: center; }
.card__img--blank b, .lcard__img--blank b { font: italic 400 44px/1 var(--serif); color: var(--tone); opacity: .8; }
.card__img--blank b { font-size: 72px; }

@media (max-width: 680px) {
  .kv { grid-template-columns: 1fr; }
  .kv dt { border-bottom: 0; padding-bottom: 0; }
  .cols { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .cards--flow > div:not(:last-child)::after { content: "↓"; right: 50%; top: auto; bottom: -11px; transform: translateX(50%); }
  .box { padding: 16px 18px; font-size: 16.5px; }
  .box--accent { padding: 2px 0 2px 16px; }
  .facts { grid-template-columns: 1fr; }
  .lesson > a { gap: 14px; padding: 16px; }
  .lesson__n { font-size: 34px; }
  .lesson__title { font-size: 20px; }
  .lesson__lead { display: none; }
  .book-head__lead { padding-left: 14px; }
}

/* Шапка на узких экранах */
@media (max-width: 680px) {
  .masthead__inner { gap: 6px; padding-left: 12px; padding-right: 12px; }
  .brand { gap: 8px; }
  .brand__logo { width: 36px; height: 36px; margin: -4px 0; }
  .brand__name { font-size: 18.5px; }
  .icon-btn { width: 34px; height: 34px; }
}
@media (max-width: 370px) {
  .icon-btn--search { display: none; }
  .brand__name { font-size: 17.5px; }
}

/* страховка от горизонтальной прокрутки на узких экранах */
html { overflow-x: clip; }
.lcards > li, .lessons > li, .rubrics > *, .cards > * { min-width: 0; }
.lcards, .lessons { grid-template-columns: minmax(0, 1fr); }


/* ===== Справочник ===== */
.draft-banner { margin: 0 0 22px; padding: 10px 16px; border-radius: 10px; background: var(--warm-soft); border: 1px dashed var(--terracotta); font-size: 14.5px; color: var(--text); }
.tag--draft { background: var(--warm-soft); color: var(--terracotta); font-size: 10.5px; vertical-align: middle; }
.ref-codes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.chip--static { cursor: default; font-size: 13.5px; padding: 6px 12px; }
.ref-also { font-size: 15px; color: var(--muted); margin: 0 0 14px; }

.brands { margin: 0 0 40px; padding: 24px 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.brands__title { font-size: 22px; margin: 0 0 8px; }
.brands__note { font-size: 14.5px; color: var(--muted); margin: 0 0 16px; line-height: 1.55; }
.brands__list { margin: 0; border-top: 1px solid var(--line); }
.brands__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.brands__row dt { font: 500 19px/1.3 var(--serif); color: var(--heading); display: flex; flex-direction: column; gap: 4px; }
.brands__row dd { margin: 0; font-weight: 600; font-size: 15.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.brands__kind { font: 600 11.5px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.brands__row--orig { background: linear-gradient(90deg, var(--tone-soft), transparent 70%); margin: 0 -26px; padding-left: 26px; padding-right: 26px; }
.brands__legal { font-size: 13.5px; color: var(--muted); margin: 14px 0 0; }

.ref-related { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; padding: 22px 24px; border-radius: var(--radius); background: var(--bg-tint); border: 1px solid var(--line); }
.ref-related__h { font: 600 12px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.ref-related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 15.5px; line-height: 1.45; }
.ref-related .meta { font-size: 12.5px; }

.ref-group { margin: 0 0 36px; }
.ref-group__title { font-size: 24px; margin: 0 0 14px; }
.ref-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ref-list a { display: flex; flex-direction: column; gap: 5px; padding: 18px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--tone-dot); text-decoration: none; color: var(--text); transition: transform .2s, box-shadow .2s; }
.ref-list a:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.ref-list__title { font: 500 22px/1.25 var(--serif); color: var(--heading); }
.ref-list__meta { font-size: 13.5px; color: var(--brand); font-weight: 600; }
.ref-list__lead { font-size: 15px; color: var(--muted); line-height: 1.55; }

.ref-home { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ref-home__card { display: flex; flex-direction: column; gap: 8px; padding: 24px 26px; border-radius: var(--radius); background: var(--tone-soft); border: 1px solid color-mix(in srgb, var(--tone) 20%, transparent); text-decoration: none; color: var(--text); transition: transform .2s, box-shadow .2s; }
.ref-home__card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.ref-home__card b { font: 500 26px/1.2 var(--serif); color: var(--heading); }
.ref-home__card span { font-size: 15px; line-height: 1.55; color: var(--muted); }
.ref-home__card small { font-size: 13px; color: var(--tone); font-weight: 600; margin-top: 4px; }
.dd__list--ref a { align-items: flex-start; }
.dd__list--ref i { margin-top: 6px; }
.dd__list--ref span { display: flex; flex-direction: column; gap: 2px; }
.dd__list--ref b { font: 500 16px/1.3 var(--serif); color: var(--heading); }
.dd__list--ref small { margin: 0; font-size: 12.5px; }

@media (max-width: 680px) {
  .brands { padding: 18px 18px; }
  .brands__row--orig { margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
  .brands__row { flex-wrap: wrap; }
  .ref-home { grid-template-columns: 1fr; }
  .ref-list a { padding: 16px 18px; }
  .ref-list__title { font-size: 19px; }
}

@media (max-width: 680px) {
  .section__head--row { flex-wrap: wrap; }
  .section__head--row .more { white-space: normal; }
}


/* ===== Шапка справочника: цветовые пятна + мотив состояния ===== */
.ref-hero { position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--h1) 7%, var(--bg)), var(--bg)); }
.ref-hero__inner { position: relative; z-index: 2; max-width: calc(var(--prose) + 48px); margin: 0 auto; padding: 72px 24px 44px; }
.ref-hero .book-head { margin: 0; }
.ref-hero .book-head__title { max-width: 16ch; }
.ref-hero__fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.ref-hero__fx::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 42%, transparent 75%); }
.blob { position: absolute; border-radius: 50%; filter: blur(46px); opacity: .55; animation: nk-drift 22s ease-in-out infinite alternate; }
.blob.b1 { width: 46vw; max-width: 620px; aspect-ratio: 1; right: -8%; top: -30%; background: var(--h1); }
.blob.b2 { width: 34vw; max-width: 460px; aspect-ratio: 1; right: 18%; top: 30%; background: var(--h2); animation-duration: 28s; animation-delay: -6s; }
.blob.b3 { width: 28vw; max-width: 380px; aspect-ratio: 1; right: -4%; bottom: -35%; background: var(--h3); animation-duration: 25s; animation-delay: -12s; }
@keyframes nk-drift { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(-4%, 6%) scale(1.08); } }

/* огни: тревога мерцает, вспыхивает и гаснет */
.motif-lights .dot, .motif-scatter .dot { position: absolute; border-radius: 50%; background: var(--c);
  box-shadow: 0 0 14px 4px color-mix(in srgb, var(--c) 70%, transparent), 0 0 38px 10px color-mix(in srgb, var(--c) 30%, transparent);
  animation: nk-flicker ease-in-out infinite; opacity: .2; }
@keyframes nk-flicker { 0%, 100% { opacity: .15; transform: scale(.8); } 45% { opacity: .95; transform: scale(1.15); } 55% { opacity: .5; } 70% { opacity: .85; } }
/* рассыпанное внимание: мелкие точки врассыпную */
.motif-scatter .dot { width: 6px !important; height: 6px !important; animation-name: nk-jitter; box-shadow: 0 0 8px 2px color-mix(in srgb, var(--c) 60%, transparent); opacity: .7; }
@keyframes nk-jitter { 0% { transform: translate(0, 0); } 25% { transform: translate(14px, -10px); } 50% { transform: translate(-8px, 12px); } 75% { transform: translate(10px, 6px); } 100% { transform: translate(0, 0); } }
/* пульс: волна, которая накрывает (паника) */
.motif-pulse .dot { position: absolute; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--c) 70%, transparent); transform: translate(-50%, -50%) scale(.2);
  animation: nk-pulse 6s cubic-bezier(.2, .6, .3, 1) infinite; opacity: 0; }
@keyframes nk-pulse { 0% { transform: translate(-50%, -50%) scale(.2); opacity: .9; } 100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; } }
/* туман: тяжёлый, медленный, приглушённый (депрессия) */
.motif-fog .blob { filter: blur(70px); opacity: .6; animation-duration: 40s; }
.motif-fog .ref-hero__fx::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--h3) 25%, transparent)); }
/* две половины: подъём и спад (БАР) */
.motif-split .blob.b1 { right: auto; left: 45%; top: -40%; }
.motif-split .blob.b3 { right: -10%; bottom: -50%; width: 40vw; }
.motif-split .ref-hero__fx::before { content: ""; position: absolute; inset: 0 0 0 40%;
  background: linear-gradient(115deg, color-mix(in srgb, var(--h1) 35%, transparent) 0 48%, color-mix(in srgb, var(--h3) 45%, transparent) 52% 100%);
  animation: nk-seesaw 14s ease-in-out infinite alternate; filter: blur(10px); }
@keyframes nk-seesaw { 0% { transform: translateX(-3%) skewX(-4deg); } 100% { transform: translateX(3%) skewX(4deg); } }
/* волны: накатывает и отступает */
.motif-waves .wave { position: absolute; left: 30%; right: -10%; height: 70px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 55%, transparent), transparent); filter: blur(8px);
  animation: nk-wave 9s ease-in-out infinite alternate; }
@keyframes nk-wave { 0% { transform: translateX(-6%) scaleY(.7); } 100% { transform: translateX(6%) scaleY(1.3); } }
/* круги: одна и та же петля (ОКР, руминация) */
.motif-rings .ring { position: absolute; left: 74%; top: 50%; border-radius: 50%; transform: translate(-50%, -50%);
  border: 1.5px solid color-mix(in srgb, var(--h1) 55%, transparent); animation: nk-spin 18s linear infinite; border-top-color: transparent; }
.motif-rings .ring:nth-child(even) { animation-direction: reverse; border-color: color-mix(in srgb, var(--h2) 60%, transparent); border-left-color: transparent; }
@keyframes nk-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
/* осколки: вспышки воспоминаний (травма) */
.motif-shards .shard { position: absolute; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--c), transparent); box-shadow: 0 0 12px color-mix(in srgb, var(--c) 60%, transparent);
  animation: nk-flash 7s ease-in-out infinite; opacity: 0; }
@keyframes nk-flash { 0%, 70%, 100% { opacity: 0; } 76% { opacity: .95; } 86% { opacity: .2; } }

.article--after-hero { padding-top: 40px; }
.ref-hero .draft-banner { margin-bottom: 18px; }

:root[data-theme="dark"] .blob { opacity: .32; }


@media (max-width: 680px) {
  .ref-hero__inner { padding: 48px 16px 32px; }
  .ref-hero__fx::after { background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--bg) 55%, transparent) 55%, var(--bg) 100%); }
  .blob.b1 { width: 90vw; right: -40%; top: -25%; }
  .blob.b2 { width: 70vw; right: -10%; top: 5%; }
  .blob.b3 { width: 60vw; }
  .motif-rings .ring { left: 85%; top: 18%; }
  .motif-pulse .dot { left: 82% !important; top: 16% !important; }
}
@media (prefers-reduced-motion: reduce) {
  .ref-hero__fx *, .ref-hero__fx::before { animation: none !important; }
  .motif-lights .dot { opacity: .7; }
  .motif-shards .shard, .motif-pulse .dot { opacity: .5; }
}

/* эмодзи у заголовков разделов */
.h-emoji { display: inline-block; margin-right: .35em; font-size: .85em; transform: translateY(-.04em); filter: saturate(.85); }

.ref-hero .book-head__lead { border-left-color: var(--h1); }
.ref-hero .eyebrow { color: color-mix(in srgb, var(--h1) 70%, var(--text)); }

/* Переключатель темы: иконка по состоянию, на широком экране с подписью */
.theme-toggle { width: auto !important; padding: 0 12px; gap: 7px; display: inline-flex !important; align-items: center; border-radius: 999px !important; font: 500 14px/1 var(--sans); color: var(--text) !important; }
.theme-toggle .ico-sun, :root[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
.theme-toggle__label::before { content: "Тёмная тема"; }
:root[data-theme="dark"] .theme-toggle__label::before { content: "Светлая тема"; }
@media (max-width: 1180px) { .theme-toggle__label { display: none; } .theme-toggle { width: 38px !important; padding: 0; justify-content: center; } }
@media (max-width: 680px) { .theme-toggle { width: 34px !important; } }
