/* BMW portal — modern technical editorial */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Source+Serif+4:opsz,wght@8..60,560;8..60,650;8..60,700&display=swap');

:root {
  --bg: #f7f6f3;
  --bg-surface: #ffffff;
  --bg-soft: #f0eeea;
  --bg-hero: #f0eeea;
  --text: #12141a;
  --text-muted: #5c616b;
  --text-faint: #8b909a;
  --accent: #1a3d66;
  --accent-hover: #122c4a;
  --accent-soft: #e8eef6;
  --border: #e2e0da;
  --border-strong: #c9c6be;
  --success: #1f6b4a;
  --danger: #b42318;
  --warning: #9a6700;
  --radius: 8px;
  --radius-sm: 6px;
  --font: 'Manrope', 'Segoe UI', sans-serif;
  --font-display: 'Source Serif 4', Georgia, serif;
  --max-width: 1180px;
  --prose-width: 720px;
  --header-h: 64px;
  --ease: 0.16s ease;
  --shadow-sm: 0 1px 2px rgba(18, 20, 26, 0.04);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 750;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.03em;
}

h1 { font-size: clamp(1.7rem, 3vw, 2.25rem); margin: 0 0 0.6rem; }
h2 { font-size: clamp(1.2rem, 2vw, 1.4rem); margin: 1.5rem 0 0.55rem; font-weight: 700; }
h3 { font-size: 1.02rem; margin: 1.1rem 0 0.4rem; font-weight: 700; letter-spacing: -0.02em; }

p { margin: 0 0 1rem; }

.container {
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - 2.5rem, var(--prose-width));
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 0.75rem;
  z-index: 100;
  border-radius: var(--radius-sm);
}

.skip-link:focus { left: 1rem; top: 1rem; }

/* —— Icons —— */
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: -0.2em;
  color: currentColor;
}

.icon--lg {
  width: 1.5rem;
  height: 1.5rem;
}

.nav-link .icon,
.site-footer nav a .icon {
  opacity: 0.88;
}

.nav-link:hover .icon,
.site-footer nav a:hover .icon {
  opacity: 1;
  color: var(--accent);
}

.site-footer nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding: 0.65rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo:hover { color: var(--text); text-decoration: none; }

.logo__mark {
  display: inline-flex;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  line-height: 0;
}

.logo__mark svg { width: 100%; height: 100%; display: block; }

.logo__text {
  font-family: var(--font);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.logo__text span {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.78em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 1.25rem;
  font-size: 0.92rem;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
}

.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav a.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nav a.nav-cta,
.nav a.btn {
  margin-left: 0.35rem;
}

/* Кнопка CTA в шапке — не наследовать цвет ссылок .nav a */
.nav a.btn-primary.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 0.42rem 0.9rem;
  font-weight: 700;
  font-size: 0.84rem;
  line-height: 1.25;
  box-shadow: none;
  text-decoration: none;
}

.nav a.btn-primary.nav-cta:hover {
  color: #fff;
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  text-decoration: none;
}

.nav a.btn-primary.nav-cta .icon {
  color: #fff;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1.05rem;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.3;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.btn-sm {
  padding: 0.38rem 0.8rem;
  font-size: 0.84rem;
}

/* —— Main / crumbs —— */
.site-main {
  flex: 1 0 auto;
}

.crumb-bar {
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.breadcrumbs {
  font-size: 0.8125rem;
  color: var(--text-faint);
  padding: 0.85rem 0;
  margin: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.breadcrumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}

.breadcrumbs li + li::before {
  content: "/";
  margin: 0 0.45rem;
  color: var(--border-strong);
  font-weight: 500;
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumbs a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.breadcrumbs [aria-current="page"] {
  color: var(--text);
  font-weight: 650;
}

/* —— Hero —— */
.hero {
  padding: 2.25rem 0 2rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.hero--portal {
  padding: 2.75rem 0 2.4rem;
  background:
    linear-gradient(90deg, var(--accent) 0 4px, transparent 4px),
    var(--bg-surface);
}

.hero__inner { max-width: 40rem; }

.hero-brand {
  font-family: var(--font);
  font-size: clamp(2rem, 4.2vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent);
  margin: 0 0 0.35rem;
  line-height: 1.05;
}

.hero--portal h1 {
  font-family: var(--font);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem;
  letter-spacing: -0.015em;
  line-height: 1.4;
  max-width: 36ch;
}

.hero-sub {
  color: var(--text-muted);
  margin: 0 0 1.15rem;
  max-width: 42ch;
  font-size: 0.98rem;
  line-height: 1.5;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.hero-search {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.15rem;
  max-width: 28rem;
  align-items: stretch;
}

.hero-search input {
  flex: 1;
  min-width: 0;
  height: 2.75rem;
  padding: 0 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--bg);
}

.hero-search input:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.hero-search .btn {
  height: 2.75rem;
  padding-inline: 1.05rem;
}

.hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Sections —— */
.section {
  padding: 2.5rem 0;
}

.crumb-bar + .section,
.site-main > .section:first-child {
  padding-top: 1.5rem;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section__head {
  margin-bottom: 1.25rem;
}

.section__head p {
  color: var(--text-muted);
  margin: 0.35rem 0 0;
  max-width: 48ch;
}

.section__more {
  margin: 1.25rem 0 0;
  font-weight: 600;
}

.section--catalog {
  background:
    linear-gradient(180deg, #faf9f7 0%, var(--bg) 100%);
}

.catalog-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.catalog-head .section__head,
.catalog-head > div {
  margin-bottom: 0;
}

.catalog-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.catalog-path li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.catalog-path li:not(:last-child)::after {
  content: "→";
  margin-left: 0.15rem;
  color: var(--border-strong);
  font-weight: 600;
}

.group-title {
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin: 1.5rem 0 0.75rem;
  padding-left: 0.65rem;
  border-left: 3px solid var(--accent);
}

.catalog-block:first-of-type .group-title { margin-top: 0.35rem; }

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

.series-tile {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 0.9rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.series-tile:hover {
  border-color: var(--accent);
  color: var(--text);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(26, 61, 102, 0.08);
}

.series-tile__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  height: 2.35rem;
  padding: 0 0.35rem;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.series-tile__body {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.series-tile__name {
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.series-tile__count {
  color: var(--text-faint);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 0.74rem;
}

.series-tile__arrow {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--text-faint);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--ease), transform var(--ease), color var(--ease);
}

.series-tile:hover .series-tile__arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent);
}

.series-tile:hover .series-tile__mark {
  background: var(--accent);
  color: #fff;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip-row--tight { gap: 0.35rem; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.3;
}

a.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

a.chip.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

a.chip.is-empty {
  opacity: 0.72;
}

/* —— Layout —— */
.layout-split {
  display: grid;
  gap: 2rem;
  padding: 1.5rem 0 2.75rem;
}

@media (min-width: 960px) {
  .layout-split {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 2.5rem;
    align-items: start;
  }
}

.layout-split__main {
  max-width: var(--prose-width);
  min-width: 0;
}

.layout-split__main--wide {
  max-width: min(54rem, 100%);
}

.layout-split__side {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

@media (min-width: 960px) {
  .layout-split__side {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
  }
}

.layout-split__side h3 {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

.layout-split__side nav {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.layout-split__side a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.layout-split__side a .icon {
  color: var(--text-faint);
}

.layout-split__side a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.layout-split__side a:hover .icon {
  color: var(--accent);
}

/* —— Article / gen —— */
.page-kicker {
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
  margin: 0 0 0.4rem;
}

.page-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 0.85rem;
  font-weight: 500;
}

.gen-page .gen-head { margin-bottom: 1.15rem; }
.gen-page .gen-head h1 { margin-bottom: 0.4rem; }

.prose { max-width: var(--prose-width); }
.prose.article-body,
.layout-split__main.prose { max-width: none; }

.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin: 0.25rem 0; }

.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.check-list li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
}

/* —— Tables —— */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.92rem;
  margin: 0 0 1.35rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.data-table tr:last-child td { border-bottom: none; }

.data-table th {
  font-weight: 700;
  color: var(--text-faint);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-soft);
}

.data-table a { font-weight: 650; }

.sev {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bg-soft);
  color: var(--text-muted);
  white-space: nowrap;
}

.sev--high,
.sev--very-high {
  background: #fde8e6;
  color: var(--danger);
}

.sev--medium { background: #fef4d8; color: var(--warning); }
.sev--low,
.sev--low-medium { background: var(--accent-soft); color: var(--accent); }

.problems-jump {
  margin: 0 0 1.5rem;
}

.problems-group {
  margin: 0 0 1.75rem;
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}

.problems-group .group-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.65rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
}

.problems-group__count {
  color: var(--text-faint);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
}

.problems-row__desc {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  max-width: 52ch;
  line-height: 1.45;
}

.data-table td .sev {
  margin-left: 0.4rem;
  vertical-align: middle;
}

.lead-cta {
  margin: 1.75rem 0 0;
  padding: 1.25rem 1.3rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background:
    linear-gradient(135deg, var(--accent-soft) 0%, var(--bg-surface) 42%);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.lead-cta p { margin: 0 0 0.85rem; color: var(--text-muted); max-width: 48ch; }
.lead-cta strong { color: var(--text); }

.lead-cta .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

/* —— Problem detail —— */
.problem-page .problem-hero {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin: 0 0 1.25rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--border);
}

.problem-hero__mark {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: #fde8e6;
  color: var(--danger);
  border: 1px solid #f3c9c4;
}

.problem-hero__body {
  min-width: 0;
  flex: 1;
}

.problem-hero__body h1 {
  margin-bottom: 0.65rem;
}

.problem-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.problem-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.2;
}

.problem-badge .icon {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--text-faint);
}

.problem-badge__label {
  color: var(--text-faint);
  font-weight: 600;
}

.problem-badge strong {
  font-weight: 700;
}

.problem-badge--muted {
  color: var(--text-muted);
  background: var(--bg-soft);
}

.problem-urgent--banner {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 0 0 1.25rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid #f3c9c4;
  background: #fdf3f2;
  color: var(--text);
}

.problem-urgent--banner .icon {
  color: var(--danger);
  margin-top: 0.15rem;
}

.problem-urgent--banner strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--danger);
}

.problem-urgent--banner p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.problem-block {
  margin: 0 0 1rem;
  padding: 1rem 1.05rem 1.05rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.problem-block--soft {
  background: var(--bg-soft);
  box-shadow: none;
}

.problem-block--urgent {
  border-color: #f3c9c4;
  background: #fdf8f7;
}

.problem-block h2 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.7rem;
  font-size: 1.05rem;
}

.problem-block__icon {
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}

.problem-block--urgent .problem-block__icon {
  background: #fde8e6;
  color: var(--danger);
}

.problem-block__body {
  color: var(--text);
  font-size: 0.98rem;
}

.problem-block__body > :last-child {
  margin-bottom: 0;
}

.problem-block .chip-row {
  margin: 0;
}

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

.problem-sources li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  margin: 0;
}

.problem-sources li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.problem-source-type {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-faint);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.problem-toc {
  margin-bottom: 0.35rem;
}

@media (max-width: 720px) {
  .problem-page .problem-hero {
    gap: 0.75rem;
  }

  .problem-hero__mark {
    width: 2.5rem;
    height: 2.5rem;
  }

  .problem-block {
    padding: 0.85rem 0.9rem;
  }
}

.empty-note { color: var(--text-muted); }

.article-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.article-list li {
  margin: 0;
  padding: 1rem 1.1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.article-list li p {
  margin: 0.4rem 0 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.article-list a strong {
  font-family: var(--font);
  font-weight: 750;
  letter-spacing: -0.015em;
}

/* —— Blog index / show —— */
.blog-index__head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin: 0 0 1.25rem;
}

.blog-index__mark,
.blog-article__mark {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid #d5e0ee;
}

.blog-index__head h1 {
  margin-bottom: 0.4rem;
}

.blog-index__lead {
  margin: 0;
  color: var(--text-muted);
  max-width: 40rem;
}

.blog-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.5rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}

.blog-card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.blog-card {
  margin: 0;
}

.blog-card__link {
  display: block;
  padding: 1.05rem 1.15rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--ease), transform var(--ease);
}

.blog-card__link:hover {
  border-color: var(--accent);
  text-decoration: none;
  color: var(--text);
  transform: translateY(-1px);
}

.blog-card__cat {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-bottom: 0.35rem;
}

.blog-card__cat .icon {
  width: 0.9rem;
  height: 0.9rem;
}

.blog-card__title {
  display: block;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.blog-card__link:hover .blog-card__title {
  color: var(--accent);
}

.blog-card__excerpt {
  margin: 0 0 0.7rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.blog-card__more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
}

.blog-article__head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin: 0 0 1.35rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--border);
}

.blog-article__head-body {
  min-width: 0;
  flex: 1;
}

.blog-article__head h1 {
  margin-bottom: 0.5rem;
}

.blog-article__lede {
  font-size: 1.08rem;
  color: var(--text-muted);
  margin: 0 0 0.65rem;
  line-height: 1.55;
}

.blog-article__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-faint);
  font-weight: 600;
}

.blog-article__body {
  margin-bottom: 0.5rem;
}

.blog-article__body h2 {
  margin-top: 1.65rem;
  padding-top: 0.35rem;
}

.blog-article__body > :first-child {
  margin-top: 0;
}

.blog-side-issues {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.page-kicker a {
  color: inherit;
  text-decoration: none;
}

.page-kicker a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* —— Visual diagrams / interactivity —— */
.viz {
  margin: 0 0 1.5rem;
  padding: 1rem 1.05rem 1.1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.viz__caption {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.viz__canvas {
  overflow: hidden;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, #f7f6f3 0%, #eef1f5 100%);
  border: 1px solid var(--border);
}

.viz__hint {
  margin: 0.65rem 0 0;
  font-size: 0.84rem;
}

.viz__canvas--car {
  background:
    linear-gradient(180deg, #eef2f6 0%, #e4e9ef 55%, #d8dee6 100%);
  min-height: 280px;
}

.viz__canvas--schema {
  background:
    linear-gradient(180deg, #f7f6f3 0%, #eef1f5 100%);
  padding: 0.35rem;
}

.viz-car {
  display: block;
  width: 100%;
  height: auto;
  max-height: 340px;
}

.viz-callout {
  pointer-events: none;
}

.viz-hotspot {
  fill: rgba(26, 61, 102, 0.07);
  stroke: rgba(26, 61, 102, 0.4);
  stroke-width: 1.6;
  stroke-dasharray: 5 4;
  cursor: pointer;
  transition: fill 0.16s ease, stroke 0.16s ease, stroke-dasharray 0.16s ease;
}

.viz-hotspot:hover,
.viz-hotspot.is-active {
  fill: rgba(26, 61, 102, 0.2);
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-dasharray: none;
}

.viz--car .viz-legend__btn.is-active .viz-legend__dot,
.viz-hotspot.is-active + .viz-callouts {
  /* no-op keep specificity */
}

.viz-schema {
  display: block;
  width: 100%;
  height: auto;
  max-height: 360px;
}

.viz-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.viz-legend__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
}

.viz-legend__btn:hover,
.viz-legend__btn.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.viz-legend__count {
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.viz-legend__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.viz-legend__dot--engine { background: #1a3d66; }
.viz-legend__dot--cooling { background: #2f6fed; }
.viz-legend__dot--oil { background: #9a6700; }
.viz-legend__dot--exhaust { background: #b42318; }
.viz-legend__dot--chassis { background: #1f6b4a; }

.viz-schema__panel {
  fill: #e8eef6;
  stroke: #1a3d66;
  stroke-width: 1.75;
}

.viz-schema__panel--soft { fill: #f0eeea; }
.viz-schema__panel--accent { fill: #d9e5f5; }

.viz-schema__node {
  fill: #f7f6f3;
  stroke: #1a3d66;
  stroke-width: 1.75;
}

.viz-schema__node--accent {
  fill: #e8eef6;
  stroke: #1a3d66;
  stroke-width: 2.2;
}

.viz-schema__path {
  fill: none;
  stroke: #1a3d66;
  stroke-width: 2;
  stroke-linecap: round;
}

.viz-schema__path--pulse {
  stroke-dasharray: 6 5;
  animation: viz-dash 1.2s linear infinite;
}

@keyframes viz-dash {
  to { stroke-dashoffset: -22; }
}

.viz-schema__title,
.viz-schema__label,
.viz-schema__body,
.viz-schema__hint {
  font-family: var(--font);
  fill: #12141a;
}

.viz-schema__title { font-size: 12px; font-weight: 700; fill: #5c616b; }
.viz-schema__label { font-size: 12px; font-weight: 750; }
.viz-schema__body { font-size: 13px; font-weight: 650; }
.viz-schema__hint { font-size: 11px; font-weight: 600; fill: #8b909a; }

.gen-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1.15rem;
}

.gen-toolbar__label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.25rem;
}

.gen-toolbar .chip {
  cursor: pointer;
  font: inherit;
}

.gen-group {
  scroll-margin-top: 5rem;
  transition: outline-color 0.2s ease, background 0.2s ease;
  border-radius: var(--radius);
  padding: 0.15rem 0.35rem 0.35rem;
  margin: 0 -0.35rem 1rem;
}

.gen-group.is-active {
  background: var(--accent-soft);
  outline: 1px solid #c5d4e8;
}

.gen-group__jump {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  padding: 0;
  margin-right: 0.35rem;
  cursor: pointer;
  vertical-align: middle;
}

.check-list--interactive {
  list-style: none;
  padding: 0;
}

.check-list--interactive li {
  padding-left: 0;
}

.check-list--interactive li::before {
  display: none;
}

.check-list--interactive label {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  cursor: pointer;
  width: 100%;
}

.check-list--interactive input {
  margin-top: 0.3rem;
  accent-color: var(--accent);
}

.check-list--interactive li.is-done span {
  color: var(--text-muted);
  text-decoration: line-through;
}

.check-list__hint {
  margin: -0.5rem 0 1.25rem;
  font-size: 0.84rem;
}

.blog-toc {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.blog-toc__title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  margin-bottom: 0.5rem;
}

.blog-toc__list {
  margin: 0;
  padding-left: 1.2rem;
}

.blog-toc__list a {
  font-weight: 650;
  font-size: 0.94rem;
}

@media (max-width: 720px) {
  .blog-index__mark,
  .blog-article__mark {
    width: 2.5rem;
    height: 2.5rem;
  }
}

/* —— Forms / wizard —— */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow-sm);
}

.form-grid {
  display: grid;
  gap: 0.95rem;
  max-width: 36rem;
}

.form-grid label {
  display: grid;
  gap: 0.35rem;
  font-weight: 650;
  font-size: 0.9rem;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  font: inherit;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.form-grid textarea { min-height: 7rem; resize: vertical; }

.form-optional {
  color: var(--text-faint);
  font-weight: 500;
  font-size: 0.84em;
}

.form-check {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 0.55rem;
  font-weight: 500 !important;
  font-size: 0.88rem !important;
  color: var(--text-muted);
}

.form-check input {
  margin-top: 0.2rem;
  width: auto;
}

.form-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 0;
}

.wizard-steps span {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-faint);
  font-size: 0.78rem;
  font-weight: 700;
}

.wizard-steps .is-active {
  background: var(--accent);
  color: #fff;
}

.wizard-steps .is-done {
  background: var(--accent-soft);
  color: var(--accent);
}

.error { color: var(--danger); margin: 0 0 0.75rem; padding-left: 1.1rem; }

.section--lead {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.lead-page {
  display: grid;
  gap: 1.25rem;
  max-width: 40rem;
}

.lead-page__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead-page__intro h1 { margin-bottom: 0.4rem; }
.lead-page__intro p { color: var(--text-muted); max-width: 42ch; }

.lead-page__card { max-width: 36rem; }

/* —— Lead modal —— */
html.lead-modal-open,
body.lead-modal-open {
  overflow: hidden;
}

body.lead-modal-open .cta-sticky {
  display: none !important;
}

.lead-modal {
  width: min(100% - 1.5rem, 28.5rem);
  max-height: 92dvh;
  margin: auto;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  overflow: hidden;
  box-shadow: none;
}

.lead-modal::backdrop {
  background: rgba(12, 18, 28, 0.52);
  backdrop-filter: blur(2px);
}

.lead-modal__panel {
  display: flex;
  flex-direction: column;
  max-height: 92dvh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(18, 20, 26, 0.22);
}

.lead-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.15rem 0.7rem;
  background:
    linear-gradient(180deg, var(--accent-soft) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.lead-modal__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead-modal__head h2 {
  margin: 0 0 0.3rem;
  font-size: 1.12rem;
}

.lead-modal__sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.4;
  max-width: 34ch;
}

.lead-modal__close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
}

.lead-modal__close:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.lead-modal__progress {
  display: flex;
  gap: 0.35rem;
  padding: 0.7rem 1.15rem 0;
  flex-shrink: 0;
}

.lead-modal__progress span {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: var(--bg-soft);
}

.lead-modal__progress .is-active,
.lead-modal__progress .is-done {
  background: var(--accent);
}

.lead-modal__form,
.lead-modal__success {
  padding: 0.85rem 1.15rem 1.15rem;
}

.lead-modal__form {
  display: grid;
  gap: 0.65rem;
}

/* display:* перебивает UA [hidden] — явно прячем шаги/кнопки */
.lead-modal [hidden] {
  display: none !important;
}

.lead-modal__step {
  display: grid;
  gap: 0.55rem;
}

.lead-modal__form label {
  display: grid;
  gap: 0.28rem;
  font-weight: 650;
  font-size: 0.9rem;
}

.lead-modal__optional span {
  color: var(--text-faint);
  font-weight: 500;
  font-size: 0.84em;
}

.lead-modal__form input,
.lead-modal__form textarea {
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  width: 100%;
  max-width: 100%;
}

.lead-modal__form input:focus,
.lead-modal__form textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.lead-modal__form textarea {
  min-height: 4.75rem;
  max-height: 8rem;
  resize: none;
}

.lead-modal__hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-faint);
}

.lead-modal__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.lead-chip {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.26rem 0.6rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
}

.lead-chip:hover,
.lead-chip.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.lead-modal__check {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 0.55rem;
  font-weight: 500 !important;
  font-size: 0.84rem !important;
  color: var(--text-muted);
}

.lead-modal__check input {
  width: auto;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.lead-modal__error {
  margin: 0;
  color: var(--danger);
  font-size: 0.88rem;
  font-weight: 600;
}

.lead-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.1rem;
}

.lead-modal__actions .btn { flex: 1 1 auto; min-width: 7rem; }

.lead-modal__success {
  text-align: center;
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
}

.lead-modal__success-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.lead-modal__success h3 { margin: 0 0 0.4rem; }
.lead-modal__success p { color: var(--text-muted); }
.lead-modal__success .btn { margin-top: 0.5rem; }

/* —— Footer / sticky —— */
.site-footer {
  margin-top: auto;
  padding: 2.25rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.site-footer__grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 720px) {
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
}

.site-footer nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }

.site-footer strong {
  display: block;
  color: var(--text);
  font-weight: 750;
  margin-bottom: 0.45rem;
}

.site-footer p { margin: 0; max-width: 36ch; }

.cta-sticky {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--border);
  padding: 0.65rem 0;
}

.cta-sticky.is-visible { display: block; }

.cta-sticky .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.cta-sticky span {
  font-weight: 650;
  font-size: 0.9rem;
}

/* —— Admin helpers —— */
.stat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.stat-strip strong {
  color: var(--text);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

table th, table td {
  text-align: left;
  padding: 0.5rem 0.55rem;
  border-bottom: 1px solid var(--border);
}

/* —— Admin layout —— */
.admin-body {
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(26, 61, 102, 0.08), transparent 60%),
    var(--bg);
}

.admin-header .logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-header .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.admin-header .nav-logout {
  display: inline-flex;
  margin-left: 0.25rem;
}

.admin-header .nav-logout .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.admin-main {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

.admin-hero {
  margin-bottom: 1.25rem;
}

.admin-hero h1 {
  margin: 0 0 0.35rem;
  letter-spacing: -0.03em;
}

.admin-hero__sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.85rem;
  margin: 0 0 1.5rem;
}

.admin-stat {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.05rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

a.admin-stat:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(26, 61, 102, 0.08);
  text-decoration: none;
  color: inherit;
}

.admin-stat .icon {
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.admin-stat strong {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.admin-stat span {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.25rem 0 1.5rem;
}

.admin-actions .btn,
.btn .icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn .icon {
  width: 1rem;
  height: 1rem;
  display: inline-block;
}

.admin-panel {
  margin: 1.5rem 0;
}

.admin-panel h2 {
  margin: 0 0 0.85rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.admin-inline-nav {
  margin: 0.5rem 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.admin-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 0.65rem;
  margin: 0 0 1.25rem;
}

.admin-status-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
}

.admin-status-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 0.9rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  border-left: 3px solid var(--border);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-status-card:hover,
.admin-status-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(26, 61, 102, 0.08);
  text-decoration: none;
  color: inherit;
}

.admin-status-card strong {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.admin-status-card span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.admin-status-card.status-EMPTY { border-left-color: #9aa3ad; }
.admin-status-card.status-PARTIAL { border-left-color: #c9a227; }
.admin-status-card.status-REVIEW { border-left-color: #d97706; }
.admin-status-card.status-EARLY_DATA { border-left-color: #3b82f6; }
.admin-status-card.status-READY { border-left-color: #16a34a; }

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.75rem;
  align-items: end;
  padding: 0.9rem 1rem;
  margin: 0 0 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.admin-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 118px;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--text-muted);
}

.admin-filters__grow {
  flex: 1 1 160px;
  min-width: 160px;
}

.admin-filters select,
.admin-filters input {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  min-height: 2.15rem;
}

.admin-filters__actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.admin-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 700;
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.admin-table td {
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: rgba(26, 61, 102, 0.03);
}

.admin-table .num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 0.35rem;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.status-EMPTY { background: #eef1f4; color: #5b6570; }
.status-PARTIAL { background: #fbf3d5; color: #8a6d12; }
.status-REVIEW { background: #ffedd5; color: #9a3412; }
.status-EARLY_DATA { background: #dbeafe; color: #1d4ed8; }
.status-READY { background: #dcfce7; color: #166534; }

.prio-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.3rem;
  font-size: 0.7rem;
  font-weight: 800;
  vertical-align: middle;
}

.prio-P0 { background: #fee2e2; color: #b91c1c; }
.prio-P1 { background: #ffedd5; color: #c2410c; }
.prio-P2 { background: #e0e7ff; color: #3730a3; }
.prio-P3 { background: #f3f4f6; color: #4b5563; }

.type-badge,
.task-status {
  display: inline-flex;
  padding: 0.12rem 0.4rem;
  border-radius: 0.3rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 750;
}

.cov-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 110px;
}

.cov-bar--sm { min-width: 92px; }
.cov-bar--lg { margin: 0 0 1.25rem; max-width: 420px; }

.cov-bar__track {
  flex: 1;
  height: 7px;
  background: #e6e9ee;
  border-radius: 999px;
  overflow: hidden;
}

.cov-bar--lg .cov-bar__track { height: 10px; }

.cov-bar__fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #1a3d66, #2f6fad);
  border-radius: inherit;
  min-width: 0;
}

.cov-bar__num {
  font-size: 0.78rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  min-width: 2.6rem;
}

.admin-rec-list {
  margin: 0;
  padding-left: 1.2rem;
}

.admin-rec-list li {
  margin: 0.4rem 0;
  line-height: 1.45;
}

.admin-rec-note {
  color: var(--text-muted);
  font-size: 0.92em;
}

.gap-card {
  padding: 1rem 0 1.15rem;
  border-bottom: 1px solid var(--border);
}

.gap-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.55rem;
}

.gap-card__head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.gap-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  align-items: center;
}

.gap-metric {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.gap-engines,
.gap-articles {
  margin: 0.55rem 0 0;
  font-size: 0.9rem;
}

.eng-pill {
  display: inline-flex;
  align-items: center;
  margin: 0.15rem 0.2rem 0.15rem 0;
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid var(--border);
}

.eng-pill.is-ok {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}

.eng-pill.is-miss {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.4rem 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.check-grid li {
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 650;
  border: 1px solid var(--border);
}

.check-grid li.is-ok {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}

.check-grid li.is-miss {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.field-miss-summary,
.gap-fields,
.field-chips-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  align-items: center;
}

.gap-fields {
  margin: 0.65rem 0 0.35rem;
  font-size: 0.9rem;
}

.field-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: #334155;
  white-space: nowrap;
}

.field-chip.is-ok {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}

.field-chip.is-miss {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}

.field-chip strong {
  font-variant-numeric: tabular-nums;
}

.admin-panel--alert {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff7ed 0%, #fff 55%);
}

.admin-panel--tight h2 {
  margin-bottom: 0.35rem;
}

.faq-list {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0 1.5rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface, #fff);
  padding: 0;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 0.85rem 1rem;
  font-weight: 650;
}

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

.faq-item__body {
  padding: 0 1rem 1rem;
  color: var(--muted-fg, #475569);
  line-height: 1.55;
}

.engine-cov-row {
  margin: 0.85rem 0;
}

.engine-cov-row__head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
}

.muted { color: var(--text-muted); }

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

.admin-plan-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.85rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.admin-plan-list time {
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  color: var(--accent);
  min-width: 8.5rem;
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.inline-form { display: inline; margin: 0; }

.admin-blog-form {
  max-width: 46rem;
}

.admin-body-field {
  min-height: 18rem !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
}

.admin-publish-box {
  margin: 0;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
  display: grid;
  gap: 0.75rem;
}

.admin-publish-box legend {
  padding: 0 0.35rem;
  font-weight: 750;
  font-size: 0.9rem;
}

.admin-check {
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem !important;
  font-weight: 600;
}

.admin-check input { width: auto; }

.admin-flash {
  padding: 0.65rem 0.85rem;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: var(--radius-sm);
  font-weight: 650;
}

.admin-danger {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  max-width: 46rem;
}

.admin-db-meta {
  display: grid;
  gap: 0.65rem 1.25rem;
  margin: 0 0 1.25rem;
}

.admin-db-meta > div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.5rem 1rem;
  align-items: start;
}

.admin-db-meta dt {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.admin-db-meta dd {
  margin: 0;
  font-size: 0.9rem;
  word-break: break-word;
}

.admin-db-meta code {
  font-size: 0.82rem;
  background: var(--accent-soft);
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
}

.admin-db-tables-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}

.admin-db-hint {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .admin-db-meta > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* —— Mobile —— */@media (max-width: 767px) {
  .container { width: min(100% - 1.5rem, var(--max-width)); }

  .nav-toggle { display: inline-flex; }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.75rem 0 0.25rem;
  }

  .nav.is-open { display: flex; }

  .site-header__inner { flex-wrap: wrap; }
  .nav a.nav-cta { margin-left: 0; }

  .series-grid {
    grid-template-columns: 1fr 1fr;
  }

  .series-tile {
    grid-template-columns: auto 1fr;
    padding: 0.75rem;
  }

  .series-tile__arrow { display: none; }

  .catalog-path { width: 100%; }

  .lead-modal {
    width: min(100% - 1rem, 28.5rem);
  }

  .lead-modal__panel {
    border-radius: 12px;
  }

  .cta-sticky span { display: none; }

  .hero-search {
    flex-direction: column;
  }

  .hero-search .btn {
    width: 100%;
  }

  .data-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
