/* ========================================
   ДомЭксперт — Главная таблица стилей
   (шрифты подключаются в includes/header.php — без @import для быстрее FCP)
   ======================================== */

/* === CSS Variables === */
:root {
  --brick: #C0392B;
  --brick-dark: #962d22;
  --brick-light: #e74c3c;
  --charcoal: #2C2C2C;
  --charcoal-light: #444;
  --beige: #F5F0E8;
  --beige-dark: #EAE4D9;
  --beige-mid: #D4C9B5;
  --white: #FFFFFF;
  --text: #333333;
  --text-light: #666666;
  --text-muted: #70757D;   /* было #999999 — давало контраст 2.9:1, ниже нормы WCAG для мелких подписей */
  --border: #E0D8CC;
  --shadow: rgba(0,0,0,0.08);
  --shadow-md: rgba(0,0,0,0.15);
  /* Роли цветов разведены с оттенками: одна и та же переменная не может быть
     и фоном шапки, и цветом заголовка — в тёмной теме им нужны разные значения. */
  --header-bg: var(--charcoal);   /* фон шапки, футера и мобильного меню */
  --heading: var(--charcoal);     /* заголовки в тексте */
  --on-dark: #FFFFFF;             /* текст поверх тёмных и кирпичных плашек */
  --hero-from: var(--charcoal);   /* градиент обложки главной и шапки категории */
  --hero-mid: #3d3022;
  --hero-to: #5a3e2b;

  --radius: 6px;
  --radius-lg: 12px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  --max-width: 1400px;
  --sidebar-width: 300px;
  --transition: 0.25s ease;
}

/* === Тёмная тема ===
   data-theme на <html> ставит инлайн-скрипт в includes/header.php ещё до отрисовки:
   иначе при загрузке успевала мелькнуть светлая страница. Он же читает системную
   настройку, поэтому отдельный @media (prefers-color-scheme) здесь не нужен. */
:root[data-theme="dark"] {
  color-scheme: dark;

  --brick: #E2705C;          /* светлее печатного кирпича: на тёмном фоне он должен читаться */
  --brick-dark: #F08C79;     /* «темнее» в тёмной теме означает светлее — это состояние hover */
  --brick-light: #FF9E8B;

  --white: #15171A;          /* фон карточек и полотна статьи */
  --beige: #1D2025;          /* вторичные плашки: оглавление, врезки, сайдбар */
  --beige-dark: #262A30;
  --beige-mid: #343941;

  --charcoal: #ECEEF1;
  --charcoal-light: #C7CBD2;
  --heading: #F2F4F7;
  --header-bg: #0E1013;      /* шапка темнее полотна, иначе тонет в фоне */
  --hero-from: #17191D;      /* обложки остаются тёмными: --charcoal здесь уже светлый */
  --hero-mid: #2A2419;
  --hero-to: #3A2C1F;

  --text: #DCDFE4;
  --text-light: #AEB3BB;
  --text-muted: #868C96;
  --border: #2C3138;
  --shadow: rgba(0,0,0,0.55);
  --shadow-md: rgba(0,0,0,0.75);
}

/* Тексты статей вёрстаны с инлайн-стилями: светло-серая заливка шапки таблицы,
   рамки #ddd и подписи #666. В тёмной теме это давало почти белый текст на почти
   белом фоне (контраст 1,2). Инлайн-стиль перебивается только !important. */
:root[data-theme="dark"] .article-body table th,
:root[data-theme="dark"] .article-body table td {
  border-color: var(--border) !important;
  color: var(--text) !important;
}
:root[data-theme="dark"] .article-body table th {
  background: var(--beige-dark) !important;
  color: var(--heading) !important;
}
/* Ячейки с инлайновой светлой заливкой (#fafafa/#f5f5f5 у строк «Итого» и
   заголовков разделов таблиц) в тёмной теме давали светлый текст на светлом
   фоне — почти невидимо. Перекрываем фон таким же, как у шапки таблицы. */
:root[data-theme="dark"] .article-body table td[style*="background"],
:root[data-theme="dark"] .article-body .a-td--shade {
  background: var(--beige-dark) !important;
}
:root[data-theme="dark"] .article-body figcaption,
:root[data-theme="dark"] .article-body figcaption * {
  color: var(--text-light) !important;
}

/* Иллюстрации в тёмной теме бьют по глазам — приглушаем, при наведении возвращаем */
:root[data-theme="dark"] .article-body img,
:root[data-theme="dark"] .card-image img,
:root[data-theme="dark"] .article-lead-figure img {
  filter: brightness(0.86) contrast(1.02);
  transition: filter var(--transition);
}
:root[data-theme="dark"] .article-body img:hover,
:root[data-theme="dark"] .article-lead-figure img:hover { filter: none; }

/* === ДОСТУПНОСТЬ С КЛАВИАТУРЫ === */

/* Ссылка «Перейти к содержимому»: убрана за пределы экрана, всплывает при фокусе */
.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 1000;
  background: var(--brick);
  color: var(--on-dark);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top var(--transition);
}
.skip-link:focus { top: 0; color: var(--on-dark); }

/* Видимая рамка фокуса для всего, что доступно с клавиатуры.
   :focus-visible, а не :focus — по клику мышью рамка не появляется. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--brick);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Рамка появляется сразу: у кнопок и ссылок меню стоит transition: all,
   и без этого она плавно «выползает» уже после нажатия Tab. */
:focus-visible { transition-property: none; }

/* На тёмных плашках кирпичный контур сливается — там рамка светлая */
.site-header a:focus-visible,
.site-header button:focus-visible,
.site-footer a:focus-visible,
.top-bar a:focus-visible,
.category-header a:focus-visible,
.hero a:focus-visible {
  outline-color: var(--on-dark);
}

/* Пользователям, попросившим уменьшить анимацию, — без плавных прокруток и переходов */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brick); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brick-dark); }
ul { list-style: none; }

h1, h2, h3, h4, h5 { font-family: var(--font-display); line-height: 1.3; color: var(--heading); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* === HEADER === */
.site-header {
  background: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 24px;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--on-dark);
  letter-spacing: -0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-logo:hover { color: var(--beige); }
.site-logo .logo-icon { margin-right: 6px; }
.site-logo .logo-accent { color: var(--brick-light); }

/* === NAVIGATION === */
.main-nav ul {
  display: flex;
  gap: 4px;
  align-items: center;
}

.main-nav a {
  color: rgba(255,255,255,0.85);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--on-dark);
  background: var(--brick);
}

/* === ПЕРЕКЛЮЧАТЕЛЬ ТЕМЫ === */
.theme-toggle {
  margin-left: auto;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), border-color var(--transition);
}
.theme-toggle:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.3); }
.theme-toggle:focus-visible { outline: 2px solid var(--brick-light); outline-offset: 2px; }

/* Иконка: солнце в тёмной теме (нажми — станет светло), луна в светлой */
.theme-toggle-icon { font-size: 1rem; line-height: 1; }
.theme-toggle-icon::before { content: '🌙'; }
:root[data-theme="dark"] .theme-toggle-icon::before { content: '☀️'; }

/* === BURGER MENU === */
.burger-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 200;
}
.burger-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--on-dark);
  border-radius: 2px;
  transition: all var(--transition);
}
.burger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.open span:nth-child(2) { opacity: 0; }
.burger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* === TOP BAR (under header) === */
.top-bar {
  background: var(--brick);
  padding: 6px 0;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.9);
  font-family: var(--font-body);
  letter-spacing: 0.3px;
}

/* === HERO === */
.hero {
  background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-mid) 50%, var(--hero-to) 100%);
  position: relative;
  overflow: hidden;
  padding: 80px 0 90px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-block;
  background: var(--brick);
  color: var(--on-dark);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 30px;
  margin-bottom: 24px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: var(--on-dark);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero h1 em {
  color: var(--brick-light);
  font-style: italic;
}

.hero-desc {
  color: rgba(255,255,255,0.75);
  font-size: 1.1rem;
  margin-bottom: 36px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--brick);
  color: var(--on-dark);
  border-color: var(--brick);
}
.btn-primary:hover {
  background: var(--brick-dark);
  border-color: var(--brick-dark);
  color: var(--on-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(192,57,43,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--on-dark);
  border-color: rgba(255,255,255,0.4);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  color: var(--on-dark);
  border-color: rgba(255,255,255,0.7);
}

/* === MAIN LAYOUT === */
.page-wrapper {
  background: var(--beige);
  min-height: 60vh;
}

.main-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 40px;
  padding: 50px 0 60px;
  align-items: start;
}

/* min-width:auto у грид-элементов не даёт колонке стать уже своего содержимого:
   широкая таблица внутри статьи распирала всю раскладку, и на телефоне
   появлялся горизонтальный скролл. */
.main-layout > * { min-width: 0; }
.main-content { min-width: 0; }

/* Широкие таблицы прокручиваются внутри себя, а не тянут страницу */
.article-body table { display: block; width: 100%; overflow-x: auto; }

/* === SECTION HEADINGS === */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--beige-mid);
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--heading);
  position: relative;
}

.section-title::before {
  content: '';
  position: absolute;
  bottom: -18px;
  left: 0;
  width: 44px;
  height: 3px;
  background: var(--brick);
  border-radius: 2px;
}

.section-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brick);
  letter-spacing: 0.3px;
}

/* === ARTICLE CARDS GRID === */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.article-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 12px var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--shadow-md);
}

.card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--beige-dark), var(--beige-mid));
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image-placeholder {
  font-size: 3rem;
  opacity: 0.5;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .card-image img { transform: scale(1.05); }

.card-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--brick);
  color: var(--on-dark);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 30px;
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 10px;
  line-height: 1.35;
}

.card-title a { color: inherit; }
.card-title a:hover { color: var(--brick); }

.card-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brick);
  display: flex;
  align-items: center;
  gap: 5px;
}
.card-link::after { content: '→'; }
.card-link:hover { color: var(--brick-dark); }

/* === AD BLOCKS === */
.ad-block {
  background: var(--beige-dark);
  border: 2px dashed var(--beige-mid);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--font-body);
  text-align: center;
  padding: 10px;
}

.ad-horizontal {
  width: 100%;
  height: 90px;
  margin: 36px 0;
}

.ad-vertical {
  width: 100%;
  height: 400px;
  margin-bottom: 28px;
}

/* === SIDEBAR === */
.sidebar { position: sticky; top: 90px; }

.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px var(--shadow);
}

.widget-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--heading);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--beige-dark);
  position: relative;
}

.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--brick);
}

/* Popular articles */
.popular-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--beige-dark);
}
.popular-list li:last-child { border-bottom: none; padding-bottom: 0; }

.popular-link {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.45;
}
.popular-link:hover { color: var(--brick); }

.popular-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: var(--beige-dark);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brick);
  margin-top: 1px;
}

/* Categories widget */
.cat-list li { border-bottom: 1px solid var(--beige-dark); }
.cat-list li:last-child { border-bottom: none; }

.cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  color: var(--text);
  font-size: 0.9rem;
  transition: all var(--transition);
}
.cat-link:hover { color: var(--brick); padding-left: 6px; }

.cat-count {
  background: var(--beige-dark);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
}

/* === BREADCRUMBS === */
.breadcrumbs {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 0.85rem;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}
.breadcrumbs li:not(:last-child)::after { content: '›'; color: var(--beige-mid); }
.breadcrumbs li:last-child { color: var(--text-light); }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--brick); }

/* === ARTICLE PAGE === */
.article-header {
  background: var(--white);
  padding: 40px 0 36px;
  border-bottom: 1px solid var(--border);
}

.article-category-badge {
  display: inline-block;
  background: var(--brick);
  color: var(--on-dark);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 30px;
  margin-bottom: 16px;
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  color: var(--heading);
  line-height: 1.25;
  margin-bottom: 18px;
  max-width: 800px;
}

.article-meta {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.article-meta span { display: flex; align-items: center; gap: 6px; }

/* === ARTICLE CONTENT === */
.article-body {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: 0 2px 12px var(--shadow);
  line-height: 1.8;
  font-size: 1.02rem;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--heading);
  margin: 36px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--beige-dark);
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--heading);
  margin: 28px 0 12px;
}

.article-body p { margin-bottom: 18px; color: var(--text); }

.article-body ul, .article-body ol {
  margin: 16px 0 22px 20px;
}

.article-body ul { list-style: none; padding: 0; margin-left: 0; }
.article-body ul li {
  padding: 6px 0 6px 22px;
  position: relative;
  border-bottom: none;
}
.article-body ul li::before {
  content: '▪';
  color: var(--brick);
  position: absolute;
  left: 0;
  font-size: 1rem;
}

.article-body ol { list-style: decimal; }
.article-body ol li { padding: 4px 0; }

.article-body strong { color: var(--heading); font-weight: 600; }

/* Повторяющиеся стили тел статей. min-width у таблиц остаётся инлайном. */
.a-fig{margin:1.5rem 0}
.a-fig img{width:100%;height:auto;border-radius:8px;display:block}
.a-figcap{margin-top:0.5rem;color:#666;font-size:0.9rem}
.a-tablewrap{overflow-x:auto;margin:1.25rem 0}
.a-table{width:100%;border-collapse:collapse}
.a-td{padding:10px;border:1px solid #ddd}
.a-th{padding:10px;border:1px solid #ddd;text-align:left;background:#f5f5f5}
.a-td--right{text-align:right}
.a-td--shade{background:#fafafa}
.a-th--right{text-align:right}
.a-th--center{text-align:center}

.article-body blockquote {
  border-left: 4px solid var(--brick);
  padding: 16px 20px;
  background: var(--beige);
  margin: 24px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-light);
}

/* === RELATED ARTICLES === */
.related-section {
  margin-top: 40px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* === CATEGORY PAGE === */
.category-header {
  background: linear-gradient(135deg, var(--hero-from), var(--hero-mid));
  padding: 50px 0 44px;
  color: var(--on-dark);
}

.category-header h1 {
  color: var(--on-dark);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 10px;
}

.category-header p {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
}

/* === FOOTER === */
.site-footer {
  background: var(--header-bg);
  color: rgba(255,255,255,0.75);
  padding: 56px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-brand .site-logo {
  display: block;
  margin-bottom: 14px;
  font-size: 1.3rem;
}

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.6);
  max-width: 280px;
}

.footer-heading {
  font-family: var(--font-display);
  color: var(--on-dark);
  font-size: 1rem;
  margin-bottom: 18px;
  font-weight: 600;
}

.footer-links li { margin-bottom: 8px; }
.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--on-dark); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.83rem;
  color: rgba(255,255,255,0.4);
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}
.footer-bottom-links a { color: rgba(255,255,255,0.4); }
.footer-bottom-links a:hover { color: rgba(255,255,255,0.8); }

/* === UTILITY === */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

.empty-state {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 60px 30px;
  text-align: center;
  box-shadow: 0 2px 12px var(--shadow);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { font-family: var(--font-display); color: var(--heading); margin-bottom: 10px; }
.empty-state p { color: var(--text-muted); font-size: 0.9rem; }

/* === ARTICLE LIST (category page) === */
.article-list { display: grid; gap: 20px; }

.article-list-item {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 200px 1fr;
  box-shadow: 0 2px 10px var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.article-list-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px var(--shadow-md);
}

.list-item-image {
  background: linear-gradient(135deg, var(--beige-dark), var(--beige-mid));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  min-height: 130px;
  overflow: hidden;
}

.list-item-image img {
  width: 100%;
  height: 100%;
  min-height: 130px;
  object-fit: cover;
  display: block;
}

.article-body > .article-lead-figure {
  margin: 0 0 28px;
}

.article-lead-figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 32px var(--shadow-md);
}

.article-lead-figure img {
  width: 100%;
  height: auto;
  max-height: min(70vh, 560px);
  object-fit: cover;
  display: block;
}

.list-item-body { padding: 20px 24px; }

.list-item-cat {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--brick);
  margin-bottom: 8px;
}

.list-item-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 8px;
  line-height: 1.35;
}
.list-item-title a { color: var(--heading); }
.list-item-title a:hover { color: var(--brick); }

.list-item-desc {
  font-size: 0.88rem;
  color: var(--text-light);
  margin-bottom: 14px;
  line-height: 1.55;
}

.list-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  :root { --sidebar-width: 260px; }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > *:first-child { grid-column: 1 / -1; }
  .footer-desc { max-width: 100%; }
}

@media (max-width: 768px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }

  .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--header-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
    z-index: 150;
  }

  .main-nav.open {
    opacity: 1;
    pointer-events: all;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .main-nav a {
    font-size: 1.2rem;
    padding: 12px 24px;
  }

  .burger-btn { display: flex; }

  .articles-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .article-list-item { grid-template-columns: 1fr; }
  .list-item-image { min-height: 80px; }
  .article-body { padding: 24px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero { padding: 50px 0 60px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; max-width: 280px; }
}

@media (max-width: 480px) {
  .section-title { font-size: 1.4rem; }
  .header-inner { height: 60px; }
}

/* ============================================================
   КАЛЬКУЛЯТОРЫ (/calculators/, /calc/<slug>/)
   ============================================================ */

.calc-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0.75rem 0 0;
  line-height: 1.6;
}

/* --- форма --- */
.calc {
  background: var(--white, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
}

.calc fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 1.5rem;
}
.calc fieldset:last-of-type { margin-bottom: 0; }

.calc legend {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--heading);
  padding: 0 0 0.75rem;
  margin: 0;
}

.calc-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem 1.25rem;
}

.calc-field { display: flex; flex-direction: column; gap: 0.35rem; }

.calc-field label {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
}

.calc-field input[type="number"],
.calc-field input[type="text"],
.calc-field select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition, 0.2s);
}

.calc-field input:focus,
.calc-field select:focus {
  outline: none;
  border-color: var(--brick);
  box-shadow: 0 0 0 3px rgba(196, 92, 74, 0.15);
}

.calc-field .calc-field-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.calc-field--checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.6rem;
}
.calc-field--checkbox input { margin-top: 0.2rem; flex: 0 0 auto; }

.calc-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.calc-actions button {
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--beige);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition, 0.2s);
}
.calc-actions button:hover { background: var(--beige-mid); }

/* --- результат --- */
.calc-result {
  background: var(--beige);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brick);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin: 0 0 1.5rem;
}

.calc-total {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-bottom: 0.9rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.calc-total:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

.calc-total-label { font-size: 0.9rem; color: var(--text-muted); }
.calc-total-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.2;
}
.calc-total-note { font-size: 0.86rem; color: var(--text-muted); }

.calc-table-wrap { overflow-x: auto; margin: 0.75rem 0; }

.calc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  min-width: 320px;
}
.calc-table caption {
  text-align: left;
  font-weight: 600;
  color: var(--text);
  padding-bottom: 0.5rem;
}
.calc-table th,
.calc-table td {
  text-align: left;
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.calc-table th { font-weight: 500; color: var(--text); }
.calc-table td { color: var(--heading); font-weight: 600; }
.calc-table td.calc-hint { font-weight: 400; color: var(--text-muted); font-size: 0.88rem; }
.calc-table tr:last-child th,
.calc-table tr:last-child td { border-bottom: 0; }

.calc-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0.75rem 0 0;
}

/* --- листинг раздела --- */
.calc-group { margin-bottom: 2.5rem; }
.calc-group-desc { color: var(--text-muted); margin: 0 0 1.25rem; }

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.calc-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition, 0.2s);
}
.calc-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.calc-card-link {
  display: block;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.calc-card-title {
  font-family: var(--font-display);
  font-size: 1.08rem;
  margin: 0 0 0.5rem;
  color: var(--heading);
}
.calc-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  line-height: 1.5;
}
.calc-card-level {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--brick);
  background: var(--beige);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
}

/* --- перелинковка --- */
.calc-links { margin: 2rem 0; }
.calc-links--inline {
  background: var(--beige);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
}
.calc-links-note { font-size: 0.92rem; color: var(--text-muted); margin: 0.5rem 0 0; }

.calc-link-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.6rem; }
.calc-link-list a {
  display: block;
  padding: 0.75rem 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all var(--transition, 0.2s);
}
.calc-link-list a:hover { border-color: var(--brick); box-shadow: var(--shadow); }
.calc-link-list strong { display: block; color: var(--heading); font-size: 0.98rem; margin-bottom: 0.15rem; }
.calc-link-list span { display: block; color: var(--text-muted); font-size: 0.87rem; line-height: 1.45; }
.calc-link-list--compact span { font-size: 0.85rem; }

@media (max-width: 600px) {
  .calc { padding: 1.1rem; }
  .calc-result { padding: 1rem 1.1rem; }
  .calc-total-value { font-size: 1.5rem; }
  .calc-fields { grid-template-columns: 1fr; }
}

/* Пояснительный текст на страницах калькуляторов */
.calc-article { margin: 2rem 0; }
.calc-article h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 1.75rem 0 0.75rem;
  color: var(--heading);
}
.calc-article h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  margin: 1.25rem 0 0.5rem;
  color: var(--heading);
}
.calc-article p,
.calc-article li { line-height: 1.7; color: var(--text); }
.calc-article ul,
.calc-article ol { margin: 0.75rem 0 1rem 1.25rem; }
.calc-article li { margin-bottom: 0.5rem; }
.calc-article table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.94rem; }
.calc-article th,
.calc-article td { padding: 0.6rem 0.75rem; border: 1px solid var(--border); text-align: left; }
.calc-article th { background: var(--beige); font-weight: 600; }
.calc-article .calc-example {
  background: var(--beige);
  border-left: 4px solid var(--brick);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

.calc-disclaimer {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--beige);
  border-radius: var(--radius-lg);
}
.calc-disclaimer p { font-size: 0.94rem; line-height: 1.65; color: var(--text-muted); margin: 0 0 0.75rem; }
.calc-disclaimer p:last-child { margin-bottom: 0; }

/* Фотографии в статье (свои и из открытых источников) */
.article-photos { margin: 2.5rem 0; }
.article-photos-note {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0 0 1.25rem;
}
.article-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.article-photo { margin: 0; }
.article-photo img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  display: block;
  background: var(--beige);
}
.article-photo figcaption {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-muted);
}
/* Строка прав под снимком: мельче подписи, чтобы не спорить с ней за внимание */
.article-photo-credit {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
  opacity: 0.85;
}
.article-photo-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.article-photo-credit a:hover { color: var(--heading); }

/* Свёрнутый список источников — полная атрибуция в одном месте */
.article-photos-sources {
  margin-top: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.article-photos-sources summary {
  cursor: pointer;
  padding: 0.35rem 0;
  color: var(--text-muted);
}
.article-photos-sources ul {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
}
.article-photos-sources li { margin-bottom: 0.35rem; line-height: 1.5; }
.article-photos-sources a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Одиночное фото не растягиваем на всю ширину сетки */
.article-photos-grid:has(> .article-photo:only-child) { grid-template-columns: 1fr; }

@media (max-width: 600px) {
  .article-photos-grid { grid-template-columns: 1fr; }
}

/* ========================================
   ОГЛАВЛЕНИЕ СТАТЬИ
   Якоря к заголовкам проставляет includes/article-toc.php при выводе.
   ======================================== */

/* Шапка sticky: без отступа заголовок при переходе по якорю уезжает под неё */
.article-body h2[id],
.article-body h3[id] { scroll-margin-top: 90px; }

.article-toc {
  background: var(--beige);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brick);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 0 0 32px;
}

.article-toc .article-toc-title {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}

.article-toc .article-toc-list {
  list-style: none;
  counter-reset: toc;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 32px;
}

.article-toc .article-toc-list li {
  counter-increment: toc;
  padding: 0;
  margin: 0 0 7px;
  break-inside: avoid;
  line-height: 1.45;
}

.article-toc .article-toc-list li::before {
  content: counter(toc) '.';
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-right: 7px;
}

.article-toc .article-toc-list a {
  color: var(--text);
  font-size: 0.93rem;
  border-bottom: 1px solid transparent;
}

.article-toc .article-toc-list a:hover { color: var(--brick); border-bottom-color: currentColor; }

/* Раздел, который читают прямо сейчас, — подсветку ставит assets/js/main.js */
.article-toc .article-toc-list a.is-current { color: var(--brick); font-weight: 600; }

@media (max-width: 600px) {
  .article-toc { padding: 16px 18px; }
  .article-toc .article-toc-list { columns: 1; }
}

/* ========================================
   ПЕРЕХОДЫ МЕЖДУ СОСЕДНИМИ СТАТЬЯМИ КАТЕГОРИИ
   ======================================== */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 32px 0 0;
}

/* Когда сосед только с одной стороны, ссылка занимает свою половину:
   растянутая на всю ширину «Следующая» читается как единственный путь дальше. */
.article-nav-next:only-child { grid-column: 2; }

.article-nav-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: 0 2px 12px var(--shadow);
  transition: border-color var(--transition), transform var(--transition);
}
.article-nav-link:hover { border-color: var(--brick); transform: translateY(-2px); }
.article-nav-next { text-align: right; }

.article-nav-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brick);
}

.article-nav-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.35;
  color: var(--heading);
}

@media (max-width: 600px) {
  .article-nav { grid-template-columns: 1fr; }
  .article-nav-next:only-child { grid-column: 1; }
  .article-nav-next { text-align: left; }
}

/* ═══════════════════════════════════════════════════════════
   УТП на главной — чем сайт отличается.
   Сетка 4→2→1 колонки; карточки без теней, чтобы не спорить
   с блоком статей ниже.
   ═══════════════════════════════════════════════════════════ */
.usp {
  background: var(--beige);
  border-bottom: 1px solid var(--border);
  padding: 56px 0;
}

.usp-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--heading);
  text-align: center;
  margin-bottom: 36px;
}

.usp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.usp-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
}

.usp-icon {
  display: block;
  font-size: 1.7rem;
  line-height: 1;
  margin-bottom: 14px;
}

.usp-item h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  color: var(--heading);
  margin: 0 0 10px;
  line-height: 1.3;
}

.usp-item p {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.usp-item a {
  color: var(--brick);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 900px) {
  .usp-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .usp { padding: 40px 0; }
  .usp-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ═══════════════════════════════════════════════════════════
   Блок доверия в подвале: как делается контент.
   Две колонки на десктопе, одна на мобильном.
   ═══════════════════════════════════════════════════════════ */
.footer-trust {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 36px;
  padding-top: 28px;
}

.footer-trust-heading {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--on-dark);
  margin: 0 0 16px;
}

.footer-trust-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-trust-list li {
  font-size: 0.87rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.66);
}

.footer-trust-list strong {
  color: rgba(255,255,255,0.9);
  font-weight: 600;
}

.footer-trust-list a {
  color: var(--brick-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 760px) {
  .footer-trust-list { grid-template-columns: 1fr; }
}

/* ========================================
   Промо-блок планировщика на главной
   Фон всегда тёмный, поэтому SVG внутри рисуется светлыми цветами
   и не требует отдельных правил под тёмную тему.
   ======================================== */

.promo-planner {
  padding: 3rem 0;
  background: var(--beige);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.promo-planner-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 2.5rem;
  align-items: center;
  padding: 2rem 2.25rem;
  color: #F4F6F8;
  background: linear-gradient(135deg, var(--hero-from), var(--hero-mid) 55%, var(--hero-to));
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 24px var(--shadow);
}

.promo-planner-badge {
  display: inline-block;
  margin-bottom: 0.9rem;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--brick);
  border-radius: 999px;
}

.promo-planner-text h2 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1.15;
  color: #fff;
}

.promo-planner-lead {
  margin: 0 0 1.1rem;
  font-size: 1.03rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.82);
}

.promo-planner-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.promo-planner-list li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.94rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.78);
}
.promo-planner-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--brick-light);
  font-weight: 700;
}

.promo-planner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
}
.promo-planner-more {
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.35);
}
.promo-planner-more:hover { color: #fff; border-bottom-color: #fff; }

.promo-planner-art svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  background: rgba(0,0,0,0.22);
}

.promo-planner-figures {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin-top: 0.9rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}
.promo-planner-figures b {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
}

@media (max-width: 860px) {
  .promo-planner { padding: 2rem 0; }
  .promo-planner-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
    padding: 1.5rem;
  }
  /* Картинка уходит под текст: на узком экране сначала суть, потом иллюстрация. */
  .promo-planner-art { order: 2; }
}

@media (max-width: 480px) {
  .promo-planner-inner { padding: 1.25rem; }
  .promo-planner-figures { font-size: 0.8rem; gap: 0.3rem 1rem; }
}

/* ==========================================================================
   Кросс-промо собственных проектов (partner-ads.php)
   Занимают рекламные места, пока нет AdSense. Помечены как реклама.
   ========================================================================== */

/* --- Общая пометка «реклама/наш проект» --- */
.partner-label,
.partner-banner-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- Карточка в сайдбаре (format: card) --- */
.partner-widget .partner-label { margin-bottom: 10px; }

.partner-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  background: var(--beige);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.partner-card:hover {
  border-color: var(--brick);
  box-shadow: 0 4px 14px var(--shadow);
  transform: translateY(-2px);
}
.partner-card-icon {
  flex: 0 0 auto;
  font-size: 1.6rem;
  line-height: 1;
}
.partner-card-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.partner-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--heading);
  line-height: 1.2;
}
.partner-card-desc {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.45;
}
.partner-card-cta {
  margin-top: 2px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brick);
}

/* --- Горизонтальный баннер (format: banner) --- */
.partner-banner {
  margin: 2rem 0;
  padding: 4px 0 0;
}
.partner-banner-label { margin: 0 0 8px 2px; }
.partner-banner-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--beige);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brick);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.partner-banner-link:hover {
  background: var(--beige-dark);
  box-shadow: 0 4px 16px var(--shadow);
}
.partner-banner-icon {
  flex: 0 0 auto;
  font-size: 2rem;
  line-height: 1;
}
.partner-banner-text { flex: 1 1 auto; min-width: 0; }
.partner-banner-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--heading);
  line-height: 1.2;
}
.partner-banner-desc {
  display: block;
  margin-top: 3px;
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.45;
}
.partner-banner-cta {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 9px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--on-dark);
  background: var(--brick);
  border-radius: var(--radius);
  transition: background var(--transition);
}
.partner-banner-link:hover .partner-banner-cta { background: var(--brick-dark); }

@media (max-width: 600px) {
  .partner-banner-link { flex-wrap: wrap; gap: 12px; padding: 16px; }
  .partner-banner-cta { width: 100%; text-align: center; }
}

/* ==========================================================================
   Cookie-уведомление (includes/cookie-consent.php)
   Информационный баннер 152-ФЗ, скрипты не блокирует.
   ========================================================================== */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 1000;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 18px;
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 26px var(--shadow-md);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-text {
  flex: 1 1 300px;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-light);
}
.cookie-banner-text a { color: var(--brick); font-weight: 600; }
.cookie-banner-actions { flex: 0 0 auto; }
.cookie-banner-btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 24px;
  color: var(--on-dark);
  background: var(--brick);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
}
.cookie-banner-btn:hover { background: var(--brick-dark); }
.cookie-banner-btn:focus-visible { outline: 2px solid var(--brick); outline-offset: 2px; }

@media (max-width: 520px) {
  .cookie-banner { flex-direction: column; align-items: stretch; gap: 12px; }
  .cookie-banner-btn { width: 100%; }
}

/* ==========================================================================
   Партнёрские блоки «Где купить» (affiliate.php) — Admitad и др.
   ========================================================================== */
.aff-block { margin: 2rem 0; }
.aff-label {
  display: inline-block; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted); margin: 0 0 8px 2px;
}
.aff-item {
  display: flex; align-items: center; gap: 15px; padding: 16px 18px; margin-bottom: 8px;
  background: var(--white); border: 1px solid var(--border); border-left: 3px solid var(--brick);
  border-radius: var(--radius-lg); text-decoration: none; box-shadow: 0 1px 4px var(--shadow);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.aff-item:hover { border-color: var(--brick); box-shadow: 0 5px 18px var(--shadow); transform: translateY(-1px); }
.aff-icon { flex: 0 0 auto; font-size: 1.6rem; line-height: 1; }
.aff-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.aff-title { font-family: var(--font-display); font-size: 1.05rem; color: var(--heading); line-height: 1.2; }
.aff-desc { font-size: 0.85rem; color: var(--text-light); line-height: 1.4; }
.aff-cta {
  flex: 0 0 auto; white-space: nowrap; padding: 8px 14px; font-size: 0.88rem; font-weight: 600;
  color: var(--on-dark); background: var(--brick); border-radius: var(--radius);
  transition: background var(--transition);
}
.aff-item:hover .aff-cta { background: var(--brick-dark); }
@media (max-width: 600px) { .aff-item { flex-wrap: wrap; gap: 10px; } .aff-cta { width: 100%; text-align: center; } }

/* Полка рекомендованных товаров (deeplink) — affiliate.php */
.shelf { margin: 2rem 0; padding: 16px 18px; background: var(--white); border: 1px solid var(--border); border-left: 3px solid var(--brick); border-radius: var(--radius-lg); box-shadow: 0 1px 4px var(--shadow); }
.shelf-label { display: block; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.shelf-title { font-family: var(--font-display); font-size: 1.1rem; color: var(--heading); margin: 6px 0 12px; }
.shelf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.shelf-item { display: flex; align-items: center; gap: 10px; padding: 11px 13px; background: var(--beige); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--heading); font-weight: 600; font-size: 0.92rem; transition: border-color var(--transition), background var(--transition), transform var(--transition); }
.shelf-item:hover { border-color: var(--brick); background: var(--beige-dark); transform: translateY(-1px); }
.shelf-ic { font-size: 1.3rem; flex: 0 0 auto; line-height: 1; }
.shelf-name { flex: 1 1 auto; min-width: 0; }
.shelf-go { color: var(--brick); font-weight: 700; flex: 0 0 auto; }

/* ── Партнёрский баннер в сайдбаре (Профи.ру 300×250) ───────────────────── */
.aff-banner-widget { text-align: center; }
.aff-banner-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted, #999);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.aff-banner { display: inline-block; line-height: 0; }
.aff-banner img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

/* =====================================================================
   РЕДИЗАЙН 2026-09 · крупнее / шире / визуальнее (наложение поверх базы)
   ===================================================================== */

/* --- Статья: крупнее текст, комфортная мера чтения, больше воздуха --- */
.article-body { font-size: 1.15rem; line-height: 1.82; padding: 44px 52px; }
.article-body > p,
.article-body > ul,
.article-body > ol { max-width: 74ch; }
.article-body h2 { font-size: 1.8rem; margin: 46px 0 16px; }
.article-body h3 { font-size: 1.3rem; margin-top: 28px; }
.article-lead-figure img { max-height: min(60vh, 500px); }
@media (max-width: 640px) {
  .article-body { padding: 26px 20px; font-size: 1.08rem; }
}

/* --- Слайдер новых статей на главной (вместо текстового вступления) --- */
.hero-slider { position: relative; overflow: hidden; background: #0d0b08;
  --slideH: clamp(330px, 42vw, 520px); }
.hero-slider-track { display: flex; transition: transform .55s cubic-bezier(.4,0,.2,1); }
.hero-slide { position: relative; flex: 0 0 100%; height: var(--slideH);
  display: block; text-decoration: none; overflow: hidden; }
.hero-slide-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-slide-shade { position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(12,9,6,.9) 0%, rgba(12,9,6,.62) 44%, rgba(12,9,6,.12) 100%); }
.hero-slide .container { position: relative; height: 100%; display: flex; align-items: center; }
.hero-slide-cap { max-width: 600px; color: #fff; }
.hero-slide-badge { display: inline-block; background: var(--brick); color: #fff;
  font-size: .72rem; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  padding: 5px 13px; border-radius: 999px; margin-bottom: 14px; }
.hero-slide-cap h2 { font-family: var(--font-display); color: #fff;
  font-size: clamp(1.6rem, 3.2vw, 2.7rem); line-height: 1.14; margin: 0 0 12px;
  text-shadow: 0 2px 18px rgba(0,0,0,.5); }
.hero-slide-cap p { color: #e9dfd2; font-size: 1.05rem; line-height: 1.5; margin: 0 0 18px; max-width: 46ch; }
.hero-slide-cta { display: inline-block; background: var(--brick); color: #fff;
  font-weight: 700; padding: 12px 22px; border-radius: 10px; font-size: .95rem; transition: background .18s; }
.hero-slide:hover .hero-slide-cta { background: var(--brick-dark); }
.hero-slider-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(0,0,0,.35);
  color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; transition: background .18s; }
.hero-slider-nav:hover { background: var(--brick); }
.hero-slider-nav.prev { left: 20px; } .hero-slider-nav.next { right: 20px; }
.hero-slider-dots { position: absolute; left: 50%; transform: translateX(-50%); bottom: 16px;
  z-index: 4; display: flex; gap: 9px; }
.hero-slider-dots button { width: 32px; height: 5px; border-radius: 99px; border: 0;
  background: rgba(255,255,255,.45); cursor: pointer; padding: 0; transition: .2s; }
.hero-slider-dots button[aria-current="true"] { background: var(--brick-light); width: 44px; }
@media (max-width: 640px) {
  .hero-slide-cap p { display: none; }
  .hero-slider-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slider-track { transition: none; }
}

/* Визуально скрытый, но доступный скринридерам (SEO h1 над слайдером) */
.visually-hidden { position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0; }

/* --- Статья «дожатая»: одна широкая колонка без сайдбара --- */
.main-layout--solo { display: block; max-width: 880px; margin: 0 auto; padding: 44px 0 64px; }
.main-layout--solo .article-body > p,
.main-layout--solo .article-body > ul,
.main-layout--solo .article-body > ol { max-width: none; }
.article-aside-inline { max-width: 880px; margin: 28px auto 0; }
.article-aside-inline .sidebar-widget,
.article-aside-inline aside { margin: 0; }
@media (max-width: 920px) { .main-layout--solo { max-width: 100%; } }

/* --- FAQ как аккордеон (собирается JS из h2 «Частые вопросы» + h3/p) --- */
.article-body details.faq-item { border-bottom: 1px solid var(--border); }
.article-body details.faq-item:first-of-type { border-top: 1px solid var(--border); }
.article-body details.faq-item > summary {
  list-style: none; cursor: pointer; font-family: var(--font-display);
  font-size: 1.22rem; color: var(--heading); padding: 16px 0;
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.article-body details.faq-item > summary::-webkit-details-marker { display: none; }
.article-body details.faq-item > summary::after { content: "+"; color: var(--brick); font-weight: 700; font-size: 1.4rem; line-height: 1; }
.article-body details.faq-item[open] > summary::after { content: "\2013"; }
.article-body details.faq-item > summary:hover { color: var(--brick-dark); }
.article-body details.faq-item > *:not(summary) { margin-bottom: 14px; }

/* =====================================================================
   РЕДИЗАЙН 2026-09 · украшенные рекламные блоки (наложение поверх базы)
   ===================================================================== */

/* Основной блок «Где купить» в статье — тёплая рамка-витрина */
.aff-block {
  background: var(--beige);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  margin: 2.6rem 0;
  box-shadow: 0 4px 18px var(--shadow);
}
.aff-label {
  display: flex; align-items: center; gap: 8px;
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted); margin: 0 0 14px;
}
.aff-label::before { content: "🛒"; font-size: 1.05rem; }
.aff-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 1px solid var(--border);      /* убираем толстую кирпичную полосу — теперь карточка */
  border-radius: 13px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: none;
}
.aff-item:last-child { margin-bottom: 0; }
.aff-item:hover {
  border-color: var(--brick);
  box-shadow: 0 10px 26px var(--shadow-md);
  transform: translateY(-2px);
}
.aff-icon {
  width: 46px; height: 46px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: var(--beige-dark);
  background: color-mix(in srgb, var(--brick) 12%, var(--white));
  border-radius: 12px; font-size: 1.5rem;
}
.aff-title { font-size: 1.1rem; }
.aff-cta {
  border-radius: 999px; padding: 9px 18px;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--brick) 35%, transparent);
}
.aff-item:hover .aff-cta { transform: translateX(2px); }

/* Полка рекомендованных товаров — та же рамка-витрина */
.shelf {
  border: 1px solid var(--border);
  border-left: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 4px 18px var(--shadow);
}
.shelf-label { display: flex; align-items: center; gap: 8px; }
.shelf-label::before { content: "🛒"; font-size: 1.05rem; }
.shelf-item { border-radius: 12px; padding: 12px 14px; }
.shelf-item:hover { box-shadow: 0 6px 18px var(--shadow); transform: translateY(-2px); }

/* Контекстный баннер и кросс-промо, перенесённые в поток статьи */
.article-aside-inline .partner-banner-link,
.article-aside-inline .partner-card {
  border-radius: 14px;
  box-shadow: 0 4px 16px var(--shadow);
}
.article-aside-inline .partner-banner-link:hover,
.article-aside-inline .partner-card:hover {
  box-shadow: 0 10px 26px var(--shadow-md);
  transform: translateY(-2px);
}

/* Перенесённые в поток баннер + кросс-промо: аккуратный центрированный ряд */
.article-aside-inline { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center;
  align-items: stretch; max-width: 880px; margin: 32px auto 0; }
.article-aside-inline > * { flex: 1 1 320px; max-width: 420px; margin: 0; }
.article-aside-inline .aff-banner-widget { display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* =====================================================================
   Плавающий виджет (фидбек + поддержать), снизу справа. На всех страницах.
   z-index кнопки умеренный (900) — не перекрывает cookie-баннер (9999) и
   рекламу; модалка выше всего (10001).
   ===================================================================== */
.fab { position: fixed; right: 20px; bottom: 20px; z-index: 900;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.fab-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  opacity: 0; transform: translateY(10px) scale(.96); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease; }
.fab.open .fab-actions { opacity: 1; transform: none; pointer-events: auto; }
.fab-action { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap;
  text-decoration: none; cursor: pointer; border: 1px solid var(--border);
  background: var(--white); color: var(--heading); font-weight: 600; font-size: .92rem;
  padding: 11px 16px; border-radius: 999px; box-shadow: 0 6px 20px var(--shadow-md);
  transition: transform .15s ease, border-color .15s ease; }
.fab-action:hover { transform: translateY(-2px); border-color: var(--brick); }
.fab-action .ic { font-size: 1.1rem; line-height: 1; }
.fab-toggle { width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--brick), var(--brick-dark)); color: #fff;
  font-size: 1.5rem; line-height: 1; box-shadow: 0 8px 24px rgba(192,57,43,.42);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s ease; align-self: flex-end; }
.fab-toggle:hover { transform: scale(1.06); }
.fab.open .fab-toggle { transform: rotate(45deg); }
@media (max-width: 600px) { .fab { right: 14px; bottom: 14px; } .fab-toggle { width: 52px; height: 52px; } }
@media (prefers-reduced-motion: reduce) { .fab-actions, .fab-toggle { transition: none; } }

/* Модалка фидбека */
.fb-modal { position: fixed; inset: 0; z-index: 10001; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(15,10,6,.55); backdrop-filter: blur(2px); }
.fb-modal.open { display: flex; }
.fb-dialog { background: var(--white); color: var(--text); width: 100%; max-width: 460px;
  border-radius: var(--radius-lg); box-shadow: 0 24px 60px rgba(0,0,0,.4);
  padding: 24px; position: relative; }
.fb-dialog h2 { font-family: var(--font-display); color: var(--heading); font-size: 1.4rem; margin: 0 0 6px; }
.fb-dialog p.fb-sub { color: var(--text-light); font-size: .92rem; margin: 0 0 16px; }
.fb-close { position: absolute; top: 12px; right: 14px; border: 0; background: transparent;
  font-size: 1.6rem; line-height: 1; color: var(--text-muted); cursor: pointer; }
.fb-field { display: block; margin-bottom: 12px; }
.fb-field label { display: block; font-size: .85rem; font-weight: 600; color: var(--heading); margin-bottom: 5px; }
.fb-field textarea, .fb-field input[type="email"] {
  width: 100%; box-sizing: border-box; font: inherit; color: var(--text);
  background: var(--beige); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 12px; resize: vertical; }
.fb-field textarea { min-height: 110px; }
.fb-field textarea:focus, .fb-field input:focus { outline: 2px solid var(--brick); border-color: var(--brick); }
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fb-submit { width: 100%; border: 0; border-radius: var(--radius); cursor: pointer;
  background: var(--brick); color: #fff; font-weight: 700; font-size: 1rem; padding: 12px;
  transition: background .18s ease; }
.fb-submit:hover { background: var(--brick-dark); }
.fb-submit:disabled { opacity: .6; cursor: default; }
.fb-status { margin-top: 12px; font-size: .92rem; min-height: 1.2em; }
.fb-status.ok { color: var(--ok, #3f7d4e); }
.fb-status.err { color: var(--brick); }
.fb-hint { font-size: .8rem; color: var(--text-muted); margin-top: 10px; }

/* ── Блок «Встроить калькулятор» (calc.php) ── */
.calc-embed-cta {
  margin: 32px 0;
  padding: 22px;
  background: var(--beige);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.calc-embed-cta .section-title { margin-top: 0; }
.embed-code {
  width: 100%;
  box-sizing: border-box;
  margin: 12px 0;
  padding: 12px 14px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  resize: vertical;
}

/* ── Лендинг виджетов (vidzhety.php) ── */
.widget-card { display: flex; flex-direction: column; }
.widget-actions { display: flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 12px; }
.widget-actions .btn { flex: 0 0 auto; }
.widget-preview { color: var(--text-light); text-decoration: none; font-size: .9rem; font-weight: 600; }
.widget-preview:hover { color: var(--brick); text-decoration: underline; }
.widget-code-wrap { margin-top: 12px; }
.widget-steps { margin: 0 0 12px; padding-left: 22px; }
.widget-steps li { margin-bottom: 6px; }
.widget-how { margin-bottom: 10px; }
/* Промо-плашка «встроить» на /calculators/ */
.embed-promo {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  margin: 0 0 24px; padding: 16px 20px;
  background: var(--beige); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.embed-promo p { margin: 0; flex: 1 1 260px; }
/* Кнопка на светлой беж-полоске: .btn-outline по умолчанию белая (для тёмного героя)
   и на беже невидима — переопределяем в брендовый кирпичный контур (виден и в тёмной теме). */
.embed-promo .btn-outline { color: var(--brick); border-color: var(--brick); }
.embed-promo .btn-outline:hover { background: var(--brick); color: var(--on-dark); border-color: var(--brick); }

/* ── Рекламные слоты (AdSense, includes/ads.php) ── */
.ad-slot { margin: 28px 0; text-align: center; overflow: hidden; clear: both; min-height: 100px; }
/* Если AdSense не отдал рекламу (unfilled) — не держим пустой резерв места */
.ad-slot:has(ins[data-ad-status="unfilled"]) { min-height: 0; margin: 0; }
.ad-slot--empty { display: none; }
.ad-slot ins { display: block; }
.sidebar .ad-slot { margin: 0 0 20px; }
/* Плейсхолдер — только в режиме предпросмотра расстановки (DOMEXPERT_ADS_PREVIEW) */
.ad-slot--preview {
  min-height: 90px; display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, var(--beige), var(--beige) 12px, var(--beige-dark) 12px, var(--beige-dark) 24px);
  border: 1px dashed var(--brick); border-radius: var(--radius);
  color: var(--brick); font-size: .82rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}

/* ── Собственное промо (self-promo.php): «Рекомендуем» своё, sticky ── */
.selfpromo {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--beige);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brick);
  border-radius: var(--radius-lg);
  padding: 16px 18px; margin: 0 0 22px;
}
.selfpromo--sticky { position: sticky; top: 88px; }
.selfpromo-badge {
  font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brick);
}
.selfpromo-icon { font-size: 1.7rem; line-height: 1; }
.selfpromo-title { font-weight: 700; font-size: 1.05rem; color: var(--heading); }
.selfpromo-desc { font-size: .9rem; line-height: 1.45; color: var(--text-light); }
.selfpromo-cta {
  margin-top: 6px; font-weight: 700; color: var(--brick); text-decoration: none; align-self: flex-start;
}
.selfpromo-cta:hover { text-decoration: underline; }

/* ── «Термины из статьи» (обратная перелинковка в словарь) ── */
.article-terms { margin: 32px 0; padding: 20px 22px; background: var(--beige); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.article-terms .section-title { margin-top: 0; }
.article-terms-note { margin: 0 0 12px; color: var(--text-light); font-size: .95rem; }
.article-terms-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.article-term-chip {
  display: inline-block; padding: 7px 14px; font-size: .95rem; font-weight: 600;
  color: var(--brick); background: var(--white); border: 1px solid var(--border);
  border-radius: 999px; text-decoration: none; transition: background var(--transition), color var(--transition);
}
.article-term-chip:hover { background: var(--brick); color: var(--on-dark); }
