/* ============================================================
   TrukSpareParts Design System
   Brand: Vaden-aligned — red #d32f2f, charcoal #1f1f1f, light grays
   ============================================================ */
:root {
  --red: #d32f2f;
  --red-dark: #b02424;
  --red-tint: #fdeeee;
  --ink: #1f1f1f;
  --ink-2: #3a3a3a;
  --ink-3: #5f6368;
  --line: #e3e3e3;
  --bg: #ffffff;
  --bg-soft: #f6f7f8;
  --bg-dark: #1f1f1f;
  --bg-dark-2: #171717;
  --white: #ffffff;
  --max: 1180px;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(31,31,31,.06), 0 8px 24px rgba(31,31,31,.07);
  --shadow-lg: 0 2px 6px rgba(31,31,31,.08), 0 18px 44px rgba(31,31,31,.12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--red); color: #fff; padding: 8px 16px; z-index: 100; }
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  background: var(--bg-dark);
  color: #fff;
  position: sticky; top: 0; z-index: 50;
  border-bottom: 3px solid var(--red);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 21px; letter-spacing: .2px; }
.brand:hover { text-decoration: none; }
.brand-text strong { color: var(--red); font-weight: 800; }
.brand-text { font-weight: 600; }
.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-list a { color: #e8e8e8; font-size: 14.5px; font-weight: 600; padding: 8px 11px; border-radius: 8px; display: block; }
.nav-list a:hover { background: rgba(255,255,255,.09); color: #fff; text-decoration: none; }
.nav-cta { background: var(--red); color: #fff !important; }
.nav-cta:hover { background: var(--red-dark) !important; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; font-size: 15px; padding: 7px 12px; border-radius: 8px; cursor: pointer; }

/* ---------- Hero (home) ---------- */
.hero {
  background: linear-gradient(135deg, #171717 0%, #262626 55%, #331b1b 100%);
  color: #fff;
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 26px 26px; pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 780px; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.15; margin: 0 0 18px; font-weight: 800; letter-spacing: -.5px; }
.hero h1 em { color: var(--red); font-style: normal; }
.hero p { font-size: 19px; color: #cfcfcf; margin: 0 0 28px; max-width: 640px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.kicker { display: inline-block; color: var(--red); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 1.6px; margin-bottom: 14px; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 13px 24px; border-radius: 10px; font-weight: 700; font-size: 15.5px; transition: background .15s ease; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-ghost { border: 1.5px solid rgba(255,255,255,.35); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.07); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }

/* ---------- Sections ---------- */
.section { padding: 60px 0; }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--bg-dark); color: #fff; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(24px, 3.4vw, 32px); margin: 0; letter-spacing: -.4px; }
.section-head p { margin: 6px 0 0; color: var(--ink-3); max-width: 640px; }
.section-link { font-weight: 700; white-space: nowrap; }

/* ---------- Stats band ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); padding: 22px 20px; }
.stat b { display: block; font-size: 30px; color: var(--red); letter-spacing: -.5px; }
.stat span { color: #c9c9c9; font-size: 14.5px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow .18s ease, transform .18s ease;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card h3 { margin: 0; font-size: 19px; line-height: 1.35; letter-spacing: -.2px; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--red); text-decoration: none; }
.card p { margin: 0; color: var(--ink-3); font-size: 15px; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-3); }
.chip {
  display: inline-block; background: var(--red-tint); color: var(--red-dark);
  font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 99px;
  text-transform: uppercase; letter-spacing: .6px;
}
.chip:hover { text-decoration: none; background: #fadada; }
.topic-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-dark); color: #fff; padding: 26px; min-height: 170px;
  display: flex; flex-direction: column; justify-content: end; gap: 8px;
  border: 1px solid #2c2c2c; transition: transform .18s ease, box-shadow .18s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.topic-card h3 { margin: 0; font-size: 20px; color: #fff; }
.topic-card p { margin: 0; color: #c9c9c9; font-size: 14px; }
.topic-card .count { position: absolute; top: 18px; right: 18px; background: var(--red); color: #fff; font-size: 12.5px; font-weight: 800; padding: 3px 10px; border-radius: 99px; }
.topic-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--red); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: 13.5px; color: var(--ink-3); margin: 22px 0 6px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: #b5b5b5; }
.breadcrumbs a { color: var(--ink-3); }
.breadcrumbs a:hover { color: var(--red); }

/* ---------- Article ---------- */
.article-head { max-width: 860px; margin: 8px auto 26px; }
.article-head h1 { font-size: clamp(28px, 4.4vw, 40px); line-height: 1.18; letter-spacing: -.6px; margin: 10px 0 14px; }
.article-meta { display: flex; align-items: center; gap: 14px; color: var(--ink-3); font-size: 14px; flex-wrap: wrap; }
.article-hero { max-width: 860px; margin: 0 auto 10px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.article-hero svg { display: block; width: 100%; height: auto; }
.article-layout { display: grid; grid-template-columns: minmax(0, 860px) 280px; gap: 48px; justify-content: center; padding: 26px 0 10px; }
.article-body { min-width: 0; }
.article-body h2 { font-size: 27px; letter-spacing: -.4px; margin: 44px 0 14px; padding-top: 10px; scroll-margin-top: 90px; }
.article-body h2::before { content: ""; display: block; width: 44px; height: 4px; background: var(--red); border-radius: 2px; margin-bottom: 12px; }
.article-body h3 { font-size: 20.5px; margin: 30px 0 10px; scroll-margin-top: 90px; }
.article-body p { margin: 0 0 16px; }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 26px; }
.article-body li { margin-bottom: 7px; }
.article-body li::marker { color: var(--red); font-weight: 700; }
.article-body table { width: 100%; border-collapse: collapse; margin: 22px 0 26px; font-size: 15px; display: block; overflow-x: auto; }
.article-body th { background: var(--ink); color: #fff; text-align: left; padding: 11px 14px; font-size: 13.5px; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.article-body td { border: 1px solid var(--line); padding: 11px 14px; vertical-align: top; }
.article-body tr:nth-child(even) td { background: var(--bg-soft); }
.article-body blockquote {
  margin: 24px 0; padding: 18px 22px; background: var(--red-tint);
  border-left: 4px solid var(--red); border-radius: 0 10px 10px 0; color: var(--ink-2);
}
.article-body blockquote p:last-child { margin: 0; }
.callout {
  margin: 24px 0; padding: 18px 22px; background: var(--bg-soft);
  border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 0 10px 10px 0;
}
.callout p:last-child { margin: 0; }

/* ---------- TOC ---------- */
.toc { position: sticky; top: 92px; align-self: start; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; font-size: 14px; }
.toc-title { font-weight: 800; font-size: 12.5px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--ink-3); margin: 0 0 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; border-left: 2px solid var(--line); }
.toc a { display: block; color: var(--ink-2); padding: 6px 0 6px 14px; line-height: 1.4; }
.toc a:hover { color: var(--red); text-decoration: none; border-left: 2px solid var(--red); margin-left: -2px; }

/* ---------- FAQ ---------- */
.faq-section { max-width: 860px; margin: 30px auto 0; }
.faq-section h2 { font-size: 26px; letter-spacing: -.4px; }
.faq-item { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; background: #fff; overflow: hidden; }
.faq-item summary {
  cursor: pointer; padding: 16px 20px; font-weight: 700; font-size: 16.5px;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--red); font-size: 22px; font-weight: 800; flex-shrink: 0; }
.faq-item[open] summary::after { content: "–"; }
.faq-item[open] summary { border-bottom: 1px solid var(--line); }
.faq-item .faq-a { padding: 14px 20px; color: var(--ink-2); }
.faq-item .faq-a p { margin: 0 0 10px; }
.faq-item .faq-a p:last-child { margin: 0; }

/* ---------- CTA panel ---------- */
.cta-panel {
  max-width: 860px; margin: 44px auto 10px;
  background: linear-gradient(135deg, #1f1f1f 0%, #2b2b2b 60%, #3a2020 100%);
  color: #fff; border-radius: var(--radius); padding: 34px 36px;
  display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap;
}
.cta-panel h2 { margin: 0 0 8px; font-size: 23px; letter-spacing: -.3px; }
.cta-panel h2::before { display: none; }
.cta-panel p { margin: 0; color: #cfcfcf; max-width: 520px; font-size: 15.5px; }

/* ---------- Related ---------- */
.related { max-width: 860px; margin: 40px auto 0; }
.related h2 { font-size: 24px; }

/* ---------- Page (about/faq/category) ---------- */
.page-head { background: var(--bg-dark); color: #fff; padding: 52px 0 46px; border-bottom: 3px solid var(--red); }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); margin: 8px 0 12px; letter-spacing: -.5px; }
.page-head p { color: #cfcfcf; max-width: 720px; margin: 0; font-size: 17.5px; }
.page-head .breadcrumbs, .page-head .breadcrumbs a { color: #a9a9a9; margin-top: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-dark-2); color: #b9b9b9; margin-top: 70px; font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 34px; padding: 50px 20px 30px; }
.footer-brand { font-size: 20px; color: #fff; font-weight: 600; margin: 0 0 10px; }
.footer-brand strong { color: var(--red); font-weight: 800; }
.footer-blurb { margin: 0; line-height: 1.6; }
.footer-title { color: #fff; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #b9b9b9; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #2e2e2e; padding: 18px 20px; font-size: 13px; color: #8a8a8a; }
.footer-bottom p { margin: 0; }

/* ---------- Utility ---------- */
.muted { color: var(--ink-3); }
.center { text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { position: static; margin: 0 0 26px; order: -1; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .nav-list { display: none; width: 100%; flex-direction: column; align-items: stretch; padding: 10px 0; }
  .nav-list.open { display: flex; }
  .header-inner { flex-wrap: wrap; padding: 10px 0; }
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 52px 0 46px; }
  .cta-panel { padding: 26px 22px; }
  .section { padding: 44px 0; }
}
