/* usedcar.bot — dark, modern, no red. Blue = good. Orange = warning. */
:root {
  --bg: #0b1016;
  --bg-2: #10161e;
  --card: #161d28;
  --card-2: #1b2431;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #eef2f7;
  --muted: #8b97a8;
  --faint: #6a7584;
  --blue: #4aa3ff;
  --blue-deep: #1d6fd4;
  --blue-soft: rgba(74, 163, 255, 0.14);
  --good: #4aa3ff;
  --warn: #ff8a3d;
  --warn-soft: rgba(255, 138, 61, 0.14);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --radius-sm: 12px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --display: "Space Grotesk", "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { height: 100%; background: var(--bg); }
body {
  min-height: 100%;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; margin: 0; }
p { margin: 0; }

.glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(29, 111, 212, 0.28), transparent 55%),
    radial-gradient(700px 400px at 110% 10%, rgba(74, 163, 255, 0.08), transparent 50%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  overflow: hidden;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(74, 163, 255, 0.25);
}
.logo-mark img { width: 100%; height: 100%; object-fit: cover; }
.wordmark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.wordmark .tld { color: var(--blue); }

.topbar-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn, .menu-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: transparent;
}
.icon-btn:hover, .menu-btn:hover { background: var(--blue-soft); }
.install-chip {
  display: none;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--blue);
  color: #071018;
  font-weight: 600;
  font-size: 0.85rem;
}
.install-chip.show { display: inline-flex; }

main { position: relative; z-index: 1; }
.view { display: none; padding: 20px 16px 48px; max-width: 800px; margin: 0 auto; }
#view-home.view { max-width: 1080px; }
.view.on { display: block; }

.hero { padding: 12px 0 8px; max-width: 640px; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}
.kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 12px var(--blue);
}
.hero h1 { font-size: clamp(2rem, 7vw, 3.4rem); margin-bottom: 12px; }
.hero .lede { font-size: 1.05rem; color: var(--muted); max-width: 42ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--blue); color: #071018; }
.btn-primary:hover { background: #6bb4ff; text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { background: var(--card); text-decoration: none; }
.btn-warn {
  background: var(--warn-soft);
  color: var(--warn);
  border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
}
.btn.full { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: default; }

.tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 32px;
}
.tool-card {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  text-align: left;
  box-shadow: var(--shadow);
  width: 100%;
}
.tool-card:hover { border-color: color-mix(in srgb, var(--blue) 45%, var(--line)); text-decoration: none; }
.tool-ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.tool-card h2 { font-size: 1.05rem; margin-bottom: 4px; }
.tool-card p { color: var(--muted); font-size: 0.92rem; }
.chev { color: var(--faint); }

.view-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}
.view-head h1 { font-size: 1.7rem; }
.view-head p { color: var(--muted); margin-top: 6px; }
.view-head .copy { min-width: 0; flex: 1; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.card + .card, .stack > * + * { margin-top: 12px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-grid .span-2 { grid-column: 1 / -1; }
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}
input, select, textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px 12px;
  font-size: 16px;
  outline: none;
  color: var(--text);
}
textarea { min-height: 140px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
input.invalid, textarea.invalid {
  border-color: var(--warn);
  box-shadow: 0 0 0 3px var(--warn-soft);
}
.hint { font-size: 0.8rem; color: var(--faint); font-weight: 400; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--card-2);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 550;
}
.chip:hover { border-color: var(--blue); }
.chip.active { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }

.verdict {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
}
.verdict.good, .verdict.fair {
  background: linear-gradient(180deg, var(--blue-soft), var(--card));
  border-color: color-mix(in srgb, var(--blue) 40%, var(--line));
}
.verdict.warn, .verdict.cheap {
  background: linear-gradient(180deg, var(--warn-soft), var(--card));
  border-color: color-mix(in srgb, var(--warn) 40%, var(--line));
}
.verdict-label {
  font-family: var(--display);
  font-size: 1.8rem;
  letter-spacing: -0.03em;
}
.verdict.good .verdict-label, .verdict.fair .verdict-label { color: var(--blue); }
.verdict.warn .verdict-label, .verdict.cheap .verdict-label { color: var(--warn); }
.range {
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--muted);
}
.reasons { margin: 0; padding-left: 18px; color: var(--text); }
.reasons li + li { margin-top: 6px; }

.vin-input-row { display: flex; gap: 8px; }
.vin-input-row input {
  flex: 1;
  font-family: var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}
.spec {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.spec dt { font-size: 0.75rem; color: var(--faint); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.spec dd { margin: 2px 0 0; font-weight: 550; }
.mono { font-family: var(--mono); letter-spacing: 0.02em; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}
.stat {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
}
.stat b { display: block; font-family: var(--display); font-size: 1.35rem; letter-spacing: -0.03em; }
.stat span { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.stat.warn b { color: var(--warn); }
.stat.good b { color: var(--blue); }

.recall {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.recall:last-child { border-bottom: 0; }
.recall-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.recall h3 { font-size: 0.95rem; font-family: var(--font); letter-spacing: 0; font-weight: 600; }
.campaign { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.recall p { margin-top: 6px; color: var(--muted); font-size: 0.9rem; }
.flag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  background: var(--blue-soft);
  color: var(--blue);
}
.pill.warn { background: var(--warn-soft); color: var(--warn); }

.flag-card {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--line));
  background: var(--warn-soft);
}
.flag-card h3 { font-size: 1rem; color: var(--warn); margin-bottom: 4px; }
.flag-card p { color: var(--text); font-size: 0.92rem; }
.clear-card {
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--blue) 40%, var(--line));
  background: var(--blue-soft);
}
.clear-card h3 { color: var(--blue); margin-bottom: 4px; }

.check-section + .check-section { margin-top: 8px; }
.check-section h2 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  padding: 8px 2px;
}
.check-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 4px;
  border-top: 1px solid var(--line);
  width: 100%;
  text-align: left;
  color: inherit;
}
.check-item .box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--line-strong);
  flex: 0 0 auto;
  margin-top: 1px;
  display: grid;
  place-items: center;
  background: var(--bg);
}
.check-item.on .box {
  background: var(--blue);
  border-color: var(--blue);
  color: #071018;
}
.check-item.on .label { color: var(--muted); }
.check-item .label { font-weight: 550; }
.check-item .why { font-size: 0.85rem; color: var(--faint); margin-top: 2px; }
.progress {
  height: 8px;
  background: var(--bg);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.progress > span { display: block; height: 100%; background: var(--blue); width: 0; transition: width 0.2s ease; }

.q-list { list-style: none; margin: 0; padding: 0; counter-reset: q; }
.q-list li {
  position: relative;
  padding: 12px 0 12px 36px;
  border-bottom: 1px solid var(--line);
}
.q-list li::before {
  counter-increment: q;
  content: counter(q);
  position: absolute;
  left: 0;
  top: 12px;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.chat-shell {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 220px);
}
.chat-log {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 12px;
}
.bubble {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 0.95rem;
  white-space: pre-wrap;
}
.bubble.bot {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}
.bubble.me {
  align-self: flex-end;
  background: var(--blue);
  color: #071018;
  border-bottom-right-radius: 6px;
}
.chat-compose {
  position: sticky;
  bottom: 0;
  padding: 8px 0 calc(8px + var(--safe-bot));
  background: linear-gradient(180deg, transparent, var(--bg) 24%);
}
.compose-row { display: flex; gap: 8px; }
.compose-row input { flex: 1; }

.site-footer {
  position: relative;
  z-index: 1;
  padding: 28px 16px calc(32px + var(--safe-bot));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}
.site-footer .inner { max-width: 1080px; margin: 0 auto; }
.site-footer h2 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  margin-bottom: 8px;
  font-family: var(--font);
  font-weight: 650;
}
.our-sites { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 16px; }
.fine { color: var(--faint); font-size: 0.8rem; max-width: 70ch; }
.fine + .fine { margin-top: 8px; }

.menu {
  display: none;
  position: fixed;
  z-index: 40;
  top: calc(62px + var(--safe-top));
  right: 12px;
  width: min(260px, calc(100vw - 24px));
  background: var(--card-2);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 6px;
}
.menu.on { display: block; }
.menu button, .menu a {
  display: flex;
  width: 100%;
  text-align: left;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--text);
  font-weight: 550;
  text-decoration: none;
}
.menu button:hover, .menu a:hover { background: var(--blue-soft); text-decoration: none; }
.menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 30;
}
.menu-backdrop.on { display: block; }

.status {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 8px 0;
}
.status.warn { color: var(--warn); }
.status.good { color: var(--blue); }
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (min-width: 720px) {
  .view { padding: 28px 24px 64px; }
  .tools { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: repeat(3, 1fr); }
  .form-grid .span-2 { grid-column: span 2; }
  .form-grid .span-3 { grid-column: 1 / -1; }
  .specs { grid-template-columns: repeat(3, 1fr); }
  .install-chip { font-size: 0.9rem; }
  .hero { padding-top: 28px; }
}

@media (min-width: 1024px) {
  .topbar { padding-left: 28px; padding-right: 28px; }
  .hero h1 { font-size: 3.6rem; }
  .tools { grid-template-columns: 1fr 1fr 1fr; }
}

@media print {
  .topbar, .site-footer, .hero-actions, .chips, .btn, .menu, .glow { display: none !important; }
  body { background: #fff; color: #111; }
  .view { display: none !important; }
  .view.on { display: block !important; }
  .check-item .box { border-color: #333; }
}

#vin-form.is-done .hint,
#vin-form.is-done #btn-demo-vin { display: none; }
#vin-form.is-done { padding-bottom: 12px; }
#vin-form.is-done .vin-input-row { margin-bottom: 0; }

#vin-result, #vin-status, #deal-result, #scam-result { scroll-margin-top: 76px; }

#view-vin.has-result .view-head p { display: none; }
#view-vin.has-result .view-head { margin-bottom: 10px; }
@media (max-width: 719px) {
  .spec { padding: 7px 0; }
}

/* Fix-it hero + finder */
.hero-ask {
  display: flex;
  gap: 8px;
  margin-top: 22px;
  max-width: 560px;
}
.hero-ask input { flex: 1; background: var(--card); }
.featured-tools { margin-top: 28px; }
.tool-card.feature {
  border-color: color-mix(in srgb, var(--blue) 28%, var(--line));
  background: linear-gradient(180deg, var(--blue-soft), var(--card));
}
.section-label {
  font-family: var(--font);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  font-weight: 650;
  margin: 28px 0 10px;
}
.car-context { margin-bottom: 12px; }
.fix-log { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.diag {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.diag h2 { font-size: 1.25rem; margin-bottom: 8px; }
.diag .lede { color: var(--muted); margin-bottom: 14px; }
.cause-list { margin: 0; padding-left: 20px; }
.cause-list li + li { margin-top: 6px; }
.cause-list li strong { color: var(--text); }
.diff-row { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.diff-bar {
  flex: 1;
  height: 8px;
  background: var(--bg);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.diff-bar > span { display: block; height: 100%; background: var(--blue); }
.steps { margin: 0; padding-left: 20px; }
.steps li + li { margin-top: 8px; }
.tool-table, .parts-list { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tool-table th, .tool-table td, .parts-list th, .parts-list td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.tool-table th, .parts-list th { color: var(--faint); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; }
.store-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.store-row a {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}
.store-row a:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.site-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.site-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  color: inherit;
  text-decoration: none;
}
.site-card:hover { border-color: color-mix(in srgb, var(--blue) 45%, var(--line)); text-decoration: none; }
.site-card h3 { font-size: 1.02rem; }
.site-card p { color: var(--muted); font-size: 0.88rem; }
.site-card .go { color: var(--blue); font-weight: 650; font-size: 0.85rem; }
@media (min-width: 720px) {
  .featured-tools { grid-template-columns: 1fr 1fr; }
  .site-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .site-grid { grid-template-columns: 1fr 1fr 1fr 1fr; }
}

#view-fix { padding-bottom: 24px; }
#view-fix .chat-compose { margin-top: 8px; }
#find-result, .diag, #fix-log { scroll-margin-top: 80px; }
html.shot .topbar { position: static; }
html.shot .chat-compose { position: static; background: var(--bg); }
html.shot .glow { opacity: 0.7; }
@media (max-width: 719px) {
  .hero-ask { flex-direction: column; }
  .hero-ask .btn { width: 100%; }
}

/* ---------- live helper additions ---------- */
.flag-card.urgent { border-width: 2px; margin-bottom: 14px; }
.flag-card.urgent h3 { font-size: 1.08rem; }
.linklike { background: none; border: 0; padding: 0; color: var(--blue); text-decoration: underline; font: inherit; cursor: pointer; }
.follow-chips { margin-top: 12px; }
.fix-log .follow-chips .chip, .chat-log .follow-chips .chip { text-align: left; white-space: normal; height: auto; padding: 8px 12px; }
.chat-compose.busy .btn { opacity: 0.6; pointer-events: none; }
[data-left] { color: var(--muted); }
