:root {
  --bg: #f4f4f2;
  --surface: #ffffff;
  --text: #1b1c1e;
  --muted: #5d6066;
  --border: #dcdcd8;
  --accent: #3a3d42;
  --hero-bg: #1b1c1e;
  --hero-text: #f4f4f2;
  --warn-bg: #fff4e5;
  --warn-border: #f0c27b;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121315;
    --surface: #1c1d20;
    --text: #e9e9e6;
    --muted: #a0a3a8;
    --border: #2e3034;
    --accent: #c9ccd1;
    --hero-bg: #0a0a0b;
    --warn-bg: #2b2215;
    --warn-border: #6b5329;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
}

a { color: inherit; }

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* Header */
.hero {
  background: var(--hero-bg);
  color: var(--hero-text);
  padding: 40px 0 24px;
}
.brand {
  display: flex;
  width: fit-content;
  text-decoration: none;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 20px;
  letter-spacing: 0.01em;
}
.brand svg { flex: none; }
.brand strong { font-weight: 800; }
.hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.1;
}
.lede { margin: 0 0 20px; opacity: 0.85; }

.search input {
  width: 100%;
  padding: 14px 16px;
  font-size: 17px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: #1b1c1e;
}
.search input:focus { outline: 3px solid #8ab4f8; }

.chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin-top: 16px;
}
.chips a {
  padding: 6px 12px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  font-size: 14px;
  text-decoration: none;
}
.chips a:hover { background: rgba(255, 255, 255, 0.1); }

/* Vehicle picker */
.vehicles {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}
.vehicle {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  font-size: 20px;
  font-weight: 600;
}
.vehicle:hover { border-color: var(--accent); }
.vehicle-name { flex: 1; }
.vehicle-arrow { color: var(--muted); }
.swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  flex: none;
}
/* Cybertruck: matte metallic slate blue wrap */
.swatch-steel { background: linear-gradient(135deg, #7d8ea3, #4a5a6e); }
/* Jeep: granite gray metallic */
.swatch-gray { background: linear-gradient(135deg, #7a7c80, #3f4145); }
.swatch-white { background: #fafafa; }

/* Content */
main.wrap { padding-top: 32px; padding-bottom: 32px; }

.emergency {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
}
.emergency a { font-weight: 600; white-space: nowrap; }

.group { margin-top: 32px; scroll-margin-top: 16px; }
.group h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 10px;
}

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
}
summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 44px 14px 16px;
  font-weight: 600;
  position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 12px;
  font-size: 22px;
  font-weight: 400;
  color: var(--muted);
}
details[open] summary::after { content: "–"; }

.answer { padding: 0 16px 6px; }
.answer p, .answer ul { margin: 0 0 12px; }
.answer ul { padding-left: 20px; }

.empty {
  margin-top: 32px;
  text-align: center;
  color: var(--muted);
}

.footer {
  color: var(--muted);
  font-size: 15px;
  padding-bottom: 40px;
}

[hidden] { display: none !important; }
