/* ==========================================================================
   Первый по заработку — основной стиль
   1. Шрифты  2. Токены  3. Тёмная схема  4. База  5. Раскладка
   6. Шапка  7. Поиск  8. Подвал  9. Текст статьи  10. Пагинация
   11. Кнопки и формы  13–15. Шаблоны  12. Служебное
   ========================================================================== */

/* 1. Шрифты — локально, без внешних запросов --------------------------------- */
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/golos-text-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: "Golos Text"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/golos-text-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: "Golos Text"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/golos-text-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+A720-A7FF; }

@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/golos-text-cyrillic-500-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/golos-text-latin-500-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: "Golos Text"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/golos-text-latin-ext-500-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+A720-A7FF; }

@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/golos-text-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: "Golos Text"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/golos-text-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: "Golos Text"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/golos-text-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+A720-A7FF; }

/* Exo 2 — только для H1, H2 и логотипа. Знак ₽ в нём берётся из Golos Text. */
@font-face { font-family: "Exo 2"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/exo2-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: "Exo 2"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/exo2-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+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Exo 2"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/exo2-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: "Exo 2"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/exo2-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+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* Roboto Condensed — только для главного меню: узкий, экономит место в строке. */
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/roboto-condensed-cyrillic-500-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/roboto-condensed-latin-500-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+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* 2. Токены --------------------------------------------------------------------
   Идея: «договор, подписанный чернилами, и маркер на главном».
   Оливковый акцент — ссылки и действия. Светло-зелёный маркер — только ключевой факт
   (блок «Кратко», важная цифра в таблице). Больше акцентов нет. */
:root {
  --c-bg: #ffffff;
  --c-surface: #f9f8f5;      /* подложка подвала и служебных блоков */
  --c-text: #282726;
  --c-muted: #666666;
  --c-line: #e0ded8;
  --c-ink: #5e7029;          /* акцент: ссылки, кнопки, фокус */
  --c-ink-strong: #4f5f20;
  --c-on-ink: #ffffff;
  --c-mark: #d6e3a8;         /* маркер */
  /* Выделенные блоки статьи: карточка сервиса, «Сколько можно заработать».
     Выделяет рамка акцентного цвета, заливка — едва заметная. Линии и подписи
     внутри — нейтральные, от цвета текста: зелёные линии на зелёной подложке
     сливались (контраст 1,3). Всё пересчитывается под каждую тему само. */
  --c-tint: color-mix(in srgb, var(--c-ink) 6%, var(--c-bg));
  --c-tint-frame: color-mix(in srgb, var(--c-ink) 45%, var(--c-bg));
  --c-tint-line: color-mix(in srgb, var(--c-text) 22%, var(--c-tint));
  --c-tint-label: color-mix(in srgb, var(--c-text) 72%, var(--c-tint));
  --c-star: #e5a100;         /* звёзды оценки */
  --c-star-empty: #dcd8cc;
  --c-good: #5e7029;         /* плюсы, «работает» */
  --c-warn: #a85f10;         /* «осторожно» */
  --c-bad: #c0392b;          /* минусы, «закрыт» */

  --f-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --f-head: "Exo 2", "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --f-menu: "Roboto Condensed", "Golos Text", system-ui, sans-serif;

  --fs-small: 0.875rem;
  --fs-base: 1.0625rem;      /* 17 px */
  --fs-h4: 1.125rem;
  --fs-h3: 1.3rem;
  --fs-h2: clamp(1.35rem, 1.1rem + 1vw, 1.7rem);
  --fs-h1: clamp(1.6rem, 1.15rem + 2vw, 2.35rem);
  --lh-body: 1.65;
  --lh-head: 1.25;

  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.5rem;  --s-6: 2rem;   --s-7: 3rem;    --s-8: 4.5rem;

  --r-small: 6px;            /* кнопки, поля */
  --r-panel: 12px;           /* крупные блоки */

  --wrap: 1180px;
  --measure: 46rem;          /* ≈ 70 знаков в строке */
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);
}

/* 3. Тёмная схема: по системе, либо принудительно кнопкой в шапке --------------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-star: #f2b84b;
    --c-star-empty: #3d3b33;
    --c-bg: #1a1c18;
    --c-surface: #23261f;
    --c-text: #e9e8e3;
    --c-muted: #a0a29a;
    --c-line: #34372d;
    --c-ink: #a7bc5b;
    --c-ink-strong: #c2d485;
    --c-on-ink: #1a1c18;
    --c-mark: #4a5423;
    --c-good: #a7bc5b;
    --c-warn: #f0a94e;
    --c-bad: #e57368;
  }
}
:root[data-theme="dark"] {
  --c-star: #f2b84b;
  --c-star-empty: #3d3b33;
  --c-bg: #1a1c18;
  --c-surface: #23261f;
  --c-text: #e9e8e3;
  --c-muted: #a0a29a;
  --c-line: #34372d;
  --c-ink: #a7bc5b;
  --c-ink-strong: #c2d485;
  --c-on-ink: #1a1c18;
  --c-mark: #4a5423;
  --c-good: #a7bc5b;
  --c-warn: #f0a94e;
  --c-bad: #e57368;
}

/* 4. База ------------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font: 400 var(--fs-base)/var(--lh-body) var(--f-body);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100vh;
}
img, svg, video, iframe { max-width: 100%; height: auto; }
svg { flex-shrink: 0; }

h1, h2, h3, h4 { line-height: var(--lh-head); margin: 0; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
h1, h2 { font-family: var(--f-head); letter-spacing: -0.01em; }
h1 { font-size: var(--fs-h1); font-weight: 600; }
h2 { font-size: var(--fs-h2); font-weight: 500; }
h3 { font-size: var(--fs-h3); font-weight: 600; }
h4 { font-size: var(--fs-h4); font-weight: 600; }

p { margin: 0; }
a { color: var(--c-ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--c-ink-strong); text-decoration-thickness: 2px; }

/* Маркер: обычный <mark> в тексте выглядит как штрих текстовыделителем */
mark, .mark {
  color: inherit;
  background: linear-gradient(100deg, transparent 0.15em, var(--c-mark) 0.3em, var(--c-mark) calc(100% - 0.3em), transparent calc(100% - 0.15em));
  padding: 0 0.2em; margin: 0 -0.12em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

:focus-visible { outline: 3px solid var(--c-ink); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--c-mark); color: var(--c-text); }

/* 5. Раскладка -------------------------------------------------------------------- */
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--text { max-width: calc(var(--measure) + 2 * var(--gutter)); }
.site-main { flex: 1 0 auto; padding-block: var(--s-6) var(--s-8); }
.site-main:focus { outline: none; }

/* 6. Шапка ------------------------------------------------------------------------ */
.site-header { border-bottom: 1px solid var(--c-line); background: var(--c-bg); position: relative; z-index: 10; }
.site-header__bar { display: flex; align-items: center; gap: var(--s-5); min-height: 4.25rem; }

.logo { display: inline-flex; align-items: center; gap: 0.6rem; line-height: 1.1; color: var(--c-text); text-decoration: none; }
.logo:hover { color: var(--c-text); }
.logo__mark {
  display: grid; place-items: center;
  width: 2.35rem; height: 2.35rem;
  background: var(--c-ink); color: var(--c-on-ink);
  border-radius: var(--r-small);
  font-family: var(--f-head); font-weight: 700; font-size: 1.5rem;
  line-height: 1; padding-bottom: 0.08em;
}
.logo__text { display: inline-flex; flex-direction: column; }
.logo__name { font-family: var(--f-head); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.01em; text-transform: uppercase; }
.logo__tagline {
  align-self: flex-start;
  margin-top: 0.15rem;
  font-size: 0.8rem; font-weight: 500;
  background: linear-gradient(100deg, transparent 0.1em, var(--c-mark) 0.25em, var(--c-mark) calc(100% - 0.25em), transparent calc(100% - 0.1em));
  padding: 0 0.3em; margin-left: -0.3em;
}

/* Главное меню — отдельная полоса под шапкой.
   Пункты, которые не влезли в строку, скрипт убирает в список «Ещё».
   Без JS список просто переносится на вторую строку — всё остаётся доступным. */
.site-nav-bar { background: var(--c-ink); position: relative; z-index: 9; }
.site-nav__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap;
  column-gap: var(--s-4); row-gap: 0;
}
/* Скрипт подключён с defer: до его запуска прячем строку, чтобы пункты
   не «моргнули» переполнением. Класс снимается сразу после раскладки. */
.js .site-nav__list { flex-wrap: nowrap; }
.js .site-nav-bar:not(.is-laid-out) .site-nav__list { visibility: hidden; }
.js .site-nav-bar { min-height: 2.9rem; }

.site-nav__list a {
  display: block; padding: 0.7rem 0.15rem 0.55rem;
  color: var(--c-on-ink); text-decoration: none;
  font-family: var(--f-menu); font-weight: 500; font-size: 1rem;
  letter-spacing: 0.01em; text-transform: uppercase; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.site-nav__list a:hover { color: var(--c-on-ink); border-bottom-color: rgba(255,255,255,0.45); }
.site-nav__list .current-menu-item > a,
.site-nav__list .current-menu-parent > a,
.site-nav__list .current-post-parent > a { border-bottom-color: var(--c-on-ink); }
.site-nav__list a:focus-visible { outline-offset: -3px; }

/* Пункт «Ещё» — появляется только когда скрипту есть что в него убрать. */
.site-nav__more { position: relative; margin-left: auto; }
.site-nav__more[hidden] { display: none; }
.site-nav__more-btn {
  display: flex; align-items: center; gap: 0.3em;
  padding: 0.7rem 0.15rem 0.55rem;
  background: none; border: 0; border-bottom: 2px solid transparent;
  color: var(--c-on-ink); cursor: pointer;
  font-family: var(--f-menu); font-weight: 500; font-size: 1rem;
  letter-spacing: 0.01em; text-transform: uppercase; white-space: nowrap;
}
.site-nav__more-btn:hover { border-bottom-color: rgba(255,255,255,0.45); }
.site-nav__more-btn[aria-expanded="true"] { border-bottom-color: var(--c-on-ink); }
.site-nav__more-btn::after {
  content: ""; width: 0.4em; height: 0.4em;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-0.1em);
}
.site-nav__more-btn[aria-expanded="true"]::after { transform: rotate(-135deg) translateY(-0.1em); }
/* Рубрика, спрятанная в «Ещё», активна — подсвечиваем саму кнопку. */
.site-nav__more.has-current .site-nav__more-btn { border-bottom-color: var(--c-on-ink); }

.site-nav__more-list {
  position: absolute; right: 0; top: 100%; z-index: 20;
  min-width: 13rem; margin: 0; padding: var(--s-2) 0;
  list-style: none;
  background: var(--c-ink);
  border-radius: 0 0 var(--r-small) var(--r-small);
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
}
.site-nav__more-list[hidden] { display: none; }
.site-nav__more-list a {
  padding: var(--s-2) var(--s-4);
  border-bottom: 0; white-space: normal;
}
.site-nav__more-list a:hover { background: rgba(255,255,255,0.12); border-bottom-color: transparent; }
.site-nav__more-list .current-menu-item > a,
.site-nav__more-list .current-menu-parent > a,
.site-nav__more-list .current-post-parent > a {
  background: rgba(255,255,255,0.16); border-bottom-color: transparent;
}

.menu-hint { margin: 0; font-size: var(--fs-small); }

.site-header__tools { display: flex; align-items: center; gap: var(--s-1); margin-left: auto; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 2.5rem; height: 2.5rem; padding: 0;
  background: none; border: 0; border-radius: var(--r-small);
  color: var(--c-text); cursor: pointer;
}
.icon-btn:hover { background: var(--c-surface); color: var(--c-ink); }
.icon-btn[aria-expanded="true"] { background: var(--c-surface); }

.nav-toggle { display: none; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: inline; }

/* Узкий экран: меню целиком уходит под бургер. */
@media (max-width: 860px) {
  .site-header__bar { gap: var(--s-3); }
  .site-header__tools { margin-left: auto; }
  .nav-toggle { display: inline-grid; }
  .js .site-nav-bar { display: none; }
  .js .site-nav-bar.is-open { display: block; }
  .js .site-nav-bar.is-open .site-nav__list { flex-direction: column; flex-wrap: nowrap; column-gap: 0; }
  /* В мобильном меню «Ещё» не нужно — скрипт возвращает все пункты в список. */
  .js .site-nav-bar.is-open .site-nav__more { display: none; }
  .js .site-nav-bar.is-open .site-nav__list a {
    padding-block: var(--s-3);
    border-bottom: 1px solid rgba(255,255,255,0.18);
    white-space: normal;
  }
  .js .site-nav-bar.is-open .site-nav__list li:last-child a { border-bottom: 0; }
  .js .site-nav-bar.is-open .site-nav__list .current-menu-item > a { border-bottom-color: var(--c-on-ink); }
}
/* Без JS полоса меню просто остаётся на месте — всё доступно. */
@media (max-width: 860px) {
  html:not(.js) .site-header__bar { flex-wrap: wrap; }
  html:not(.js) .site-nav__list { justify-content: flex-start; }
}

/* 7. Поиск ------------------------------------------------------------------------
   Форма живёт прямо в строке шапки: занимает свободное место между логотипом
   и кнопками. Высота поля меньше высоты строки, поэтому шапка не растягивается. */
.site-search {
  flex: 1 1 auto; min-width: 0;
  max-width: 34rem;
  margin-inline: auto;
}
.site-search[hidden] { display: none; }

.search-form { display: flex; gap: var(--s-2); width: 100%; }
.search-form__field {
  flex: 1; min-width: 0;
  font: inherit; font-size: var(--fs-small); color: var(--c-text); background: var(--c-bg);
  border: 1px solid var(--c-line); border-radius: var(--r-small);
  padding: 0.45rem 0.7rem;
  text-overflow: ellipsis;
}
.search-form__field:focus { border-color: var(--c-ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-ink) 25%, transparent); }
.search-form .btn { padding: 0.45rem 0.9rem; font-size: var(--fs-small); white-space: nowrap; }

/* На странице результатов поиска форма выводится в контенте — там она обычная. */
.site-main .search-form { max-width: 40rem; }
.site-main .search-form__field { font-size: var(--fs-base); padding: 0.6rem 0.8rem; }
.site-main .search-form .btn { padding: 0.6rem 1rem; font-size: var(--fs-base); }

/* Узкий экран: форме нужно всё место строки — логотип на время прячем. */
@media (max-width: 700px) {
  .site-header.is-searching .logo { display: none; }
  .site-search { max-width: none; }
  .search-form__field::placeholder { font-size: 0.8rem; }
}

/* 8. Подвал ----------------------------------------------------------------------- */
.site-footer { background: var(--c-surface); color: var(--c-muted); font-size: var(--fs-small); padding-block: var(--s-7) var(--s-5); }
.site-footer__grid { display: grid; gap: var(--s-6); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .site-footer__grid { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } }
.site-footer__about p { margin-top: var(--s-3); max-width: 28rem; }
.site-footer__navs { display: grid; gap: var(--s-4) var(--s-6); grid-template-columns: minmax(0, 1fr); align-content: start; }
.site-footer__list { list-style: none; margin: 0; padding: 0; }
.site-footer__list li { break-inside: avoid; padding-block: var(--s-1); }
.site-footer__list a { color: var(--c-text); text-decoration: none; }
.site-footer__list a:hover { color: var(--c-ink); text-decoration: underline; }
.site-footer__legal {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); align-items: baseline;
  margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--c-line);
}
.age-mark { margin-left: auto; font-weight: 600; color: var(--c-text); border: 1px solid currentColor; border-radius: var(--r-small); padding: 0 0.4em; }

/* 9. Текст статьи ----------------------------------------------------------------- */
.entry__title, .page-title { margin-bottom: var(--s-5); }

.entry-content > * + * { margin-top: var(--s-4); }
.entry-content > h2 { margin-top: var(--s-7); }
.entry-content > h3 { margin-top: var(--s-6); }
.entry-content > h4 { margin-top: var(--s-5); }
.entry-content > h2 + *, .entry-content > h3 + *, .entry-content > h4 + * { margin-top: var(--s-3); }

.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li + li { margin-top: var(--s-2); }
.entry-content li::marker { color: var(--c-muted); }
.entry-content ol > li::marker { font-weight: 600; color: var(--c-text); }

.entry-content blockquote {
  margin-inline: 0; padding: var(--s-1) 0 var(--s-1) var(--s-5);
  border-left: 3px solid var(--c-ink);
}
.entry-content blockquote cite { display: block; margin-top: var(--s-2); font-size: var(--fs-small); font-style: normal; color: var(--c-muted); }

.entry-content figure { margin-inline: 0; }
.entry-content img { border-radius: var(--r-small); }
.entry-content figcaption, .entry-content .wp-element-caption { margin-top: var(--s-2); font-size: var(--fs-small); color: var(--c-muted); }

/* Таблицы — главный носитель данных на сайте */
.entry-content .wp-block-table, .table-scroll { overflow-x: auto; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.entry-content th, .entry-content td { padding: 0.6rem 0.75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--c-line); }
.entry-content thead th { font-weight: 600; border-bottom: 2px solid var(--c-text); white-space: nowrap; }
.entry-content tbody tr:nth-child(even) { background: color-mix(in srgb, var(--c-surface) 60%, transparent); }
.entry-content .wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: none; }
.entry-content .wp-block-table { border: 0; }
.entry-content .wp-block-table thead { border-bottom: 0; }

.entry-content code, .entry-content kbd {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.9em;
  background: var(--c-surface); border-radius: 4px; padding: 0.1em 0.35em;
}
.entry-content pre { overflow-x: auto; background: var(--c-surface); border-radius: var(--r-panel); padding: var(--s-4); font-size: 0.9rem; }
.entry-content pre code { background: none; padding: 0; }
.entry-content hr { border: 0; border-top: 1px solid var(--c-line); margin-block: var(--s-7); }

/* 10. Пагинация --------------------------------------------------------------- */
.nav-links { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-6); }
.page-numbers { display: inline-grid; place-items: center; min-width: 2.5rem; height: 2.5rem; padding-inline: var(--s-3); border: 1px solid var(--c-line); border-radius: var(--r-small); text-decoration: none; color: var(--c-text); }
.page-numbers.current { background: var(--c-text); border-color: var(--c-text); color: var(--c-bg); }
a.page-numbers:hover { border-color: var(--c-ink); color: var(--c-ink); }

/* 11. Кнопки и формы -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font: 600 1rem/1.2 var(--f-body);
  padding: 0.7rem 1.2rem;
  background: var(--c-ink); color: var(--c-on-ink);
  border: 1px solid var(--c-ink); border-radius: var(--r-small);
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--c-ink-strong); border-color: var(--c-ink-strong); color: var(--c-on-ink); text-decoration: none; }

/* 13. Шаблоны: крошки, сведения, «Кратко», оглавление ------------------------------ */
.wrap--list { max-width: calc(56rem + 2 * var(--gutter)); }

.breadcrumbs { font-size: var(--fs-small); color: var(--c-muted); margin-bottom: var(--s-4); }
.breadcrumbs a { color: var(--c-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--c-ink); text-decoration: underline; }
.breadcrumbs .breadcrumb_last, .breadcrumbs [aria-current] { color: var(--c-text); }
.breadcrumbs__sep { margin-inline: 0.35em; opacity: 0.6; }

.entry__header { margin-bottom: var(--s-5); }
.entry__header .entry__title { margin-bottom: var(--s-3); }
.entry-meta { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); font-size: var(--fs-small); color: var(--c-muted); }
.entry-meta__cat { font-weight: 500; text-decoration: none; }
.entry-meta__cat:hover { text-decoration: underline; }

/* «Кратко» — ответ в двух-трёх предложениях. Единственное место с маркером-ярлыком. */
.summary { margin-bottom: var(--s-5); padding: var(--s-4) var(--s-5); background: var(--c-surface); border-radius: var(--r-panel); }
.summary__label { display: inline-block; margin-bottom: var(--s-2); font-weight: 600; font-size: var(--fs-small);
  background: linear-gradient(100deg, transparent 0.1em, var(--c-mark) 0.25em, var(--c-mark) calc(100% - 0.25em), transparent calc(100% - 0.1em));
  padding: 0 0.35em; margin-left: -0.35em; }
.summary__text p { margin: 0; font-size: 1.075rem; }
.summary__text p + p { margin-top: var(--s-2); }

.entry__cover { margin: 0 0 var(--s-5); }
.entry__cover img { display: block; width: 100%; border-radius: var(--r-panel); }

.toc { margin-bottom: var(--s-6); border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); }
.toc details { padding-block: var(--s-3); }
.toc__title { cursor: pointer; font-weight: 600; }
.toc__title::marker { color: var(--c-muted); }
.toc__list { margin: var(--s-3) 0 var(--s-1); padding-left: 1.6em; }
.toc__list li + li { margin-top: var(--s-1); }
.toc__list li::marker { color: var(--c-muted); font-variant-numeric: tabular-nums; }
.toc__list a { text-decoration: none; }
.toc__list a:hover { text-decoration: underline; }

/* Якорь не уходит под край экрана при переходе из оглавления */
.entry-content h2[id], .entry-content h3[id] { scroll-margin-top: var(--s-5); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* 14. Под статьёй: дисклеймер, автор, ещё в рубрике --------------------------------- */
.disclaimer { margin-top: var(--s-7); padding-top: var(--s-4); border-top: 1px solid var(--c-line); font-size: var(--fs-small); color: var(--c-muted); }

.author-box { margin-top: var(--s-6); padding: var(--s-4) var(--s-5); border: 1px solid var(--c-line); border-radius: var(--r-panel); }
.disclaimer + .author-box { margin-top: var(--s-5); }
.author-box__label { font-size: var(--fs-small); color: var(--c-muted); }
.author-box__name { font-weight: 600; font-size: 1.1rem; }
.author-box__bio { margin-top: var(--s-2); color: var(--c-muted); }

.related { margin-top: var(--s-7); }
.related__title { font-size: var(--fs-h3); margin-bottom: var(--s-3); }
.related__list { list-style: none; margin: 0; padding: 0; }
.related__list li { border-bottom: 1px solid var(--c-line); }
.related__list a { display: block; padding-block: var(--s-3); color: var(--c-text); text-decoration: none; font-weight: 500; }
.related__list a:hover { color: var(--c-ink); }

/* 15. Списки: рубрика, поиск, лента ------------------------------------------------ */
.archive-header { margin-bottom: var(--s-6); }
.archive-header .page-title { margin-bottom: var(--s-3); }
.archive-header__desc { max-width: var(--measure); color: var(--c-muted); font-size: 1.075rem; }
.archive-header__desc p + p { margin-top: var(--s-2); }
.archive-header__search { margin-top: var(--s-3); }
.archive-header__count { margin-top: var(--s-3); font-size: var(--fs-small); color: var(--c-muted); }

.card-list { border-top: 1px solid var(--c-line); }
.card { display: grid; gap: var(--s-3) var(--s-5); padding-block: var(--s-5); border-bottom: 1px solid var(--c-line); }
@media (min-width: 640px) { .card.has-post-thumbnail { grid-template-columns: 13.5rem minmax(0, 1fr); align-items: start; } }
.card__thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-small); background: var(--c-surface); }
.card__title { font-family: var(--f-body); font-size: var(--fs-h3); font-weight: 600; line-height: 1.3; }
.card__title a { color: var(--c-text); text-decoration: none; }
.card__title a:hover { color: var(--c-ink); text-decoration: underline; }
.card__excerpt { margin-top: var(--s-2); color: var(--c-muted); max-width: var(--measure); }
.card__meta { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); margin-top: var(--s-2); font-size: var(--fs-small); color: var(--c-muted); }
/* Просмотры: глаз + число. Цифры моноширинные, чтобы столбец в ленте не прыгал. */
.views { display: inline-flex; align-items: center; gap: 0.3em; font-variant-numeric: tabular-nums; }
.views__icon { display: inline-flex; opacity: 0.75; }
.views__icon svg { display: block; }

.empty-state { padding: var(--s-5); background: var(--c-surface); border-radius: var(--r-panel); max-width: var(--measure); }

.seo-text { margin-top: var(--s-7); padding-top: var(--s-6); border-top: 1px solid var(--c-line); max-width: var(--measure); }

.notfound__search { margin-block: var(--s-5) var(--s-6); }
.notfound__title { font-size: var(--fs-h3); font-family: var(--f-body); font-weight: 600; margin-bottom: var(--s-3); }
.notfound__cats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.notfound__cats a { display: inline-block; padding: var(--s-2) var(--s-4); border: 1px solid var(--c-line); border-radius: var(--r-small); text-decoration: none; color: var(--c-text); }
.notfound__cats a:hover { border-color: var(--c-ink); color: var(--c-ink); }

/* 16. Боковая колонка ------------------------------------------------------------
   Включается, только когда в областях виджетов что-то есть. Основная колонка
   записи сохраняет ширину под чтение, колонка справа — 300 px: стандартная
   ширина рекламных блоков 300×250 и 300×600. На экранах уже 1024 px скрыта. */
.wrap--sidebar { max-width: calc(var(--wrap) + 2 * var(--gutter)); }
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  column-gap: var(--s-7);
  align-items: start;
}
/* Запись: колонка текста остаётся шириной под чтение, свободное место — между ней и колонкой. */
.layout--text { grid-template-columns: minmax(0, var(--measure)) 300px; justify-content: space-between; }
.layout__main { min-width: 0; }

.sidebar { display: flex; flex-direction: column; gap: var(--s-5); padding-top: var(--s-5); min-width: 0; }
/* Колонка тянется на всю высоту статьи: иначе закреплённой части некуда «ехать»
   и position: sticky не срабатывает (у .layout выравнивание по верху). */
.layout > .sidebar { align-self: stretch; }
.sidebar__main { display: flex; flex-direction: column; gap: var(--s-5); }
/* Закреплённая часть прилипает под шапкой, пока основная колонка прокручивается. */
.sidebar__sticky { position: sticky; top: var(--s-5); display: flex; flex-direction: column; gap: var(--s-5); }

.widget { font-size: var(--fs-small); line-height: 1.5; }
.widget__title {
  margin: 0 0 var(--s-3);
  font-family: var(--f-head); font-weight: 600; font-size: 1rem;
  letter-spacing: 0.01em;
}
.widget ul, .widget ol { margin: 0; padding: 0; list-style: none; }
.widget li + li { margin-top: var(--s-2); }
.widget a { text-decoration: none; }
.widget a:hover { text-decoration: underline; }
/* Реклама и произвольный HTML не должны распирать колонку. */
.widget img, .widget iframe, .widget ins { max-width: 100%; }
.widget_custom_html, .widget_text { overflow: hidden; }

/* «Популярное» — нумерованный список с крупной цифрой. */
.popular-list { counter-reset: popular; }
.popular-list li { counter-increment: popular; display: grid; grid-template-columns: 1.6rem 1fr; gap: var(--s-2); }
.popular-list li::before {
  content: counter(popular);
  font-family: var(--f-head); font-weight: 700; font-size: 1.1rem; line-height: 1.3;
  color: var(--c-ink);
}
.popular-list li + li { margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--c-line); }

@media (max-width: 1023px) {
  .layout { display: block; }
  .layout__main--text { max-width: var(--measure); margin-inline: auto; }
  .sidebar { display: none; }
}

/* 12. Служебное ------------------------------------------------------------------- */
.nowrap { white-space: nowrap; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s-4); top: -4rem; z-index: 100;
  background: var(--c-ink); color: var(--c-on-ink); padding: var(--s-2) var(--s-4); border-radius: var(--r-small);
}
.skip-link:focus { top: var(--s-2); }

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

@media print {
  .site-header, .site-footer, .skip-link { display: none; }
  body { color: #000; background: #fff; }
  a { color: #000; }
}


/* Кнопка «Наверх» --------------------------------------------------------- */
.to-top {
  position: fixed; z-index: 20;
  right: max(var(--s-4), env(safe-area-inset-right));
  bottom: max(var(--s-4), env(safe-area-inset-bottom));
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0;
  border: 1px solid var(--c-line); border-radius: 50%;
  background: var(--c-bg); color: var(--c-ink);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--c-text) 14%, transparent);
  cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--c-ink); color: var(--c-on-ink); border-color: var(--c-ink); }


/* Меню подвала: на телефоне — один список, на планшете — две колонки рядом,
   на десктопе — см. ниже. Пункты не переносятся. */
@media (min-width: 560px) {
  .site-footer__navs { grid-template-columns: max-content max-content; justify-content: start; column-gap: 3rem; }
  .site-footer__list li { white-space: nowrap; }
}
/* На десктопе три блока в ряд — описание сайта, «О сайте», «Документы» —
   с одинаковыми промежутками: среднее меню стоит ровно посередине между соседями. */
@media (min-width: 760px) {
  .site-footer__grid { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-6); }
  .site-footer__about { flex: 0 1 26rem; }
  .site-footer__navs { display: contents; }
}
.site-footer__list { list-style: none; margin: 0; padding: 0; }
.site-footer__list li { break-inside: avoid; padding-block: var(--s-1); }
.site-footer__list a { color: var(--c-text); text-decoration: none; }
.site-footer__list a:hover { color: var(--c-ink); text-decoration: underline; }
.site-footer__legal {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); align-items: baseline;
  margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--c-line);
}
.age-mark { margin-left: auto; font-weight: 600; color: var(--c-text); border: 1px solid currentColor; border-radius: var(--r-small); padding: 0 0.4em; }

/* Главная страница (с 0.9.4, устройство из aff-hr 0.9.3) ------------------- */
.home-hero { padding-block: var(--s-8) var(--s-6); text-align: center; }
.home-hero__title { font-family: var(--f-head); font-weight: 700; font-size: clamp(1.85rem, 7vw, 4.6rem); line-height: 1.12; letter-spacing: -0.02em; max-width: none; hyphens: none; overflow-wrap: normal; }
.home-hero__line { display: block; } /* всегда две строки */
.home-hero__line + .home-hero__line { margin-top: .06em; }
.home-hero__title .mark { background: linear-gradient(100deg, transparent .1em, var(--c-mark) .2em, var(--c-mark) calc(100% - .2em), transparent calc(100% - .1em)); color: inherit; padding: 0 .25em; }
.home-hero__lead { margin: var(--s-4) auto 0; font-size: 1.15rem; color: var(--c-muted); max-width: 60ch; }
.home-hero__actions { margin-top: var(--s-5); justify-content: center; }
.home-section { padding-block: var(--s-6); }
.home-section__title { font-family: var(--f-head); font-weight: 600; font-size: var(--fs-h2); margin-bottom: var(--s-4); }
.home-paths { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.home-path { padding: var(--s-5); border: 1px solid var(--c-line); border-radius: var(--r-panel); background: var(--c-surface); }
.home-path__title { font-size: 1.1rem; font-weight: 600; }
.home-path__text { margin-top: var(--s-2); color: var(--c-muted); font-size: 0.95rem; }
.home-path__links { margin: var(--s-3) 0 0; padding-left: 1.1em; }
.home-path__links li { margin-top: var(--s-1); }
.home-featured { display: grid; gap: var(--s-5); align-items: center; padding: var(--s-5); border: 2px solid var(--c-tint-frame); border-radius: var(--r-panel); background: var(--c-tint); color: var(--c-text); text-decoration: none; }
@media (min-width: 760px) { .home-featured { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.home-featured__thumb img { display: block; width: 100%; height: auto; border-radius: var(--r-small); }
.home-featured__body { display: grid; gap: var(--s-3); }
.home-featured__title { font-family: var(--f-head); font-weight: 600; font-size: 1.45rem; line-height: 1.25; }
.home-featured__excerpt { color: var(--c-muted); }
.home-featured__more { color: var(--c-ink); font-weight: 600; }
.home-featured:hover .home-featured__more { text-decoration: underline; }
.home-tiles { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
.home-tile { display: grid; gap: var(--s-2); color: var(--c-text); text-decoration: none; }
.home-tile__thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-small); }
.home-tile__title { font-weight: 600; line-height: 1.3; }
.home-tile:hover .home-tile__title { color: var(--c-ink); text-decoration: underline; }
/* Рубрики — горизонтальные карточки одна под другой: слева название и число материалов, справа первый абзац описания. */
.home-cats { display: grid; gap: var(--s-3); }
.home-cat { display: grid; gap: var(--s-2) var(--s-5); align-items: start; padding: var(--s-4) var(--s-5); border: 1px solid var(--c-line); border-radius: var(--r-panel); color: var(--c-text); text-decoration: none; }
@media (min-width: 760px) { .home-cat { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); align-items: center; } }
.home-cat:hover { border-color: var(--c-ink); }
.home-cat__head { display: grid; gap: var(--s-1); }
.home-cat__name { font-weight: 600; font-size: 1.1rem; line-height: 1.3; color: var(--c-ink); }
.home-cat__text { color: var(--c-muted); font-size: 0.95rem; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.home-cat__count { font-size: var(--fs-small); color: var(--c-muted); }
.home-more { margin-top: var(--s-4); font-weight: 600; }
.home-tools { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 640px) { .home-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .home-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.home-tools .cat-card__name a { color: inherit; text-decoration: none; }
.home-tools .cat-card__name a:hover { color: var(--c-ink); }
.home-about p + p { margin-top: var(--s-3); }
.home-about p { max-width: 70ch; }
