/* ==========================================================================
   ЦЗС — типографика статей портала и блога
   --------------------------------------------------------------------------
   Надстройка над /assets/czs-ui.css. Действует только внутри страницы
   поста (.t-feed__post-popup), остальные блоки Tilda не трогает.
   Что исправляет:
     • тело текста 14px на телефоне и 1.4 интерлиньяжа на десктопе;
     • H2 и H3 одинакового веса и почти одного размера;
     • чёрный текст на песочном фоне вместо фирменного тёмно-зелёного;
     • рыжие ссылки Tilda;
     • плавающие кнопки мессенджеров поверх текста на телефоне.
   ========================================================================== */

.t-feed__post-popup {
  --czs-a-body:   clamp(17px, 1.05vw + 13px, 18.5px);
  --czs-a-lh:     1.66;
  --czs-a-h2:     clamp(23px, 1.4vw + 17px, 30px);
  --czs-a-h3:     clamp(19px, .6vw + 16.5px, 22px);
  --czs-a-h4:     clamp(17px, .3vw + 16px, 18.5px);
  --czs-a-small:  14px;
  --czs-a-meta:   13.5px;
  --czs-a-block:  1.8em;      /* вертикальный отступ у крупных элементов */
  color: var(--czs-ink);
  -webkit-font-smoothing: antialiased;
}

/* --- рамка страницы -------------------------------------------------------- */
.t-feed__post-popup .t-feed__post-popup__container {
  padding: clamp(28px, 4.6vw, 60px) 0 clamp(40px, 6vw, 84px);
}
.t-feed__post-popup .t-feed__post-popup__content.t-col_8 { max-width: 760px; }

/* --- хлебная крошка -------------------------------------------------------- */
.czs-crumb {
  margin: 0 0 22px;
  font-family: var(--czs-font);
  font-size: var(--czs-a-meta);
  font-weight: 500;
  line-height: 1.3;
}
.czs-crumb a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--czs-green) !important;
  text-decoration: none !important;
  transition: color var(--czs-t);
}
.czs-crumb a:hover { color: var(--czs-green-dark) !important; }
.czs-crumb a:focus-visible { outline: 2px solid var(--czs-focus); outline-offset: 3px; border-radius: 2px; }
.czs-crumb svg { flex: none; }

/* --- заголовок и мета ------------------------------------------------------ */
.t-feed__post-popup .t-feed__post-popup__title-wrapper { padding-bottom: 0; }
.t-feed__post-popup h1.t-feed__post-popup__title {
  font-family: var(--czs-font);
  font-size: clamp(28px, 2.2vw + 18px, 42px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -.018em;
  color: var(--czs-ink);
  text-wrap: balance;
  margin: 0;
}

.t-feed__post-popup .t-feed__post-popup__date-parts-wrapper,
.t-feed__post-popup .t-feed__post-popup__date-parts-wrapper_aftertitle {
  margin: 18px 0 0;
  padding-bottom: 0;
  gap: 8px 10px;
  align-items: center;
}
.t-feed__post-popup .t-feed__post-popup__date-wrapper { margin-right: 6px; }
.t-feed__post-popup .t-feed__post-popup__date,
.t-feed__post-popup .t-feed__post-popup__date.t-uptitle {
  font-family: var(--czs-font);
  font-size: var(--czs-a-meta);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--czs-ink-55);
}
.czs-rt {
  font-family: var(--czs-font);
  font-size: var(--czs-a-meta);
  font-weight: 500;
  color: var(--czs-ink-55);
  white-space: nowrap;
}
.czs-rt::before {
  content: "";
  display: inline-block;
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--czs-ink-35);
  vertical-align: middle;
  margin: 0 10px 2px 4px;
}
.t-feed__post-popup .t-feed__post-popup__tag {
  display: inline-flex; align-items: center;
  padding: 5px 11px;
  border: 1px solid var(--czs-line);
  border-radius: var(--czs-r-pill);
  text-decoration: none !important;
  transition: border-color var(--czs-t), background var(--czs-t);
}
.t-feed__post-popup .t-feed__post-popup__tag:hover { border-color: var(--czs-green); background: rgba(255,255,255,.5); }
.t-feed__post-popup .t-feed__post-popup__tag span,
.t-feed__post-popup .t-feed__post-popup__tag span.t-uptitle {
  font-family: var(--czs-font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: none;
  color: var(--czs-green);
  margin: 0;
}

/* --- обложка --------------------------------------------------------------- */
.t-feed__post-popup .t-feed__post-popup__cover-wrapper,
.t-feed__post-popup .t-feed__post-popup__cover-wrapper_aftertitle {
  margin: 30px 0 34px;
}
.t-feed__post-popup .t-feed__post-popup__img {
  width: 100%;
  border-radius: var(--czs-r-2);
}

/* --- содержание ------------------------------------------------------------ */
.czs-toc {
  margin: 0 0 40px;
  padding: 18px 22px 20px;
  background: rgba(255, 255, 255, .55);
  border: 1px solid var(--czs-line);
  border-radius: var(--czs-r-2);
  font-family: var(--czs-font);
}
.czs-toc summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--czs-green);
  user-select: none;
}
.czs-toc summary::-webkit-details-marker { display: none; }
.czs-toc summary::after {
  content: "";
  width: 8px; height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-3px);
  transition: transform var(--czs-t);
}
.czs-toc[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.czs-toc ol {
  list-style: none;
  counter-reset: czs-toc;
  margin: 14px 0 0;
  padding: 0;
}
.czs-toc li {
  counter-increment: czs-toc;
  position: relative;
  padding: 5px 0 5px 30px;
  font-size: 15.5px;
  line-height: 1.45;
}
.czs-toc li::before {
  content: counter(czs-toc);
  position: absolute; left: 0; top: 5px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--czs-ink-35);
  line-height: 1.75;
}
.czs-toc a {
  color: var(--czs-ink) !important;
  text-decoration: none !important;
  transition: color var(--czs-t);
}
.czs-toc a:hover { color: var(--czs-green) !important; }
.czs-toc a:focus-visible { outline: 2px solid var(--czs-focus); outline-offset: 2px; border-radius: 2px; }

/* --- тело статьи ------------------------------------------------------------ */
.t-feed__post-popup .t-feed__post-popup__text-wrapper { margin-top: 0; }
.t-feed__post-popup .t-feed__post-popup__text {
  font-family: var(--czs-font);
  font-size: var(--czs-a-body);
  line-height: var(--czs-a-lh);
  color: var(--czs-ink);
}
.t-feed__post-popup .t-redactor__tte-view .t-redactor__text {
  font-size: var(--czs-a-body);
  line-height: var(--czs-a-lh);
  color: var(--czs-ink);
  margin: 0 0 1.15em;
  padding: 0;
}
.t-feed__post-popup .t-redactor__tte-view .t-redactor__text:last-child { margin-bottom: 0; }
.t-feed__post-popup .t-redactor__tte-view strong,
.t-feed__post-popup .t-redactor__tte-view b { font-weight: 600; color: var(--czs-ink); }

/* заголовки: H2 — раздел, H3 — шаг внутри раздела, H4 — подпункт */
.t-feed__post-popup .t-feed__post-popup__text-wrapper h2.t-redactor__h2,
.t-feed__post-popup .t-redactor__tte-view h2.t-redactor__h2 {
  font-family: var(--czs-font);
  font-size: var(--czs-a-h2);
  line-height: 1.22;
  font-weight: 600;
  letter-spacing: -.014em;
  color: var(--czs-ink);
  margin: 2.1em 0 .7em;
  padding: 0;
  text-wrap: balance;
  scroll-margin-top: 96px;
}
.t-feed__post-popup .t-feed__post-popup__text-wrapper h3.t-redactor__h3,
.t-feed__post-popup .t-redactor__tte-view h3.t-redactor__h3 {
  font-family: var(--czs-font);
  font-size: var(--czs-a-h3);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -.008em;
  color: var(--czs-ink);
  margin: 1.75em 0 .55em;
  padding: 0;
  scroll-margin-top: 96px;
}
.t-feed__post-popup .t-feed__post-popup__text-wrapper h4.t-redactor__h4,
.t-feed__post-popup .t-redactor__tte-view h4.t-redactor__h4,
.t-feed__post-popup .t-redactor__tte-view h4 {
  font-family: var(--czs-font);
  font-size: var(--czs-a-h4);
  line-height: 1.35;
  font-weight: 600;
  color: var(--czs-ink);
  margin: 1.5em 0 .45em;
  padding: 0;
}
/* заголовок сразу после заголовка — без двойного воздуха */
.t-feed__post-popup .t-redactor__tte-view h2.t-redactor__h2 + h3.t-redactor__h3 { margin-top: .9em; }
.t-feed__post-popup .t-redactor__tte-view > :first-child { margin-top: 0 !important; }

/* списки */
.t-feed__post-popup .t-redactor__tte-view ul,
.t-feed__post-popup .t-redactor__tte-view ol,
.t-feed__post-popup .t-feed__post-popup__text-wrapper ul,
.t-feed__post-popup .t-feed__post-popup__text-wrapper ol {
  margin: .2em 0 .4em;
  padding-left: 1.45em;
}
.t-feed__post-popup .t-redactor__tte-view li {
  margin: .42em 0;
  padding-left: .15em;
  line-height: 1.58;
}
.t-feed__post-popup .t-redactor__tte-view li::marker {
  color: var(--czs-green);
  font-weight: 600;
}
.t-feed__post-popup .t-redactor__tte-view li > ul,
.t-feed__post-popup .t-redactor__tte-view li > ol { margin: .3em 0 .2em; }

/* ссылки в тексте */
.t-feed__post-popup .t-redactor__tte-view a {
  color: var(--czs-green) !important;
  text-decoration: underline !important;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  text-decoration-color: rgba(16, 88, 51, .4);
  transition: color var(--czs-t), text-decoration-color var(--czs-t);
}
.t-feed__post-popup .t-redactor__tte-view a:hover {
  color: var(--czs-green-dark) !important;
  text-decoration-color: currentColor;
}
.t-feed__post-popup .t-redactor__tte-view a:focus-visible { outline: 2px solid var(--czs-focus); outline-offset: 2px; border-radius: 2px; }

/* иллюстрации: в статьях это в основном снимки таблиц на белом фоне */
.t-feed__post-popup .t-redactor__tte-view figure {
  margin: var(--czs-a-block) 0;
  width: 100%;
}
.t-feed__post-popup .t-redactor__tte-view figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--czs-r-2);
  box-shadow: 0 0 0 1px var(--czs-line-soft);
  background: #fff;
}
.t-feed__post-popup .t-redactor__tte-view figure img.t-zoomable { cursor: zoom-in; }
.t-feed__post-popup .t-redactor__tte-view figure figcaption,
.t-feed__post-popup .t-feed__post-popup__text-wrapper figcaption {
  font-size: var(--czs-a-small);
  font-style: normal;
  line-height: 1.45;
  color: var(--czs-ink-55);
  opacity: 1;
  margin-top: 10px;
}

/* цитата */
.t-feed__post-popup .t-redactor__tte-view blockquote.t-redactor__quote,
.t-feed__post-popup .t-feed__post-popup__text-wrapper blockquote.t-redactor__quote {
  margin: var(--czs-a-block) 0;
  padding: 6px 0 6px 22px;
  border-left: 3px solid var(--czs-green);
  font-size: var(--czs-body-lg);
  line-height: 1.55;
  color: var(--czs-ink-70);
}

/* врезка */
.t-feed__post-popup .t-redactor__tte-view .t-redactor__callout {
  margin: var(--czs-a-block) 0;
  padding: 22px 24px 22px 56px;
  background: rgba(255, 255, 255, .6);
  border: 1px solid var(--czs-line);
  border-radius: var(--czs-r-2);
  color: var(--czs-ink);
  font-size: var(--czs-a-body);
  line-height: 1.55;
}
.t-feed__post-popup .t-redactor__tte-view .t-redactor__callout-icon { left: 22px; top: 22px; color: var(--czs-green); }

/* таблица */
.t-feed__post-popup .t-redactor__tte-view table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  margin: var(--czs-a-block) 0;
  font-size: 15.5px;
  line-height: 1.45;
}
.t-feed__post-popup .t-redactor__tte-view th,
.t-feed__post-popup .t-redactor__tte-view td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--czs-line);
  text-align: left;
  vertical-align: top;
  min-width: 140px;
}
.t-feed__post-popup .t-redactor__tte-view th {
  font-weight: 600;
  color: var(--czs-ink);
  background: rgba(255, 255, 255, .55);
}

/* разделитель */
.t-feed__post-popup .t-redactor__tte-view figure hr {
  background: var(--czs-line);
  color: var(--czs-line);
  margin: var(--czs-a-block) 0 !important;
}

/* --- блок «что делать дальше»: цвет ссылок, который перебивала Tilda ------- */
.t-feed__post-popup .czs-next__list a,
.czs-next__list a { color: var(--czs-ink) !important; }
.t-feed__post-popup .czs-next__list a:hover,
.czs-next__list a:hover { color: var(--czs-green) !important; }

/* --- стрелка «наверх» и плавающие мессенджеры ------------------------------ */
.t-feed__post-popup .t-feed__post-popup__arrow-top { opacity: .7; }

@media screen and (max-width: 640px) {
  .t-feed__post-popup { --czs-a-lh: 1.62; }
  .t-feed__post-popup .t-feed__post-popup__container { padding-top: 22px; }
  .czs-crumb { margin-bottom: 16px; }
  .t-feed__post-popup .t-feed__post-popup__cover-wrapper,
  .t-feed__post-popup .t-feed__post-popup__cover-wrapper_aftertitle { margin: 24px 0 26px; }
  .czs-toc { padding: 15px 18px 16px; margin-bottom: 32px; }
  .czs-toc li { font-size: 15px; padding-left: 26px; }
  .t-feed__post-popup .t-redactor__tte-view h2.t-redactor__h2 { margin-top: 1.9em; }
  .t-feed__post-popup .t-redactor__tte-view ul,
  .t-feed__post-popup .t-redactor__tte-view ol { padding-left: 1.25em; }
  .t-feed__post-popup .t-redactor__tte-view .t-redactor__callout { padding: 18px 18px 18px 50px; }
  .t-feed__post-popup .t-redactor__tte-view .t-redactor__callout-icon { left: 16px; top: 18px; }

  /* кнопки мессенджеров: в угол и меньше, чтобы не ложились на строку текста */
  .t898__btn { bottom: 14px !important; right: 12px !important; }
  .t-feed__post-popup .t-feed__post-popup__arrow-top { bottom: 14px !important; left: 12px !important; }
}

@media print {
  .czs-crumb, .czs-toc, .t898, .t-feed__post-popup__arrow-top { display: none !important; }
  .t-feed__post-popup { color: #000; }
}

@media (prefers-reduced-motion: reduce) {
  .czs-crumb a, .czs-toc a, .czs-toc summary::after,
  .t-feed__post-popup .t-feed__post-popup__tag,
  .t-feed__post-popup .t-redactor__tte-view a { transition: none !important; }
}
