/* ==========================================================================
   sx-tool.com — global stylesheet (2026 dark redesign)
   Design system: "dark automotive performance" per design-spec-oemactivations.md,
   in the SX-Tool brand palette (crimson, not the competitor's red).

   Tokens
     brand crimson   #E10E5C  primary / links / accents
     brand hover     #FF2D78  hover on dark
     brand deep      #B80C4A  crimson on light surfaces (≥4.5:1 on white)
     surfaces        #000 bg · #121416 panel · #1A1D20 card · #0C0E10 inset
     silver          #9AA0A3  muted UI chrome / borders on dark
     light           #FFFFFF / #F1F1F1 (VIN card, light bands)
   Type              Assistant (Google Fonts, display=swap) + system fallbacks
   Layout            container 1200px · breakpoints 989px / 749px
   Radii             10 / 14 / 16 / 24 px
   RTL-aware: logical properties throughout.
   ========================================================================== */

:root {
  /* brand */
  --sx-brand: #E10E5C;
  --sx-brand-hover: #FF2D78;
  --sx-brand-deep: #B80C4A;
  --sx-brand-soft: rgba(225, 14, 92, 0.14);
  --sx-brand-border: rgba(225, 14, 92, 0.45);

  /* dark surfaces */
  --sx-bg: #000000;
  --sx-panel: #121416;
  --sx-card: #1A1D20;
  --sx-tile: #0C0E10;
  --sx-border: rgba(255, 255, 255, 0.10);
  --sx-border-2: rgba(255, 255, 255, 0.20);
  --sx-text: #F5F5F5;
  --sx-text-dim: rgba(255, 255, 255, 0.65);
  --sx-text-faint: rgba(255, 255, 255, 0.40);
  --sx-silver: #9AA0A3;

  /* light surfaces (VIN card, light bands) */
  --sx-light: #FFFFFF;
  --sx-light-2: #F1F1F1;
  --sx-ink: #343434;
  --sx-ink-dim: #555555;
  --sx-light-border: #D9D9D9;

  /* structure */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --max-width: 1200px;

  /* motion (oemactivations §2.7) */
  --ease-out-slow: cubic-bezier(0, 0, 0.3, 1);
  --dur: 0.15s;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  font-family: "Assistant", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 16px;
  line-height: 1.55;
  color: var(--sx-text);
  background: var(--sx-bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--sx-brand-hover); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
ul, ol { padding-inline-start: 1.4em; }

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 32px;
}

/* ---------- Shared display elements ---------- */
.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sx-brand-hover);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin: 0 0 22px;
}
.section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--sx-text);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background var(--dur) ease, border-color var(--dur) ease,
    transform 0.05s ease, color var(--dur) ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--sx-brand); color: #fff; }
.btn-primary:hover { background: var(--sx-brand-hover); color: #fff; }
.btn-ghost, .btn-outline {
  background: transparent;
  color: var(--sx-text);
  border-color: var(--sx-border-2);
}
.btn-ghost:hover, .btn-outline:hover { border-color: #fff; color: #fff; }
.btn-lg { min-height: 54px; padding: 16px 32px; font-size: 16px; border-radius: var(--radius); }
.btn-sm { padding: 10px 18px; font-size: 13px; border-radius: 8px; }

/* ---------- Sticky header (black, scheme-1) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--sx-border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: 0.7rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--sx-text);
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; color: #fff; }
.brand-logo { width: 34px; height: 34px; display: block; }

/* ---------- Mega main menu (desktop ≥989px) ---------- */
.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-link {
  appearance: none;
  background: none;
  border: 0;
  padding: 0.35rem 0;
  font: inherit;
  cursor: pointer;
  color: var(--sx-text-dim);
  font-weight: 600;
  font-size: 0.92rem;
}
.nav-link:hover { color: #fff; }
.has-mega.mega-open .nav-link,
.has-mega:hover .nav-link,
.has-mega:focus-within .nav-link { color: #fff; }
.nav-trigger::after {
  content: "▾";
  font-size: 0.7em;
  margin-inline-start: 5px;
  color: var(--sx-text-faint);
}
.has-mega.mega-open .nav-trigger::after { color: var(--sx-brand-hover); }
.nav-plain { display: inline-block; }

/* full-width panel — containing block is the sticky .site-header */
.mega {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  z-index: 40; /* below consent (1000) / AI FAB (900), above content */
  background: var(--sx-panel);
  border-top: 1px solid var(--sx-border);
  border-bottom: 1px solid var(--sx-border);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s var(--ease-out-slow),
    transform 0.2s var(--ease-out-slow), visibility 0s linear 0.2s;
}
.has-mega:hover .mega,
.has-mega:focus-within .mega,
.has-mega.mega-open .mega {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.mega-inner { padding-block: 28px 32px; }
.mega-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.mega-card {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--sx-border);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #1E2228, #121418);
  text-decoration: none;
  transition: transform var(--dur) ease, border-color var(--dur) ease;
}
.mega-card:hover {
  transform: translateY(-2px);
  border-color: var(--sx-brand-border);
  text-decoration: none;
}
.mega-card-name {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--sx-text);
}
.mega-arrow { color: var(--sx-brand-hover); font-weight: 700; }
[dir="rtl"] .mega-arrow { transform: scaleX(-1); display: inline-block; }
.mega-card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--sx-text-dim);
  white-space: normal;
  overflow: hidden;
}
/* Bridge card is a <button> (JS-only navigation, no href) — reset button
   chrome so it renders identically to the anchor mega-cards. */
button.mega-card {
  width: 100%;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
/* Mobile accordion bridge entry — same look as the sibling links. */
.nav-acc ul .nav-acc-bridge {
  display: block;
  width: 100%;
  padding: 0.4rem 0.4rem;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.9rem;
  text-align: start;
  color: var(--sx-text-dim);
  cursor: pointer;
}
.nav-acc ul .nav-acc-bridge:hover { color: #fff; }
.mega-links {
  columns: 2;
  column-gap: 2rem;
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  max-width: 640px;
}
.mega-links li { margin-bottom: 0.55rem; break-inside: avoid; }
.mega-links a { color: var(--sx-silver); font-size: 0.95rem; font-weight: 600; }
.mega-links a:hover { color: var(--sx-brand-hover); text-decoration: none; }
.mega-more {
  display: inline-block;
  margin-top: 6px;
  color: var(--sx-brand-hover);
  font-weight: 700;
  font-size: 0.92rem;
}
.mega-more:hover { text-decoration: underline; }
[dir="rtl"] .mega-more span { display: inline-block; transform: scaleX(-1); }

/* ---------- Mobile nav accordion (<989px) ---------- */
.nav-mobile { display: none; position: relative; }
.nav-mobile > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--sx-text);
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--sx-border);
  border-radius: var(--radius-sm);
  background: var(--sx-tile);
}
.nav-mobile > summary::-webkit-details-marker { display: none; }
.nav-mobile[open] > summary { border-color: var(--sx-brand); }
.nav-mobile-panel {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 6px);
  z-index: 60;
  background: var(--sx-panel);
  border: 1px solid var(--sx-border);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  max-height: 70vh;
  overflow-y: auto;
  padding: 0.6rem;
  min-width: min(320px, calc(100vw - 2.5rem));
}
.nav-acc { border-bottom: 1px solid var(--sx-border); }
.nav-acc:last-of-type { border-bottom: none; }
.nav-acc summary {
  list-style: none;
  cursor: pointer;
  padding: 0.6rem 0.4rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--sx-text);
}
.nav-acc summary::-webkit-details-marker { display: none; }
.nav-acc summary::after {
  content: "▾";
  float: inline-end;
  color: var(--sx-text-faint);
  font-size: 0.8em;
}
.nav-acc[open] summary::after { color: var(--sx-brand-hover); }
.nav-acc ul { list-style: none; margin: 0; padding: 0 0 0.5rem; }
.nav-acc ul a {
  display: block;
  padding: 0.4rem 0.4rem;
  color: var(--sx-text-dim);
  font-size: 0.9rem;
}
.nav-acc ul a:hover { color: #fff; text-decoration: none; }
.nav-mobile-contact {
  display: block;
  padding: 0.7rem 0.4rem;
  font-weight: 700;
  color: var(--sx-brand-hover);
}
.header-actions {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ---------- Language switcher (dark details dropdown) ---------- */
.lang-switcher { position: relative; }
.lang-switcher summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--sx-border);
  border-radius: var(--radius-sm);
  background: var(--sx-tile);
  color: var(--sx-text);
  user-select: none;
}
.lang-switcher summary::-webkit-details-marker { display: none; }
.lang-switcher[open] summary { border-color: var(--sx-brand); }
.lang-switcher ul {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 4px);
  min-width: 180px;
  margin: 0;
  padding: 0.4rem 0;
  list-style: none;
  background: var(--sx-card);
  border: 1px solid var(--sx-border);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  max-height: 60vh;
  overflow-y: auto;
  z-index: 60;
}
.lang-switcher ul a {
  display: block;
  padding: 0.45rem 0.9rem;
  color: var(--sx-text);
  font-size: 0.9rem;
}
.lang-switcher ul a:hover { background: rgba(255, 255, 255, 0.06); text-decoration: none; }
.lang-switcher ul a[aria-current="true"] { font-weight: 700; color: var(--sx-brand-hover); }

/* ==========================================================================
   HOMEPAGE (templates/home.html)
   ========================================================================== */

/* ---------- 1. Hero: full-bleed + gradient scrim + VIN card ---------- */
.hh {
  position: relative;
  color: #fff;
  overflow: hidden;
  background: var(--sx-tile);
  isolation: isolate;
}
.hh::before {
  /* background image (from --hh-img) + left-to-right black scrim */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0.15)),
    var(--hh-img, none);
  background-size: cover;
  background-position: 50% 35%;
}
[dir="rtl"] .hh::before {
  background-image:
    linear-gradient(-90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0.15)),
    var(--hh-img, none);
}
.hh-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 460px);
  gap: 48px;
  align-items: center;
  padding-block: 72px;
  min-height: clamp(480px, 44vw, 760px);
}
.hh-title {
  margin: 0 0 16px;
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  max-width: 20ch;
}
.hh-sub {
  margin: 0 0 26px;
  font-size: 17px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  max-width: 54ch;
}
.hh .hero-cta { margin-top: 0; }

/* VIN conversion card (white, radius 24, heavy shadow) */
.hh-card {
  background: rgba(255, 255, 255, 0.96);
  color: #111;
  border-radius: var(--radius-xl);
  padding: 28px 28px 22px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.45);
}
.hh-card-title { margin: 0 0 6px; font-size: 22px; font-weight: 700; color: #111; }
.hh-card-sub { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: var(--sx-ink-dim); }
.hh-form { display: flex; flex-direction: column; gap: 10px; }
.hh-input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1.5px solid var(--sx-light-border);
  border-radius: var(--radius);
  font: inherit;
  font-size: 17px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #111;
  background: #fff;
}
.hh-input::placeholder { text-transform: none; letter-spacing: 0; color: #9a9a9a; }
.hh-input:focus {
  outline: none;
  border-color: var(--sx-brand);
  box-shadow: 0 0 0 3px rgba(225, 14, 92, 0.18);
}
.hh-btn {
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: var(--radius);
  background: var(--sx-brand);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background var(--dur) ease;
}
.hh-btn:hover { background: var(--sx-brand-hover); }
.hh-card-foot { margin: 14px 0 0; font-size: 13px; color: var(--sx-ink-dim); }

/* Live VIN decode result (proxied via the ai-cs backend, JS-rendered) */
.hh-result { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(0, 0, 0, 0.1); }
.hh-result[hidden] { display: none; }
.hh-result-title { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: #111; }
.hh-result-fields { display: grid; gap: 5px; }
.hh-result-field { display: flex; gap: 10px; font-size: 13.5px; }
.hh-result-label { flex: 0 0 110px; color: var(--sx-ink-dim); }
.hh-result-value { margin: 0; font-weight: 600; color: #111; overflow-wrap: anywhere; }
.hh-result-ctas { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.hh-result-ctas .hh-btn { height: 48px; font-size: 15px; }
.hh-result-link {
  display: block;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--sx-brand);
  text-decoration: none;
  padding: 6px 0;
}
.hh-result-link:hover { color: var(--sx-brand-hover); text-decoration: underline; }
.hh-result-status { margin: 0; font-size: 14px; color: var(--sx-ink-dim); }
.hh-result-error { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: var(--sx-brand-hover); }

/* ---------- 2. How-it-works strip ---------- */
.steps { padding-block: 48px 32px; }
.steps-eyebrow { text-align: center; margin-bottom: 26px; }
.steps-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 20px;
  align-items: start;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}
.step-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--sx-card);
  border: 1px solid var(--sx-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sx-text);
}
.step-icon svg { width: 34px; height: 34px; }
.step-icon--accent {
  color: var(--sx-brand-hover);
  background: var(--sx-brand-soft);
  border-color: var(--sx-brand-border);
}
.step-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  max-width: 24ch;
  color: var(--sx-text);
}
.step-num {
  color: var(--sx-brand-hover);
  font-size: 24px;
  font-weight: 800;
  margin-inline-end: 6px;
}
.step-desc {
  margin: 0;
  font-size: 14px;
  color: var(--sx-text-dim);
  line-height: 1.5;
  max-width: 30ch;
}
.step-arrow {
  display: flex;
  align-items: center;
  color: var(--sx-text-faint);
  margin-top: 26px;
}
.step-arrow svg { width: 40px; height: 24px; }
[dir="rtl"] .step-arrow svg { transform: scaleX(-1); }

/* ---------- 3. Popular: gradient cards ---------- */
.popular { padding-block: 24px 56px; }
.popular-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.pf-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, #1E2228, #121418);
  border: 1px solid var(--sx-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  transition: transform var(--dur) ease, border-color var(--dur) ease;
}
.pf-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.22);
  text-decoration: none;
}
.pf-card-body { padding: 16px 16px 18px; }
.pf-card-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #0d0f12;
}
.pf-card-name {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--sx-text);
}
.pf-card-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--sx-text-dim);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 4/6. Bands (packages, KB teaser) ---------- */
.band { padding-block: 8px; }
.band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: var(--sx-panel);
  border: 1px solid var(--sx-border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
}
.band--tile .band-inner { background: var(--sx-tile); }
.band-copy { max-width: 60ch; }
.band-title {
  margin: 0 0 6px;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--sx-text);
}
.band-text { margin: 0; color: var(--sx-text-dim); font-size: 15px; }
.band .btn { flex-shrink: 0; }

/* ---------- 5. Trust strip ---------- */
.trust { padding-block: 32px; }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  background: var(--sx-panel);
  border: 1px solid var(--sx-border);
  border-radius: var(--radius-lg);
  padding: 28px 36px;
}
.trust-item { display: flex; gap: 16px; align-items: center; }
.trust-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--sx-card);
  border: 1px solid var(--sx-border);
  color: var(--sx-brand-hover);
  display: flex;
  align-items: center;
  justify-content: center;
}
.trust-icon svg { width: 26px; height: 26px; }
.trust-title { margin: 0 0 2px; font-size: 16px; font-weight: 700; color: var(--sx-text); }
.trust-desc { margin: 0; font-size: 13px; color: var(--sx-text-dim); line-height: 1.45; }

/* ---------- 7. Blog teaser ---------- */
.homeblog { padding-block: 32px 56px; }
.homeblog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.homeblog-date {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sx-text-faint);
}

/* ---------- 7b. Blog index (/blog/) — filter chips + masonry ---------- */
.blog-filter {
  display: flex;
  gap: 8px;
  margin: 0 0 20px;
  padding-bottom: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.blog-chip {
  flex-shrink: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--sx-border);
  background: var(--sx-panel);
  color: var(--sx-text-dim);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color var(--dur) ease, color var(--dur) ease,
    background var(--dur) ease;
}
.blog-chip:hover {
  border-color: var(--sx-brand-border);
  color: var(--sx-text);
}
.blog-chip[aria-pressed="true"] {
  background: var(--sx-brand);
  border-color: var(--sx-brand);
  color: #fff;
}
.blog-chip-count {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.75;
  margin-inline-start: 2px;
}
/* Masonry via CSS columns: cards keep their natural height and stack into
   the shortest column, giving a true staggered layout (no equal-height
   grid rows). */
.blogindex-grid {
  columns: 3;
  column-gap: 16px;
}
.blogindex-card {
  display: inline-block; /* break-inside works reliably on inline-block */
  width: 100%;
  margin: 0 0 16px;
  break-inside: avoid;
}
.blogindex-card .pf-card-img { width: 100%; height: auto; }
@media (max-width: 1024px) {
  .blogindex-grid { columns: 2; }
}
@media (max-width: 640px) {
  .blogindex-grid { columns: 1; }
}

/* ==========================================================================
   INNER PAGES (page / product / blog) — same dark system
   ========================================================================== */

/* ---------- Hero band (inner pages) ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(120% 160% at 85% -20%, var(--sx-brand-soft) 0%, transparent 55%),
    linear-gradient(180deg, #16181C 0%, #0C0E10 100%);
  border-bottom: 1px solid var(--sx-border);
  color: var(--sx-text);
  padding-block: clamp(3rem, 8vw, 5.5rem);
}
.hero-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sx-brand-hover);
}
.hero h1 {
  font-size: clamp(30px, 4.6vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.06;
  max-width: 24ch;
  color: #fff;
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--sx-text-dim);
  max-width: 60ch;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* ---------- Feature grid (gradient cards) ---------- */
.features { padding-block: clamp(2.5rem, 6vw, 4rem); background: var(--sx-bg); }
.feature-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.feature-card {
  background: linear-gradient(180deg, #1E2228, #121418);
  border: 1px solid var(--sx-border);
  border-radius: var(--radius);
  padding: 22px 20px 24px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  transition: transform var(--dur) ease, border-color var(--dur) ease;
}
.feature-card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.22); }
.feature-card h3 { font-size: 1.05rem; color: var(--sx-text); letter-spacing: -0.01em; }
.feature-card p { margin: 0; color: var(--sx-text-dim); font-size: 0.93rem; }

/* ---------- Prose (dark reading surface) ---------- */
.prose-section { padding-block: clamp(2.5rem, 6vw, 4rem); }
.prose { max-width: 1000px; color: rgba(245, 245, 245, 0.88); }
.prose h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--sx-text);
  margin-top: 1.8em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--sx-border);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.2rem; margin-top: 1.5em; color: var(--sx-text); }
.prose li { margin-bottom: 0.35em; }
.prose strong { color: #fff; }
.prose a { color: var(--sx-brand-hover); }
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-block: 1.2em;
  background: var(--sx-panel);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.93rem;
}
.prose th, .prose td {
  padding: 0.65rem 1rem;
  text-align: start;
  border-bottom: 1px solid var(--sx-border);
}
.prose thead th { color: var(--sx-text); background: var(--sx-card); }
.prose tbody tr:last-child td { border-bottom: none; }

/* ---------- Product ---------- */
.product-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--sx-brand-hover);
  margin-top: 0.5rem;
}
.spec-section { padding-block: clamp(2rem, 5vw, 3.5rem); background: var(--sx-tile); }
.spec-section h2 { color: var(--sx-text); font-weight: 800; letter-spacing: -0.01em; }
.spec-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--sx-panel);
  border: 1px solid var(--sx-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.spec-table th, .spec-table td {
  padding: 0.7rem 1rem;
  text-align: start;
  border-bottom: 1px solid var(--sx-border);
  font-size: 0.93rem;
}
.spec-table th { width: 38%; color: var(--sx-text-dim); font-weight: 600; }
.spec-table td { color: var(--sx-text); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }

/* ---------- Blog article ---------- */
.blog-article { padding-block: clamp(2.5rem, 6vw, 4rem); }
.article-header { margin-bottom: 2rem; }
.article-header h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 26ch;
  color: #fff;
}
.article-meta { color: var(--sx-text-dim); font-size: 0.9rem; margin-bottom: 0.5rem; }

/* ---------- CTA band (crimson-tinted dark panel) ---------- */
.cta-band {
  background:
    radial-gradient(90% 180% at 50% -40%, var(--sx-brand-soft) 0%, transparent 60%),
    var(--sx-panel);
  border-top: 1px solid var(--sx-border);
  color: var(--sx-text);
  text-align: center;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.cta-band h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; letter-spacing: -0.01em; }
.cta-band p { color: var(--sx-text-dim); }
.cta-band .btn { margin-top: 0.5rem; }

/* ---------- Corporate footer (dark tile band, 5 columns) ---------- */
.site-footer {
  background: var(--sx-tile);
  border-top: 1px solid var(--sx-border);
  color: var(--sx-text-dim);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-block: 3rem 2rem;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.footer-brand:hover { text-decoration: none; }
.footer-brand .brand-logo { width: 38px; height: 38px; }
.footer-tagline { margin: 0.7rem 0 0.9rem; font-size: 0.92rem; max-width: 34ch; }
.footer-contact { list-style: none; margin: 0 0 0.7rem; padding: 0; }
.footer-contact li { margin-bottom: 0.3rem; }
.footer-contact a { color: var(--sx-brand-hover); font-size: 0.92rem; font-weight: 600; }
.footer-countries {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sx-text-faint);
}
.footer-col h3 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.8rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.45rem; }
.footer-col a { color: var(--sx-silver); font-size: 0.92rem; }
.footer-col a:hover { color: var(--sx-brand-hover); text-decoration: none; }

/* trust strip: payment badges + secure note */
.footer-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding-block: 1.1rem;
  border-top: 1px solid var(--sx-border);
}
.pay-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pay-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.28rem 0.6rem;
  border: 1px solid var(--sx-border);
  border-radius: 6px;
  background: var(--sx-card);
  color: var(--sx-silver);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.footer-secure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 0 auto;
  margin-inline-start: auto;
  font-size: 0.8rem;
  color: var(--sx-text-faint);
}
.footer-secure svg { color: var(--sx-brand-hover); flex-shrink: 0; }

/* bottom bar: copyright + legal */
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  border-top: 1px solid var(--sx-border);
  padding-block: 1.2rem;
  font-size: 0.85rem;
  color: var(--sx-text-faint);
}
.footer-bottom p { margin: 0; }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.2rem;
  list-style: none;
  margin: 0 0 0 auto;
  margin-inline-start: auto;
  padding: 0;
}
.footer-legal a { color: var(--sx-text-faint); font-size: 0.82rem; }
.footer-legal a:hover { color: var(--sx-brand-hover); text-decoration: none; }

/* ---------- Featured image ---------- */
.featured-image-section { padding-top: clamp(1.5rem, 4vw, 2.5rem); }
.featured-image { margin: 0 0 1.5rem; }
.featured-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--sx-border);
}

/* ---------- E-E-A-T meta lines ---------- */
.article-author { font-weight: 600; }
.article-footer { margin-top: 2.5rem; border-top: 1px solid var(--sx-border); padding-top: 1rem; }
.article-byline { color: var(--sx-text-dim); font-size: 0.9rem; margin: 0; }
.page-updated { color: var(--sx-text-faint); font-size: 0.85rem; margin-top: 2rem; }

/* ---------- Related guides ---------- */
.related-section { padding-block: clamp(1.5rem, 4vw, 2.5rem); }
.related-section h2 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; color: var(--sx-text); margin-bottom: 0.9rem; }
.related-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.related-card {
  display: block;
  padding: 0.85rem 1rem;
  border: 1px solid var(--sx-border);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #1E2228, #121418);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--sx-text);
  transition: transform var(--dur) ease, border-color var(--dur) ease;
}
.related-card:hover {
  border-color: var(--sx-brand-border);
  transform: translateY(-2px);
  text-decoration: none;
  color: #fff;
}

/* ==========================================================================
   ADD-ONS — AI assistant, cookie consent (dark, crimson)
   ========================================================================== */

/* ---------- AI assistant widget (z 900, below consent) ---------- */
#aiFab {
  position: fixed;
  bottom: 1.25rem;
  inset-inline-end: 1.25rem;
  z-index: 900;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--sx-brand);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(225, 14, 92, 0.35);
  transition: transform var(--dur) ease, background var(--dur) ease;
}
#aiFab:hover, #aiFab:focus-visible { background: var(--sx-brand-hover); transform: scale(1.06); }
#aiFab svg { width: 26px; height: 26px; }

#aiPanel {
  position: fixed;
  bottom: 5.5rem;
  inset-inline-end: 1.25rem;
  z-index: 900;
  width: 360px;
  max-width: calc(100vw - 2rem);
  max-height: min(560px, calc(100vh - 7rem));
  display: flex;
  flex-direction: column;
  background: var(--sx-panel);
  border: 1px solid var(--sx-border);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
#aiPanel[hidden] { display: none; }

.ai-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: var(--sx-tile);
  border-bottom: 1px solid var(--sx-border);
  color: #fff;
}
.ai-head-title { font-weight: 700; font-size: 0.95rem; line-height: 1.2; }
.ai-head-title::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--sx-brand);
  margin-inline-end: 7px;
}
.ai-head-sub { font-size: 0.75rem; color: var(--sx-text-dim); }
#aiClose {
  margin-inline-start: auto;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
}

.ai-modes { display: flex; gap: 0.4rem; padding: 0.6rem 1rem 0; }
.ai-modes button {
  flex: 1;
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--sx-border);
  border-radius: 999px;
  background: transparent;
  color: var(--sx-text-dim);
  cursor: pointer;
}
.ai-modes button:hover { color: #fff; }
.ai-modes button.active {
  background: var(--sx-brand);
  border-color: var(--sx-brand);
  color: #fff;
}

.ai-sugg { padding: 0.5rem 1rem 0; }
.ai-sugg-label { font-size: 0.72rem; color: var(--sx-text-faint); margin-bottom: 0.3rem; }
.ai-sugg button {
  display: block;
  width: 100%;
  text-align: start;
  margin-bottom: 0.3rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.78rem;
  border: 1px solid var(--sx-border);
  border-radius: 8px;
  background: var(--sx-card);
  color: var(--sx-brand-hover);
  cursor: pointer;
}
.ai-sugg button:hover { border-color: var(--sx-brand-border); }

#aiMsgs {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 120px;
}
.ai-msg {
  max-width: 88%;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.45;
}
.ai-user { align-self: flex-end; background: var(--sx-brand); color: #fff; }
.ai-bot { align-self: flex-start; background: var(--sx-card); color: var(--sx-text); }
.ai-bot a { color: var(--sx-brand-hover); }
.ai-src { margin-top: 0.4rem; font-size: 0.75rem; display: flex; flex-direction: column; gap: 0.15rem; }

.ai-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--sx-border);
}
#aiInput {
  flex: 1;
  resize: none;
  height: 2.4rem;
  padding: 0.45rem 0.6rem;
  font: inherit;
  font-size: 0.85rem;
  color: var(--sx-text);
  background: var(--sx-tile);
  border: 1px solid var(--sx-border);
  border-radius: 8px;
}
#aiInput:focus { outline: none; border-color: var(--sx-brand); }
#aiSend { flex-shrink: 0; }
.ai-disclaimer { padding: 0 1rem 0.6rem; font-size: 0.68rem; color: var(--sx-text-faint); }

/* ---------- Cookie consent banner (dark, z 1000 > AI 900) ---------- */
#sxConsent {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 1000;
  background: var(--sx-panel);
  border-top: 2px solid var(--sx-brand);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.55);
  padding: 0.9rem 1rem;
}
#sxConsent[hidden] { display: none; }
.consent-inner {
  max-width: 72rem;
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: space-between;
}
.consent-text { flex: 1 1 26rem; }
.consent-text strong { display: block; font-size: 0.95rem; color: var(--sx-text); margin-bottom: 0.15rem; }
.consent-text p { margin: 0; font-size: 0.85rem; color: var(--sx-text-dim); line-height: 1.5; }
.consent-note { font-size: 0.8rem; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
/* Equal visual weight Accept / Reject — no dark patterns. */
.consent-btn-secondary {
  background: transparent;
  color: var(--sx-text);
  border: 1px solid var(--sx-border-2);
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.consent-btn-secondary:hover { border-color: #fff; color: #fff; }
.consent-privacy { font-size: 0.85rem; color: var(--sx-text-dim); text-decoration: underline; }

/* ==========================================================================
   RESPONSIVE (breakpoints 989px / 749px) + RTL extras + motion prefs
   ========================================================================== */

@media (max-width: 989px) {
  .hh-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-block: 40px 48px;
    min-height: 0;
  }
  .hh-card { max-width: 520px; }
  .popular-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps-grid { grid-template-columns: 1fr; gap: 24px; }
  .step-arrow { margin: 0 auto; transform: rotate(90deg); }
  [dir="rtl"] .step-arrow { transform: rotate(90deg); }
  [dir="rtl"] .step-arrow svg { transform: scaleX(-1); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; padding: 22px 28px; }
  .homeblog-grid { grid-template-columns: 1fr; }
  .band-inner { padding: 28px 24px; }
  /* mega menu → accordion switch */
  .nav-list { display: none; }
  .nav-mobile { display: block; }
}

@media (min-width: 640px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 990px) {
  .feature-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; }
  .related-grid { grid-template-columns: repeat(4, 1fr); }
  .nav-mobile { display: none; }
}

@media (max-width: 749px) {
  .container { padding-inline: 16px; }
  .popular-grid { gap: 12px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .hero-cta .btn, .band .btn { width: 100%; }
  .hh .hero-cta .btn { width: auto; }
  .band-inner { flex-direction: column; align-items: flex-start; }
  .trust-grid { grid-template-columns: 1fr; gap: 0; padding: 12px 24px; }
  .trust-item { padding: 14px 0; border-bottom: 1px solid var(--sx-border); }
  .trust-item:last-child { border-bottom: none; }
  .popular-grid { grid-template-columns: 1fr; }
  /* corporate footer: columns stack, brand first */
  .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .footer-secure, .footer-legal { margin-inline-start: 0; }
}

@media (max-width: 480px) {
  #aiPanel { inset-inline: 0.75rem; bottom: 5rem; width: auto; }
  .consent-inner { flex-direction: column; align-items: stretch; text-align: center; }
  .consent-actions { justify-content: center; }
  .consent-actions .btn, .consent-actions button { flex: 1 1 auto; }
}

/* ---------- RTL extras ---------- */
[dir="rtl"] .lang-switcher ul { inset-inline-end: auto; inset-inline-start: 0; }
[dir="rtl"] .lang-switcher-footer ul { inset-inline-start: auto; inset-inline-end: 0; }
.lang-switcher-footer ul { inset-inline-start: 0; inset-inline-end: auto; bottom: calc(100% + 4px); top: auto; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  #aiFab, .pf-card, .feature-card, .related-card, .btn, .mega { transition: none; }
  #aiFab:hover, #aiFab:focus-visible { transform: none; }
  .pf-card:hover, .feature-card:hover, .related-card:hover { transform: none; }
  .mega { transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  #sxConsent { animation: consent-in 0.25s var(--ease-out-slow); }
  @keyframes consent-in {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
}

/* ==========================================================================
   Free tools (VIN decoder / DTC lookup) — dark chrome, crimson accents.
   Markup lives in templates/page.html (tool block) + assets/tools/*.js.
   ========================================================================== */
.tool-section { padding-block: clamp(2rem, 5vw, 3.5rem); }
.tool-card {
  background: var(--sx-card);
  border: 1px solid var(--sx-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
  border-inline-start: 4px solid var(--sx-brand);
}
.tool-label { display: block; font-weight: 700; margin-bottom: 8px; color: var(--sx-text); }
.tool-row { display: flex; gap: 10px; flex-wrap: wrap; }
.tool-input {
  flex: 1 1 260px;
  min-height: 52px;
  padding: 12px 16px;
  font-size: 16px;
  font-family: inherit;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sx-text);
  background: var(--sx-tile);
  border: 1px solid var(--sx-border-2);
  border-radius: var(--radius-sm);
}
.tool-input::placeholder { text-transform: none; letter-spacing: 0; color: var(--sx-text-faint); }
.tool-input:focus {
  outline: 2px solid var(--sx-brand);
  outline-offset: 1px;
  border-color: var(--sx-brand);
}
.tool-row .btn { min-height: 52px; }
.tool-status { margin: 10px 0 0; font-size: 0.9rem; color: var(--sx-text-dim); min-height: 1.2em; }

.tool-results { margin-top: 1.5rem; display: grid; gap: 14px; }
.tool-results:empty { margin-top: 0; }
.tool-card-result {
  background: var(--sx-tile);
  border: 1px solid var(--sx-border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.tool-result-heading { margin: 0 0 12px; font-size: 1.15rem; color: var(--sx-text); }
.tool-sub-heading {
  margin: 18px 0 8px; font-size: 0.95rem; color: var(--sx-text);
  border-inline-start: 3px solid var(--sx-brand);
  padding-inline-start: 10px;
}
.tool-fields { margin: 0; display: grid; gap: 6px; }
.tool-field { display: flex; gap: 12px; flex-wrap: wrap; }
.tool-field-label { flex: 0 0 130px; color: var(--sx-text-dim); font-size: 0.92rem; }
.tool-field-value { margin: 0; font-weight: 600; color: var(--sx-text); overflow-wrap: anywhere; }
.tool-note { font-size: 0.88rem; color: var(--sx-text-dim); }
/* Escalation bridge to the full factory DTC database (JS-only navigation). */
.tool-bridge {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--sx-border);
}
.tool-bridge .tool-note { margin: 0 0 10px; }
.tool-disclaimer {
  margin: 18px 0 0; padding-top: 14px;
  border-top: 1px solid var(--sx-border);
  font-size: 0.85rem; color: var(--sx-silver);
}
.tool-error { border-color: var(--sx-brand-border); }
.tool-error-text { color: var(--sx-brand-hover); }
.tool-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tool-chip {
  background: var(--sx-brand-soft);
  border: 1px solid var(--sx-brand-border);
  color: var(--sx-text);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.82rem;
  font-weight: 600;
}
.tool-chip--maybe { border-style: dashed; opacity: 0.85; }
.tool-power { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tool-power-item {
  display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
  background: var(--sx-card);
  border: 1px solid var(--sx-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.tool-power-id { font-weight: 800; color: var(--sx-brand-hover); letter-spacing: 0.03em; }
.tool-power-status { font-size: 0.85rem; color: var(--sx-text-dim); }
.tool-engine-btn { margin-top: 16px; }
.tool-dtc-card { display: grid; gap: 6px; }
.tool-dtc-code { margin: 0; font-size: 1.05rem; color: var(--sx-brand-hover); letter-spacing: 0.03em; }
.tool-dtc-def { margin: 0; color: var(--sx-text); }
.tool-dtc-block { margin-top: 6px; }
.tool-dtc-field { margin: 0 0 4px; font-size: 0.85rem; color: var(--sx-text-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.tool-dtc-list { margin: 0; padding-inline-start: 1.2em; color: var(--sx-text); font-size: 0.92rem; }

/* Tools hub cards (content/en/tools/ page body links reuse .pf-card). */
@media (max-width: 749px) {
  .tool-field-label { flex-basis: 100%; }
}

/* ---- Intro video modal (homepage) ---- */
.vmodal { position: fixed; inset: 0; z-index: 99990; display: flex;
          align-items: center; justify-content: center; padding: 20px; }
.vmodal[hidden] { display: none; }
.vmodal-backdrop { position: absolute; inset: 0; background: rgba(8, 12, 18, 0.78);
                   backdrop-filter: blur(3px); }
.vmodal-box { position: relative; width: min(92vw, 880px); background: #000;
              border-radius: 14px; overflow: hidden;
              border: 1px solid var(--sx-border);
              box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55); }
.vmodal-box video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.vmodal-close { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2;
                width: 36px; height: 36px; border-radius: 50%; border: none;
                background: rgba(20, 24, 30, 0.85); color: #fff; font-size: 20px;
                line-height: 1; cursor: pointer; transition: background 0.15s ease; }
.vmodal-close:hover { background: var(--sx-brand); }
#hhVideoBtn svg { margin-inline-end: 2px; vertical-align: -2px; }

/* ---------- Shop closed-loop CTA (templates/base.html `shop_cta`) ----------
         Page-type-aware "Get the tools & parts" block rendered after the
         content, before the footer. Card look follows .mega-card; the band
         reuses the .cta-band crimson-tinted panel gradient. */
.shop-cta {
  background:
    radial-gradient(90% 180% at 50% -40%, var(--sx-brand-soft) 0%, transparent 60%),
    var(--sx-panel);
  border-top: 1px solid var(--sx-border);
  color: var(--sx-text);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.shop-cta-heading {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 0.4rem;
}
.shop-cta-text { color: var(--sx-text-dim); max-width: 72ch; margin: 0 0 1.4rem; }
.shop-cta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.shop-cta-card {
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  border: 1px solid var(--sx-border);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #1E2228, #121418);
  transition: transform var(--dur) ease, border-color var(--dur) ease;
}
.shop-cta-card:hover { transform: translateY(-2px); border-color: var(--sx-brand-border); }
.shop-cta-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--sx-text);
}
.shop-cta-card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--sx-text-dim);
  overflow: hidden;
  flex: 1;
}
.shop-cta-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 0;
}
.shop-cta-price { font-size: 1.05rem; font-weight: 800; color: var(--sx-brand-hover); }
.shop-cta-links { margin: 1.4rem 0 0; display: flex; gap: 1.5rem; flex-wrap: wrap; }
.shop-cta-links a { font-weight: 700; }
.shop-cta-links a:hover { color: var(--sx-brand-hover); }
/* Injected in-content keyword -> product links (EN body text). */
.prose a.shop-inline-link { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.prose a.shop-inline-link:hover { text-decoration-style: solid; }
@media (min-width: 750px) {
  .shop-cta-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
