/* ============================================================
   blog.css — стили блога kozich.ru
   Подключается после /assets/css/site.css (тёмная тема, золото).
   Мобильный-first: базовые стили — мобильные,
   брейкпоинты — 720px (планшет) и 1080px (десктоп).
   Без внешних шрифтов, импортов и картинок.
   ============================================================ */

/* ---------- Токены ----------
   Часть переменных приходит из site.css/ai.css. Ниже — только
   безопасные fallback-значения для тех, которых нет в site.css,
   чтобы blog.css был самодостаточным. */

:root {
  --gold-2: #e6d2b0;
  --gold-deep: #8c7556;
  --line: rgba(255, 255, 255, 0.1);
  --line-gold: rgba(204, 173, 129, 0.32);
  --radius: 18px;
  --ease: cubic-bezier(0.2, 0.65, 0.25, 1);
  --blog-text: #dcdcdc;
  --blog-text-soft: #b8b8b8;
  --blog-measure: 760px;
  --blog-header-h: 64px;
}

/* Якоря не должны прятаться под липким хедером */
html {
  scroll-padding-top: calc(var(--blog-header-h) + 24px);
}

/* ---------- Доступность: скрытая утилита (honeypot, skip-поля) ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   1. ХЕДЕР БЛОГА
   ============================================================ */

.blog-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid transparent;
  background: rgba(5, 5, 5, 0.82);
  backdrop-filter: blur(14px);
  transition: background 240ms ease, border-color 240ms ease;
}

.blog-header.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(5, 5, 6, 0.94);
}

.blog-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  min-height: var(--blog-header-h);
  padding-block: 8px;
}

.blog-header__brand {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  min-height: 44px;
  color: #fff;
  font-family: "Roboto", sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
}

.blog-header__brand img {
  width: auto;
  max-height: 30px;
}

.blog-header__brand:hover {
  color: var(--gold-2);
}

/* На мобиле навигация уходит на свою строку и скроллится по горизонтали */
.blog-header__nav {
  display: flex;
  order: 3;
  flex: 1 1 100%;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.blog-header__nav::-webkit-scrollbar {
  display: none;
}

.blog-header__nav a {
  position: relative;
  flex: 0 0 auto;
  padding-block: 6px;
  color: var(--blog-text-soft);
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms ease;
}

.blog-header__nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms var(--ease);
}

.blog-header__nav a:hover {
  color: var(--gold-2);
}

.blog-header__nav a:hover::after,
.blog-header__nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.blog-header__nav a[aria-current="page"] {
  color: var(--gold);
}

.blog-header__cta {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-left: auto;
  padding: 0 18px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: linear-gradient(120deg, var(--gold), var(--gold-2));
  color: #17130c;
  font-family: "Roboto", sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 220ms var(--ease), background 220ms ease, color 220ms ease;
}

.blog-header__cta:hover {
  transform: translateY(-1px);
  background: transparent;
  color: var(--gold-2);
}

/* ============================================================
   2. ХЛЕБНЫЕ КРОШКИ
   ============================================================ */

.breadcrumbs {
  padding-block: 16px;
  color: var(--muted);
  font-family: "Roboto", sans-serif;
  font-size: 13px;
}

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

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.breadcrumbs__item + .breadcrumbs__item::before {
  content: "/";
  color: #5a5a5a;
}

.breadcrumbs__item a {
  color: #b0b0b0;
  text-decoration: none;
  transition: color 160ms ease;
}

.breadcrumbs__item a:hover {
  color: var(--gold);
}

.breadcrumbs__item[aria-current="page"] {
  overflow: hidden;
  color: var(--white);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   3. СТАТЬЯ: КАРКАС
   ============================================================ */

.article {
  width: min(calc(100% - var(--gutter) * 2), var(--blog-measure));
  margin-inline: auto;
  padding-block: clamp(28px, 6vw, 64px) clamp(48px, 8vw, 96px);
}

.article__header {
  margin-bottom: clamp(26px, 5vw, 44px);
}

.article__kicker {
  margin: 0 0 14px;
  color: var(--gold);
  font-family: "Roboto", sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.article__title {
  margin: 0 0 18px;
  color: var(--white);
  font-size: clamp(30px, 6.4vw, 54px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.article__lead {
  margin: 0 0 24px;
  color: #cccccc;
  font-size: clamp(17px, 2.4vw, 21px);
  font-weight: 300;
  line-height: 1.6;
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: "Roboto", sans-serif;
  font-size: 13px;
}

.article__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ---------- Текст статьи ---------- */

.article__body {
  color: var(--blog-text);
  font-size: clamp(17px, 2.2vw, 18px);
  line-height: 1.75;
  overflow-wrap: break-word;
}

.article__body h2,
.article__body h3 {
  color: var(--white);
  font-weight: 300;
  letter-spacing: -0.01em;
  scroll-margin-top: calc(var(--blog-header-h) + 24px);
}

.article__body h2 {
  margin: 2.2em 0 0.7em;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.18;
}

.article__body h3 {
  margin: 1.8em 0 0.6em;
  font-size: clamp(20px, 3vw, 24px);
  line-height: 1.25;
}

.article__body h2:first-child,
.article__body h3:first-child {
  margin-top: 0;
}

.article__body p {
  margin: 0 0 1.35em;
}

.article__body ul,
.article__body ol {
  margin: 0 0 1.4em;
  padding-left: 1.35em;
}

.article__body li {
  margin-bottom: 0.55em;
}

.article__body li::marker {
  color: var(--gold);
}

.article__body li > ul,
.article__body li > ol {
  margin-top: 0.55em;
  margin-bottom: 0;
}

.article__body blockquote {
  margin: 0 0 1.6em;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--gold);
  color: #e0d6c6;
  font-size: 1.03em;
  font-style: normal;
}

.article__body blockquote p:last-child {
  margin-bottom: 0;
}

.article__body code {
  padding: 0.12em 0.42em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--gold-2);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  word-break: break-word;
}

.article__body pre {
  margin: 0 0 1.6em;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b0b0d;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.article__body pre code {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #e8e8e8;
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre;
  word-break: normal;
}

.article__body hr {
  height: 1px;
  margin: 2.4em 0;
  border: 0;
  background: var(--line);
}

/* ---------- Ссылки в тексте ---------- */

.article__body a {
  color: #ededed;
  text-decoration: underline;
  text-decoration-color: rgba(204, 173, 129, 0.5);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.article__body a:hover {
  color: var(--gold);
  text-decoration-color: var(--gold);
}

/* ---------- Таблицы (скролл на мобиле) ---------- */

.article__body table {
  display: block;
  width: 100%;
  margin: 0 0 1.6em;
  border-collapse: collapse;
  font-size: 15px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.article__body th,
.article__body td {
  padding: 10px 14px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.article__body th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--gold-2);
  font-family: "Roboto", sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article__body tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

/* ---------- Изображения и подписи ---------- */

.article__body img {
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  background: var(--black-soft);
  object-fit: cover;
}

.article__body figure {
  margin: 0 0 1.8em;
}

.article__body figure img {
  width: 100%;
}

.article__body figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

/* ============================================================
   4. ВЫНОСКИ И ОГЛАВЛЕНИЕ
   ============================================================ */

.takeaways {
  margin: 0 0 2em;
  padding: clamp(18px, 4vw, 24px);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(204, 173, 129, 0.08), rgba(204, 173, 129, 0.02));
}

.takeaways__title {
  margin: 0 0 14px;
  color: var(--gold);
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.takeaways__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.takeaways__list li {
  position: relative;
  margin-bottom: 12px;
  padding-left: 28px;
  color: #e2e2e2;
  line-height: 1.65;
}

.takeaways__list li:last-child {
  margin-bottom: 0;
}

.takeaways__list li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 2px;
  width: 7px;
  height: 12px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
}

.toc {
  margin: 0 0 2em;
  padding: clamp(18px, 4vw, 22px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--black-soft);
}

.toc__title {
  margin: 0 0 12px;
  color: var(--gold);
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.toc__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc__list .toc__list {
  padding-left: 14px;
}

.toc__list a {
  display: block;
  padding: 7px 12px;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  color: #b6b6b6;
  font-size: 15px;
  line-height: 1.45;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.toc__list a:hover {
  border-left-color: rgba(204, 173, 129, 0.5);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
}

.toc__list a.is-active {
  border-left-color: var(--gold);
  background: rgba(204, 173, 129, 0.1);
  color: var(--gold);
}

/* ============================================================
   5. CTA И ЛИД-БЛОКИ
   ============================================================ */

.cta-inline {
  margin: 2.2em 0;
  padding: clamp(18px, 4vw, 26px);
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: linear-gradient(100deg, rgba(204, 173, 129, 0.08), rgba(255, 255, 255, 0.01));
}

.cta-inline__title {
  margin: 0 0 10px;
  color: var(--white);
  font-size: clamp(19px, 3vw, 24px);
  font-weight: 300;
  line-height: 1.25;
}

.cta-inline__text {
  margin: 0 0 18px;
  color: #c6c6c6;
  font-size: 16px;
  line-height: 1.65;
}

.cta-inline__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Магнит за подписку ---------- */

.lead-magnet {
  margin: 2.2em 0;
  padding: clamp(22px, 5vw, 34px);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 0%, rgba(204, 173, 129, 0.14), transparent 62%),
    var(--black-soft);
}

.lead-magnet__title {
  margin: 0 0 12px;
  color: var(--white);
  font-size: clamp(21px, 3.4vw, 28px);
  font-weight: 300;
  line-height: 1.22;
}

.lead-magnet__text {
  margin: 0 0 20px;
  color: #c6c6c6;
  font-size: 15.5px;
  line-height: 1.65;
}

.lead-magnet__form {
  display: grid;
  gap: 12px;
}

.lead-magnet__note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

/* ---------- Блок автора в статье ---------- */

.author-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin: 2.4em 0;
  padding: clamp(18px, 4vw, 22px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--black-soft);
}

.author-box__avatar {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
}

.author-box__name {
  margin: 0 0 4px;
  color: var(--white);
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  font-weight: 500;
}

.author-box__bio {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

/* ---------- «Сами vs с агентством» ---------- */

.compare-note {
  margin: 2.2em 0;
  padding: clamp(18px, 4vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--black-soft);
}

.compare-note > * + * {
  margin-top: 18px;
}

.compare-note h3,
.compare-note h4 {
  margin: 0 0 8px;
  color: var(--white);
  font-size: 17px;
  font-weight: 500;
}

.compare-note > div,
.compare-note > ul,
.compare-note > section {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.compare-note ul {
  margin: 0;
  padding-left: 1.2em;
  color: var(--blog-text);
  font-size: 15.5px;
  line-height: 1.65;
}

.compare-note p:last-child,
.compare-note ul:last-child {
  margin-bottom: 0;
}

/* ---------- Финальный CTA ---------- */

.cta-final {
  margin-top: clamp(42px, 7vw, 72px);
  padding: clamp(28px, 5vw, 46px) clamp(20px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 0%, rgba(204, 173, 129, 0.14), transparent 60%),
    var(--black-soft);
  text-align: center;
}

.cta-final__title {
  margin: 0 0 14px;
  color: var(--white);
  font-size: clamp(25px, 4.5vw, 38px);
  font-weight: 300;
  line-height: 1.15;
}

.cta-final__text {
  max-width: 560px;
  margin: 0 auto 24px;
  color: #c2c2c2;
  font-size: 16.5px;
  line-height: 1.65;
}

.cta-final__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ---------- Липкий мини-CTA ---------- */

.sticky-cta {
  position: fixed;
  z-index: 90;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: rgba(5, 5, 6, 0.94);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(110%);
  transition: transform 320ms var(--ease), opacity 320ms var(--ease);
}

.sticky-cta.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.sticky-cta__text {
  margin: 0;
  color: #cfcfcf;
  font-size: 14px;
  line-height: 1.4;
}

.sticky-cta__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  gap: 10px;
  margin: 2.2em 0;
}

.faq__item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--black-soft);
  overflow: hidden;
  transition: border-color 180ms ease;
}

.faq__item:hover {
  border-color: var(--line-gold);
}

.faq__item summary {
  position: relative;
  padding: 15px 48px 15px 18px;
  color: var(--white);
  font-size: 16.5px;
  font-weight: 400;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 20px;
  width: 9px;
  height: 9px;
  margin-top: -7px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
  transition: transform 220ms var(--ease);
}

.faq__item[open] summary {
  color: var(--gold-2);
}

.faq__item[open] summary::after {
  margin-top: -3px;
  transform: rotate(-135deg);
}

.faq__item p {
  margin: 0;
  padding: 0 18px 18px;
  color: #c2c2c2;
  font-size: 15.5px;
  line-height: 1.7;
}

/* ============================================================
   6. ХАБ БЛОГА: ГЕРОЙ, РУБРИКИ, СПИСОК ПОСТОВ
   ============================================================ */

.blog-hero {
  padding-block: clamp(38px, 8vw, 84px) clamp(26px, 5vw, 44px);
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 12% 0%, rgba(204, 173, 129, 0.1), transparent 42%);
}

.blog-hero__title {
  max-width: 900px;
  margin: 0 0 18px;
  color: var(--white);
  font-size: clamp(32px, 7vw, 62px);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.blog-hero__lead {
  max-width: 720px;
  margin: 0;
  color: #c2c2c2;
  font-size: clamp(17px, 2.4vw, 21px);
  font-weight: 300;
  line-height: 1.6;
}

.blog-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 36px;
  margin: 26px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.blog-hero__stats > * {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-family: "Roboto", sans-serif;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-hero__stats b,
.blog-hero__stats strong {
  color: var(--gold);
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 300;
  letter-spacing: -0.01em;
  text-transform: none;
}

/* ---------- Навигация по рубрикам ---------- */

.rubric-nav {
  display: flex;
  gap: 10px;
  margin: 0 0 clamp(22px, 4vw, 34px);
  padding: 18px 0 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.rubric-nav::-webkit-scrollbar {
  display: none;
}

.rubric-nav a {
  flex: 0 0 auto;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blog-text-soft);
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.rubric-nav a:hover {
  border-color: var(--line-gold);
  color: var(--gold-2);
}

.rubric-nav a.is-active {
  border-color: var(--gold);
  background: var(--gold);
  color: #17130c;
}

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

.post-list {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--black-soft);
  overflow: hidden;
  transition: transform 260ms var(--ease), border-color 260ms ease;
}

.post-card:hover {
  border-color: var(--line-gold);
  transform: translateY(-3px);
}

.post-card:focus-within {
  border-color: var(--line-gold);
}

/* aspect-ratio + object-fit: нет скачков раскладки (CLS) */
.post-card__cover {
  order: -1;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0;
  background: #101014;
  object-fit: cover;
}

.post-card__rubric {
  margin: 0;
  padding: 20px 20px 0;
  color: var(--gold);
  font-family: "Roboto", sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.post-card__title {
  margin: 0;
  padding: 10px 20px 0;
  color: var(--white);
  font-size: clamp(19px, 2.6vw, 22px);
  font-weight: 300;
  line-height: 1.25;
}

.post-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease;
}

.post-card__title a:hover {
  color: var(--gold-2);
}

.post-card__excerpt {
  margin: 0;
  padding: 10px 20px 0;
  color: #b0b0b0;
  font-size: 15px;
  line-height: 1.6;
}

.post-card__meta {
  margin-top: auto;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: "Roboto", sans-serif;
  font-size: 12.5px;
}

/* ---------- Вступление рубрики ---------- */

.rubric-intro {
  max-width: 720px;
  margin: 0 0 clamp(24px, 4vw, 38px);
  padding-left: 18px;
  border-left: 2px solid var(--gold);
  color: #c2c2c2;
  font-size: 17px;
  line-height: 1.7;
}

.rubric-intro p:last-child {
  margin-bottom: 0;
}

/* ---------- Профиль автора на странице автора ---------- */

.author-profile {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  margin-bottom: clamp(26px, 5vw, 44px);
  padding: clamp(20px, 4vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--black-soft);
}

.author-profile__avatar {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
}

.author-profile__body {
  flex: 1 1 260px;
  min-width: 0;
  color: #c2c2c2;
  font-size: 15.5px;
  line-height: 1.7;
}

.author-profile__body > :first-child {
  margin-top: 0;
  color: var(--white);
  font-weight: 300;
}

.author-profile__body > :last-child {
  margin-bottom: 0;
}

/* ---------- Пагинация ---------- */

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: clamp(30px, 6vw, 56px) 0 0;
  padding: 0;
  list-style: none;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #bfbfbf;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.pagination a:hover {
  border-color: var(--line-gold);
  background: rgba(204, 173, 129, 0.1);
  color: var(--gold);
}

.pagination [aria-current="page"] {
  border-color: var(--gold);
  color: var(--gold);
}

/* ============================================================
   7. ФОРМА ЛИДА
   ============================================================ */

.lead-form {
  display: grid;
  gap: 16px;
  margin: 0;
}

.lead-form__row {
  display: grid;
  gap: 16px;
}

.lead-form__field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.lead-form__label {
  color: #cfcfcf;
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.lead-form__input,
.lead-form__select {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0d0d10;
  color: var(--white);
  font: inherit;
  font-size: 16px;
  transition: border-color 180ms ease, background 180ms ease;
}

.lead-form__input::placeholder {
  color: #7d7d7d;
}

.lead-form__input:hover,
.lead-form__select:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.lead-form__checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--blog-text-soft);
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}

.lead-form__checkbox input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--gold);
}

.lead-form__submit {
  justify-self: start;
  min-height: 52px;
  padding: 0 30px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: linear-gradient(120deg, var(--gold), var(--gold-2));
  color: #17130c;
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 220ms var(--ease), box-shadow 220ms ease, opacity 220ms ease;
}

.lead-form__submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 50px rgba(204, 173, 129, 0.28);
}

.lead-form__submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.lead-form__error {
  margin: 0;
  color: #ffb3a7;
  font-size: 13.5px;
  line-height: 1.5;
}

.lead-form__success {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgba(126, 199, 148, 0.36);
  border-radius: 10px;
  background: rgba(64, 158, 96, 0.14);
  color: #bce8c8;
  font-size: 14.5px;
  line-height: 1.55;
}

.lead-form__error[hidden],
.lead-form__success[hidden] {
  display: none;
}

/* ============================================================
   8. ФОКУС И ДОСТУПНОСТЬ
   ============================================================ */

.faq__item summary:focus-visible,
.lead-form__input:focus-visible,
.lead-form__select:focus-visible,
.lead-form__checkbox input:focus-visible,
.lead-form__submit:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.lead-form__input:focus-visible,
.lead-form__select:focus-visible {
  border-color: var(--gold);
  background: #101013;
}

/* ============================================================
   9. БРЕЙКПОИНТЫ
   ============================================================ */

/* ---------- Планшет: от 720px ---------- */

@media (min-width: 720px) {
  :root {
    --blog-header-h: 72px;
  }

  .blog-header__inner {
    flex-wrap: nowrap;
    gap: 30px;
    padding-block: 12px;
  }

  .blog-header__nav {
    order: 0;
    flex: 1 1 auto;
    gap: 26px;
    overflow: visible;
    padding-bottom: 0;
    font-size: 14px;
  }

  .blog-header__cta {
    margin-left: 0;
    padding: 0 24px;
    font-size: 12.5px;
  }

  .article__body table {
    display: table;
  }

  .article__body th,
  .article__body td {
    padding: 12px 16px;
  }

  .lead-magnet__form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .lead-magnet__form .lead-form__submit,
  .lead-magnet__form button {
    justify-self: end;
  }

  .lead-form__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }

  .compare-note {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .compare-note > * + * {
    margin-top: 0;
  }

  .sticky-cta {
    padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2));
  }

  .author-box {
    gap: 20px;
  }

  .author-box__avatar {
    width: 64px;
    height: 64px;
  }
}

/* ---------- Десктоп: от 1080px ---------- */

@media (min-width: 1080px) {
  .post-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
  }

  .blog-hero {
    padding-block: clamp(56px, 8vw, 96px) clamp(30px, 5vw, 48px);
  }

  .sticky-cta__text {
    font-size: 15px;
  }

  .cta-final__actions {
    gap: 16px;
  }
}

/* ============================================================
   10. УМЕНЬШЕНИЕ ДВИЖЕНИЯ
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .blog-header,
  .blog-header__nav a,
  .blog-header__nav a::after,
  .blog-header__cta,
  .breadcrumbs__item a,
  .article__body a,
  .toc__list a,
  .post-card,
  .post-card__title a,
  .rubric-nav a,
  .pagination a,
  .pagination span,
  .faq__item,
  .faq__item summary::after,
  .sticky-cta,
  .lead-form__input,
  .lead-form__select,
  .lead-form__submit {
    transition: none;
  }

  .blog-header__cta:hover,
  .post-card:hover,
  .lead-form__submit:hover {
    transform: none;
  }

  .blog-header__nav a:hover::after,
  .blog-header__nav a[aria-current="page"]::after {
    transform: scaleX(1);
  }
}
