:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-2: #f4f4f2;
  --ink: #0a0a0a;
  --ink-2: #4a4a48;
  --ink-3: #8a8a88;
  --line: #e5e5e2;
  --line-strong: #d2d2cf;
  --accent: #d97706;
  --accent-strong: #92400e;
  --warn-bg: #fff6ea;
  --warn-ink: #7a4a00;
  --warn-line: #f1d6a3;
  --danger: #c8320a;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(10, 10, 10, 0.05);
  --shadow-md: 0 6px 24px -8px rgba(10, 10, 10, 0.12), 0 2px 6px -2px rgba(10, 10, 10, 0.06);
  --font: ui-sans-serif, system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0a;
    --surface: #141413;
    --surface-2: #1c1c1a;
    --ink: #fafaf9;
    --ink-2: #c5c5c2;
    --ink-3: #8a8a86;
    --line: #262624;
    --line-strong: #323230;
    --accent: #fbbf24;
    --accent-strong: #fde68a;
    --warn-bg: #2a1e0b;
    --warn-ink: #f3d69a;
    --warn-line: #4d3918;
    --danger: #ff7a58;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 28px -8px rgba(0, 0, 0, 0.6), 0 2px 6px -2px rgba(0, 0, 0, 0.4);
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-feature-settings: "cv11", "ss01", "kern";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.small { font-size: 13px; color: var(--ink-3); }

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  position: sticky; top: 0; z-index: 20;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 15px;
}
.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--accent);
  flex: 0 0 auto;
}
.brand-icon svg { display: block; }

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 10px;
}
.site-nav-link {
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  white-space: nowrap;
  transition: border-color .12s, background .12s, color .12s;
}
.site-nav-link:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--accent-strong);
}
@media (max-width: 480px) {
  .site-nav { gap: 6px; margin-right: 6px; }
  .site-nav-link { padding: 6px 10px; font-size: 12.5px; }
}

.lang-switcher select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 30px 6px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%238a8a88' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><path d='m5 8 5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
}
.lang-switcher select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Hero */
main.wrap { flex: 1; padding-top: 48px; padding-bottom: 64px; }
.hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
  font-weight: 700;
}
.hero .sub {
  font-size: 17px;
  color: var(--ink-2);
  margin: 0 0 28px;
  max-width: 56ch;
}

/* Search */
.search { position: relative; }
.search-input {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 18%, transparent);
}
.search-icon { margin: 0 12px; color: var(--ink-3); flex: 0 0 auto; }
.search-input input {
  flex: 1;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 16px 12px 16px 0;
  font: inherit;
  font-size: 17px;
  outline: none;
}
.search-input input::-webkit-search-cancel-button { display: none; }
.search-input .clear {
  flex: 0 0 auto;
  margin-right: 8px;
  border: 0;
  background: var(--surface-2);
  color: var(--ink-2);
  height: 28px; width: 28px;
  border-radius: 999px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.search-input .clear:hover { background: var(--line-strong); color: var(--ink); }
.search-input .clear[hidden] { display: none; }

/* Suggestions dropdown */
.suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  margin: 0; padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 10;
  max-height: 360px;
  overflow: auto;
  overscroll-behavior: contain;
}
.suggestion {
  border-radius: var(--radius-sm);
  padding: 0;
  list-style: none;
}
.suggestion-link {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
  align-items: center;
}
.suggestion:hover .suggestion-link,
.suggestion[aria-selected="true"] .suggestion-link {
  background: var(--surface-2);
}
.suggestion-title { font-weight: 600; letter-spacing: -0.005em; }
.suggestion-sub { grid-column: 1 / -1; color: var(--ink-3); font-size: 13px; }
.suggestion mark {
  background: color-mix(in oklab, var(--accent) 26%, transparent);
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
}

/* Filters */
.filters {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; }
.field select {
  appearance: none; -webkit-appearance: none;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 10px 34px 10px 12px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  min-width: 0;
  text-overflow: ellipsis;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%238a8a88' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><path d='m5 8 5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
}
.field select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }

@media (max-width: 560px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .field:first-child { grid-column: 1 / -1; }
}

/* Results */
.results { margin-top: 36px; display: grid; gap: 16px; }

.state {
  padding: 28px 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}
.state h2 { margin: 0 0 6px; font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.state p { margin: 0; color: var(--ink-2); max-width: 56ch; margin-inline: auto; }

.match-count { font-size: 13px; color: var(--ink-3); padding: 2px 2px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.card-head {
  padding: 18px 20px 14px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.card-title h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.card-title .gen { color: var(--ink-3); font-size: 13px; margin-top: 2px; }

.badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.badge--yes { background: color-mix(in oklab, var(--accent) 14%, var(--surface)); color: var(--accent-strong); border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent); }
.badge--no { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.badge--depends { background: color-mix(in oklab, var(--warn-ink) 10%, var(--surface)); color: var(--warn-ink); border: 1px solid var(--warn-line); }

.card-body { padding: 16px 20px 6px; }
.card-body > p { margin: 0 0 10px; color: var(--ink-2); }

.wet-belt-warn {
  margin: 12px 20px 18px;
  padding: 12px 14px;
  background: var(--warn-bg);
  color: var(--warn-ink);
  border: 1px solid var(--warn-line);
  border-radius: var(--radius-sm);
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 14px;
}
.wet-belt-warn strong { display: block; margin-bottom: 2px; }
.wet-belt-warn svg { margin-top: 2px; }

.engines {
  margin: 0;
  border-top: 1px solid var(--line);
}
.engines h4 {
  margin: 0;
  padding: 14px 20px 10px;
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.engine-list { list-style: none; margin: 0; padding: 0 8px 8px; }
.engine-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  align-items: baseline;
}
.engine-row + .engine-row { border-top: 1px solid var(--line); }
.engine-name { font-weight: 600; }
.engine-meta { color: var(--ink-3); font-size: 13px; font-family: var(--mono); }
.engine-tags { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 650;
  padding: 3px 7px;
  border-radius: 999px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag--pt { background: color-mix(in oklab, var(--accent) 14%, var(--surface)); color: var(--accent-strong); border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent); }
.tag--not-pt { background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line); }
.tag--wet { background: color-mix(in oklab, var(--danger) 14%, var(--surface)); color: var(--danger); border: 1px solid color-mix(in oklab, var(--danger) 30%, transparent); }
.tag--chain { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.engine-note {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--ink-3);
  padding-top: 2px;
}

/* Disclaimer */
.disclaimer {
  margin-top: 36px;
  padding: 22px;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.disclaimer h2 { margin: 0 0 8px; font-size: 15px; font-weight: 650; letter-spacing: -0.005em; }
.disclaimer p { margin: 0 0 8px; color: var(--ink-2); font-size: 14px; }
.disclaimer p:last-child { margin-bottom: 0; }

/* FAQ */
.faq { margin-top: 56px; }
.faq > h2 {
  font-size: 22px;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
  font-weight: 700;
}
.faq .sub { color: var(--ink-2); margin: 0 0 18px; max-width: 64ch; }
.faq-list { margin: 0; padding: 0; display: grid; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.faq-item dt {
  font-weight: 650;
  letter-spacing: -0.005em;
  font-size: 16px;
  margin: 0 0 6px;
}
.faq-item dd {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.55;
}

/* Card CTA (detail link on result cards) */
.card-link { color: inherit; text-decoration: none; }
.card-link:hover { color: var(--accent-strong); }
.card-cta {
  margin: 4px 20px 18px;
  font-size: 13.5px;
  font-weight: 600;
}
.card-cta a {
  color: var(--accent-strong);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklab, var(--accent) 35%, transparent);
}
.card-cta a:hover { border-bottom-color: var(--accent-strong); }

/* ---- Vehicle detail page ---- */
.vehicle-page { padding-top: 24px; }

.breadcrumb {
  font-size: 13px;
  color: var(--ink-3);
  margin: 0 0 18px;
}
.breadcrumb ol {
  margin: 0; padding: 0;
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 0;
}
.breadcrumb li + li::before {
  content: "›";
  margin: 0 8px;
  color: var(--ink-3);
}
.breadcrumb a {
  color: var(--ink-3);
  text-decoration: none;
  border-bottom: 1px dashed var(--line-strong);
}
.breadcrumb a:hover { color: var(--ink); border-bottom-color: var(--ink-2); }
.breadcrumb li[aria-current="page"] { color: var(--ink); font-weight: 600; }

.vehicle-hero { margin-bottom: 24px; }
.vehicle-hero h1 {
  font-size: clamp(26px, 4.4vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  font-weight: 700;
}
.vehicle-sub {
  color: var(--ink-2);
  font-size: 16px;
  margin: 0 0 16px;
}
.vehicle-badge-row { margin-bottom: 14px; }
.badge--lg {
  font-size: 14px;
  padding: 8px 14px;
  letter-spacing: -0.005em;
}
.vehicle-body {
  color: var(--ink-2);
  margin: 8px 0 0;
  max-width: 64ch;
}

.wet-belt-warn--lg {
  margin: 0 0 24px;
  padding: 16px 18px;
  grid-template-columns: 28px 1fr;
  font-size: 15px;
  line-height: 1.5;
}
.wet-belt-warn--lg strong { font-size: 15px; margin-bottom: 6px; }

.vehicle-engines {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 24px;
}
.vehicle-engines h2 {
  margin: 0 0 12px;
  font-size: 16px;
  letter-spacing: -0.005em;
  font-weight: 650;
}
.vehicle-engine-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: engine;
}
.vehicle-engine-list .engine-row {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  counter-increment: engine;
}
.vehicle-engine-list .engine-row:first-child { border-top: 0; padding-top: 2px; }

.vehicle-howto {
  padding: 18px 20px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 28px;
}
.vehicle-howto h2 {
  margin: 0 0 8px;
  font-size: 15px;
  letter-spacing: -0.005em;
  font-weight: 650;
}
.vehicle-howto p { margin: 0 0 8px; color: var(--ink-2); font-size: 14px; }
.vehicle-howto p:last-child { margin-bottom: 0; }

.vehicle-related { margin-bottom: 28px; }
.vehicle-related > h2 {
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  font-weight: 700;
}
.vehicle-related > div + div { margin-top: 18px; }
.vehicle-related h3 {
  font-size: 13px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  margin: 0 0 10px;
}
.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 560px) {
  .related-list { grid-template-columns: 1fr 1fr; }
}
.related-list li a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
}
.related-list li a:hover { border-color: var(--accent); }
.related-list li a span { color: var(--ink-3); font-size: 13px; }

.vehicle-back {
  margin: 24px 0 8px;
  font-size: 14px;
}
.vehicle-back a {
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px dashed var(--line-strong);
}
.vehicle-back a:hover { color: var(--ink); border-bottom-color: var(--ink-2); }

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 22px 0;
  background: var(--surface);
}
.site-footer p { margin: 0 0 4px; font-size: 14px; color: var(--ink-2); }

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  .card, .suggestions { animation: pop .16s ease-out both; }
  @keyframes pop {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
  }
}

/* Print (friendly for screenshots) */
@media print {
  .site-header, .site-footer, .search, .filters, #suggestions { display: none !important; }
}
