/* ============ База: утилитарный минимализм + современные детали ============ */
:root {
  --brand: #0b5cad;
  --brand-dark: #08417a;
  --brand-soft: #eaf2fa;
  --ink: #1c2228;
  --ink-soft: #5a6570;
  --bg: #f6f7f8;
  --card: #ffffff;
  --line: #dfe4e8;
  --radius: 10px;
  --radius-lg: 14px;
  --wrap: 1080px;
  --header-h: 62px;
  --shadow-sm: 0 1px 2px rgba(28, 34, 40, 0.05), 0 1px 3px rgba(28, 34, 40, 0.07);
  --shadow-md: 0 2px 6px rgba(28, 34, 40, 0.06), 0 10px 28px rgba(28, 34, 40, 0.10);
  font-size: 16px;
  accent-color: var(--brand);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}
::selection {
  background: color-mix(in srgb, var(--brand) 22%, transparent);
}

h1, h2, h3 { line-height: 1.22; letter-spacing: -0.01em; }
h1 {
  font-size: clamp(1.35rem, 1.05rem + 1.3vw, 1.9rem);
  margin: 0.45em 0;
  text-wrap: balance;
}
h2 { font-size: clamp(1.08rem, 1rem + 0.5vw, 1.32rem); margin: 1.5em 0 0.5em; }
p { margin: 0.5em 0; }

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

/* ============ Темы портфеля ============ */
.theme-tire { --bg: #ffffff; } /* основная палитра — в блоке «ТЕМА TIRE» внизу */
.theme-pdd  { --brand: #0b5cad; --brand-dark: #08417a; --brand-soft: #eaf2fa; --bg: #f4f7fb; }
.theme-kids { --brand: #4e7d5b; --brand-dark: #3b6146; --brand-soft: #eef5ef; --bg: #f8f7f3; }

/* ============ Шапка (эффект стекла) ============ */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--card) 84%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line));
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: var(--card); }
}
.header-inner {
  display: flex; flex-wrap: wrap; gap: 10px;
  align-items: center; justify-content: space-between;
  min-height: var(--header-h);
  padding-top: 8px; padding-bottom: 8px;
}
.logo {
  font-weight: 700; font-size: 1.12rem; color: var(--brand);
  letter-spacing: -0.01em;
}
.logo:hover { color: var(--brand-dark); text-decoration: none; }

/* Поиск: pill-форма с градиентной кнопкой */
.search-form {
  display: flex; flex: 1 1 260px; max-width: 430px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-form:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent);
}
.search-form input {
  flex: 1; min-width: 0; padding: 8px 14px; font-size: 1rem;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--ink);
}
.search-form input:focus { outline: none; }
.search-form button {
  padding: 8px 18px; font-size: 0.95rem; cursor: pointer;
  border: 0; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.search-form button:hover { filter: brightness(1.08); }
.search-form button:active { transform: scale(0.97); }

/* ============ Хлебные крошки ============ */
.breadcrumbs {
  font-size: 0.85rem; color: var(--ink-soft);
  padding: 12px 0 2px; overflow-wrap: anywhere;
}
.breadcrumbs .sep { margin: 0 6px; color: var(--line); }
.breadcrumbs span[aria-current] { color: var(--ink); }

/* ============ Лид и контент ============ */
main { padding-bottom: 44px; }
.lead { font-size: 1.06rem; color: var(--ink-soft); max-width: 72ch; }
.seo-text { max-width: 76ch; }
.seo-text p { margin: 0.7em 0; }
.note {
  font-size: 0.9rem; color: var(--ink-soft);
  background: var(--brand-soft); border-left: 3px solid var(--brand);
  padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0;
}
.disclaimer {
  font-size: 0.88rem; color: #7a5b16;
  background: #fdf6e3; border: 1px solid #ecd9a0;
  border-radius: var(--radius); padding: 10px 14px; margin: 12px 0;
}
.source { font-size: 0.85rem; color: var(--ink-soft); margin-top: 26px; }

/* ============ Карточки категорий ============ */
.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px; margin: 20px 0;
}
.cat-card {
  display: block; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 16px 18px; color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.cat-card:hover,
.cat-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  color: var(--ink);
  text-decoration: none;
}
.cat-card h2 { margin: 0 0 5px; font-size: 1.06rem; color: var(--brand); }
.cat-card p { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }

/* ============ Таблицы данных ============ */
.data-table {
  width: 100%; margin: 18px 0; border-collapse: collapse;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  overflow: clip; /* сохраняет скругление, не ломает sticky-шапку */
  font-size: 0.95rem;
}
@supports not (overflow: clip) { .data-table { overflow: hidden; } }
.data-table th, .data-table td {
  padding: 11px 13px; text-align: left;
  border-bottom: 1px solid var(--line);
}
.data-table thead th {
  background: color-mix(in srgb, var(--brand-soft) 88%, transparent);
  color: var(--ink);
  font-weight: 600; white-space: nowrap;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.data-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--brand-soft) 35%, transparent);
}
.data-table tbody tr { transition: background 0.12s ease; }
.data-table tbody tr:hover { background: color-mix(in srgb, var(--brand-soft) 65%, transparent); }
.data-table tbody tr:last-child td { border-bottom: 0; }

/* Липкая шапка таблицы под шапкой сайта (только десктоп) */
@media (min-width: 641px) {
  .data-table thead th { position: sticky; top: calc(var(--header-h) + 6px); z-index: 5; }
}

/* ============ Миниатюры в таблицах (знаки ПДД) ============ */
.row-thumb-td { width: 56px; }
.th-thumb { width: 56px; }
.row-thumb {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.row-thumb img {
  width: 32px; height: 32px;
  display: block;
}
.row-thumb:hover {
  border-color: var(--brand);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ============ Рекламные слоты (плейсхолдеры до подключения РСЯ) ============ */
.ad {
  display: flex; align-items: center; justify-content: center;
  margin: 20px 0; min-height: 90px;
  border: 1px dashed color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: var(--radius-lg);
  color: color-mix(in srgb, var(--ink-soft) 75%, transparent);
  font-size: 0.85rem; background: color-mix(in srgb, var(--card) 60%, transparent);
}
.ad-sticky {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  min-height: 60px; margin: 0; border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0;
  background: var(--card);
}

/* ============ FAQ ============ */
.faq details {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); margin: 10px 0; padding: 0 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease;
}
.faq details[open] { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.faq summary {
  cursor: pointer; font-weight: 600; padding: 13px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  list-style: none;
  transition: color 0.15s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--brand); }
.faq summary::after {
  content: "+";
  flex: none; font-size: 1.25rem; font-weight: 500; line-height: 1;
  color: var(--brand);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details[open] summary { color: var(--brand); }
.faq details p {
  padding-bottom: 14px; color: var(--ink-soft);
  animation: faq-slide 0.22s ease;
}
@keyframes faq-slide {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* ============ Поиск ============ */
.search-results { list-style: none; margin: 14px 0; padding: 0; }
.search-results li {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 12px 16px; margin: 10px 0;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease;
}
.search-results li:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.search-results a { font-weight: 600; }
.search-cat { display: block; font-size: 0.82rem; color: var(--ink-soft); }

/* ============ Прочее ============ */
.related { margin-top: 28px; }
.related ul { padding-left: 20px; }
.item-image {
  display: block; margin: 16px auto; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 10px;
  box-shadow: var(--shadow-sm);
}
.copy-link {
  padding: 9px 18px; font-size: 0.9rem; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--brand);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}
.copy-link:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.site-footer {
  border-top: 1px solid var(--line); background: var(--card);
  padding: 18px 0 70px; font-size: 0.85rem; color: var(--ink-soft);
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 8px; }
.footer-copy { margin: 0; }

/* ============ Группы на главной и список А-Я ============ */
.all-brands-link { font-weight: 600; }
.group-h {
  margin: 1.8em 0 0.2em; font-size: 1.15rem; color: var(--brand);
  padding-bottom: 4px; border-bottom: 2px solid color-mix(in srgb, var(--brand) 25%, var(--line));
}
.group-text { margin: 0.2em 0 0.6em; font-size: 0.9rem; color: var(--ink-soft); max-width: 70ch; }
.cat-card h3 { margin: 0 0 5px; font-size: 1.02rem; color: var(--brand); }
.letter-h {
  position: sticky; top: calc(var(--header-h) + 4px); z-index: 6;
  margin: 1.2em 0 0.4em; font-size: 1.1rem; color: var(--brand);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 4px 0;
}
.brands-list {
  list-style: none; margin: 0 0 8px; padding: 0;
  columns: 3; column-gap: 28px;
}
.brands-list li {
  break-inside: avoid; padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  display: flex; justify-content: space-between; gap: 10px; align-items: baseline;
}
.brands-list a { font-weight: 500; }
.brands-count { font-size: 0.8rem; color: var(--ink-soft); white-space: nowrap; }
@media (max-width: 860px) { .brands-list { columns: 2; } }
@media (max-width: 560px) { .brands-list { columns: 1; } }

/* ============ Мобайл: длинные таблицы -> карточки ============ */
@media (max-width: 640px) {
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td {
    display: block; width: 100%; border: 0;
  }
  .data-table {
    background: transparent; border: 0; border-radius: 0;
    box-shadow: none; overflow: visible;
  }
  .data-table tr {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius-lg); margin: 10px 0; padding: 4px 0;
    box-shadow: var(--shadow-sm);
  }
  .data-table td {
    border-bottom: 1px dashed var(--line); padding: 9px 13px;
  }
  .data-table td:last-child { border-bottom: 0; }
  .data-table td::before {
    content: attr(data-label);
    display: block; font-size: 0.72rem; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--ink-soft); margin-bottom: 3px;
  }
  /* Миниатюра: без лейбла, компактно в потоке карточки */
  .data-table td[data-thumb] { padding: 10px 13px 0; }
  .data-table td[data-thumb]::before { content: none; }
  .row-thumb { width: 44px; height: 44px; }
  .row-thumb img { width: 34px; height: 34px; }
  .data-table tbody tr:nth-child(even), .data-table tbody tr:hover { background: var(--card); }
  .ad-sticky { display: flex; }
}

/* ================================================================
   ТЕМА TIRE «GRADIENT SAAS»: белый, пастельные градиенты, стекло.
   Всё scoped в .theme-tire — pdd/kids не затронуты.
   ================================================================ */
.theme-tire {
  --brand: #6366f1; --brand-dark: #4f46e5; --brand-soft: #eef2ff;
  --grad: linear-gradient(120deg, #6366f1, #ec4899);
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --bg: #ffffff;
}

/* Шапка: белое стекло, градиентный маркер логотипа */
.theme-tire .site-header {
  background: color-mix(in srgb, #ffffff 80%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #eef0f4;
}
.theme-tire .logo { color: #312e81; display: inline-flex; align-items: center; gap: 9px; }
.theme-tire .logo::before {
  content: ""; width: 13px; height: 13px; border-radius: 4px;
  background: var(--grad); flex: none;
}
.theme-tire .logo:hover { color: var(--brand-dark); }

/* Герой на главной: пастельная градиентная подложка */
.theme-tire .hero {
  position: relative; overflow: hidden; background: #fff;
  border: 1px solid #f0f0f5; border-radius: 24px;
  padding: clamp(20px, 4vw, 34px); margin: 18px 0 26px;
}
.theme-tire .hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 65%; height: 190%;
  background: radial-gradient(closest-side, #e0e7ff, transparent 70%),
              radial-gradient(closest-side at 30% 60%, #fce7f3, transparent 70%);
  filter: blur(10px); pointer-events: none;
}
.theme-tire .hero > * { position: relative; }
.theme-tire h1 { letter-spacing: -0.025em; }

/* Заголовки групп: спокойные серые капсом + градиентный разделитель */
.theme-tire .group-h {
  color: #9ca3af; font-size: 0.92rem; text-transform: uppercase;
  letter-spacing: 0.09em; margin: 30px 0 4px; padding: 0; border-bottom: 0;
}
.theme-tire .group-h::after {
  content: ""; display: block; height: 2px; margin-top: 7px; border-radius: 2px;
  background: linear-gradient(90deg, #6366f1, #ec4899 45%, transparent 90%);
  opacity: 0.5;
}
.theme-tire .group-text { margin-top: 10px; }

/* Карточки марок: градиентная кромка при hover */
.theme-tire .cat-card {
  position: relative; overflow: hidden; border-color: #eef0f4; border-radius: 16px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.theme-tire .cat-card::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px;
  background: var(--grad); opacity: 0; transition: opacity .18s ease;
}
.theme-tire .cat-card:hover { border-color: #d9dcf5; box-shadow: 0 10px 30px rgba(99,102,241,.10); }
.theme-tire .cat-card:hover::after { opacity: 1; }
.theme-tire .cat-card h3 { color: #1f2937; }
.theme-tire .prange-badge {
  display: inline-block; font-family: var(--mono); font-size: 0.72rem; font-weight: 600;
  color: #7c3aed; background: linear-gradient(120deg, #eef2ff, #fdf2f8);
  border-radius: 999px; padding: 3px 10px; margin-left: 4px; vertical-align: 1px;
}

/* Таблицы: мягкие скругления, лёгкий thead */
.theme-tire .data-table { border-radius: 16px; border-color: #eef0f4; }
.theme-tire .data-table thead th {
  background: #fafafd; color: #9ca3af;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
}
.theme-tire .data-table td { border-color: #f3f4f8; font-variant-numeric: tabular-nums; }
.theme-tire .brands-count { font-family: var(--mono); }

/* Манометры: стекло + градиентные цифры */
.gauges { display: flex; gap: 18px; flex-wrap: wrap; margin: 18px 0 6px; }
.gauge {
  margin: 0; flex: 1 1 200px; max-width: 260px; text-align: center;
  background: rgba(255,255,255,.75); border: 1px solid rgba(226,232,240,.9);
  border-radius: 18px; padding: 14px 12px 12px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 30px rgba(99,102,241,.08);
}
.gauge svg { width: 100%; height: auto; display: block; }
.gauge figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: 5px; }
.g-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: #8a8fa0; }
.g-value {
  font-family: var(--mono); font-size: 1.6rem; font-weight: 700;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.g-value small {
  background: none; color: #9ca3af; -webkit-text-fill-color: #9ca3af;
  font-size: 0.8rem; font-weight: 400;
}
.g-loaded { font-family: var(--mono); font-size: 0.8rem; color: #db2777; }
.g-scale { fill: none; stroke: #edeef4; stroke-width: 8; }
.g-zone { fill: none; stroke: #f9a8d4; stroke-width: 8; stroke-linecap: round; }
.g-tick { stroke: #fff; stroke-width: 1.5; }
.g-needle { stroke: #6366f1; stroke-width: 4; stroke-linecap: round; }
.g-hub { fill: #6366f1; }
@media (max-width: 560px) { .gauges { gap: 12px; } .gauge { flex-basis: 44%; } }

/* Страница бренда tire: модели с полными таблицами */
.brand-models { display: flex; flex-direction: column; gap: 26px; margin-top: 22px; }
.brand-model {
  background: rgba(255,255,255,.75); border: 1px solid rgba(226,232,240,.9);
  border-radius: 18px; padding: 18px 18px 14px;
  box-shadow: 0 8px 30px rgba(99,102,241,.08);
}
.brand-model h2 { margin: 0 0 6px; font-size: 1.15rem; }
.brand-model h2 a { color: var(--brand-dark, #4f46e5); text-decoration: none; }
.brand-model h2 a:hover { text-decoration: underline; }
.bm-lead { margin: 0 0 10px; color: #6b7280; font-size: 0.92rem; }
.brand-model .data-table { margin: 0; }

/* Виджет «Давление за 10 секунд» на главной */
.tire-widget {
  background: rgba(255,255,255,.75); border: 1px solid rgba(226,232,240,.9);
  border-radius: 20px; padding: 22px; margin: 22px 0;
  box-shadow: 0 12px 40px rgba(99,102,241,.10);
}
.tire-widget h2 { margin: 0 0 6px; }
.tw-desc { margin: 0 0 14px; color: #6b7280; }
.tw-controls { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.tw-field { display: flex; flex-direction: column; gap: 5px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: #8a8fa0; }
.tw-field select {
  font: inherit; font-size: 0.95rem; text-transform: none; letter-spacing: normal;
  padding: 9px 12px; border-radius: 12px; border: 1px solid #e2e8f0;
  background: #fff; color: #1f2937; min-width: 200px; cursor: pointer;
}
.tw-field select:focus-visible { outline: 2px solid var(--brand, #6366f1); outline-offset: 1px; }
.tw-units { display: flex; gap: 6px; margin-left: auto; }
.tw-unit {
  font: inherit; font-size: 0.85rem; padding: 8px 14px; border-radius: 999px;
  border: 1px solid #e2e8f0; background: #fff; color: #6b7280; cursor: pointer;
}
.tw-unit.active {
  border-color: transparent; color: #fff;
  background: var(--grad, linear-gradient(120deg, #6366f1, #06b6d4));
}
.tw-result { margin-top: 18px; }
.tw-gauges { display: flex; gap: 14px; flex-wrap: wrap; }
.tw-gauge {
  flex: 1 1 180px; max-width: 260px; text-align: center;
  background: #fff; border: 1px solid #eef0f5; border-radius: 16px; padding: 14px 10px;
}
.tw-g-label { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: #8a8fa0; }
.tw-g-val {
  display: block; font-family: var(--mono); font-size: 1.7rem; font-weight: 700; margin-top: 3px;
  background: var(--grad, linear-gradient(120deg, #6366f1, #06b6d4));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tw-g-sub { display: block; font-family: var(--mono); font-size: 0.78rem; color: #db2777; margin-top: 2px; }
.tw-sizes { margin: 14px 0 4px; color: #6b7280; font-size: 0.9rem; }
.tw-link { font-weight: 600; }
@media (max-width: 560px) {
  .tw-units { margin-left: 0; }
  .tw-field select { min-width: 100%; }
  .tire-widget { padding: 16px; }
}

/* ================================================================
   ТЕМА SIZES: тот же современный язык, градиент фиолетовый→синий.
   Scoped в .theme-sizes.
   ================================================================ */
.theme-sizes {
  --brand: #7c3aed; --brand-dark: #6d28d9; --brand-soft: #f3efff;
  --grad: linear-gradient(120deg, #7c3aed, #2563eb);
  --bg: #ffffff;
}
.theme-sizes .site-header {
  background: color-mix(in srgb, #ffffff 80%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #eef0f4;
}
.theme-sizes .logo { color: #3b2f6e; display: inline-flex; align-items: center; gap: 9px; }
.theme-sizes .logo::before {
  content: ""; width: 13px; height: 13px; border-radius: 4px;
  background: var(--grad); flex: none;
}
.theme-sizes .logo:hover { color: var(--brand-dark); }
.theme-sizes .hero {
  position: relative; overflow: hidden; background: #fff;
  border: 1px solid #f0f0f5; border-radius: 24px;
  padding: clamp(20px, 4vw, 34px); margin: 18px 0 26px;
}
.theme-sizes .hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 65%; height: 190%;
  background: radial-gradient(closest-side, #ede9fe, transparent 70%),
              radial-gradient(closest-side at 30% 60%, #dbeafe, transparent 70%);
  filter: blur(10px); pointer-events: none;
}
.theme-sizes .hero > * { position: relative; }
.theme-sizes h1 { letter-spacing: -0.025em; }
.theme-sizes .group-h {
  color: #9ca3af; font-size: 0.92rem; text-transform: uppercase;
  letter-spacing: 0.09em; margin: 30px 0 4px; padding: 0; border-bottom: 0;
}
.theme-sizes .group-h::after {
  content: ""; display: block; height: 2px; margin-top: 7px; border-radius: 2px;
  background: linear-gradient(90deg, #7c3aed, #2563eb 45%, transparent 90%);
  opacity: 0.5;
}
.theme-sizes .group-text { margin-top: 10px; }
.theme-sizes .cat-card {
  position: relative; overflow: hidden; border-color: #eef0f4; border-radius: 16px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.theme-sizes .cat-card::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px;
  background: var(--grad); opacity: 0; transition: opacity .18s ease;
}
.theme-sizes .cat-card:hover { border-color: #ddd6f5; box-shadow: 0 10px 30px rgba(124,58,237,.10); }
.theme-sizes .cat-card:hover::after { opacity: 1; }
.theme-sizes .cat-card h3 { color: #1f2937; }
.theme-sizes .data-table { border-radius: 16px; border-color: #eef0f4; }
.theme-sizes .data-table thead th {
  background: #fbfaff; color: #9ca3af;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
}
.theme-sizes .data-table td { border-color: #f3f4f8; font-variant-numeric: tabular-nums; }

/* ================================================================
   ТЕМА COOK: современный язык, тёплый градиент оранжевый→розовый.
   Scoped в .theme-cook.
   ================================================================ */
.theme-cook {
  --brand: #ea580c; --brand-dark: #c2410c; --brand-soft: #fff3ea;
  --grad: linear-gradient(120deg, #ea580c, #db2777);
  --bg: #ffffff;
}
.theme-cook .site-header {
  background: color-mix(in srgb, #ffffff 80%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #eef0f4;
}
.theme-cook .logo { color: #7c2d12; display: inline-flex; align-items: center; gap: 9px; }
.theme-cook .logo::before {
  content: ""; width: 13px; height: 13px; border-radius: 4px;
  background: var(--grad); flex: none;
}
.theme-cook .logo:hover { color: var(--brand-dark); }
.theme-cook .hero {
  position: relative; overflow: hidden; background: #fff;
  border: 1px solid #f0f0f5; border-radius: 24px;
  padding: clamp(20px, 4vw, 34px); margin: 18px 0 26px;
}
.theme-cook .hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 65%; height: 190%;
  background: radial-gradient(closest-side, #ffedd5, transparent 70%),
              radial-gradient(closest-side at 30% 60%, #fce7f3, transparent 70%);
  filter: blur(10px); pointer-events: none;
}
.theme-cook .hero > * { position: relative; }
.theme-cook h1 { letter-spacing: -0.025em; }
.theme-cook .cat-card {
  position: relative; overflow: hidden; border-color: #eef0f4; border-radius: 16px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.theme-cook .cat-card::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px;
  background: var(--grad); opacity: 0; transition: opacity .18s ease;
}
.theme-cook .cat-card:hover { border-color: #f5ddd0; box-shadow: 0 10px 30px rgba(234,88,12,.10); }
.theme-cook .cat-card:hover::after { opacity: 1; }
.theme-cook .cat-card h3 { color: #1f2937; }
.theme-cook .data-table { border-radius: 16px; border-color: #eef0f4; }
.theme-cook .data-table thead th {
  background: #fffcfa; color: #b3a89f;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
}
.theme-cook .data-table td { border-color: #f7f2ee; font-variant-numeric: tabular-nums; }

/* ================================================================
   ТЕМА MOON: современный язык, небесный градиент синий→циан.
   Scoped в .theme-moon.
   ================================================================ */
.theme-moon {
  --brand: #2563eb; --brand-dark: #1d4ed8; --brand-soft: #eff6ff;
  --grad: linear-gradient(120deg, #2563eb, #06b6d4);
  --bg: #ffffff;
}
.theme-moon .site-header {
  background: color-mix(in srgb, #ffffff 80%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #eef0f4;
}
.theme-moon .logo { color: #172554; display: inline-flex; align-items: center; gap: 9px; }
.theme-moon .logo::before {
  content: ""; width: 13px; height: 13px; border-radius: 50%;
  background: var(--grad); flex: none;
}
.theme-moon .logo:hover { color: var(--brand-dark); }
.theme-moon .hero {
  position: relative; overflow: hidden; background: #fff;
  border: 1px solid #f0f0f5; border-radius: 24px;
  padding: clamp(20px, 4vw, 34px); margin: 18px 0 26px;
}
.theme-moon .hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 65%; height: 190%;
  background: radial-gradient(closest-side, #dbeafe, transparent 70%),
              radial-gradient(closest-side at 30% 60%, #cffafe, transparent 70%);
  filter: blur(10px); pointer-events: none;
}
.theme-moon .hero > * { position: relative; }
.theme-moon h1 { letter-spacing: -0.025em; }
.theme-moon .group-h {
  color: #9ca3af; font-size: 0.92rem; text-transform: uppercase;
  letter-spacing: 0.09em; margin: 30px 0 4px; padding: 0; border-bottom: 0;
}
.theme-moon .group-h::after {
  content: ""; display: block; height: 2px; margin-top: 7px; border-radius: 2px;
  background: linear-gradient(90deg, #2563eb, #06b6d4 45%, transparent 90%);
  opacity: 0.5;
}
.theme-moon .group-text { margin-top: 10px; }
.theme-moon .cat-card {
  position: relative; overflow: hidden; border-color: #eef0f4; border-radius: 16px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.theme-moon .cat-card::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px;
  background: var(--grad); opacity: 0; transition: opacity .18s ease;
}
.theme-moon .cat-card:hover { border-color: #d0dcf5; box-shadow: 0 10px 30px rgba(37,99,235,.10); }
.theme-moon .cat-card:hover::after { opacity: 1; }
.theme-moon .cat-card h3 { color: #1f2937; }
.theme-moon .data-table { border-radius: 16px; border-color: #eef0f4; }
.theme-moon .data-table thead th {
  background: #fafcff; color: #9ca3af;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
}
.theme-moon .data-table td { border-color: #f2f5fa; font-variant-numeric: tabular-nums; }

/* ================================================================
   ТЕМА TOOLS: хаб инструментов, изумруд→тил, формы и результаты.
   Scoped в .theme-tools.
   ================================================================ */
.theme-tools {
  --brand: #059669; --brand-dark: #047857; --brand-soft: #ecfdf5;
  --grad: linear-gradient(120deg, #059669, #0d9488);
  --bg: #ffffff;
}
.theme-tools .site-header {
  background: color-mix(in srgb, #ffffff 80%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #eef0f4;
}
.theme-tools .logo { color: #064e3b; display: inline-flex; align-items: center; gap: 9px; }
.theme-tools .logo::before {
  content: ""; width: 13px; height: 13px; border-radius: 4px;
  background: var(--grad); flex: none;
}
.theme-tools .logo:hover { color: var(--brand-dark); }
.theme-tools .hero {
  position: relative; overflow: hidden; background: #fff;
  border: 1px solid #f0f0f5; border-radius: 24px;
  padding: clamp(20px, 4vw, 34px); margin: 18px 0 26px;
}
.theme-tools .hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 65%; height: 190%;
  background: radial-gradient(closest-side, #d1fae5, transparent 70%),
              radial-gradient(closest-side at 30% 60%, #ccfbf1, transparent 70%);
  filter: blur(10px); pointer-events: none;
}
.theme-tools .hero > * { position: relative; }
.theme-tools h1 { letter-spacing: -0.025em; }
.theme-tools .group-h {
  color: #9ca3af; font-size: 0.92rem; text-transform: uppercase;
  letter-spacing: 0.09em; margin: 30px 0 4px; padding: 0; border-bottom: 0;
}
.theme-tools .cat-card {
  position: relative; overflow: hidden; border-color: #eef0f4; border-radius: 16px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.theme-tools .cat-card::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px;
  background: var(--grad); opacity: 0; transition: opacity .18s ease;
}
.theme-tools .cat-card:hover { border-color: #cdeee2; box-shadow: 0 10px 30px rgba(5,150,105,.10); }
.theme-tools .cat-card:hover::after { opacity: 1; }
.theme-tools .cat-card h3 { color: #1f2937; }
.theme-tools .data-table { border-radius: 16px; border-color: #eef0f4; }
.theme-tools .data-table thead th {
  background: #f7fdf9; color: #9ca3af;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
}
.theme-tools .data-table td { border-color: #f0f7f3; font-variant-numeric: tabular-nums; }

/* ================================================================
   ТЕМА PORTAL: витрина всего портфеля на корне info-gate.ru.
   Scoped в .theme-portal.
   ================================================================ */
.theme-portal {
  --brand: #4f46e5; --brand-dark: #4338ca; --brand-soft: #eef2ff;
  --grad: linear-gradient(120deg, #4f46e5, #06b6d4);
  --bg: #ffffff;
}
.theme-portal .site-header {
  background: color-mix(in srgb, #ffffff 80%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #eef0f4;
}
.theme-portal .logo { color: #312e81; display: inline-flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: -0.02em; }
.theme-portal .logo::before {
  content: ""; width: 14px; height: 14px; border-radius: 4px;
  background: var(--grad); flex: none;
}
.theme-portal .hero {
  position: relative; overflow: hidden; background: #fff;
  border: 1px solid #f0f0f5; border-radius: 24px;
  padding: clamp(24px, 4vw, 40px); margin: 18px 0 30px;
}
.theme-portal .hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 70%; height: 200%;
  background: radial-gradient(closest-side, #e0e7ff, transparent 70%),
              radial-gradient(closest-side at 25% 70%, #cffafe, transparent 70%),
              radial-gradient(closest-side at 70% 20%, #fce7f3, transparent 70%);
  filter: blur(12px); pointer-events: none;
}
.theme-portal .hero > * { position: relative; }
.theme-portal .hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.theme-portal .hero .lead { font-size: 1.05rem; color: #4b5563; max-width: 56ch; }

.portal-lead { color: #6b7280; max-width: 70ch; margin: 0 0 18px; }

/* ---- Поиск по порталу ---- */
.portal-search {
  display: flex; gap: 10px; max-width: 640px; margin: 18px auto 0;
}
.portal-search input {
  flex: 1; font: inherit; font-size: 1.08rem; padding: 14px 18px;
  border: 1px solid #d1d5db; border-radius: 14px; background: #fff;
}
.portal-search input:focus {
  outline: none; border-color: #4f46e5;
  box-shadow: 0 0 0 4px color-mix(in srgb, #4f46e5 15%, transparent);
}
.portal-search button {
  font: inherit; font-weight: 700; color: #fff; border: 0; cursor: pointer;
  padding: 0 24px; border-radius: 14px;
  background: linear-gradient(120deg, #4f46e5, #06b6d4);
  transition: transform .12s ease, box-shadow .12s ease;
}
.portal-search button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(79,70,229,.25); }
.portal-search-inline { margin: 14px 0 22px; }
.portal-stats {
  display: flex; gap: 22px; justify-content: center; flex-wrap: wrap;
  margin: 16px 0 0; font-size: 0.82rem; color: #6b7280;
}
.portal-stats strong { color: #1f2937; font-weight: 750; font-variant-numeric: tabular-nums; }
.portal-search-count { color: #6b7280; margin: 6px 0 4px; font-size: 0.92rem; }
.portal-search-hint { color: #6b7280; }
.portal-search-empty { color: #b91c1c; }
.portal-search-group { margin: 22px 0; }
.portal-search-group-h { font-size: 1.05rem; font-weight: 700; color: #1f2937; margin: 0 0 8px; }
.portal-search-list { list-style: none; padding: 0; margin: 0; }
.portal-search-list li { padding: 9px 0; border-bottom: 1px dashed #e5e7eb; }
.portal-search-list a { font-weight: 600; }
.portal-search-cat { color: #9ca3af; font-size: 0.82rem; margin-left: 8px; }
.portal-search-more { display: inline-block; margin-top: 10px; font-size: 0.9rem; color: #4f46e5; font-weight: 600; }

/* ---- Сетка карточек сайтов ---- */
.portal-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px;
  margin: 26px 0;
}
.portal-card {
  display: flex; flex-direction: column; gap: 8px; padding: 20px;
  background: #fff; border: 1px solid #eef0f4; border-radius: 18px;
  text-decoration: none; color: inherit; position: relative; overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.portal-card::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px;
  opacity: 0; transition: opacity .18s ease;
}
.portal-card:hover {
  border-color: #d9dcf5; transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(79, 70, 229, .12);
}
.portal-card:hover::after { opacity: 1; }
.portal-card h3 { margin: 0; font-size: 1.1rem; font-weight: 700; color: #1f2937; }
.portal-card p { margin: 0; font-size: 0.9rem; color: #6b7280; flex: 1; }
.card-tire::after   { background: linear-gradient(120deg, #6366f1, #ec4899); }
.card-pdd::after    { background: linear-gradient(120deg, #0b5cad, #2563eb); }
.card-kids::after   { background: linear-gradient(120deg, #4e7d5b, #74b69c); }
.card-sizes::after  { background: linear-gradient(120deg, #7c3aed, #2563eb); }
.card-cook::after   { background: linear-gradient(120deg, #ea580c, #db2777); }
.card-moon::after   { background: linear-gradient(120deg, #2563eb, #06b6d4); }
.card-tools::after  { background: linear-gradient(120deg, #059669, #0d9488); }

/* ---- Премиум-плитка (скоро) ---- */
.portal-soon-card {
  padding: 18px; background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border: 1px dashed #cbd5e1; border-radius: 16px;
  display: flex; flex-direction: column; gap: 6px; max-width: 360px;
}
.bento-tag {
  align-self: flex-start; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: #4f46e5;
  background: #eef2ff; padding: 3px 10px; border-radius: 999px;
}
.bento-tag-soon { color: #6b7280; background: #f1f5f9; }
.portal-soon-card h3 { margin: 0; font-size: 1rem; color: #312e81; }
.portal-soon-card p { margin: 0; font-size: 0.88rem; color: #6b7280; }
@media (max-width: 640px) { .portal-grid { grid-template-columns: 1fr; } }

/* ---- Тренажёр ПДД ---- */
.train-hero { text-align: center; margin: 20px 0 28px; }
.train-hero h1 { font-size: 1.75rem; font-weight: 750; color: #1f2937; margin: 0 0 8px; }
.train-lead { color: #6b7280; max-width: 56ch; margin: 0 auto; }

.train-setup { max-width: 560px; margin: 0 auto 32px; }
.train-form { display: flex; flex-direction: column; gap: 18px; }
.train-fieldset {
  border: 1px solid #e5e7eb; border-radius: 14px; padding: 16px 18px;
}
.train-fieldset legend { font-weight: 700; color: #1f2937; padding: 0 8px; }
.train-fieldset label {
  display: flex; align-items: baseline; gap: 8px; padding: 6px 0;
  font-size: 0.95rem; color: #374151; cursor: pointer;
}
.train-fieldset input[type="radio"] { margin: 0; accent-color: #2563eb; transform: translateY(2px); }
.train-hint { color: #9ca3af; font-size: 0.85rem; }
.train-fieldset select {
  font: inherit; font-size: 0.95rem; padding: 8px 12px; border: 1px solid #d1d5db;
  border-radius: 10px; background: #fff; color: #1f2937; width: 100%;
}
.train-start-btn {
  font: inherit; font-size: 1.05rem; font-weight: 700; color: #fff; border: 0; cursor: pointer;
  padding: 14px 28px; border-radius: 14px; background: linear-gradient(120deg, #0b5cad, #2563eb);
  transition: transform .12s ease, box-shadow .12s ease;
}
.train-start-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(37,99,235,.25); }

.train-info { max-width: 640px; margin: 0 auto 28px; }
.train-info h2 { font-size: 1.2rem; font-weight: 700; color: #1f2937; margin: 0 0 12px; }
.train-info ul { list-style: disc; padding-left: 20px; color: #4b5563; }
.train-info ul li { padding: 5px 0; font-size: 0.92rem; line-height: 1.5; }
.train-note { color: #9ca3af; font-size: 0.88rem; margin-top: 12px; }

/* прогресс-бар */
.train-progress { margin: 16px 0 20px; }
.train-progress-bar { height: 8px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.train-progress-fill { height: 100%; background: linear-gradient(90deg, #0b5cad, #2563eb); border-radius: 999px; transition: width .3s ease; }
.train-progress-text { display: block; margin-top: 6px; font-size: 0.85rem; color: #6b7280; font-variant-numeric: tabular-nums; }

/* вопрос */
.train-question { text-align: center; }
.train-q-title { font-size: 1.15rem; font-weight: 700; color: #1f2937; margin: 0 0 18px; }
.train-sign-display {
  display: flex; justify-content: center; margin: 0 0 24px;
}
.train-sign-img {
  width: 100px; height: auto; border: 2px solid #e5e7eb; border-radius: 12px; padding: 6px; background: #fff;
}
.train-desc-display {
  background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 16px;
  padding: 28px 24px; margin: 0 auto 24px; max-width: 560px;
}
.train-desc-text { font-size: 1.08rem; color: #1f2937; margin: 0; line-height: 1.5; }

.train-options {
  display: flex; flex-direction: column; gap: 14px; max-width: 680px; margin: 0 auto;
}
.train-option {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
  text-decoration: none; color: #374151; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.train-option:hover {
  border-color: #2563eb; transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37,99,235,.12);
}
.train-option-img { width: 56px; height: auto; border: 1px solid #eef0f4; border-radius: 8px; padding: 4px; flex-shrink: 0; background: #fff; }
.train-option-label {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; color: #2563eb; background: #eff6ff;
}
.train-option-text { font-size: 0.92rem; line-height: 1.4; text-align: left; }

/* ответ */
.train-answer { max-width: 640px; margin: 0 auto; }
.train-verdict {
  display: flex; align-items: center; gap: 10px; padding: 14px 20px;
  border-radius: 14px; font-weight: 700; font-size: 1.1rem; margin: 0 0 20px;
}
.train-verdict-correct { background: #ecfdf5; color: #065f46; }
.train-verdict-wrong { background: #fef2f2; color: #991b1b; }
.train-verdict-icon { font-size: 1.3rem; }

.train-answer-detail {
  display: flex; gap: 20px; padding: 20px; background: #f8fafc;
  border: 1px solid #e5e7eb; border-radius: 16px; margin: 0 0 16px;
}
@media (max-width: 560px) { .train-answer-detail { flex-direction: column; align-items: center; text-align: center; } }
.train-answer-sign { flex-shrink: 0; }
.train-answer-sign .train-sign-img { width: 90px; }
.train-answer-info h3 { margin: 0 0 8px; font-size: 1.05rem; color: #1f2937; }
.train-answer-lead { margin: 0 0 8px; font-size: 0.92rem; color: #4b5563; line-height: 1.5; }
.train-answer-group { margin: 0 0 10px; font-size: 0.85rem; color: #9ca3af; }
.train-answer-link { font-size: 0.9rem; font-weight: 600; color: #2563eb; }

.train-correct-option {
  padding: 12px 18px; background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: 12px; margin: 0 0 20px; font-size: 0.95rem; color: #1e40af;
}

.train-next-btn {
  display: inline-block; font: inherit; font-weight: 700; font-size: 1.05rem;
  color: #fff; text-decoration: none; padding: 14px 32px; border-radius: 14px;
  background: linear-gradient(120deg, #0b5cad, #2563eb); cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.train-next-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(37,99,235,.25); }

/* результат */
.train-result { text-align: center; max-width: 480px; margin: 20px auto 28px; }
.train-result h1 { font-size: 1.5rem; font-weight: 750; color: #1f2937; margin: 0 0 20px; }
.train-result-score {
  display: flex; align-items: baseline; justify-content: center; gap: 8px; margin: 0 0 6px;
}
.train-result-num { font-size: 3rem; font-weight: 800; color: #2563eb; font-variant-numeric: tabular-nums; }
.train-result-sep { font-size: 1.3rem; color: #9ca3af; }
.train-result-total { font-size: 2rem; font-weight: 700; color: #6b7280; font-variant-numeric: tabular-nums; }
.train-result-pct { font-size: 1.3rem; font-weight: 700; color: #1f2937; margin: 0 0 16px; }
.train-result-grade { font-size: 1.4rem; font-weight: 750; color: #2563eb; margin: 0 0 8px; }
.train-result-text { color: #6b7280; margin: 0 0 24px; }
.train-result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 0 0 16px; }
.train-secondary-btn {
  display: inline-block; font-weight: 600; font-size: 0.95rem; color: #2563eb;
  text-decoration: none; padding: 12px 22px; border: 1px solid #bfdbfe; border-radius: 12px;
}
.train-secondary-btn:hover { background: #eff6ff; }
.train-result-meta { color: #9ca3af; font-size: 0.85rem; }
.train-result-meta p { margin: 0; }

/* ---- Формы инструментов и результаты ---- */
.tool {
  background: var(--card); border: 1px solid #eef0f4; border-radius: 18px;
  padding: clamp(16px, 3vw, 26px); margin: 16px 0 22px;
  box-shadow: 0 8px 30px rgba(5, 150, 105, .06);
}
.tool-form { display: flex; flex-direction: column; gap: 13px; }
.tool-row { display: flex; gap: 13px; flex-wrap: wrap; }
.tool-row .tool-field { flex: 1 1 130px; }
.tool-field { display: flex; flex-direction: column; gap: 5px; }
.tool-field span { font-size: 0.8rem; color: #6b7280; font-weight: 600; }
.tool-field input, .tool-field textarea, .tool-field select {
  font: inherit; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 10px;
  background: #fff; width: 100%;
}
.tool-field input:focus, .tool-field textarea:focus, .tool-field select:focus {
  outline: none; border-color: var(--brand, #059669);
  box-shadow: 0 0 0 3px color-mix(in srgb, #059669 15%, transparent);
}
.tool-check { display: flex; gap: 8px; align-items: center; font-size: 0.92rem; }
.tool-btn {
  align-self: flex-start; border: 0; cursor: pointer; font: inherit; font-weight: 700;
  color: #fff; padding: 11px 26px; border-radius: 12px;
  background: linear-gradient(120deg, #059669, #0d9488);
  transition: transform .12s ease, box-shadow .12s ease;
}
.tool-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(5,150,105,.25); }
.tool-result { margin-top: 20px; padding-top: 18px; border-top: 1px dashed #e5e7eb; }
.tool-out {
  font-family: ui-monospace, Consolas, monospace; font-size: 1.15rem;
  font-weight: 600; word-break: break-word; margin: 0 0 8px;
}
.tool-big {
  font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 750; letter-spacing: -0.02em;
  background: linear-gradient(120deg, #059669, #0d9488);
  -webkit-background-clip: text; background-clip: text; color: transparent; margin: 0 0 8px;
}
.tool-note { font-size: 0.88rem; color: #6b7280; margin: 6px 0; }
.tool-error {
  margin-top: 18px; padding: 12px 16px; border-radius: 10px;
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-size: 0.92rem;
}
.qr-img {
  width: 260px; height: 260px; border: 1px solid #eef0f4; border-radius: 12px; padding: 8px;
  background: #fff; display: block;
}

/* ---- Навигация тренажёра ПДД ---- */
.header-train-link {
  font-weight: 700; font-size: 0.9rem; color: #2563eb; text-decoration: none;
  padding: 6px 14px; border: 1px solid #bfdbfe; border-radius: 999px;
  white-space: nowrap; transition: background .15s ease, color .15s ease;
}
.header-train-link:hover { background: #eff6ff; }

.train-cta {
  margin: 20px 0 28px;
  background: linear-gradient(120deg, #eff6ff, #e0f2fe);
  border: 1px solid #bfdbfe; border-radius: 20px; padding: 24px 28px;
}
.train-cta-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.train-cta-text h2 { margin: 0 0 4px; font-size: 1.25rem; font-weight: 750; color: #1e40af; }
.train-cta-text p { margin: 0; font-size: 0.95rem; color: #4b5563; }
.train-cta-btn {
  font: inherit; font-weight: 700; font-size: 1rem; color: #fff; text-decoration: none;
  padding: 14px 28px; border-radius: 14px; background: linear-gradient(120deg, #0b5cad, #2563eb);
  white-space: nowrap; transition: transform .12s ease, box-shadow .12s ease;
}
.train-cta-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(37,99,235,.25); }

.train-cat-btn {
  display: inline-block; margin: 8px 0 16px; font-weight: 700; font-size: 0.92rem;
  color: #2563eb; text-decoration: none; padding: 8px 18px;
  border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff;
}
.train-cat-btn:hover { background: #dbeafe; }

/* ссылки на группы каталога на лендинге тренажёра */
.train-catalog-links { margin: 28px 0; }
.train-catalog-links h2 { font-size: 1.2rem; font-weight: 700; color: #1f2937; margin: 0 0 6px; }
.train-catalog-links > p { color: #6b7280; font-size: 0.92rem; margin: 0 0 16px; }
.train-catalog-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px;
}
.train-catalog-card {
  display: flex; flex-direction: column; gap: 6px; padding: 16px 18px;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
  text-decoration: none; color: inherit; transition: border-color .15s ease, box-shadow .15s ease;
}
.train-catalog-card:hover { border-color: #2563eb; box-shadow: 0 6px 18px rgba(37,99,235,.10); }
.train-catalog-name { font-weight: 700; font-size: 0.95rem; color: #1f2937; }
.train-catalog-train { font-size: 0.85rem; color: #2563eb; font-weight: 600; }

/* блок статистики */
.train-stats {
  margin: 24px 0; padding: 22px 24px;
  background: linear-gradient(135deg, #f8fafc, #eff6ff);
  border: 1px solid #dbeafe; border-radius: 18px;
}
.train-stats h2 { font-size: 1.15rem; font-weight: 700; color: #1e40af; margin: 0 0 14px; }
.train-stats-grid { display: flex; gap: 28px; flex-wrap: wrap; margin: 0 0 12px; }
.train-stat-cell { display: flex; flex-direction: column; gap: 2px; }
.train-stat-num { font-size: 1.8rem; font-weight: 800; color: #2563eb; font-variant-numeric: tabular-nums; line-height: 1.1; }
.train-stat-label { font-size: 0.82rem; color: #6b7280; }
.train-stats-last { font-size: 0.9rem; color: #4b5563; margin: 0 0 14px; }
.train-stats-reset {
  font: inherit; font-size: 0.85rem; font-weight: 600; color: #9ca3af;
  background: none; border: 1px solid #e5e7eb; border-radius: 8px;
  padding: 6px 14px; cursor: pointer; transition: color .15s ease, border-color .15s ease;
}
.train-stats-reset:hover { color: #ef4444; border-color: #fecaca; }
@media (max-width: 560px) { .train-stats-grid { gap: 18px; } }

/* ---- Экзамен ПДД ---- */
.exam-landing { margin: 16px 0 24px; }
.exam-landing h1 { font-size: 1.6rem; font-weight: 800; color: #1e40af; margin: 0 0 8px; }
.exam-lead { font-size: 0.95rem; color: #4b5563; margin: 0 0 8px; }
.exam-back { margin: 0 0 12px; font-size: 0.9rem; }
.exam-back a { color: #2563eb; text-decoration: none; font-weight: 600; }
.exam-back a:hover { text-decoration: underline; }

.exam-mode-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 16px;
  padding: 22px 24px; margin: 0 0 16px;
}
.exam-mode-card h2 { font-size: 1.15rem; font-weight: 700; color: #1f2937; margin: 0 0 6px; }
.exam-mode-card > p { font-size: 0.9rem; color: #6b7280; margin: 0 0 14px; }
.exam-form { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.exam-field { display: flex; flex-direction: column; gap: 4px; }
.exam-field span { font-size: 0.82rem; color: #6b7280; font-weight: 600; }
.exam-field select {
  font: inherit; font-size: 0.92rem; padding: 8px 12px;
  border: 1px solid #d1d5db; border-radius: 10px; background: #fff; color: #1f2937;
}
.exam-btn {
  font: inherit; font-weight: 700; font-size: 0.95rem; color: #fff; text-decoration: none;
  padding: 10px 24px; border-radius: 12px; border: none; cursor: pointer;
  background: linear-gradient(120deg, #0b5cad, #2563eb); white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease;
}
.exam-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(37,99,235,.22); }
.exam-btn-secondary { background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; }
.exam-btn-secondary:hover { background: #e5e7eb; box-shadow: none; }

.exam-timer {
  font-weight: 800; font-variant-numeric: tabular-nums; color: #dc2626;
  margin-left: 8px; font-size: 1rem;
}
.exam-timer.exam-timer-warn { color: #f59e0b; }

.exam-question { margin: 16px 0; }
.exam-question-img-wrap { margin: 0 0 16px; text-align: center; }
.exam-question-img {
  max-width: 100%; width: auto; max-height: 320px;
  border: 1px solid #e5e7eb; border-radius: 12px; background: #fff;
}
.exam-q-text { font-size: 1.1rem; font-weight: 650; color: #1f2937; margin: 0 0 18px; line-height: 1.5; }

.exam-answer-detail {
  display: flex; gap: 20px; flex-wrap: wrap; margin: 16px 0;
  padding: 20px; background: #f8fafc; border-radius: 14px; border: 1px solid #e2e8f0;
}
.exam-answer-img { flex: 0 0 auto; }
.exam-answer-img .exam-question-img { max-height: 260px; }
.exam-answer-info { flex: 1 1 300px; min-width: 0; }
.exam-answer-info h3 { font-size: 1rem; font-weight: 700; color: #1f2937; margin: 0 0 8px; }
.exam-answer-correct { font-size: 0.95rem; color: #059669; margin: 0 0 8px; }
.exam-answer-correct strong { color: #047857; }
.exam-answer-comment {
  font-size: 0.9rem; color: #4b5563; line-height: 1.5; margin: 0 0 8px;
  padding: 12px 14px; background: #fff; border-radius: 10px; border: 1px solid #e5e7eb;
}
.exam-answer-topic { font-size: 0.82rem; color: #9ca3af; margin: 0; }

.exam-result { text-align: center; margin: 24px 0; }
.exam-verdict {
  display: inline-flex; flex-direction: column; gap: 4px;
  padding: 28px 48px; border-radius: 20px; margin: 0 0 12px;
}
.exam-verdict-pass { background: linear-gradient(135deg, #ecfdf5, #d1fae5); border: 1px solid #a7f3d0; }
.exam-verdict-fail { background: linear-gradient(135deg, #fef2f2, #fee2e2); border: 1px solid #fecaca; }
.exam-verdict-grade { font-size: 2rem; font-weight: 800; }
.exam-verdict-pass .exam-verdict-grade { color: #059669; }
.exam-verdict-fail .exam-verdict-grade { color: #dc2626; }
.exam-verdict-score { font-size: 1.2rem; font-weight: 600; color: #374151; }
.exam-verdict-text { font-size: 0.95rem; color: #6b7280; margin: 0 0 20px; }

.exam-blocks-breakdown { margin: 0 0 24px; }
.exam-blocks-breakdown h3 { font-size: 1rem; font-weight: 700; color: #1f2937; margin: 0 0 10px; }
.exam-blocks-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.exam-block-cell {
  display: flex; flex-direction: column; gap: 4px; padding: 12px;
  border-radius: 10px; text-align: center;
}
.exam-block-ok { background: #ecfdf5; border: 1px solid #a7f3d0; }
.exam-block-fail { background: #fef2f2; border: 1px solid #fecaca; }
.exam-block-name { font-size: 0.85rem; font-weight: 700; color: #374151; }
.exam-block-errors { font-size: 0.8rem; color: #6b7280; }
.exam-extra-result { font-size: 0.9rem; color: #4b5563; margin: 10px 0 0; }
.exam-result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.exam-stats {
  margin: 24px 0; padding: 22px 24px;
  background: linear-gradient(135deg, #f8fafc, #eff6ff);
  border: 1px solid #dbeafe; border-radius: 18px;
}
.exam-stats h2 { font-size: 1.15rem; font-weight: 700; color: #1e40af; margin: 0 0 14px; }
@media (max-width: 560px) {
  .exam-blocks-grid { grid-template-columns: repeat(2, 1fr); }
  .exam-question-img { max-height: 220px; }
}

/* ─── ГОРОВОСКОПЫ (.horo) — тёмная космическая тема, scoped, не трогает темы сайтов ─── */

.horo {
  --h-accent: #a78bfa; --h-accent2: #22d3ee; --h-text: #e6e4f0; --h-muted: #8b8fa8;
  position: relative; overflow: hidden; margin: 18px 0 34px; padding: 30px 24px 24px;
  border-radius: 22px; color: var(--h-text);
  background: radial-gradient(1100px 700px at 75% -12%, #2a1450 0%, #1A1033 38%, #0B0E1A 100%);
}
.horo::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .75;
  background-image:
    radial-gradient(1.6px 1.6px at 8% 18%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 22% 64%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 36% 12%, #c4b5fd 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 52% 78%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 64% 30%, #22d3ee 50%, transparent 51%),
    radial-gradient(2.2px 2.2px at 78% 58%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 88% 16%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 14% 86%, #a78bfa 50%, transparent 51%),
    radial-gradient(1.8px 1.8px at 44% 44%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 92% 82%, #fff 50%, transparent 51%);
  animation: horo-twinkle 7s ease-in-out infinite alternate;
}
@keyframes horo-twinkle { from { opacity: .4; } to { opacity: .9; } }
.horo > * { position: relative; }
.horo h1 { color: #fff; font-size: clamp(26px, 4.5vw, 42px); line-height: 1.15; margin: 4px 0 6px; }
.horo h2 { color: #c4b5fd; font-size: 19px; margin: 0 0 12px; }
.horo a { color: var(--h-accent2); }
.horo-kicker { color: var(--h-muted); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin: 0; }
.horo-date { color: #b8b6cc; margin: 0 0 10px; font-size: 15px; }
.horo-moonline {
  display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 999px;
  background: rgba(167,139,250,.12); border: 1px solid rgba(167,139,250,.3); font-size: 14px;
}
.horo-moonglyph { font-size: 18px; }
.horo-phase-note { color: #cfcde3; max-width: 640px; margin: 12px 0 0; }
.horo-h1glyph {
  font-size: 1.15em; margin-right: 6px;
  background: linear-gradient(135deg, #a78bfa, #22d3ee);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.horo-block { margin: 26px 0 0; }
.horo-general { font-size: 17px; line-height: 1.65; color: #f0eefa; max-width: 780px; }
.horo-bar-wrap { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 18px 0 4px; font-size: 14px; color: var(--h-muted); }
.horo-bar { display: inline-block; width: 160px; height: 10px; border-radius: 6px; background: rgba(255,255,255,.09); overflow: hidden; }
.horo-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #a78bfa, #22d3ee); }
.horo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 12px; }
.horo-card {
  display: flex; flex-direction: column; gap: 6px; padding: 16px 14px; border-radius: 16px;
  background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.1); color: var(--h-text);
  text-decoration: none; transition: .22s; backdrop-filter: blur(6px);
}
.horo-card:hover { border-color: var(--h-accent); transform: translateY(-2px); color: var(--h-text); }
.horo-card b { color: #fff; font-size: 16px; }
.horo-card-g { font-size: 26px; line-height: 1;
  background: linear-gradient(135deg, #a78bfa, #22d3ee);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.horo-card-dates { color: var(--h-muted); font-size: 12px; }
.horo-card-energy { font-size: 12px; color: var(--h-muted); }
.horo-card-first { font-size: 13.5px; color: #cfcde3; line-height: 1.45; }
.horo-trio, .horo-duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 22px; }
.horo-panel {
  padding: 18px 16px; border-radius: 16px; background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(6px);
}
.horo-panel h2 { font-size: 16px; }
.horo-panel p { margin: 0; line-height: 1.55; font-size: 15px; color: #dcd9ec; }
.horo-advice { color: #c4b5fd; font-style: italic; }
.horo-mercury { margin-top: 10px !important; }
.horo-btn {
  display: inline-block; margin-top: 10px; padding: 10px 20px; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, rgba(167,139,250,.25), rgba(34,211,238,.25));
  border: 1px solid rgba(167,139,250,.5); color: #fff; text-decoration: none; font-size: 15px;
  transition: .22s; font-family: inherit;
}
.horo-btn:hover { border-color: var(--h-accent2); background: linear-gradient(135deg, rgba(167,139,250,.4), rgba(34,211,238,.4)); }
.horo-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.horo-chip { padding: 7px 14px; border-radius: 999px; font-size: 13.5px;
  background: rgba(167,139,250,.13); border: 1px solid rgba(167,139,250,.35); color: #dcd9ec; }
.horo-signnav { display: flex; gap: 8px; flex-wrap: wrap; }
.horo-signnav a { padding: 7px 12px; border-radius: 999px; font-size: 13.5px; text-decoration: none;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); color: var(--h-text); transition: .2s; }
.horo-signnav a:hover { border-color: var(--h-accent); color: #fff; }
.horo-disclaimer { margin: 26px 0 0; font-size: 12px; color: var(--h-muted); line-height: 1.5; }

/* колесо зодиака */
.horo-wheel { position: relative; width: min(430px, 92%); aspect-ratio: 1; margin: 8px auto 0; }
.horo-wheel::before { content: ""; position: absolute; inset: 7.5%; border: 2px dashed rgba(167,139,250,.35); border-radius: 50%; }
.horo-wheel-core {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center;
  color: var(--h-muted); font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
}
.horo-wheel-core span { display: block; font-size: 26px; color: var(--h-accent); animation: horo-spin 14s linear infinite; }
@keyframes horo-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.horo-spoke {
  position: absolute; transform: translate(-50%, -50%); width: 62px; height: 62px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  text-decoration: none; color: var(--h-text); background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14); transition: .25s; backdrop-filter: blur(4px);
}
.horo-spoke:hover { border-color: var(--h-accent); color: #fff; transform: translate(-50%, -50%) scale(1.12); }
.horo-spoke .g { font-size: 22px; line-height: 1;
  background: linear-gradient(135deg, #a78bfa, #22d3ee);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.horo-spoke .n { font-size: 9px; color: #b8b6cc; }

/* неделя */
.horo-week { display: flex; flex-direction: column; gap: 10px; }
.horo-week-row {
  display: grid; grid-template-columns: 150px 210px 1fr; gap: 14px; align-items: center;
  padding: 12px 16px; border-radius: 14px; background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.09);
}
.horo-week-today { border-color: rgba(34,211,238,.5); background: rgba(34,211,238,.07); }
.horo-week-day b { display: block; color: #fff; font-size: 15px; }
.horo-week-day span { color: var(--h-muted); font-size: 12.5px; }
.horo-week-mid { display: flex; gap: 8px; align-items: center; }
.horo-week-rating { font-size: 12.5px; color: var(--h-muted); }
.horo-week-theme { margin: 0; font-size: 14.5px; color: #dcd9ec; line-height: 1.45; }
@media (max-width: 640px) { .horo-week-row { grid-template-columns: 1fr 1fr; } .horo-week-theme { grid-column: 1 / -1; } }

/* таро */
.horo-tarot-stage { text-align: center; }
.tarot-card { display: inline-block; width: 220px; height: 330px; perspective: 900px; cursor: default; }
.tarot-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.2,.7,.3,1); }
.tarot-card.flipped .tarot-inner { transform: rotateY(180deg); }
.tarot-face {
  position: absolute; inset: 0; border-radius: 18px; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 18px;
}
.tarot-back { background: repeating-linear-gradient(45deg, #241046 0 12px, #1A1033 12px 24px); border: 2px solid rgba(167,139,250,.4); }
.tarot-back span { color: #a78bfa; font-size: 34px; letter-spacing: .3em; }
.tarot-back span:nth-child(2) { color: #22d3ee; }
.tarot-front { transform: rotateY(180deg); background: radial-gradient(300px 300px at 50% 20%, #2a1450, #0B0E1A); border: 2px solid rgba(34,211,238,.5); }
.tarot-name { color: #fff; font-size: 19px; }
.tarot-kw { color: #c4b5fd; font-size: 13.5px; margin: 0; }
.tarot-read { max-width: 560px; margin: 18px auto 0; }
.tarot-read p { color: #dcd9ec; line-height: 1.6; margin: 6px 0; }
.tarot-advice { color: #22d3ee; font-style: italic; }
.horo-tarot-teaser .horo-tarot-name { margin: 0 0 6px; font-size: 16px; color: #fff; }

/* share-карточка */
.horo-share { text-align: center; }
.horo-card-img { max-width: min(340px, 80%); border-radius: 18px; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 18px 50px rgba(0,0,0,.45); display: block; margin: 0 auto 6px; }
