@import url("https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;0,900;1,400&family=Source+Sans+3:wght@400;500;600&display=swap");

/* ===========================================
   Academic Serif — Classic Library Theme
   Generated from teal-warm base
   =========================================== */

/* --- Переменные (легко менять тему) --- */
:root {
  --primary: #10b981;
  --primary-light: #34d399;
  --primary-dark: #047857;
  --bg: #f0fdf4;
  --bg-card: #ffffff;
  --bg-surface: #dcfce7;
  --text: #14532d;
  --text-muted: #6b7280;
  --text-secondary: #166534;
  --accent: #059669;
  --border: transparent;
  --gold: #059669;
  --font-heading: "Source Sans 3", "Segoe UI", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --max-width: 1100px;
  --radius: 24px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.08);
}

/* --- Сброс --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--primary-dark);
}
img {
  max-width: 100%;
  height: auto;
}

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

/* ===========================================
   ПРОГРЕСС-БАР ЧТЕНИЯ
   =========================================== */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 1000;
  transition: width 0.15s;
}

/* ===========================================
   ШАПКА
   =========================================== */
.site-header {
  background: rgba(250, 250, 249, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(28, 25, 23, 0.04);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  max-width: 240px;
  flex-shrink: 0;
}
.logo span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}
.logo-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* --- Sidebar Search --- */
.sidebar-search {
  margin-bottom: 16px;
}
.sidebar-search-box {
  position: relative;
}
.sidebar-search-box input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.88rem;
  font-family: var(--font-body);
  background: #fff;
  color: var(--text);
  outline: none;
  transition: all 0.2s;
}
.sidebar-search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 45, 18, 0.08);
}
.sidebar-search-box input::placeholder {
  color: #a8a29e;
}
.sidebar-search-box .search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 200;
  margin-top: 4px;
}
.sidebar-search-box .sd-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
  border-bottom: 1px solid #f5ede0;
  font-size: 0.84rem;
}
.sidebar-search-box .sd-item:last-child {
  border-bottom: none;
}
.sidebar-search-box .sd-item:hover,
.sidebar-search-box .sd-item.sd-active {
  background: #fdf8f1;
}
.sidebar-search-box .sd-item:hover .sd-title {
  color: var(--primary);
}
.sidebar-search-box .sd-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #fdf8f1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.sidebar-search-box .sd-title {
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-search-box .sd-empty {
  padding: 14px;
  text-align: center;
  color: #a8a29e;
  font-size: 0.84rem;
}

.main-nav {
  display: flex;
  gap: 4px;
}
.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--primary);
  background: var(--bg-surface);
}
.nav-link.active {
  color: var(--primary);
  background: #fdf8f1;
  font-weight: 600;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1.4rem;
  padding: 4px 10px;
  cursor: pointer;
  color: var(--text);
}

/* ===========================================
   ХЛЕБНЫЕ КРОШКИ
   =========================================== */
.breadcrumbs {
  padding: 14px 0;
  font-size: 0.84rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.breadcrumbs a {
  color: var(--primary);
  font-weight: 500;
}
.breadcrumbs a:hover {
  text-decoration: underline;
}
.breadcrumb-sep {
  margin: 0 6px;
  opacity: 0.4;
}
.breadcrumb-current {
  color: var(--text-secondary);
}

/* ===========================================
   ОСНОВНОЙ КОНТЕНТ — 2 КОЛОНКИ
   =========================================== */
.site-main {
  padding: 32px 0 60px;
  min-height: 60vh;
}

.article-layout {
  display: flex;
  flex-direction: row-reverse;
  gap: 40px;
  align-items: start;
}
.article-main {
  width: calc(100% - 320px);
}
.article-sidebar {
  width: 280px;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .article-layout {
    flex-direction: column;
  }
  .article-main {
    width: 100%;
  }
  .article-sidebar {
    width: 100%;
  }
}

/* --- Карточка статьи --- */
.article-main {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 40px 44px 48px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

/* --- Заголовок + share --- */
.article-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.article-main h1 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

/* Подпись "Проверено: ..." */
.article-updated {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* --- Контент --- */
.article-body h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 40px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
  letter-spacing: -0.01em;
  position: relative;
}

.article-body h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 12px;
  padding-left: 14px;
  border-left: 3px solid var(--primary-light);
}

.article-body p {
  margin-bottom: 1em;
  color: var(--text-secondary);
}
.article-body ul,
.article-body ol {
  margin: 0 0 1em 0;
}
.article-body li {
  margin-bottom: 0.5em;
  color: var(--text-secondary);
}

/* ===========================================
   ВИЗУАЛЬНОЕ РАЗНООБРАЗИЕ КОНТЕНТА
   =========================================== */

/* Lead paragraph — первый абзац крупнее */
.article-body > p:first-of-type {
  font-size: 1.08em;
  color: var(--text);
  line-height: 1.8;
}

/* Drop Cap — большая первая буква */
.article-body > p:first-of-type::first-letter {
  font-size: 3em;
  font-weight: 800;
  float: left;
  line-height: 0.85;
  margin-right: 8px;
  margin-top: 6px;
  color: var(--primary);
}

/* Первый абзац после H2 */
.article-body h2 + p {
  font-size: 1.02em;
  color: var(--text-secondary);
}

/* Выделение ключевых слов — мягкий акцент */
.article-body strong {
  color: var(--text);
  font-weight: 700;
}

/* Акцентное выделение */
.article-body em {
  font-style: italic;
  color: var(--text-secondary);
}

/* Маркер критически важной информации */
.article-body mark {
  background: linear-gradient(120deg, #fef08a 0%, #1d4ed8 100%);
  padding: 2px 6px;
  border-radius: 3px;
  color: #92400e;
  font-weight: 500;
}

/* Красивые ordered-list с кастомным счётчиком */
.article-body ol {
  list-style: none;
  counter-reset: step-counter;
  padding-left: 0;
  margin-left: 0;
}
.article-body ol > li {
  counter-increment: step-counter;
  padding-left: 42px;
  position: relative;
  margin-bottom: 12px;
}
.article-body ol > li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 2px;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(124, 45, 18, 0.25);
}

/* Unordered list — ромбические маркеры */
.article-body ul {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}
.article-body ul > li {
  padding-left: 24px;
  position: relative;
}
.article-body ul > li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--primary-light);
  border-radius: 2px;
  transform: rotate(45deg);
  opacity: 0.5;
}

/* Цитаты — элегантная полоска с янтарным акцентом */
.article-body blockquote {
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  margin: 24px 0;
  padding: 18px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-secondary);
  font-style: italic;
  font-size: 0.97em;
  line-height: 1.7;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.article-body blockquote::before {
  content: "\201C";
  position: absolute;
  top: -4px;
  left: 12px;
  font-size: 2.8em;
  color: var(--accent);
  opacity: 0.2;
  font-family: Georgia, serif;
}

/* Ключевой вывод */
.key-point {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid #bfdbfe;
  border-left: 4px solid #2563eb;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.95em;
}
.key-point strong {
  background: none;
}
.key-point::before {
  content: "📌 Ключевой момент";
  display: block;
  font-weight: 700;
  color: #2563eb;
  font-size: 0.85em;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Inline code */
.article-body code {
  background: #f1f5f9;
  color: #1d4ed8;
  padding: 2px 8px;
  border-radius: 5px;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 0.86em;
  border: 1px solid #e2e8f0;
}

/* Блок кода — тёмный терминал */
.article-body pre {
  background: #292524;
  color: #e7e0d5;
  padding: 20px 24px;
  border-radius: var(--radius);
  margin: 24px 0;
  overflow-x: auto;
  position: relative;
  border: 1px solid #292524;
  box-shadow: var(--shadow-md);
}
.article-body pre code {
  background: none;
  color: inherit;
  padding: 0;
  border: none;
  font-size: 0.88em;
  line-height: 1.6;
}
.article-body pre::before {
  content: "📋";
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 0.8rem;
  opacity: 0.3;
  cursor: pointer;
  transition: opacity 0.2s;
}
.article-body pre:hover::before {
  opacity: 0.7;
}

/* ===========================================
   ТАБЛИЦЫ — Premium
   =========================================== */
.article-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.article-body th,
.article-body td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.article-body th {
  background: linear-gradient(135deg, #292524, #292524);
  color: #fdf8f1;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.article-body tr:last-child td {
  border-bottom: none;
}
.article-body tr:nth-child(even) td {
  background: #fdf8f1;
}
.article-body tr:hover td {
  background: #fdf8f1;
  transition: background 0.2s;
}

/* ===========================================
   БОКОВАЯ ПАНЕЛЬ (sidebar)
   =========================================== */
.article-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Поиск в sidebar */
.sidebar-search {
  margin-bottom: 4px;
}
.sidebar-search-box {
  position: relative;
}
.sidebar-search-box input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  font-size: 0.88rem;
  font-family: var(--font-body);
  color: var(--text);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.sidebar-search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 45, 18, 0.12);
}
.search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 360px;
  overflow-y: auto;
  z-index: 999;
}
.sd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
  border-bottom: 1px solid var(--border);
}
.sd-item:last-child {
  border-bottom: none;
}
.sd-item:hover,
.sd-item.sd-active {
  background: rgba(124, 45, 18, 0.06);
}
.sd-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}
.sd-info {
  min-width: 0;
}
.sd-title {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.3;
}
.sd-slug {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.sd-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Содержание в sidebar */
.sidebar-toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.sidebar-toc h3 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}
.sidebar-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-toc li {
  margin-bottom: 6px;
}
.sidebar-toc a {
  font-size: 0.84rem;
  color: var(--text-secondary);
  text-decoration: none;
  line-height: 1.4;
  display: block;
  padding: 4px 0;
  transition: color 0.2s;
}
.sidebar-toc a:hover {
  color: var(--primary);
}

/* Похожие статьи в sidebar */
.sidebar-related {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.sidebar-related h3 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}
.sidebar-related ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-related li {
  margin-bottom: 6px;
}
.sidebar-related a.related-card {
  display: block;
  font-size: 0.84rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 6px;
  line-height: 1.35;
  transition: all 0.2s;
}
.sidebar-related a.related-card:hover {
  background: rgba(124, 45, 18, 0.06);
  color: var(--primary);
}

/* ===========================================
   МОБИЛЬНОЕ СОДЕРЖАНИЕ (mobile-toc)
   =========================================== */
.mobile-toc {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
}
.mobile-toc summary {
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.mobile-toc summary:hover {
  background: rgba(124, 45, 18, 0.04);
}
.mobile-toc ul {
  list-style: none;
  padding: 0 16px 12px;
  margin: 0;
}
.mobile-toc li {
  margin-bottom: 4px;
}
.mobile-toc a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  display: block;
  padding: 4px 0;
}
.mobile-toc a:hover {
  color: var(--primary);
}

/* На десктопе скрываем mobile-toc (показываем sidebar-toc) */
@media (min-width: 769px) {
  .mobile-toc {
    display: none;
  }
}

/* На мобиле скрываем sidebar */
@media (max-width: 768px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    display: none;
  }
  .article-main {
    padding: 20px 16px 24px;
  }
}

/* ============================================
   ATTENTION-BOX (контент из AI-генерации)
   ============================================ */

/* Общий контейнер */
.attention-box {
  border-radius: 12px;
  padding: 20px 24px;
  margin: 28px 0;
  line-height: 1.6;
  box-shadow: var(--shadow-sm);
}

/* Info-вариант — опросы, чеклисты */
.attention-box.attention-info {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid #bfdbfe;
  padding: 16px 20px;
}
.attention-box.attention-info > div > strong {
  display: block;
  color: #2563eb;
  font-size: 0.95em;
  margin-bottom: 8px;
}
/* Pill-кнопки */
.attention-box.attention-info ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none !important;
  padding: 0 !important;
  margin: 4px 0 0 !important;
}
.attention-box.attention-info ul li {
  background: #fff;
  border: 1.5px solid #bfdbfe;
  border-radius: 8px;
  padding: 6px 16px !important;
  font-size: 0.88em;
  font-weight: 500;
  color: #1e293b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.attention-box.attention-info ul li:hover {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
/* Убираем дефолтные буллиты внутри attention-box */
.attention-box ul > li::before {
  display: none !important;
}
.attention-box ul > li {
  padding-left: 0;
  position: static;
}
.attention-box strong {
  background: none !important;
}

/* Warning-вариант */
.attention-box.attention-warning {
  background: linear-gradient(135deg, #eff6ff, #bfdbfe);
  border: 1px solid #1d4ed8;
  border-left: 4px solid var(--accent);
}

/* Tip-вариант — подсказки */
.attention-box.attention-tip {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid #bfdbfe;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.attention-box.attention-tip .attention-icon {
  font-size: 1.5em;
  flex-shrink: 0;
  line-height: 1;
}
.attention-box.attention-tip p {
  margin: 0;
  color: var(--text-secondary);
}

/* Danger-вариант */
.attention-box.attention-danger {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 1px solid #fecaca;
  border-left: 4px solid #ef4444;
}

/* ===========================================
   FAQ — Premium interactive
   =========================================== */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  background: var(--bg-card);
  overflow: hidden;
  transition: all 0.25s ease;
}
.faq-item:hover {
  border-color: #d4cabb;
  box-shadow: 0 2px 8px rgba(124, 45, 18, 0.08);
}
.faq-item summary {
  padding: 16px 44px 16px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  color: var(--text);
  transition: color 0.2s;
}
.faq-item summary:hover {
  color: var(--primary);
}
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--primary);
  font-weight: 300;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fdf8f1;
  transition: all 0.25s;
}
.faq-item[open] summary::after {
  content: "−";
  background: var(--primary);
  color: #fff;
}
.faq-item[open] {
  border-color: var(--primary-light);
  box-shadow: 0 2px 12px rgba(124, 45, 18, 0.1);
}
.faq-item .faq-answer {
  padding: 0 20px 16px;
}
.faq-item .faq-answer p {
  color: var(--text-secondary);
}

/* FAQ — general details */
.article-body details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  background: var(--bg-card);
  overflow: hidden;
  transition: all 0.25s ease;
}
.article-body details:hover {
  border-color: #d4cabb;
}
.article-body summary {
  padding: 16px 44px 16px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  color: var(--text);
  transition: color 0.2s;
}
.article-body summary:hover {
  color: var(--primary);
}
.article-body summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--primary);
  font-weight: 300;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fdf8f1;
  transition: all 0.25s;
}
.article-body details[open] summary::after {
  content: "−";
  background: var(--primary);
  color: #fff;
}
.article-body details[open] {
  border-color: var(--primary-light);
  box-shadow: 0 2px 12px rgba(124, 45, 18, 0.1);
}
.article-body details > p {
  padding: 0 20px 16px;
  color: var(--text-secondary);
}

/* Mobile TOC — only visible on mobile */
.mobile-toc {
  margin-bottom: 24px;
  display: none;
}
.mobile-toc details {
  background: linear-gradient(135deg, #fdf8f1, #f5ede0);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.mobile-toc summary {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  padding: 14px 18px;
}
.mobile-toc ul {
  padding: 0 18px 14px !important;
  margin: 0 !important;
  list-style: none !important;
}
.mobile-toc ul li {
  padding-left: 0 !important;
  margin-bottom: 4px;
}
.mobile-toc ul li::before {
  display: none !important;
}
.mobile-toc ul li a {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: all 0.2s;
}
.mobile-toc ul li a:hover {
  color: var(--primary);
  background: #fdf8f1;
}

/* ===========================================
   ВИДЖЕТЫ
   =========================================== */

/* Опрос */
.poll-block {
  background: linear-gradient(135deg, #fdf8f1, #f5ede0);
  border: 1px solid #d4cabb;
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}
.poll-block h4 {
  color: var(--primary);
  margin-bottom: 14px;
}
.poll-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.poll-btn {
  background: #fff;
  border: 2px solid #d4cabb;
  border-radius: var(--radius);
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.95em;
  transition: all 0.25s;
}
.poll-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-1px);
}
.poll-btn.voted {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.poll-result p {
  color: var(--accent);
  font-weight: 600;
  margin-top: 10px;
}

/* Чеклист */
.checklist-block {
  background: linear-gradient(135deg, #fdf8f1, #f5ede0);
  border: 1px solid #d4cabb;
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}
.checklist-block h4 {
  color: var(--primary);
  margin-bottom: 12px;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
}
.check-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}
.check-progress {
  margin-top: 10px;
  font-size: 0.85em;
  color: var(--text-muted);
}

/* Спойлер */
.spoiler-block {
  background: #fdf8f1;
  border: 1px solid #d4cabb;
  border-radius: var(--radius);
  margin: 20px 0;
  overflow: hidden;
}
.spoiler-block summary {
  color: var(--primary-dark);
  padding: 14px 18px;
}
.spoiler-block p {
  padding: 0 18px 14px;
}

/* Совет */
.tip-block {
  background: linear-gradient(135deg, #fdf8f1, #e7e0d5);
  border: 1px solid #d4cabb;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.tip-icon {
  font-size: 1.5em;
  flex-shrink: 0;
}
.tip-block p {
  margin: 0;
}

/* ===========================================
   РЕЙТИНГ
   =========================================== */
.rating-block {
  text-align: center;
  padding: 24px;
  margin: 32px 0 20px;
  background: var(--bg-surface);
  border-radius: 12px;
}
.rating-block > p {
  color: var(--text-muted);
  margin-bottom: 10px;
}
.star {
  font-size: 2em;
  cursor: pointer;
  transition: transform 0.15s;
}
.star:hover {
  transform: scale(1.2);
}
.rating-thanks {
  color: var(--primary);
  font-weight: 600;
  margin-top: 8px;
}

/* ===========================================
   SHARE WIDGET
   =========================================== */
.share-widget {
  position: relative;
}
.share-trigger {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s;
}
.share-trigger:hover {
  background: var(--bg);
  border-color: var(--primary);
}

.share-popup {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  gap: 4px;
  z-index: 50;
  flex-direction: column;
}
.share-popup.visible {
  display: flex;
}

.share-link {
  display: block;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}
.share-link:hover {
  background: var(--bg-surface);
}

/* Шаринг внизу */
.share-bottom {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  margin-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}
.share-bottom-links {
  display: flex;
  gap: 8px;
}
.share-bottom-links a {
  padding: 6px 14px;
  border-radius: var(--radius);
  background: var(--bg-surface);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}
.share-bottom-links a:hover {
  background: var(--primary);
  color: #fff;
}

/* ===========================================
   САЙДБАР
   =========================================== */
.article-sidebar {
  position: sticky;
  top: 76px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d6d3d1 transparent;
}
.article-sidebar::-webkit-scrollbar {
  width: 4px;
}
.article-sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.article-sidebar::-webkit-scrollbar-thumb {
  background: #d6d3d1;
  border-radius: 4px;
}
.article-sidebar::-webkit-scrollbar-thumb:hover {
  background: #a8a29e;
}

.sidebar-toc,
.sidebar-related {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.sidebar-toc h3,
.sidebar-related h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-toc ul {
  list-style: none;
}
.sidebar-toc li {
  margin-bottom: 2px;
}
.sidebar-toc a {
  font-size: 0.83rem;
  color: var(--text-muted);
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s;
  border-left: 2px solid transparent;
  line-height: 1.4;
}
.sidebar-toc a:hover {
  color: var(--primary);
  background: #fdf8f1;
  border-left-color: var(--primary);
}
.sidebar-toc a.active {
  color: var(--primary);
  background: #fdf8f1;
  font-weight: 600;
  border-left-color: var(--primary);
}

.sidebar-related ul {
  list-style: none;
}
.sidebar-related li {
  margin-bottom: 8px;
}
.related-card {
  display: block;
  padding: 8px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  transition: all 0.2s;
}
.related-card:hover {
  background: var(--bg-surface);
  color: var(--primary);
}

/* ===========================================
   ПОХОЖИЕ СТАТЬИ — НИЖНИЙ БЛОК
   =========================================== */
.related-bottom {
  padding: 40px 0 48px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}
.related-bottom-heading {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
  text-align: center;
}
.related-bottom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.related-bottom-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.related-bottom-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.related-bottom-title {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--text);
}
.related-bottom-card:hover .related-bottom-title {
  color: var(--primary);
}
.related-bottom-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}

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

/* ===========================================
   ПОДВАЛ
   =========================================== */
.site-footer {
  margin-top: 60px;
  padding: 24px 0;
  background: #292524;
  color: #a8a29e;
  text-align: center;
  font-size: 0.85rem;
}
.site-footer a {
  color: #7c2d12;
}

/* ===========================================
   АДАПТИВНОСТЬ
   =========================================== */
@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .article-main {
    padding: 28px 24px 32px;
    border-radius: 0;
    box-shadow: none;
    border-left: none;
    border-right: none;
  }
  .article-sidebar {
    position: static;
    display: flex;
    gap: 16px;
  }
  .mobile-toc {
    display: block;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .mobile-menu-btn {
    display: block;
  }
  .logo {
    font-size: 1rem;
    max-width: 200px;
    gap: 6px;
  }
  .logo-icon {
    font-size: 1.2rem;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 20px;
    box-shadow: 0 4px 12px rgba(28, 25, 23, 0.06);
  }
  .main-nav.open {
    display: flex;
  }
  .nav-link {
    padding: 10px 0;
  }

  .article-main {
    padding: 20px 16px 24px;
  }
  .article-main h1 {
    font-size: 1.4rem;
  }
  .article-body h2 {
    font-size: 1.15rem;
  }

  .article-sidebar {
    grid-template-columns: 1fr;
  }
  .article-title-row {
    flex-direction: column;
  }

  .poll-opts {
    flex-direction: column;
  }

  .attention-box.attention-info ul {
    flex-direction: column;
  }
  .attention-box.attention-info ul li {
    white-space: normal;
  }
}

/* ===========================================
   FOOTER PREMIUM (moved from inline)
   =========================================== */
.site-footer-premium {
  margin-top: 60px;
  padding: 40px 0 0;
  background: #1e293b;
  color: #94a3b8;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #334155;
}
.footer-brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 12px;
}
.footer-about {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 8px;
}
.footer-updated {
  font-size: 0.8rem;
  color: #64748b;
}
.footer-col h4 {
  color: #f1f5f9;
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.footer-col ul {
  list-style: none;
}
.footer-col li {
  margin-bottom: 8px;
}
.footer-col a {
  color: #94a3b8;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-col a:hover {
  color: #60a5fa;
}
.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ===========================================
   COOKIE POPUP (moved from inline)
   =========================================== */
.cookie-popup {
  position: fixed;
  bottom: -100px;
  left: 0;
  right: 0;
  background: #1e293b;
  color: #fff;
  padding: 16px;
  transition: bottom 0.5s ease;
  z-index: 9999;
  border-top: 2px solid #2563eb;
}
.cookie-popup.visible {
  bottom: 0;
}
.cookie-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
}
.cookie-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.cookie-btn:hover {
  background: #1d4ed8;
}

@media (max-width: 640px) {
  .cookie-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ===========================================
   СТАТИЧЕСКИЕ СТРАНИЦЫ (About, Contact, Privacy)
   =========================================== */
.page-hero {
  background: linear-gradient(135deg, #292524 0%, #292524 100%);
  color: #fdf8f1;
  padding: 60px 0 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(
      circle at 30% 50%,
      rgba(124, 45, 18, 0.15) 0%,
      transparent 60%
    ),
    radial-gradient(
      circle at 70% 80%,
      rgba(217, 119, 6, 0.1) 0%,
      transparent 50%
    );
}
.page-hero .container {
  position: relative;
  z-index: 1;
}
.page-hero h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.page-hero h1 span {
  color: var(--primary-light);
}
.page-hero p {
  font-size: 1.1rem;
  color: #a8a29e;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}
.about-content,
.contact-content,
.privacy-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 20px 60px;
}
.about-block {
  margin-bottom: 48px;
}
.about-block h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.about-block h2 span {
  font-size: 1.4em;
}
.about-block p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1.02em;
}
.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 20px;
}
.value-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}
.value-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #d4cabb;
}
.value-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.value-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}
.team-section {
  margin-top: 48px;
}
.team-section h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.team-section h2 span {
  font-size: 1.4em;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 20px;
}
.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}
.team-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #d4cabb;
}
.member-avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, #fdf8f1, #e7e0d5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 4px 12px rgba(124, 45, 18, 0.1);
}
.team-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.team-card .role {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  background: #fdf8f1;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.team-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 24px 0;
}
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}
.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #d4cabb;
}
.contact-card .contact-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
  display: block;
}
.contact-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.contact-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}
.contact-card a {
  color: var(--primary);
  font-weight: 500;
}
.privacy-content h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin: 36px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}
.privacy-content p,
.privacy-content li {
  color: var(--text-secondary);
  line-height: 1.8;
}
.privacy-content ul {
  padding-left: 24px;
  margin: 12px 0;
}

@media (max-width: 768px) {
  .page-hero {
    padding: 40px 0 32px;
  }
  .page-hero h1 {
    font-size: 1.6rem;
  }
  .page-hero p {
    font-size: 0.95rem;
  }
  .values-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }
  .about-content,
  .contact-content,
  .privacy-content {
    padding: 32px 16px 40px;
  }
}

/* ===========================================
    ФУТЕР (Premium)
    =========================================== */
.site-footer-premium {
  margin-top: 60px;
  padding: 40px 0 0;
  background: #1e293b;
  color: #94a3b8;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #334155;
}
.footer-brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 12px;
}
.footer-about {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 8px;
}
.footer-updated {
  font-size: 0.8rem;
  color: #64748b;
}
.footer-col h4 {
  color: #f1f5f9;
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li {
  margin-bottom: 8px;
}
.footer-col a {
  color: #94a3b8;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-col a:hover {
  color: #60a5fa;
}
.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ===========================================
    СТРАНИЦА "О ПРОЕКТЕ"
    =========================================== */
.page-hero {
  background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #1e3a5f 100%);
  padding: 48px 0 40px;
  text-align: center;
  color: #f1f5f9;
}
.page-hero h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.page-hero h1 span {
  color: #60a5fa;
}
.page-hero p {
  font-size: 1.05rem;
  color: #94a3b8;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

.about-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.about-block {
  margin-bottom: 48px;
}
.about-block h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}
.about-block h2 span {
  margin-right: 8px;
}
.about-block p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1rem;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.value-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.25s;
}
.value-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
  transform: translateY(-2px);
}
.value-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.value-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===========================================
   КОМАНДА
   =========================================== */
.team-section {
  margin-bottom: 48px;
}
.team-section h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
}
.team-section h2 span {
  margin-right: 8px;
}

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

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
  transition: all 0.3s;
}
.team-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.1);
  transform: translateY(-3px);
}

.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 14px;
  border: 3px solid #fdf8f1;
  box-shadow: 0 2px 8px rgba(124, 45, 18, 0.15);
}

.team-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.team-card .role {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.team-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Trust block */
.trust-block {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===========================================
   ЧИТАЙТЕ ТАКЖЕ (related-bottom)
   =========================================== */
.related-bottom {
  margin-top: 48px;
  padding: 40px 0 48px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}
.related-bottom-heading {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}
.related-bottom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.related-bottom-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 16px;
  text-decoration: none;
  transition: all 0.25s;
}
.related-bottom-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.related-bottom-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-bottom-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 768px) {
  .related-bottom-grid {
    grid-template-columns: 1fr;
  }
  .related-bottom {
    padding: 24px 0 32px;
  }
  .related-bottom-heading {
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .values-grid {
    grid-template-columns: 1fr;
  }
  .page-hero h1 {
    font-size: 1.5rem;
  }
}
@media (max-width: 480px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

/* ===========================================
   MOBILE RESPONSIVE — Prevent horizontal overflow
   =========================================== */
html,
body {
  overflow-x: hidden;
  max-width: 100vw;
}

@media (max-width: 768px) {
  /* Header */
  .header-inner {
    flex-wrap: wrap;
  }
  .main-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 2px;
    padding-top: 8px;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 20px;
    box-shadow: 0 4px 12px rgba(28, 25, 23, 0.06);
  }
  .main-nav.open {
    display: flex;
  }
  .mobile-menu-btn {
    display: block;
  }
  .logo span:last-child {
    max-width: 200px;
  }

  /* Article layout: single column */
  .article-layout {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  /* Hide sidebar on mobile */
  .article-sidebar {
    display: none;
  }

  /* Article card: reduce padding */
  .article-main {
    padding: 20px 16px 24px;
    border-radius: 10px;
  }
  .article-main h1 {
    font-size: 1.35rem;
    margin-bottom: 16px;
  }

  /* Container padding */
  .container {
    padding: 0 12px;
  }
  .site-main {
    padding: 16px 0 32px;
  }

  /* Table: scrollable */
  .article-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  /* Code blocks: scroll horizontally */
  .article-body pre {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    padding: 14px;
    font-size: 0.82rem;
  }

  /* Blockquotes */
  .article-body blockquote {
    margin-left: 0;
    margin-right: 0;
    padding: 12px 14px;
  }

  /* Images */
  .article-body img {
    max-width: 100%;
    height: auto;
  }

  /* Headings */
  .article-body h2 {
    font-size: 1.15rem;
  }
  .article-body h3 {
    font-size: 1.05rem;
  }

  /* FAQ */
  .faq-item summary {
    font-size: 0.92rem;
    padding: 12px 14px;
  }
  .faq-answer {
    padding: 10px 14px;
  }

  /* Attention boxes */
  .attention-box {
    padding: 12px 14px;
  }

  /* Breadcrumbs */
  .breadcrumbs {
    font-size: 0.78rem;
    padding: 10px 0;
  }

  /* Related bottom */
  .related-bottom-grid {
    grid-template-columns: 1fr !important;
  }

  /* Mobile TOC */
  .mobile-toc {
    margin-bottom: 16px;
  }
  .mobile-toc details {
    padding: 10px;
  }
}

/* Extra small screens */
@media (max-width: 400px) {
  .article-main {
    padding: 14px 12px 20px;
  }
  .article-main h1 {
    font-size: 1.2rem;
  }
  .container {
    padding: 0 8px;
  }
}

/* Word-break for any long text (always active) */
.article-body {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}
.article-body a {
  word-break: break-all;
}

/* ============================================
   Cookie Consent Popup
   ============================================ */
.cookie-popup {
  position: fixed;
  bottom: -100px;
  left: 0;
  right: 0;
  background: var(--bg-card, #fff);
  color: var(--text, #333);
  padding: 16px;
  transition: bottom 0.5s ease;
  z-index: 9999;
  border-top: 2px solid var(--primary, #7c2d12);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}
.cookie-popup.visible {
  bottom: 0;
}
.cookie-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
}
.cookie-btn {
  background: var(--primary, #7c2d12);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: var(--radius, 8px);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.cookie-btn:hover {
  opacity: 0.85;
}
@media (max-width: 640px) {
  .cookie-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ===========================================
   Modern Blue Theme — Structural Overrides
   =========================================== */

:root {
  --font-heading: "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}
body {
  font-size: 16px;
  line-height: 1.75;
}
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  color: #2563eb;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.nav-link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.88rem;
}
.article-main {
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.article-main h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.85rem;
  line-height: 1.25;
}
.article-body h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  border-bottom: 2px solid #2563eb;
  font-size: 1.4rem;
}
.article-body h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  border-left: 3px solid #3b82f6;
  font-size: 1.1rem;
}
.article-body p {
  line-height: 1.75;
}
.article-body blockquote {
  font-family: var(--font-body);
  font-style: italic;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-left: 4px solid #2563eb;
}
.article-body code {
  background: #f1f5f9;
  color: #1d4ed8;
  border: 1px solid #e2e8f0;
}
.article-body pre {
  background: #1e293b;
  color: #e2e8f0;
}
.article-body table th {
  background: #1e293b;
  color: #f8fafc;
}
.article-body ol > li::before {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #ffffff;
}
.faq-item {
  border-color: #e2e8f0;
}
.faq-item[open] summary::after {
  background: #2563eb;
}
.key-point {
  border-left-color: #2563eb;
}

.hero-home {
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 30%, #f8fafc 100%);
}
.cat-card {
  border-color: #e2e8f0;
}
.cat-card:hover {
  border-color: #bfdbfe;
}
.article-home-card {
  border-color: #e2e8f0;
}
.recent-card {
  border-color: #e2e8f0;
}
.recent-cat {
  background: #eff6ff;
  color: #1d4ed8;
}
.featured-card {
  border-color: #e2e8f0;
  background: linear-gradient(135deg, #1e3a5f 0%, #1e293b 100%);
}
.page-hero {
  background: linear-gradient(135deg, #1e293b, #334155);
}
.team-card {
  border-color: #e2e8f0;
}

/* ============================================
   NEW UNIVERSAL WIDGETS (auto-injected)
   ============================================ */

/* attention-fact (📚 green callout) */
.attention-box.attention-fact {
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border: 1px solid #a7f3d0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.attention-box.attention-fact .attention-icon {
  font-size: 1.5em;
  flex-shrink: 0;
  line-height: 1;
}
.attention-box.attention-fact p {
  margin: 0;
  color: #065f46;
}

/* definition-box (📖 term definition) */
.definition-box {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--primary, #6b7280);
  background: var(--bg-surface, #f1f5f9);
  border-radius: 0 12px 12px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.definition-term {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text, #1f2937);
  margin-bottom: 6px;
}
.definition-text {
  font-size: 0.92rem;
  color: var(--text-secondary, #6b7280);
  line-height: 1.6;
}

/* tldr-box (📝 summary at top) */
.tldr-box {
  margin: 0 0 28px;
  padding: 18px 22px;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 0 12px 12px 0;
}
.tldr-header {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #92400e;
  margin-bottom: 8px;
}
.tldr-box p {
  margin: 0;
  font-size: 0.95rem;
  color: #78350f;
  line-height: 1.6;
}

/* brief-box (📋 key-value info card) */
.brief-box {
  margin: 24px 0;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  overflow: hidden;
}
.brief-header {
  padding: 12px 20px;
  background: var(--bg-surface, #f1f5f9);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text, #1f2937);
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.brief-box dl {
  margin: 0;
  padding: 0;
}
.brief-box dt {
  float: left;
  clear: left;
  width: 38%;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-muted, #9ca3af);
  border-bottom: 1px solid var(--border, #e5e7eb);
  box-sizing: border-box;
}
.brief-box dd {
  margin-left: 38%;
  padding: 10px 16px;
  font-size: 0.92rem;
  color: var(--text, #1f2937);
  border-bottom: 1px solid var(--border, #e5e7eb);
  border-left: 1px solid var(--border, #e5e7eb);
}
.brief-box dt:last-of-type,
.brief-box dd:last-of-type {
  border-bottom: none;
}

/* persona-box (👤 character card) */
.persona-box {
  display: flex;
  gap: 16px;
  margin: 24px 0;
  padding: 20px;
  background: var(--bg-surface, #f1f5f9);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
}
.persona-icon {
  font-size: 2.4rem;
  width: 56px;
  height: 56px;
  background: var(--bg-card, #fff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid var(--border, #e5e7eb);
}
.persona-body {
  flex: 1;
  min-width: 0;
}
.persona-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text, #1f2937);
  margin-bottom: 2px;
}
.persona-role {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--primary, #6b7280);
  margin-bottom: 8px;
}
.persona-body p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-secondary, #6b7280);
  line-height: 1.5;
}

/* poll (interactive vote - Pack A) */
.poll-widget {
  margin: 24px 0;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  overflow: hidden;
}
.poll-widget-question {
  padding: 14px 20px;
  background: var(--bg-surface, #f1f5f9);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text, #1f2937);
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.poll-widget-option {
  position: relative;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}
.poll-widget-option:last-child {
  border-bottom: none;
}
.poll-widget-option:hover {
  background: rgba(0, 0, 0, 0.02);
}
.poll-widget-label {
  font-size: 0.92rem;
  color: var(--text, #1f2937);
  flex: 1;
  position: relative;
  z-index: 1;
}
.poll-widget-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: rgba(0, 0, 0, 0.04);
  width: 0;
  transition: width 0.6s ease;
}
.poll-widget-pct {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary, #6b7280);
  min-width: 42px;
  text-align: right;
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s;
}
.poll-widget.voted .poll-widget-option {
  cursor: default;
  pointer-events: none;
}
.poll-widget.voted .poll-widget-pct {
  opacity: 1;
}
.poll-widget.voted .poll-widget-option.selected {
  background: rgba(0, 0, 0, 0.03);
}
.poll-widget.voted .poll-widget-option.selected .poll-widget-label {
  font-weight: 600;
}
.poll-widget.voted .poll-widget-option.selected .poll-widget-bar {
  background: rgba(0, 0, 0, 0.07);
}

/* --- Styles moved from HTML files --- */
.site-footer-premium {
  margin-top: 60px;
  padding: 40px 0 0;
  background: #1e293b;
  color: #94a3b8;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #334155;
}
.footer-brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 12px;
}
.footer-about {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 8px;
}
.footer-updated {
  font-size: 0.8rem;
  color: #64748b;
}
.footer-col h4 {
  color: #f1f5f9;
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.footer-col ul {
  list-style: none;
}
.footer-col li {
  margin-bottom: 8px;
}
.footer-col a {
  color: #94a3b8;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-col a:hover {
  color: #60a5fa;
}
.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
}
@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
.cookie-popup {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1e293b;
  color: #fff;
  padding: 16px;
  transition: transform 0.5s ease;
  z-index: 9999;
  border-top: 2px solid #2563eb;
  transform: translateY(100%);
}
.cookie-popup.visible {
  transform: translateY(0);
}
.cookie-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
}
.cookie-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.cookie-btn:hover {
  background: #1d4ed8;
}
@media (max-width: 640px) {
  .cookie-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* --- Dropdown styles --- */
.nav-dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s;
}
.dropdown-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}
.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  min-width: 240px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  padding: 8px 0;
  z-index: 1000;
}
.nav-dropdown::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 12px;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  display: block;
}
.dropdown-item {
  display: block;
  padding: 10px 20px;
  color: var(--text, #1f2937);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.15s;
  white-space: nowrap;
}
.dropdown-item:hover {
  background: rgba(37, 99, 235, 0.06);
  color: var(--primary, #2563eb);
}
@media (max-width: 768px) {
  .main-nav > .nav-link {
    display: block;
    padding: 10px 0;
  }
  .main-nav > a[href*="AvitoUnblock_bot"] {
    margin: 2px 0 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--primary, #2563eb);
    color: #fff;
    font-weight: 600;
    text-align: center;
  }
  .dropdown-toggle {
    display: none;
  }
  .dropdown-menu {
    display: block !important;
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    min-width: auto;
    max-height: none;
    padding: 0;
    background: transparent;
  }
  .dropdown-item {
    padding: 8px 0;
    font-size: 1rem;
  }
}

.tg-contact-block{ 
    display: grid;
  /* Создаем 2 равные колонки */
  grid-template-columns: 1fr 1fr;
  /* Создаем 3 строки (автоматическая высота по контенту или фиксированная) */
  grid-template-rows: auto auto auto; 
  gap: 10px;
}
.tg-contact-block .tg-topics{/* Говорим элементу занять место от 1-й до 4-й линии (то есть все 3 строки) */
  grid-row: 1 / 4;
  /* Принудительно отправляем его во вторую колонку */
  grid-column: 2; 
}
.tg-contact-block .tg-topics ul{
    padding-top: 15px ;
    list-style: none;
}
.tg-contact-block .tg-topics p{
    /* display: none; */
}
.tg-contact-block .tg-btn-arrow{
    display: none;
}
.tg-btn-icon{
    display: none;
}
.tg-contact-block h3, h4 {
    color:white;
}
/* ===========================================
   КНОПКА РАЗБЛОКИРОВКИ В ШАПКЕ НА МОБИЛЬНЫХ
   =========================================== */
.mobile-cta {
  display: none;
}
@media (max-width: 768px) {
  .header-inner {
    gap: 8px;
  }
  .logo {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mobile-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--primary, #2563eb);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.1;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  }
  .mobile-cta:hover,
  .mobile-cta:active {
    color: #fff;
    opacity: 0.92;
  }
}
@media (max-width: 400px) {
  .logo span:last-child {
    display: none;
  }
  .mobile-cta {
    font-size: 0.74rem;
    padding: 7px 10px;
  }
}
