/* 4 ПОЛЬЗЫ: навигация по статьям.
   Один файл на все случаи: полоса рубрик, сетка карточек, оглавление раздела.
   Палитра и типографика наследуют Blocksy, ниже только свои переменные. */

:root {
  --dsh-ink: #1f2a1d;
  --dsh-mut: #6c7a63;
  --dsh-line: #e2e7da;
  --dsh-line-2: #eef1e8;
  --dsh-green: #2f6b3a;
  --dsh-green-dk: #22522b;
  --dsh-sand: #f7f6f0;
  --dsh-white: #ffffff;
  --dsh-rail-top: 0px;
  --dsh-radius: 14px;
  --dsh-shadow: 0 18px 40px -24px rgba(18, 36, 18, .45);
  --dsh-max: 1290px;
}

/* ---------- закреплённая полоса рубрик ---------- */

.dsh-rail {
  position: sticky;
  top: var(--dsh-rail-top);
  z-index: 45;
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--dsh-line);
  transition: box-shadow .25s ease, background-color .25s ease;
}

/* аварийный режим: если обёртка темы клипует потомков, прилипание заменяем на fixed */

.dsh-rail-fixed .dsh-rail {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--dsh-rail-top);
  z-index: 60;
  width: 100%;
}

.dsh-rail-ph { height: 54px; }

.dsh-rail.is-stuck {
  box-shadow: 0 10px 26px -18px rgba(18, 36, 18, .55);
}

.dsh-rail__inner {
  max-width: var(--dsh-max);
  margin: 0 auto;
  padding: 4px 24px;
  min-height: 54px;
  display: flex;
  align-items: stretch;
  gap: 0;
  position: relative;
  /* Названия разделов длинные, поэтому в полосе короткие подписи,
     а полное имя — в подсказке. Узкое окно прокручивается. */
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.dsh-rail__inner::-webkit-scrollbar { display: none; }


/* Плашка «Статьи» ведёт на список всех статей: она заменила отдельную ссылку
   «Все статьи», чтобы в шапке осталось больше места под разделы. */
.dsh-rail__label {
  display: inline-flex;
  align-items: center;
  align-self: center;
  margin-right: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--dsh-green);
  color: #fff !important;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background-color .18s ease;
}

.dsh-rail__label:hover,
.dsh-rail__label:focus-visible {
  background: var(--dsh-green-dk);
  color: #fff !important;
}

.dsh-rail__group {
  display: inline-flex;
  align-items: stretch;
  border-radius: 10px;
  transition: background-color .15s ease;
}

.dsh-rail__group:hover,
.dsh-rail__group:focus-within {
  background: #eef2e5;
}

.dsh-rail__group.is-active {
  background: #e8efdc;
}

/* Отступы пункта симметричны: подсветка не съезжает вправо. */

.dsh-rail__item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #3e4b37;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}

.dsh-rail__item:hover,
.dsh-rail__item:focus-visible {
  color: var(--dsh-green);
}

.dsh-rail__group.is-active .dsh-rail__item {
  color: var(--dsh-green-dk);
}

.dsh-rail__item sup {
  font-size: 11px;
  font-weight: 600;
  color: var(--dsh-mut);
  margin-left: 2px;
}

.dsh-rail__spacer { flex: 1 1 auto; }

.dsh-rail__all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 2px 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--dsh-mut);
  text-decoration: none;
  white-space: nowrap;
}

.dsh-rail__all:hover { color: var(--dsh-green); }

/* выпадающая панель с темами раздела */

.dsh-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border-bottom: 1px solid var(--dsh-line);
  box-shadow: var(--dsh-shadow);
  display: none;
  z-index: 44;
}

.dsh-panel.is-open { display: block; }

.dsh-panel__grid {
  max-width: var(--dsh-max);
  margin: 0 auto;
  padding: 22px 24px 26px;
}

.dsh-panel__grid > [data-dsh-block] {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 4px 32px;
  align-items: start;
}

/* наш display:grid сильнее атрибута hidden, поэтому закрытые разделы прячем явно */
.dsh-panel__grid > [data-dsh-block][hidden] {
  display: none;
}

.dsh-panel__lead {
  grid-column: 1 / -1;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--dsh-mut);
}

.dsh-panel__link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  font-size: 15px;
  color: #2d3a28;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.dsh-panel__link:hover {
  color: var(--dsh-green);
  border-bottom-color: var(--dsh-line);
}

.dsh-panel__link b {
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dsh-panel__link i {
  font-style: normal;
  font-size: 12.5px;
  color: var(--dsh-mut);
  white-space: nowrap;
}

.dsh-panel__all {
  grid-column: 1 / -1;
  margin-top: 12px;
  font-weight: 700;
  color: var(--dsh-green-dk);
}

/* ---------- шапка раздела ---------- */

.dsh-head {
  padding: 40px 0 8px;
}

.dsh-head__crumbs {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--dsh-mut);
  margin: 0 0 14px;
}

.dsh-head__crumbs a { color: var(--dsh-mut); text-decoration: none; }
.dsh-head__crumbs a:hover { color: var(--dsh-green); }
.dsh-head__crumbs span { opacity: .45; padding: 0 8px; }

.dsh-head__title {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.12;
  letter-spacing: -.01em;
  color: var(--dsh-ink);
}

.dsh-head__lead {
  margin: 0;
  max-width: 72ch;
  font-size: 17px;
  line-height: 1.6;
  color: #4a5642;
}

/* ---------- сетка карточек ---------- */

.dsh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.dsh-card {
  display: flex;
  flex-direction: column;
  background: var(--dsh-white);
  border: 1px solid var(--dsh-line);
  border-radius: var(--dsh-radius);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.dsh-card:hover {
  transform: translateY(-2px);
  border-color: #cfd8c4;
  box-shadow: 0 16px 32px -22px rgba(18, 36, 18, .55);
}

.dsh-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--dsh-line-2);
  overflow: hidden;
}

.dsh-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.dsh-card:hover .dsh-card__media img { transform: scale(1.03); }

.dsh-card__body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
}

.dsh-card__topic {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--dsh-green);
  text-decoration: none;
}

.dsh-card__title {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.34;
  font-weight: 650;
  color: var(--dsh-ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dsh-card__title a {
  color: inherit;
  text-decoration: none;
}

.dsh-card__title a:hover { color: var(--dsh-green-dk); }

.dsh-card__note {
  margin: auto 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--dsh-mut);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- разделы на странице «Полезное» ---------- */

.dsh-sec {
  padding: 44px 0 8px;
  border-top: 1px solid var(--dsh-line);
  margin-top: 40px;
  scroll-margin-top: calc(var(--dsh-rail-top) + 66px);
}

.dsh-sec:first-of-type { border-top: 0; margin-top: 12px; }

.dsh-sec__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.dsh-sec__title {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.2;
  color: var(--dsh-ink);
}

.dsh-sec__title a { color: inherit; text-decoration: none; }
.dsh-sec__title a:hover { color: var(--dsh-green); }

.dsh-sec__count {
  font-size: 13px;
  font-weight: 600;
  color: var(--dsh-mut);
  white-space: nowrap;
}

.dsh-terms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.dsh-term a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--dsh-line);
  border-radius: 11px;
  background: #fff;
  text-decoration: none;
  color: var(--dsh-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.dsh-term a:hover {
  border-color: var(--dsh-green);
  color: var(--dsh-green-dk);
  background: #fbfcf8;
}

.dsh-term i {
  font-style: normal;
  font-size: 12.5px;
  color: var(--dsh-mut);
  font-weight: 600;
}

.dsh-term a:hover i { color: var(--dsh-green); }

/* тонкие темы: без индексации, помечаем спокойно */
.dsh-term.is-thin a {
  background: var(--dsh-sand);
  color: #5c6653;
  border-style: dashed;
}

/* ---------- главная: баннер и блок статей ---------- */

.dsh-hero {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(120deg, #2f6b3a, #4d8a45 60%, #6ca24e);
  color: #fff;
  padding: 44px 40px 40px;
  margin: 26px 0 0;
}

.dsh-hero__title {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.14;
  color: #fff;
}

.dsh-hero__lead {
  margin: 0 0 22px;
  max-width: 60ch;
  font-size: 16.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .92);
}

.dsh-hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: #fff;
  color: var(--dsh-green-dk);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}

.dsh-hero__btn:hover { background: #f1f5ea; color: var(--dsh-green-dk); }

.dsh-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 44px 0 0;
}

.dsh-section-title h2 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.2;
  color: var(--dsh-ink);
}

.dsh-section-title a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--dsh-green-dk);
  text-decoration: none;
  white-space: nowrap;
}

.dsh-section-title a:hover { text-decoration: underline; }

/* ---------- вторая строка: темы раздела ---------- */

.dsh-rail__sub {
  display: flex;
  gap: 4px;
  align-items: center;
  max-width: var(--dsh-max);
  margin: 0 auto;
  padding: 6px 24px 8px;
  overflow-x: auto;
  scrollbar-width: none;
  border-top: 1px solid var(--dsh-line-2);
}

.dsh-rail__sub::-webkit-scrollbar { display: none; }

.dsh-sub__item {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  color: #5b6752;
  text-decoration: none;
  white-space: nowrap;
}

.dsh-sub__item:hover { background: var(--dsh-line-2); color: var(--dsh-green-dk); }

.dsh-sub__item.is-active {
  background: #eaf2e2;
  color: var(--dsh-green-dk);
}

.dsh-sections { padding-bottom: 8px; }

@media (max-width: 999.98px) {
  .dsh-rail__sub { padding: 4px 12px 6px; }
}

/* ---------- мелочи ---------- */

.dsh-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 0;
  padding: 12px 20px;
  border: 1px solid var(--dsh-line);
  border-radius: 999px;
  background: #fff;
  color: var(--dsh-green-dk);
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
}

.dsh-more:hover { border-color: var(--dsh-green); }

/* ---------- адаптив ---------- */

@media (max-width: 999.98px) {
  .dsh-rail__inner {
    padding: 0 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x proximity;
  }

  .dsh-rail__inner::-webkit-scrollbar { display: none; }

  .dsh-rail__item,
  .dsh-rail__all { scroll-snap-align: start; }

  .dsh-rail__all { padding-left: 10px; }

  .dsh-panel__grid { padding: 18px 16px 22px; }

  .dsh-hero { padding: 32px 22px 30px; }

  .dsh-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
}

@media (max-width: 689.98px) {
  .dsh-rail__inner { min-height: 48px; }
  .dsh-rail-ph { height: 48px; }

  .dsh-head { padding: 26px 0 4px; }

  .dsh-grid { grid-template-columns: 1fr; }

  .dsh-terms { grid-template-columns: 1fr; }

  .dsh-sec { padding-top: 32px; margin-top: 28px; }

  .dsh-hero { border-radius: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .dsh-card,
  .dsh-card__media img,
  .dsh-rail__item svg { transition: none; }
}

/* ---------- обтекание снимков в статье ---------- */

.entry-content::after {
  content: "";
  display: block;
  clear: both;
}

.entry-content figure.alignleft,
.entry-content figure.alignright {
  width: 380px;
  max-width: 46%;
  margin-top: 6px;
  margin-bottom: 18px;
  /* тема сдвигает плавающие снимки к узкой колонке (750 px), из-за этого они
     не доходили до края текста: зазор держим только отступом внутри блока */
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.entry-content figure.alignleft {
  float: left;
  /* тема ставит фигурам margin: auto !important, поэтому зазор делаем внутренним отступом */
  padding-right: 32px;
  margin-bottom: 18px;
}

.entry-content figure.alignright {
  float: right;
  padding-left: 32px;
  margin-bottom: 18px;
}

.entry-content figure.alignleft img,
.entry-content figure.alignright img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.entry-content figure.alignleft figcaption,
.entry-content figure.alignright figcaption {
  font-size: 13px;
  line-height: 1.4;
  color: var(--dsh-mut);
  margin-top: 6px;
}

@media (max-width: 689.98px) {
  .entry-content figure.alignleft,
  .entry-content figure.alignright {
    float: none;
    width: auto;
    max-width: 100%;
    padding: 0;
    margin: 16px 0 18px;
  }
}

.entry-content .dsh-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 24px;
}

.entry-content .dsh-gallery figure {
  margin: 0;
  float: none;
  max-width: 100%;
}

.entry-content .dsh-gallery img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
}

@media (max-width: 999.98px) {
  .entry-content .dsh-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 689.98px) {
  .entry-content .dsh-gallery { grid-template-columns: 1fr; }
}

/* ---------- ширина текста статьи ---------- */

/* Тема заужает текст до 750px при колонке 1290px: статья выглядела узкой
   полосой посреди страницы. Возвращаем ширину обычного контейнера сайта. */
.single-post .entry-content {
  max-width: min(var(--theme-normal-container-max-width, 1290px), 100%);
  margin-left: auto;
  margin-right: auto;
}

.single-post .entry-content > * {
  max-width: 100% !important;
}

@media (max-width: 689.98px) {
  .single-post .entry-content {
    max-width: 100%;
  }
}

/* ---------- служебные сведения о записи ---------- */

/* Не показываем посетителям имя учётной записи и даты публикации:
   на карточках и в статье остаются только рубрики. */
.entry-meta .meta-author,
.entry-meta .meta-date {
  display: none !important;
}

/* если в строке меты остались только они, убираем и пустую строку */
.entry-meta:not(:has(> li:not(.meta-author):not(.meta-date))) {
  display: none !important;
}

/* ---------- описание рубрики ---------- */

/* Блок описания приходит одной строкой с переносами: разбиваем на заголовки
   и абзацы (см. dsh_format_term_intro) и задаём нормальный набор. */
body .page-description,
body .term-description {
  /* текст рубрики занимает ту же ширину, что и остальная страница */
  max-width: 100% !important;
  font-size: 17px;
  line-height: 1.68;
  color: #3f4a37;
}

.page-description p,
.term-description p {
  margin: 0 0 1.05em;
}

.page-description h2,
.term-description h2 {
  margin: 1.5em 0 .55em;
  font-size: clamp(19px, 1.6vw, 22px);
  line-height: 1.28;
  color: var(--dsh-ink, #1f2a17);
}

.page-description h2:first-child,
.term-description h2:first-child {
  margin-top: 0;
}

.page-description ul,
.term-description ul {
  margin: 0 0 1.05em;
  padding-left: 1.15em;
}

.page-description li,
.term-description li {
  margin: 0 0 .4em;
}

/* ---------- блок заголовка страницы ---------- */

/* Тема держит заголовок и описание в узком контейнере (750 px), поэтому шапка
   статьи не совпадала по ширине с текстом. Ставим её в общий контейнер сайта. */
.hero-section.is-width-constrained {
  max-width: min(var(--theme-normal-container-max-width, 1290px), 100%) !important;
}

/* ---------- карточки статей ---------- */

/* Заголовки в карточках были 34 px и разной высоты: длинные уводили картинку
   вниз и ломали ряд. Держим две строки и одинаковую высоту блока. */
body .entry-card .entry-title,
body .entry-card h2.entry-title {
  font-size: 21px !important;
  line-height: 1.3 !important;
  margin: 0 0 10px;
  min-height: 2.6em;
}

body .entry-card .entry-title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 689.98px) {
  body .entry-card .entry-title,
  body .entry-card h2.entry-title {
    font-size: 18px !important;
    min-height: 2.6em;
  }
}

/* ---------- шапка: отступ между логотипом и меню ---------- */

/* Тема прижимает список меню к логотипу отрицательным полем, из-за этого
   первый пункт «Грунты и удобрения» касался знака. Даём воздух слева и чуть
   уменьшаем кегль пунктов, чтобы последний пункт не подходил к иконкам. */
#header [data-device="desktop"] .menu {
  margin-left: 30px !important;
}

html body #header #header-menu-1 > ul > li.menu-item > .ct-menu-link {
  font-size: 13.6px !important;
}

/* ---------- карточки 11 разделов на «Полезном» ---------- */

.dsh-sections {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  padding-bottom: 8px;
}

.dsh-sections .dsh-sec {
  padding: 20px 20px 16px;
  margin: 0;
  border: 1px solid var(--dsh-line);
  border-top: 1px solid var(--dsh-line);
  border-radius: 16px;
  background: #fff;
}

.dsh-sections .dsh-sec:first-of-type {
  border-top: 1px solid var(--dsh-line);
  margin-top: 0;
}

.dsh-sections .dsh-sec__title { font-size: 21px; }

.dsh-sections .dsh-terms {
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 12px;
}

.dsh-sections .dsh-term a {
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: #f6f7f2;
  font-size: 14px;
  font-weight: 500;
}

.dsh-sec__all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--dsh-green-dk);
  text-decoration: none;
}

.dsh-sec__all:hover { text-decoration: underline; }

/* ---------- навигация над лентой рубрики ---------- */

.dsh-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--dsh-mut);
}

.dsh-crumbs a { color: var(--dsh-mut); text-decoration: none; }
.dsh-crumbs a:hover { color: var(--dsh-green-dk); text-decoration: underline; }
.dsh-crumbs span[aria-current] { color: var(--dsh-ink); font-weight: 600; }
.dsh-crumbs__sep { color: #b9beb2; }

.dsh-groups {
  display: grid;
  gap: 14px;
  margin: 0 0 26px;
}

.dsh-group {
  border: 1px solid var(--dsh-line);
  border-radius: 14px;
  padding: 14px 16px 12px;
  background: #fff;
}

.dsh-group__title {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.3;
  color: var(--dsh-ink);
}

.dsh-group__title span {
  margin-left: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--dsh-mut);
}

.dsh-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dsh-topic > a {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--dsh-line);
  border-radius: 999px;
  background: #fbfcf8;
  text-decoration: none;
  color: var(--dsh-ink);
  font-size: 14px;
  font-weight: 600;
}

.dsh-topic > a:hover { border-color: var(--dsh-green); color: var(--dsh-green-dk); }

.dsh-topic__count {
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  color: var(--dsh-mut);
}

.dsh-topic__kids {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0 4px;
  padding: 0;
  list-style: none;
}

.dsh-topic__kids a {
  display: inline-flex;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f3f5ee;
  color: #4d5346;
  font-size: 13px;
  text-decoration: none;
}

.dsh-topic__kids a:hover { background: #e9eede; color: var(--dsh-green-dk); }
.dsh-topic__kids i { font-style: normal; color: var(--dsh-mut); font-size: 11.5px; }

.dsh-topics--row { margin-bottom: 24px; }

.dsh-siblings {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 22px;
  padding-top: 14px;
  border-top: 1px solid var(--dsh-line);
}

.dsh-siblings a {
  padding: 7px 12px;
  border: 1px solid var(--dsh-line);
  border-radius: 999px;
  background: #fff;
  color: var(--dsh-ink);
  font-size: 13.5px;
  text-decoration: none;
}

.dsh-siblings a:hover { border-color: var(--dsh-green); color: var(--dsh-green-dk); }
.dsh-siblings__up { font-weight: 600; background: #f6f7f2; }

@media (max-width: 640px) {
  .dsh-sections { grid-template-columns: 1fr; }
  .dsh-siblings { gap: 6px; }
  .dsh-siblings a { padding: 6px 10px; font-size: 13px; }
}

/* На ноутбуках 1280–1319 семь длинных названий чуть не влезают:
   поджимаем шрифт и отступы, чтобы последний пункт не уходил за край. */
@media (min-width: 1025px) and (max-width: 1319.98px) {
  .dsh-rail__item { font-size: 13.5px; padding: 0 7px; }
  .dsh-rail__item sup { font-size: 10px; margin-left: 1px; }
  .dsh-rail__label { margin-right: 6px; padding: 5px 9px; font-size: 9.5px; }
}

/* Ниже 1200 px счётчики в полосе скрываем: названия важнее цифр. */
@media (min-width: 900px) and (max-width: 1199.98px) {
  .dsh-rail__item { font-size: 13px; padding: 0 6px; }
  .dsh-rail__item sup { display: none; }
}

@media (min-width: 900px) and (max-width: 1050px) {
  .dsh-rail__item { font-size: 12.5px; padding: 0 4px; }
  .dsh-rail__label { margin-right: 4px; padding: 4px 8px; font-size: 9px; }
}

/* ---------- близкие статьи под текстом ---------- */

.dsh-related {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--dsh-line);
}

.dsh-related h2 {
  margin: 0 0 14px;
  font-size: clamp(19px, 1.8vw, 23px);
  line-height: 1.25;
}

.dsh-related ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dsh-related a {
  display: block;
  height: 100%;
  padding: 12px 14px;
  border: 1px solid var(--dsh-line);
  border-radius: 11px;
  background: #fff;
  color: var(--dsh-ink);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  transition: border-color .15s ease, color .15s ease;
}

.dsh-related a:hover {
  border-color: var(--dsh-green);
  color: var(--dsh-green-dk);
}

.dsh-related__cat {
  display: block;
  margin-bottom: 5px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--dsh-mut);
}

@media (max-width: 689.98px) {
  .dsh-related ul { grid-template-columns: 1fr; }
}
