/* =====================================================================
   STYLE.CSS v3.0 (final)
   Цвета, шрифт и размеры подставляются через CSS custom properties.
   ===================================================================== */

:root {
  --bg: #050505;
  --accent: #ff9d00;
  --accent-text: #ffffff;
  --secondary: #0d0f14;
  --text: #f4f4f5;
  --muted: #9a9ca8;
  --login: #121212;
  --login-text: #ffffff;
  --link: #ff9d00;
  /* Служебные цвета зависят от светлоты палитры (вычисляются в build.py).
     На тёмных темах это полупрозрачный белый, на светлых — полупрозрачный чёрный. */
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --card: rgba(255, 255, 255, 0.04);
  --card-hover: rgba(255, 255, 255, 0.08);
  --btn-secondary-bg: rgba(255, 255, 255, 0.07);
  --btn-secondary-bg-hover: rgba(255, 255, 255, 0.14);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --rating-bg: rgba(255, 255, 255, 0.08);
  --footer-overlay: rgba(0, 0, 0, 0.25);
  --max: 1200px;
  --prose-max: 880px;
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 64px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-base: 17px;
  --font-h1: 50px;
  --font-h2: 30px;
  --font-h3: 22px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-family);
  background: var(--bg); color: var(--text);
  font-size: var(--font-base); line-height: 1.65;
  overflow-x: hidden; min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: opacity 0.15s; }
a:hover { opacity: 0.85; }
button { font-family: inherit; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ====================== HEADER ====================== */
/* Нижняя полоса шапки (с CTA-кнопками) — по умолчанию скрыта на десктопе.
   Показывается только в мобильном @media (max-width: 960px). */
.header-bottom-bar { display: none; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  /* Фон привязан к цветовой палитре — в светлых темах будет светлым,
     в тёмных — тёмным. Меню, кнопки и лого остаются читаемыми. */
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  min-height: var(--header-h);
  /* Лёгкая тень чтобы шапка визуально отделялась от контента */
  box-shadow: 0 1px 0 var(--border), 0 4px 16px rgba(0,0,0,0.08);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 12px 20px;
  max-width: var(--max); margin: 0 auto;
  min-height: var(--header-h);
}

/* ====================== LOGO ====================== */
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 19px; font-weight: 800; color: var(--text);
  letter-spacing: -0.02em; white-space: nowrap; flex-shrink: 0;
  text-decoration: none;
  max-width: 220px;
}
.logo-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}
/* ЛОГОТИП-КАРТИНКА — работает с любыми пропорциями:
   - Высота фиксирована
   - Ширина вычисляется автоматически по intrinsic aspect-ratio
   - max-width ограничивает очень широкие логотипы (обрезается через object-fit)
   - Особый случай: SVG с preserveAspectRatio="none" игнорирует intrinsic ratio.
     Для таких SVG используем flex-shrink: 0 + явный aspect-ratio через data-атрибут.
     Если это невозможно, оборачиваем картинку в inline-block с фиксированным размером. */
.logo-img-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  height: 40px;
  max-width: 180px;
  flex-shrink: 0;
  overflow: hidden;
}
.logo-img-wrap img,
.logo-img-wrap svg {
  display: block;
  height: 100%;       /* высота = высота обёртки */
  width: auto;        /* ширина авто — пересчитывается пропорционально */
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}
/* Fallback — если используется старая структура без .logo-img-wrap */
.logo > img.logo-img {
  display: block;
  height: 40px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

/* ====================== MAIN NAV (desktop) ====================== */
.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; list-style: none; }
.main-nav > li { position: relative; }
.main-nav a,
.main-nav .nav-label {
  color: var(--text); font-weight: 500; font-size: 15px;
  padding: 10px 16px; border-radius: 8px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  transition: background 0.15s;
  background: none; border: none;
  text-decoration: none;
}
.main-nav a:hover,
.main-nav .nav-label:hover { background: var(--card); opacity: 1; }
.main-nav a.active,
.main-nav .nav-label.active { color: var(--accent); background: var(--card); }
.nav-chev {
  display: inline-block; width: 7px; height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); margin-left: 3px; margin-top: -3px;
  transition: transform 0.2s;
}
.has-dropdown:hover .nav-chev { transform: rotate(225deg); margin-top: 2px; }

/* ====================== DROPDOWN ====================== */
.nav-dropdown {
  position: absolute; top: 100%; left: 0;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 6px;
  min-width: 230px; margin-top: 4px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  opacity: 0; visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s, visibility 0.18s, transform 0.18s;
  list-style: none; z-index: 101;
}
.has-dropdown:hover .nav-dropdown,
.has-dropdown:focus-within .nav-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-dropdown a {
  display: block; padding: 11px 14px; font-size: 14px;
  border-radius: 7px;
}
.nav-dropdown a:hover { background: var(--card-hover); opacity: 1; }
.nav-dropdown a.active { color: var(--accent); }

/* ====================== HEADER ACTIONS (кнопки) ====================== */
.header-actions {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.btn-login {
  background: var(--login); color: var(--login-text);
  padding: 12px 22px; border-radius: 9px;
  font-weight: 700; font-size: 14px;
  white-space: nowrap; border: none; cursor: pointer;
  text-decoration: none; display: inline-block;
  transition: transform 0.15s, filter 0.15s;
}
.btn-login:hover { transform: translateY(-1px); filter: brightness(1.1); opacity: 1; }
.header-cta {
  background: var(--accent); color: var(--accent-text);
  padding: 12px 24px; border-radius: 9px;
  font-weight: 700; font-size: 14px;
  white-space: nowrap;
  text-decoration: none; display: inline-block;
  transition: transform 0.15s, box-shadow 0.15s;
}
.header-cta:hover {
  transform: translateY(-1px); opacity: 1;
  filter: brightness(1.08);
}

/* ====================== BURGER ====================== */
.burger {
  display: none; background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; padding: 0; position: relative;
  flex-shrink: 0;
}
.burger span {
  position: absolute; left: 9px; right: 9px; height: 2px;
  background: var(--text); border-radius: 2px; transition: all 0.25s;
}
.burger span:nth-child(1) { top: 14px; }
.burger span:nth-child(2) { top: 19px; }
.burger span:nth-child(3) { top: 24px; }

/* ====================== MOBILE OVERLAY ====================== */
.nav-overlay {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 78%; max-width: 340px; min-width: 260px;
  background: var(--bg);
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 40px rgba(0,0,0,0.5);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  visibility: hidden;
}
.nav-overlay.is-open { transform: translateX(0); visibility: visible; }
.nav-overlay-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 199; opacity: 0; visibility: hidden;
  transition: opacity 0.28s, visibility 0.28s;
}
.nav-overlay-backdrop.is-open { opacity: 1; visibility: visible; }

.nav-overlay-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  min-height: 60px;
}
.nav-overlay-head .logo { font-size: 17px; max-width: 200px; }
.nav-close {
  width: 38px; height: 38px; background: none; border: none;
  color: var(--text); cursor: pointer; font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background 0.15s;
  flex-shrink: 0;
}
.nav-close:hover { background: var(--card); }

/* ====================== MOBILE NAV LIST ====================== */
.nav-overlay-list { list-style: none; padding: 10px; }
.nav-overlay-list > li { margin-bottom: 2px; }

/* Все ссылки в мобайл-меню подчёркнуты */
.nav-overlay-list a {
  display: block;
  color: var(--text); font-weight: 500; font-size: 16px;
  padding: 13px 14px; border-radius: 8px; cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  background: none; border: none; width: 100%;
}
.nav-overlay-list a:hover { background: var(--card); opacity: 1; }
.nav-overlay-list a.active { color: var(--accent); background: var(--card); }

/* Родитель с дропдауном */
.has-dropdown-m > .nav-parent-row {
  display: flex; align-items: stretch; gap: 0;
}
.has-dropdown-m > .nav-parent-row > a {
  flex: 1;
  padding-right: 8px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.nav-parent-toggle {
  background: none; border: none; cursor: pointer;
  padding: 0 14px; color: var(--text);
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  transition: background 0.15s;
}
.nav-parent-toggle:hover { background: var(--card); }

.nav-submenu {
  list-style: none; padding: 0 0 4px 14px;
  max-height: 0; overflow: hidden;
  transition: max-height 0.25s ease;
}
.has-dropdown-m.is-open .nav-submenu { max-height: 400px; }
.nav-submenu a {
  font-size: 14px; padding: 11px 14px; color: var(--muted);
  text-decoration: underline; text-underline-offset: 4px;
}
.nav-submenu a:hover { color: var(--text); }
.nav-submenu a.active { color: var(--accent); }

.nav-chev-m {
  display: inline-block; width: 8px; height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); transition: transform 0.2s;
}
.has-dropdown-m.is-open .nav-chev-m { transform: rotate(225deg); }

/* ====================== BREADCRUMBS ====================== */
nav.breadcrumbs {
  padding-top: 14px; padding-bottom: 14px;
  font-size: 13px; color: var(--muted);
}
/* На десктопе — разделяющая линия под breadcrumbs.
   На мобайле её нет (убирается в медиа-запросе) чтобы визуально
   не прижимало хлебные крошки к H1. */
@media (min-width: 961px) {
  nav.breadcrumbs { border-bottom: 1px solid var(--border); }
}
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs li { display: flex; align-items: center; gap: 6px; }
.breadcrumbs li:not(:last-child)::after { content: '/'; color: var(--muted); opacity: 0.5; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs li:last-child { color: var(--text); }

/* ====================== HERO ====================== */
.hero { padding: 52px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 44px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--border);
  padding: 6px 14px; border-radius: 99px;
  font-size: 13px; color: var(--muted); margin-bottom: 18px;
}
.hero-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.hero h1 {
  font-size: var(--font-h1);
  line-height: 1.12; font-weight: 800;
  letter-spacing: -0.02em; margin-bottom: 16px;
}
@media (max-width: 768px) {
  .hero h1 { font-size: clamp(26px, 7vw, 36px); }
}

.hero-subtitle {
  font-size: clamp(15px, 1.7vw, 18px); color: var(--muted);
  margin-bottom: 26px; max-width: 560px;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }

.hero-image-mobile { display: none; }

/* ====================== КНОПКИ ====================== */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-text);
  padding: 14px 30px; border-radius: 10px;
  font-weight: 700; font-size: 15.5px;
  border: none; cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, filter 0.15s;
}
.btn-primary:hover { transform: translateY(-2px); opacity: 1; filter: brightness(1.08); }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--btn-secondary-bg);
  color: var(--text);
  padding: 14px 30px; border-radius: 10px;
  font-weight: 600; font-size: 15.5px;
  border: 1px solid var(--border-strong);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.btn-secondary:hover {
  background: var(--btn-secondary-bg-hover);
  border-color: rgba(255,255,255,0.2);
  opacity: 1;
}

.cta-inline-wrap { text-align: center; margin: 28px 0; }
.btn-inline { padding: 14px 32px; font-size: 16px; }

/* ====================== HERO SCORE ====================== */
.hero-score {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border);
  padding: 10px 16px; border-radius: 10px;
}
.hero-score-val { font-size: 28px; font-weight: 800; color: var(--accent); line-height: 1; }
.hero-score-label { font-size: 11px; color: var(--muted); line-height: 1.3; }
.hero-score-label strong { color: var(--text); font-size: 12px; display: block; }

.hero-image {
  position: relative; width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, var(--secondary), var(--bg));
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.hero-image img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}

/* ====================== PAGE TITLE ====================== */
section.page-title { padding-top: 36px; padding-bottom: 16px; }
.page-title h1 {
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.18; font-weight: 800;
  letter-spacing: -0.02em; margin-bottom: 10px;
  max-width: var(--prose-max); margin-left: auto; margin-right: auto;
}
.page-title .hero-subtitle {
  max-width: var(--prose-max); margin: 0 auto;
}

/* ====================== SECTIONS ====================== */
.section { padding: 44px 0; }
.section-head { margin-bottom: 24px; }
.section-head h2 {
  font-size: var(--font-h2); font-weight: 800;
  letter-spacing: -0.01em; margin-bottom: 6px;
}
.section-head p { color: var(--muted); font-size: 15px; }

/* ====================== FACTS ====================== */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.fact-card {
  background: var(--card); border: 1px solid var(--border);
  padding: 15px 18px; border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.fact-card:hover { background: var(--card-hover); }
.fact-label { font-size: 11px; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.05em; margin-bottom: 6px; }
.fact-value { font-size: 16px; font-weight: 700; color: var(--text); line-height: 1.3; }

/* ====================== RATINGS ====================== */
.ratings-wrap {
  background: var(--card); border: 1px solid var(--border);
  padding: 26px; border-radius: var(--radius);
}
.ratings-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 22px;
}
.ratings-score { display: flex; align-items: baseline; gap: 10px; }
.ratings-score-big { font-size: 48px; font-weight: 800; color: var(--accent); line-height: 1; }
.ratings-score-label { color: var(--muted); font-size: 13px; }

.rating-row { margin-bottom: 14px; }
.rating-row:last-child { margin-bottom: 0; }
.rating-row-head {
  display: flex; justify-content: space-between; gap: 12px;
  margin-bottom: 6px; font-size: 13px;
}
.rating-row-head strong { color: var(--accent); font-weight: 700; }
.rating-bar { width: 100%; height: 5px; background: var(--rating-bg); border-radius: 99px; overflow: hidden; }
.rating-bar-fill { height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.8s ease; }

.ratings-toggle {
  display: none;
  margin-top: 16px; width: 100%;
  padding: 11px; background: transparent; color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 8px;
  cursor: pointer; font-size: 14px; font-weight: 600;
}
.ratings-toggle:hover { background: var(--card-hover); }
.ratings-toggle-arrow { display: inline-block; margin-left: 6px; transition: transform 0.25s; }
.ratings-wrap.is-expanded .ratings-toggle-arrow { transform: rotate(180deg); }

/* ====================== CONTENT PROSE ====================== */
.section-prose { padding: 36px 0 44px; }
.content-prose {
  max-width: var(--prose-max);
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.8;
  overflow-wrap: break-word;
  word-break: break-word;
}
.content-prose p {
  margin-bottom: 20px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
}
.content-prose h2 {
  font-size: var(--font-h2);
  font-weight: 800;
  margin: 40px 0 16px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.content-prose h2:first-child { margin-top: 0; }
.content-prose h3 {
  font-size: var(--font-h3);
  font-weight: 700;
  margin: 28px 0 12px;
  line-height: 1.3;
}
.content-prose ul, .content-prose ol {
  margin: 0 0 20px 4px;
  padding-left: 22px;
}
.content-prose li {
  margin-bottom: 8px;
  line-height: 1.7;
  font-size: 17px;
  padding-left: 4px;
}
.content-prose ul li::marker { color: var(--accent); }
.content-prose a {
  color: var(--link);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}
.content-prose a:hover { opacity: 0.8; }

.content-prose img,
.content-prose .content-img img {
  display: block; max-width: 100%; height: auto;
  border-radius: var(--radius-sm);
}
.content-prose figure,
.content-prose .content-img {
  margin: 24px auto; max-width: 100%; text-align: center;
}
.content-prose figcaption {
  font-size: 13px; color: var(--muted);
  margin-top: 8px; text-align: center;
  line-height: 1.5;
}
.content-prose iframe,
.content-prose video,
.content-prose embed {
  max-width: 100%; display: block;
  margin: 24px auto; border-radius: var(--radius-sm);
}
.content-prose pre,
.content-prose code {
  max-width: 100%; overflow-x: auto;
  white-space: pre-wrap; word-wrap: break-word;
}

/* ====================== ТАБЛИЦЫ ====================== */
.content-prose table {
  width: 100%; border-collapse: collapse; margin: 24px 0;
  font-size: 15px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); overflow: hidden;
}
.content-prose th, .content-prose td {
  padding: 12px 14px; text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top; line-height: 1.55;
}
.content-prose th {
  background: var(--card-hover); font-weight: 700; color: var(--text);
  font-size: 14px; text-transform: uppercase; letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border-strong);
}
.content-prose td { color: var(--text); }
.content-prose th:not(:last-child),
.content-prose td:not(:last-child) {
  border-right: 1px solid var(--border);
}
.content-prose tbody tr:nth-child(odd) { background: rgba(255,255,255,0.015); }
.content-prose tbody tr:hover { background: var(--card-hover); }
.content-prose tbody tr:last-child td { border-bottom: none; }

.content-prose a.btn-primary,
.content-prose a.btn-secondary,
.content-prose a.btn-inline {
  color: var(--accent-text); font-weight: 700; text-decoration: none;
}
.content-prose a.btn-secondary,
.content-prose a.btn-secondary.btn-inline {
  color: var(--text);
}

/* ====================== FAQ ====================== */
.section-faq { padding: 44px 0; }
.section-faq .section-head,
.section-faq .faq-list {
  max-width: var(--prose-max);
  margin-left: auto; margin-right: auto;
}
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
  transition: background 0.15s;
}
.faq-item:hover { background: var(--card-hover); }
.faq-question {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 20px; cursor: pointer;
  font-weight: 600; font-size: 15px; user-select: none;
  background: none; border: none; color: var(--text);
  width: 100%; text-align: left;
}
.faq-question::after {
  content: '+'; font-size: 22px; color: var(--accent);
  font-weight: 300; transition: transform 0.25s; flex-shrink: 0;
}
.faq-item.is-open .faq-question::after { transform: rotate(45deg); }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 20px;
}
.faq-item.is-open .faq-answer { max-height: 600px; padding: 0 20px 18px; }
.faq-answer p { color: var(--muted); line-height: 1.65; font-size: 14.5px; }

/* ====================== CTA BLOCK ====================== */
.cta-block {
  background: linear-gradient(135deg, var(--secondary), var(--card-hover));
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 44px 32px;
  text-align: center; margin: 32px auto;
  max-width: var(--prose-max);
}
.cta-block h2 { font-size: clamp(22px, 2.8vw, 28px); font-weight: 800; margin-bottom: 10px; letter-spacing: -0.01em; }
.cta-block p { color: var(--muted); margin-bottom: 22px; max-width: 560px; margin-left: auto; margin-right: auto; font-size: 15px; }

/* ====================== FOOTER ====================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 44px 0 22px; margin-top: 50px;
  background: var(--footer-overlay);
}
/* Адаптивная сетка футера — зависит от количества колонок (правка 3) */
.footer-grid {
  display: grid;
  gap: 36px; margin-bottom: 32px;
}
.footer-grid.cols-1 { grid-template-columns: 1fr; }           /* только about */
.footer-grid.cols-2 { grid-template-columns: 1.5fr 1fr; }     /* about + навигация */
.footer-grid.cols-3 { grid-template-columns: 1.5fr 1fr 1fr; } /* about + нав + инфо */

.footer-about p { color: var(--muted); font-size: 14px; line-height: 1.65; max-width: 380px; margin-top: 10px; }
.footer-logo { display: inline-flex !important; /* показывается всегда, в т.ч. мобайле */ }
.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--text); font-size: 14px; }
.footer-col a:hover { color: var(--accent); opacity: 1; }

.footer-bottom {
  padding-top: 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted);
}
.footer-disclaimer { display: flex; align-items: center; gap: 10px; }
.age-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: var(--accent-text);
  font-size: 10px; font-weight: 800;
}

/* ====================== 404 ====================== */
.page-404 {
  min-height: calc(100vh - var(--header-h) - 200px);
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 60px 20px;
}
.page-404-inner {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 48px 36px;
  max-width: 520px; width: 100%;
}
.page-404 .err-code {
  font-size: clamp(56px, 12vw, 112px); font-weight: 800;
  color: var(--accent); line-height: 1; margin-bottom: 12px;
  letter-spacing: -0.03em;
}
.page-404 h1 { font-size: clamp(22px, 3vw, 28px); font-weight: 800; margin-bottom: 12px; }
.page-404 p { color: var(--muted); font-size: 16px; margin-bottom: 24px; }


/* =====================================================================
   RESPONSIVE — мобильная вёрстка
   ===================================================================== */
@media (max-width: 960px) {
  /* ===== МОБИЛЬНАЯ ШАПКА ===== 
     Двухслойная структура:
     Слой 1 (.header-inner): лого слева + бургер справа (кнопки CTA скрыты)
     Слой 2 (.header-bottom-bar): 2 крупные кнопки CTA на всю ширину

     НЕТ flex-wrap — жёсткое разделение через display, чтобы избежать
     непредсказуемого поведения в Safari и других браузерах. */

  :root { --header-h: auto; }
  .site-header { min-height: 0; }

  /* Верхний слой — лого слева, бургер справа. Компактный в высоту. */
  .header-inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    gap: 10px;
    min-height: 48px;
  }

  .main-nav { display: none; }

  /* В верхнем слое прячем CTA-кнопки — они переехали в нижний слой */
  .header-inner .header-actions { display: none; }

  /* Логотип занимает доступное место до бургера */
  .logo {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 18px;
    max-width: calc(100% - 60px);
    gap: 10px;
  }
  .logo-img-wrap { height: 34px; max-width: 150px; }
  .logo > img.logo-img { height: 34px; max-width: 150px; }

  /* Бургер справа — компактнее, чтобы верхняя полоса шапки не была слишком высокой */
  .burger {
    display: block;
    flex: 0 0 42px;
    width: 42px; height: 42px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
  }
  .burger span {
    left: 11px; right: 11px; height: 2px;
  }
  .burger span:nth-child(1) { top: 14px; }
  .burger span:nth-child(2) { top: 20px; }
  .burger span:nth-child(3) { top: 26px; }

  /* Нижний слой — 2 кнопки на всю ширину, минимум 30% каждой (правка 2) */
  .header-bottom-bar {
    display: grid;
    grid-template-columns: minmax(30%, 1fr) minmax(30%, 1fr);
    gap: 8px;
    padding: 8px 14px 12px;
    background: inherit;
  }
  .header-bottom-bar .btn-login,
  .header-bottom-bar .header-cta {
    width: 100%;
    text-align: center;
    padding: 14px 10px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 10px;
    white-space: normal;
    line-height: 1.25;
    min-height: 48px;
    max-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* Автоматически уменьшаемый шрифт длинных кнопок (через JS) */
  .header-bottom-bar .btn-login.btn-compact,
  .header-bottom-bar .header-cta.btn-compact {
    font-size: 14px;
    line-height: 1.2;
    padding: 10px 8px;
  }
  .header-bottom-bar .btn-login.btn-xcompact,
  .header-bottom-bar .header-cta.btn-xcompact {
    font-size: 12.5px;
    line-height: 1.15;
    padding: 8px 6px;
  }

  /* ===== HERO МОБАЙЛ ===== */
  .hero { padding: 28px 0 14px; }
  .hero-grid { grid-template-columns: 1fr; gap: 12px; }
  .hero-image { display: none; }
  .hero-image-mobile { display: block; margin: 8px 0 12px; }
  .hero-image-mobile .hero-image {
    display: block;
    aspect-ratio: 16 / 9;
    margin: 0 auto;
    max-height: 180px;
  }
  .hero h1 { font-size: clamp(22px, 6vw, 28px); margin-bottom: 8px; }
  .hero-subtitle { margin-bottom: 12px; font-size: 14px; }
  .hero-badge { margin-bottom: 12px; padding: 4px 10px; font-size: 12px; }
  .hero-ctas {
    flex-direction: row; gap: 8px; margin-bottom: 12px;
  }
  .hero-ctas .btn-primary, .hero-ctas .btn-secondary {
    flex: 1;
    padding: 12px 14px; font-size: 14px;
  }
  .hero-score { padding: 8px 12px; }
  .hero-score-val { font-size: 22px; }
  .hero-score-label { font-size: 10px; }
  .hero-score-label strong { font-size: 11px; }

  /* Правка 1: разумное расстояние между breadcrumbs и H1 (на мобайле) */
  nav.breadcrumbs { padding-top: 14px; padding-bottom: 18px; border-bottom: none; }
  /* Для страниц БЕЗ hero: воздух над H1 */
  section.page-title { padding-top: 6px; padding-bottom: 8px; }
  .page-title h1 { margin-top: 6px; margin-bottom: 0; }
  /* Меньше воздуха между H1 и текстом */
  .section-prose { padding-top: 14px; }

  .facts-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .fact-card { padding: 12px 14px; }

  /* ===== МОБИЛЬНЫЙ ФУТЕР =====
     На мобайле игнорируем сетку cols-1/2/3 десктопа — все блоки идут
     в одну колонку друг под другом: лого → текст про обзор → навигация → информация */
  .footer-grid,
  .footer-grid.cols-1,
  .footer-grid.cols-2,
  .footer-grid.cols-3 {
    grid-template-columns: 1fr !important;
    gap: 22px;
  }
  .footer-about p { max-width: none; }
  .ratings-wrap { padding: 18px; }
  .section { padding: 32px 0; }
  .cta-block { padding: 28px 18px; }

  .content-prose { font-size: 16px; line-height: 1.75; }
  .content-prose p, .content-prose li { font-size: 16px; }
  .content-prose h2 { margin: 32px 0 14px; }
  .content-prose h3 { margin: 24px 0 10px; }

  .content-prose table {
    display: block; max-width: 100%; overflow-x: auto;
    -webkit-overflow-scrolling: touch; white-space: nowrap; font-size: 14px;
  }
  .content-prose th, .content-prose td { padding: 10px 12px; }

  .ratings-toggle { display: block; }
  .ratings-wrap .rating-row { display: none; }
  .ratings-wrap.is-expanded .rating-row { display: block; }
}

/* НА ДЕСКТОПЕ .header-bottom-bar скрыт — это правило продублировано
   в начале файла (рядом с базовыми) чтобы гарантированно переопределиться
   только в мобильном @media. */

@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .header-inner { padding: 9px 11px 11px; gap: 8px; }
  .logo { font-size: 16px; }
  .logo-img-wrap { height: 36px; max-width: 140px; }
  .logo > img.logo-img { height: 36px; max-width: 140px; }
  .logo-dot { width: 7px; height: 7px; }
  /* Бургер немного уменьшаем, но всё ещё крупный */
  .burger { width: 44px; height: 44px; }
  .burger span { left: 11px; right: 11px; }
  .burger span:nth-child(1) { top: 15px; }
  .burger span:nth-child(2) { top: 22px; }
  .burger span:nth-child(3) { top: 29px; }
  /* Кнопки остаются крупными, шрифт чуть-чуть меньше для узких экранов */
  .btn-login, .header-cta {
    padding: 13px 10px;
    font-size: 15px;
    min-height: 46px;
  }

  .facts-grid { grid-template-columns: 1fr; }
  .ratings-score-big { font-size: 38px; }
  .page-title h1 { font-size: clamp(20px, 6vw, 28px); }
  .section-head h2 { font-size: 20px; }
  .ratings-wrap { padding: 14px; }
  .cta-block { padding: 22px 14px; }
  .faq-question { padding: 14px 16px; font-size: 14px; }
  .faq-item.is-open .faq-answer { padding: 0 16px 14px; }
  .page-404-inner { padding: 32px 20px; }

  .content-prose { font-size: 15.5px; line-height: 1.72; }
  .content-prose p, .content-prose li { font-size: 15.5px; }
  .content-prose h2 { font-size: 20px; margin-top: 28px; }
  .content-prose h3 { font-size: 17px; margin-top: 20px; }

  .hero-image-mobile .hero-image { max-height: 150px; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn-primary, .hero-ctas .btn-secondary { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
