/* ===========================================================
   CheckDiag — redesign 2026 «Приборная панель» (вариант B1)
   Подключается ПОСЛЕ main.css и переопределяет дизайн-токены.
   Разметка шаблонов и URL не меняются.
   =========================================================== */

:root {
  --bg-void: #0b0c0f;
  --bg-surface: #16181d;
  --bg-light: #101216;
  --bg-light-alt: #14171c;
  --text-dark: #e7e9ee;
  --text-dark-muted: #8b8f9a;
  --text-light: #e7e9ee;
  --text-light-muted: #8b8f9a;
  --teal: #f59e0b;
  --teal-dim: #7a5514;
  --teal-deep: #fbbf24;
  --yellow: #f59e0b;
  --yellow-ink: #1a1204;
  --warn: #fbbf24;
  --warn-bg: #201a10;
  --border-dark: #23262d;
  --border-light: #23262d;
  --radius: 10px;
  --font-body: 'Golos Text', 'IBM Plex Sans', system-ui, sans-serif;
  --font-display: 'Russo One', 'PT Sans Narrow', var(--font-body);
  --red-lamp: #ef4444;
}

body { background: var(--bg-void); }

/* заголовки светлых секций тоже дисплейным шрифтом */
.cd-section--light h1, .cd-section--light h2, .cd-section--light h3,
.cd-section--surface h1, .cd-section--surface h2, .cd-section--surface h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
}
h1, h2, h3, h4 { font-weight: 400; }

/* сетка-фон приглушённее */
.cd-section--dark.cd-section--grid { background-image: none; }

/* ---------- header ---------- */
.cd-header { background: rgba(11, 12, 15, 0.97); }
.cd-logo__word { font-family: var(--font-display); letter-spacing: 0.04em; }
.cd-logo__word::first-letter { color: var(--text-dark); }
.cd-header__phone { color: var(--teal-deep); }
.cd-primary-nav > ul > li > a:hover { color: var(--teal-deep); }

/* ---------- кнопки ---------- */
.cd-btn { border-radius: 10px; }
.cd-btn--primary {
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
  color: var(--yellow-ink);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.95rem;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.25);
}
.cd-btn--ghost { border-color: #33363f; color: var(--text-dark); }
.cd-section--light .cd-btn--ghost, .cd-section--surface .cd-btn--ghost {
  border-color: #33363f; color: var(--text-dark);
}

/* ---------- карточки ---------- */
.cd-card { background: var(--bg-surface); border-color: var(--border-dark); }
.cd-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(245, 158, 11, 0.35);
  transform: translateY(-3px);
}
.cd-card__img--placeholder {
  color: var(--text-dark-muted);
  background: repeating-linear-gradient(135deg, var(--bg-surface) 0 10px, #101318 10px 20px);
}
.cd-card__body p { color: var(--text-dark-muted); }
.wp-block-details { background: var(--bg-surface); border-color: var(--border-dark); }
.cd-warning-block { background: var(--warn-bg); border-color: #4a3a14; }
.cd-warning-block p { color: var(--text-dark); }
.cd-demo-notice { background: var(--warn-bg); border-color: #4a3a14; color: var(--teal-deep); }
.cd-chip { border-color: var(--border-dark); color: var(--text-dark); }
.cd-chip:hover { border-color: var(--teal); color: var(--teal-deep); }
.cd-breadcrumbs a { color: var(--text-dark-muted); }
.cd-hierarchy-back a { color: var(--teal-deep); }
.cd-map-embed, .cd-reviews-embed iframe { border-color: var(--border-dark); }

/* ---------- hero «приборная панель» (front-page) ---------- */
.cd-dash-hero { padding: 2.5rem 0 3rem; overflow: hidden; }
.cd-dash-hero .cd-container {
  display: flex; align-items: center; gap: 2.5rem; flex-wrap: wrap;
}
.cd-dash-hero__copy { flex: 1 1 420px; min-width: 0; }
.cd-dash-hero__dial-wrap {
  flex: 0 1 400px; display: flex; justify-content: center; min-width: 280px;
}

.cd-dash-badge {
  display: inline-flex; align-items: center; gap: 0.6rem;
  border: 1px solid #33363f; border-radius: 999px;
  padding: 0.45rem 1rem; margin-bottom: 1.2rem;
  font-size: 0.82rem; color: var(--teal-deep);
}
.cd-dash-badge img { height: 20px; width: auto; }

.cd-dash-slogans {
  position: relative;
  height: 2.3em;
  margin: 0 0 0.4em;
  font-size: clamp(1.9rem, 4.2vw + 0.6rem, 3rem);
  line-height: 1.12;
  letter-spacing: 0.01em;
}
.cd-dash-slogans { font-family: var(--font-display); font-weight: 400; }
/* H1-фраза длиннее слоганов — ей чуть меньший кегль, чтобы влезала в 2 строки */
.cd-dash-slogans h1.cd-slogan { font-size: 0.72em; line-height: 1.18; }
.cd-dash-slogans .cd-slogan {
  position: absolute; left: 0; top: 0; width: 100%;
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
  opacity: 0;
  animation: cd-slogan 21s ease-in-out infinite;
}
.cd-dash-slogans .cd-slogan-1 { animation-delay: 3s; }
.cd-dash-slogans .cd-slogan-2 { animation-delay: 6s; }
.cd-dash-slogans .cd-slogan-3 { animation-delay: 9s; }
.cd-dash-slogans .cd-slogan-4 { animation-delay: 12s; }
.cd-dash-slogans .cd-slogan-5 { animation-delay: 15s; }
.cd-dash-slogans .cd-slogan-6 { animation-delay: 18s; }
@keyframes cd-slogan {
  0% { opacity: 0; transform: translateY(10px); }
  2.2% { opacity: 1; transform: translateY(0); }
  12.2% { opacity: 1; transform: translateY(0); }
  14.3% { opacity: 0; transform: translateY(-8px); }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cd-dash-slogans .cd-slogan { opacity: 0 !important; animation: none !important; }
  .cd-dash-slogans h1.cd-slogan { opacity: 1 !important; transform: none !important; }
}

.cd-dash-hero__sub {
  max-width: 46ch; font-size: 1.05rem; color: var(--text-dark-muted);
}

/* циферблат */
.cd-dash-dial { position: relative; width: 100%; max-width: 400px; aspect-ratio: 1 / 1; }
.cd-dash-dial > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* анимируем весь слой стрелки (HTML-элемент) — композитится на GPU,
   вращение внутреннего SVG-узла на слабых телефонах дёргается */
.cd-dash-dial__needle-layer {
  pointer-events: none;
  transform-origin: 50% 50%;
  will-change: transform;
  animation: cd-needle 8s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}
@keyframes cd-needle {
  0% { transform: rotate(-118deg); }
  30% { transform: rotate(72deg); }
  45% { transform: rotate(38deg); }
  60% { transform: rotate(55deg); }
  80% { transform: rotate(-30deg); }
  100% { transform: rotate(-118deg); }
}
@media (prefers-reduced-motion: reduce) {
  .cd-dash-dial__needle-layer { animation: none; transform: rotate(38deg); }
}
.cd-dash-dial__lamp { position: absolute; width: auto; }
.cd-dash-dial__lamp--amber { filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.4)); }
.cd-dash-dial__lamp--red { filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.4)); }
.cd-dash-dial__lamp--check { left: 29%; top: 53%; height: 6.75%; animation: cd-mil 4s linear infinite; }
.cd-dash-dial__lamp--temp { left: 64.5%; top: 52%; height: 7.25%; }
.cd-dash-dial__lamp--oil { left: 34%; top: 63.25%; height: 5%; }
.cd-dash-dial__lamp--airbag { left: 57%; top: 60%; height: 6%; }
.cd-dash-dial__lamp--abs { left: 45.75%; top: 67%; height: 6.5%; }
.cd-dash-dial__lamp--battery { left: 44.5%; top: 58%; height: 4.75%; }
@keyframes cd-mil {
  0%, 8% { opacity: 1; }
  12%, 20% { opacity: 0.15; }
  24%, 100% { opacity: 1; }
}
.cd-dash-badge img { animation: cd-mil 4s linear infinite; }

@media (max-width: 720px) {
  .cd-dash-hero .cd-container { gap: 1.5rem; }
  .cd-dash-hero__dial-wrap { flex-basis: 100%; }
  .cd-dash-dial { max-width: 320px; }
  .cd-dash-slogans { height: 2.4em; }
}

/* ---------- футер и формы в тон ---------- */
.cd-footer, .site-footer { background: var(--bg-void); border-top: 1px solid var(--border-dark); }
input[type="text"], input[type="tel"], input[type="email"], select, textarea {
  background: var(--bg-surface); color: var(--text-dark); border: 1px solid #33363f; border-radius: 8px;
}
input::placeholder, textarea::placeholder { color: #565b66; }

/* компактная навигация — всё меню в одну строку */
@media (min-width: 960px) {
  .cd-primary-nav ul { gap: 1.05rem; flex-wrap: nowrap; }
  .cd-primary-nav > ul > li > a { font-size: 0.9rem; white-space: nowrap; }
}
@media (min-width: 1180px) {
  .cd-header__address { display: none; }
}
@media (min-width: 1320px) {
  .cd-header__address { display: block; }
}

/* ===== плитки услуг с лампами ===== */
.cd-service-tiles {
  display: grid; grid-template-columns: 1fr; gap: 0.9rem; margin-top: 1.5rem;
}
@media (min-width: 560px) { .cd-service-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cd-service-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1120px) { .cd-service-tiles { grid-template-columns: repeat(5, 1fr); } }
.cd-service-tile {
  display: flex; flex-direction: column; gap: 0.55rem;
  background: var(--bg-surface); border: 1px solid var(--border-dark);
  border-radius: var(--radius); padding: 1.15rem 1.15rem 1.25rem;
  text-decoration: none; color: var(--text-dark);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.cd-service-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}
.cd-service-tile h3 {
  font-family: var(--font-body); font-weight: 600;
  font-size: 0.99rem; line-height: 1.3; margin: 0;
}
.cd-service-tile p { font-size: 0.82rem; color: var(--text-dark-muted); margin: 0; }
.cd-service-tile__lamp {
  height: 30px; width: auto; align-self: flex-start;
  transition: filter .2s ease;
}
.cd-service-tile__lamp--amber { filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.4)); }
.cd-service-tile__lamp--red { filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.4)); }
.cd-service-tile__lamp--green { filter: drop-shadow(0 0 4px rgba(52, 211, 153, 0.4)); }
.cd-service-tile:hover .cd-service-tile__lamp--amber { filter: drop-shadow(0 0 9px rgba(245, 158, 11, 0.85)); }
.cd-service-tile:hover .cd-service-tile__lamp--red { filter: drop-shadow(0 0 9px rgba(239, 68, 68, 0.85)); }
.cd-service-tile:hover .cd-service-tile__lamp--green { filter: drop-shadow(0 0 9px rgba(52, 211, 153, 0.85)); }

/* ===== прайс-строки ===== */
.cd-price-strip { margin-top: 1.4rem; max-width: 820px; }
.cd-price-strip__row {
  display: flex; align-items: baseline; gap: 0.8rem;
  padding: 0.85rem 0.2rem; text-decoration: none; color: var(--text-dark);
  border-bottom: 1px solid var(--border-dark);
}
.cd-price-strip__row:hover .cd-price-strip__name { color: var(--teal-deep); }
.cd-price-strip__name { font-size: 1rem; }
.cd-price-strip__dots { flex: 1; border-bottom: 1px dotted #3a3e47; transform: translateY(-4px); }
.cd-price-strip__price {
  font-family: var(--font-mono); font-weight: 500; white-space: nowrap; color: var(--teal-deep);
}

/* ===== форма «карта диагностики» ===== */
.cd-diagcard {
  max-width: 720px;
  background: var(--bg-surface);
  border: 1px solid #33363f; border-radius: 14px;
  padding: 1.8rem 1.9rem 1.9rem;
  position: relative;
}
.cd-diagcard::before {
  content: ''; position: absolute; left: 0; top: 14px; bottom: 14px;
  width: 3px; background: linear-gradient(180deg, #fbbf24, #f59e0b);
  border-radius: 2px;
}
.cd-diagcard__head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  margin-bottom: 1rem; flex-wrap: wrap;
}
.cd-diagcard__title {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--teal-deep);
}
.cd-diagcard__num { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-dark-muted); }
.cd-diagcard h2 { font-size: clamp(1.35rem, 2vw + 0.8rem, 1.8rem); }

/* ===== пульс главной кнопки ===== */
@keyframes cd-pulse {
  0%, 100% { box-shadow: 0 4px 18px rgba(245, 158, 11, 0.25); }
  50% { box-shadow: 0 4px 26px rgba(245, 158, 11, 0.5); }
}
.cd-btn--primary { animation: cd-pulse 2.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .cd-btn--primary { animation: none; } }

/* ===== осциллограмма в футере ===== */
.cd-footer { position: relative; }
.cd-footer-scope { display: block; width: 100%; height: 46px; overflow: hidden; }
.cd-footer-scope svg { width: 100%; height: 46px; display: block; }
.cd-footer-scope polyline {
  stroke-dasharray: 260 260;
  animation: cd-scope 6s linear infinite;
}
@keyframes cd-scope { to { stroke-dashoffset: -520; } }
@media (prefers-reduced-motion: reduce) { .cd-footer-scope polyline { animation: none; } }

/* ===== переключатель темы ===== */
.cd-theme-toggle {
  background: none; border: 1px solid var(--border-dark); border-radius: 6px;
  width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  color: var(--text-dark); cursor: pointer; flex-shrink: 0;
}
.cd-theme-toggle:hover { color: var(--teal-deep); border-color: var(--teal-dim); }
.cd-theme-toggle svg { width: 20px; height: 20px; }
.cd-theme-toggle .cd-ico-sun { display: none; }
html[data-theme="light"] .cd-theme-toggle .cd-ico-sun { display: block; }
html[data-theme="light"] .cd-theme-toggle .cd-ico-moon { display: none; }

/* ===== светлая тема ===== */
html[data-theme="light"] {
  --bg-void: #eef0f4;
  --bg-surface: #ffffff;
  --bg-light: #f7f8fa;
  --bg-light-alt: #eceef2;
  --text-dark: #1a1c22;
  --text-dark-muted: #5b6170;
  --text-light: #1a1c22;
  --text-light-muted: #5b6170;
  --teal-dim: #d9a422;
  --border-dark: #dcdfe6;
  --border-light: #dcdfe6;
  --warn-bg: #fdf3df;
  --red-lamp: #dc2626;
}
html[data-theme="light"] body { background: var(--bg-void); }
html[data-theme="light"] .cd-header { background: rgba(247, 248, 250, 0.92); border-bottom-color: var(--border-dark); }
html[data-theme="light"] .cd-logo__word,
html[data-theme="light"] .cd-primary-nav a,
html[data-theme="light"] .cd-header__address,
html[data-theme="light"] .cd-nav-toggle { color: var(--text-light); }
html[data-theme="light"] .cd-header__phone { color: #b45309; }
html[data-theme="light"] .cd-primary-nav { background: var(--bg-void); }
html[data-theme="light"] .cd-primary-nav .sub-menu { background: var(--bg-surface); border-color: var(--border-dark); }
html[data-theme="light"] .cd-section--dark { background: var(--bg-void); color: var(--text-light); }
html[data-theme="light"] .cd-section--dark p { color: var(--text-light-muted); }
html[data-theme="light"] .cd-card:hover { box-shadow: 0 10px 26px rgba(26, 28, 34, 0.12), 0 0 0 1px rgba(245, 158, 11, 0.4); }
html[data-theme="light"] .cd-service-tile:hover { box-shadow: 0 10px 22px rgba(26, 28, 34, 0.12); }
html[data-theme="light"] .cd-btn--ghost { border-color: #c9cdd6; color: var(--text-light); }
html[data-theme="light"] .cd-price-strip__price { color: #b45309; }
html[data-theme="light"] .cd-diagcard { border-color: var(--border-dark); }
html[data-theme="light"] .cd-diagcard__title { color: #b45309; }
html[data-theme="light"] input[type="text"], html[data-theme="light"] input[type="tel"],
html[data-theme="light"] input[type="email"], html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background: #ffffff; color: var(--text-light); border-color: #c9cdd6;
}
html[data-theme="light"] .cd-footer, html[data-theme="light"] .cd-mobile-cta { background: var(--bg-void); }
/* ===== плитки услуг с лампами ===== */
.cd-service-tiles {
  display: grid; grid-template-columns: 1fr; gap: 0.9rem; margin-top: 1.5rem;
}
@media (min-width: 560px) { .cd-service-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cd-service-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1120px) { .cd-service-tiles { grid-template-columns: repeat(5, 1fr); } }
.cd-service-tile {
  display: flex; flex-direction: column; gap: 0.55rem;
  background: var(--bg-surface); border: 1px solid var(--border-dark);
  border-radius: var(--radius); padding: 1.15rem 1.15rem 1.25rem;
  text-decoration: none; color: var(--text-dark);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.cd-service-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}
.cd-service-tile h3 {
  font-family: var(--font-body); font-weight: 600;
  font-size: 0.99rem; line-height: 1.3; margin: 0;
}
.cd-service-tile p { font-size: 0.82rem; color: var(--text-dark-muted); margin: 0; }
.cd-service-tile__lamp {
  height: 30px; width: auto; align-self: flex-start;
  transition: filter .2s ease;
}
.cd-service-tile:hover .cd-service-tile__lamp--amber { filter: drop-shadow(0 0 9px rgba(245, 158, 11, 0.85)); }
.cd-service-tile:hover .cd-service-tile__lamp--red { filter: drop-shadow(0 0 9px rgba(239, 68, 68, 0.85)); }
.cd-service-tile:hover .cd-service-tile__lamp--green { filter: drop-shadow(0 0 9px rgba(52, 211, 153, 0.85)); }

/* ===== прайс-строки ===== */
.cd-price-strip { margin-top: 1.4rem; max-width: 820px; }
.cd-price-strip__row {
  display: flex; align-items: baseline; gap: 0.8rem;
  padding: 0.85rem 0.2rem; text-decoration: none; color: var(--text-dark);
  border-bottom: 1px solid var(--border-dark);
}
.cd-price-strip__row:hover .cd-price-strip__name { color: var(--teal-deep); }
.cd-price-strip__name { font-size: 1rem; }
.cd-price-strip__dots { flex: 1; border-bottom: 1px dotted #3a3e47; transform: translateY(-4px); }
.cd-price-strip__price {
  font-family: var(--font-mono); font-weight: 500; white-space: nowrap; color: var(--teal-deep);
}

/* ===== форма «карта диагностики» ===== */
.cd-diagcard {
  max-width: 720px;
  background: var(--bg-surface);
  border: 1px solid #33363f; border-radius: 14px;
  padding: 1.8rem 1.9rem 1.9rem;
  position: relative;
}
.cd-diagcard::before {
  content: ''; position: absolute; left: 0; top: 14px; bottom: 14px;
  width: 3px; background: linear-gradient(180deg, #fbbf24, #f59e0b);
  border-radius: 2px;
}
.cd-diagcard__head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  margin-bottom: 1rem; flex-wrap: wrap;
}
.cd-diagcard__title {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--teal-deep);
}
.cd-diagcard__num { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-dark-muted); }
.cd-diagcard h2 { font-size: clamp(1.35rem, 2vw + 0.8rem, 1.8rem); }

/* ===== пульс главной кнопки ===== */
@keyframes cd-pulse {
  0%, 100% { box-shadow: 0 4px 18px rgba(245, 158, 11, 0.25); }
  50% { box-shadow: 0 4px 26px rgba(245, 158, 11, 0.5); }
}
.cd-btn--primary { animation: cd-pulse 2.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .cd-btn--primary { animation: none; } }

/* ===== осциллограмма в футере ===== */
.cd-footer { position: relative; }
.cd-footer-scope { display: block; width: 100%; height: 46px; overflow: hidden; }
.cd-footer-scope svg { width: 100%; height: 46px; display: block; }
.cd-footer-scope polyline {
  stroke-dasharray: 260 260;
  animation: cd-scope 6s linear infinite;
}
@keyframes cd-scope { to { stroke-dashoffset: -520; } }
@media (prefers-reduced-motion: reduce) { .cd-footer-scope polyline { animation: none; } }

/* ===== переключатель темы ===== */
.cd-theme-toggle {
  background: none; border: 1px solid var(--border-dark); border-radius: 6px;
  width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  color: var(--text-dark); cursor: pointer; flex-shrink: 0;
}
.cd-theme-toggle:hover { color: var(--teal-deep); border-color: var(--teal-dim); }
.cd-theme-toggle svg { width: 20px; height: 20px; }
.cd-theme-toggle .cd-ico-sun { display: none; }
html[data-theme="light"] .cd-theme-toggle .cd-ico-sun { display: block; }
html[data-theme="light"] .cd-theme-toggle .cd-ico-moon { display: none; }

/* ===== светлая тема ===== */
html[data-theme="light"] {
  --bg-void: #eef0f4;
  --bg-surface: #ffffff;
  --bg-light: #f7f8fa;
  --bg-light-alt: #eceef2;
  --text-dark: #1a1c22;
  --text-dark-muted: #5b6170;
  --text-light: #1a1c22;
  --text-light-muted: #5b6170;
  --teal-dim: #d9a422;
  --border-dark: #dcdfe6;
  --border-light: #dcdfe6;
  --warn-bg: #fdf3df;
  --red-lamp: #dc2626;
}
html[data-theme="light"] body { background: var(--bg-void); }
html[data-theme="light"] .cd-header { background: rgba(247, 248, 250, 0.92); border-bottom-color: var(--border-dark); }
html[data-theme="light"] .cd-logo__word,
html[data-theme="light"] .cd-primary-nav a,
html[data-theme="light"] .cd-header__address,
html[data-theme="light"] .cd-nav-toggle { color: var(--text-light); }
html[data-theme="light"] .cd-header__phone { color: #b45309; }
html[data-theme="light"] .cd-primary-nav { background: var(--bg-void); }
html[data-theme="light"] .cd-primary-nav .sub-menu { background: var(--bg-surface); border-color: var(--border-dark); }
html[data-theme="light"] .cd-section--dark { background: var(--bg-void); color: var(--text-light); }
html[data-theme="light"] .cd-section--dark p { color: var(--text-light-muted); }
html[data-theme="light"] .cd-card:hover { box-shadow: 0 10px 26px rgba(26, 28, 34, 0.12), 0 0 0 1px rgba(245, 158, 11, 0.4); }
html[data-theme="light"] .cd-service-tile:hover { box-shadow: 0 10px 22px rgba(26, 28, 34, 0.12); }
html[data-theme="light"] .cd-btn--ghost { border-color: #c9cdd6; color: var(--text-light); }
html[data-theme="light"] .cd-price-strip__price { color: #b45309; }
html[data-theme="light"] .cd-diagcard { border-color: var(--border-dark); }
html[data-theme="light"] .cd-diagcard__title { color: #b45309; }
html[data-theme="light"] input[type="text"], html[data-theme="light"] input[type="tel"],
html[data-theme="light"] input[type="email"], html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background: #ffffff; color: var(--text-light); border-color: #c9cdd6;
}
html[data-theme="light"] .cd-footer, html[data-theme="light"] .cd-mobile-cta { background: var(--bg-void); }

/* ===== светлая тема: лампы на тёмных кружках, чтоб читались на белом ===== */
html[data-theme="light"] .cd-service-tile__lamp {
  width: 48px;
  height: 48px;
  box-sizing: border-box;
  padding: 10px;
  object-fit: contain;
  background: #14161b;
  border-radius: 50%;
}
html[data-theme="light"] .cd-dash-badge {
  background: #14161b;
  border-color: #14161b;
  color: #fbbf24;
}

/* ===== контакты: номер — прямая ссылка tel: ===== */
a.cd-phone-row__number { color: var(--teal-deep); text-decoration: none; }
a.cd-phone-row__number:hover { text-decoration: underline; }
html[data-theme="light"] a.cd-phone-row__number { color: #b45309; }

/* ===== контакты: номер без рамки-окошка, просто крупная ссылка ===== */
.cd-phone-row { border: none; background: none; padding: 0; justify-content: flex-start; }
a.cd-phone-row__number { font-size: 1.3rem; }

/* ===== светлая тема: шапка и выпадающее меню белые, не серые ===== */
html[data-theme="light"] .cd-header { background: #ffffff; }
html[data-theme="light"] .cd-primary-nav { background: #ffffff; }

/* ===== осциллограмма пишет CHECK DIAG ===== */
.cd-footer-scope text {
  font-family: var(--font-display), sans-serif;
  font-size: 30px;
  letter-spacing: 3px;
  fill: none;
  stroke: #f59e0b;
  stroke-width: 1.5;
}
.cd-scope-text-base { opacity: 0.5; }
html[data-theme="light"] .cd-scope-text-base { stroke: #d97706; }
.cd-scope-text-run {
  opacity: 0.95;
  stroke-dasharray: 40 260;
  animation: cd-scope-text 5s linear infinite;
}
@keyframes cd-scope-text { to { stroke-dashoffset: -300; } }
@media (prefers-reduced-motion: reduce) {
  .cd-scope-text-run { animation: none; stroke-dasharray: none; opacity: 0.7; }
  .cd-scope-text-base { opacity: 0; }
}

/* ===== мини-анимации на страницах услуг ===== */
.cd-service-anim { height: 46px; margin: 0.7rem 0 0.2rem; display: flex; align-items: center; gap: 8px; }
.cd-service-anim svg { height: 46px; width: auto; display: block; }

/* диагностика: опрос блоков по шине */
.cd-a-bus { animation: cd-a-busrun 1.2s linear infinite; }
@keyframes cd-a-busrun { to { stroke-dashoffset: -18; } }
.cd-a-ecu { animation: cd-a-poll 3.6s linear infinite; }
.cd-a-ecu-1 { animation-delay: 0.6s; } .cd-a-ecu-2 { animation-delay: 1.2s; }
.cd-a-ecu-3 { animation-delay: 1.8s; } .cd-a-ecu-4 { animation-delay: 2.4s; } .cd-a-ecu-5 { animation-delay: 3s; }
@keyframes cd-a-poll { 0%, 100% { fill: #23262d; } 6% { fill: #f59e0b; } 14% { fill: #23262d; } }

/* автоэлектрика: ток по проводу + искра */
.cd-a-current { stroke-dasharray: 22 240; animation: cd-a-flow 1.6s linear infinite; }
@keyframes cd-a-flow { to { stroke-dashoffset: -262; } }
.cd-a-spark { opacity: 0; animation: cd-a-sparkle 1.6s linear infinite; }
@keyframes cd-a-sparkle { 78%, 92% { opacity: 0; } 82%, 88% { opacity: 1; } }

/* ремонт ЭБУ: контакты вспыхивают */
.cd-a-pin { animation: cd-a-solder 3.2s linear infinite; }
.cd-a-pin-1 { animation-delay: 0.4s; } .cd-a-pin-2 { animation-delay: 0.8s; } .cd-a-pin-3 { animation-delay: 1.2s; }
.cd-a-pin-4 { animation-delay: 1.6s; } .cd-a-pin-5 { animation-delay: 2s; } .cd-a-pin-6 { animation-delay: 2.4s; } .cd-a-pin-7 { animation-delay: 2.8s; }
@keyframes cd-a-solder { 0%, 100% { fill: #3a3e47; } 5% { fill: #fbbf24; } 12% { fill: #3a3e47; } }

/* прошивка: прогресс + OK */
.cd-a-flash { transform-origin: 33px 33px; animation: cd-a-fill 4s ease-in-out infinite; }
@keyframes cd-a-fill { 0% { transform: scaleX(0); } 70%, 100% { transform: scaleX(1); } }
.cd-a-dl { animation: cd-a-dlpulse 1s ease-in-out infinite; }
@keyframes cd-a-dlpulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.cd-a-flash-ok { opacity: 0; animation: cd-a-okblink 4s linear infinite; }
@keyframes cd-a-okblink { 0%, 69% { opacity: 0; } 74%, 100% { opacity: 1; } }

/* чип-тюнинг: кривая мощности рисуется */
.cd-a-dyno { stroke-dasharray: 230; stroke-dashoffset: 230; animation: cd-a-draw 3.5s ease-in-out infinite; }
@keyframes cd-a-draw { 0% { stroke-dashoffset: 230; } 55%, 85% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }

/* автоключи: радиоволны */
.cd-a-wave { opacity: 0; animation: cd-a-radio 2.1s linear infinite; }
.cd-a-wave-1 { animation-delay: 0.3s; } .cd-a-wave-2 { animation-delay: 0.6s; }
@keyframes cd-a-radio { 0%, 100% { opacity: 0; } 15%, 45% { opacity: 1; } 65% { opacity: 0; } }

/* одометр: барабан крутится */
.cd-a-odo { animation: cd-a-roll 6s cubic-bezier(0.3, 0, 0.7, 1) infinite; }
@keyframes cd-a-roll { 0% { transform: translateY(0); } 90%, 100% { transform: translateY(-260px); } }

/* SRS: лампа гаснет, галочка загорается */
.cd-a-srs-lamp { height: 30px; width: auto; filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.5)); animation: cd-a-srsoff 4.5s linear infinite; }
@keyframes cd-a-srsoff { 0%, 8% { opacity: 1; } 12% { opacity: 0.2; } 16%, 40% { opacity: 1; } 55%, 100% { opacity: 0.12; filter: none; } }
.cd-a-srs-ok svg, .cd-a-srs-ok { height: 30px; }
.cd-a-srs-ok { opacity: 0; animation: cd-a-srsok 4.5s linear infinite; }
@keyframes cd-a-srsok { 0%, 55% { opacity: 0; } 65%, 100% { opacity: 1; } }

/* SAS: руль ищет ноль */
.cd-a-sas-wheel { height: 34px; width: auto; animation: cd-a-steer 5s ease-in-out infinite; }
@keyframes cd-a-steer {
  0% { transform: rotate(0deg); } 15% { transform: rotate(-28deg); }
  35% { transform: rotate(24deg); } 50% { transform: rotate(-10deg); }
  62%, 100% { transform: rotate(0deg); }
}
.cd-a-sas-zero { opacity: 0; animation: cd-a-zeroblink 5s linear infinite; }
@keyframes cd-a-zeroblink { 0%, 60% { opacity: 0; } 68%, 100% { opacity: 1; } }

/* гибриды: батарея заряжается */
.cd-a-cell { animation: cd-a-charge 3.6s linear infinite; opacity: 0.12; }
.cd-a-cell-1 { animation-delay: 0.5s; } .cd-a-cell-2 { animation-delay: 1s; } .cd-a-cell-3 { animation-delay: 1.5s; }
@keyframes cd-a-charge { 0% { opacity: 0.12; } 18%, 80% { opacity: 1; } 95%, 100% { opacity: 0.12; } }
.cd-a-bolt { animation: cd-a-dlpulse 1.8s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .cd-service-anim *, .cd-a-srs-lamp, .cd-a-sas-wheel { animation: none !important; }
  .cd-a-current, .cd-a-spark, .cd-a-wave, .cd-a-flash-ok, .cd-a-srs-ok, .cd-a-sas-zero { opacity: 1; }
  .cd-a-cell { opacity: 1; }
  .cd-a-dyno { stroke-dashoffset: 0; }
}

/* ===== страницы услуг: заголовок чуть меньше ===== */
body.single-usluga h1 { font-size: clamp(1.7rem, 3.6vw + 0.8rem, 2.4rem); }
