/* ============================================================
   VIN Decoder — style.css
   ============================================================ */

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

:root {
  --primary:        #2563eb;
  --primary-hover:  #1d4ed8;
  --primary-light:  #eff6ff;
  --premium:        #7c3aed;
  --premium-hover:  #6d28d9;
  --premium-light:  #f5f3ff;
  --bg:             #f1f5f9;
  --surface:        #ffffff;
  --border:         #e2e8f0;
  --text:           #0f172a;
  --muted:          #64748b;
  --success:        #16a34a;
  --danger:         #dc2626;
  --warning:        #d97706;
  --radius:         10px;
  --shadow:         0 1px 3px rgba(0,0,0,.08);
  --shadow-md:      0 4px 16px rgba(0,0,0,.08);
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary); }

/* ── Layout ─────────────────────────────────────────────── */
.container { max-width: 920px; margin: 0 auto; padding: 0 16px; }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  background: #0f172a;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.logo {
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
}
.logo span { color: var(--primary); }
.logo-img { line-height: 0; }
.logo-wordmark {
  height: 32px;
  width: auto;
  display: block;
  /* Logo is dark — invert to white for the dark header */
  filter: brightness(0) invert(1);
}

nav { display: flex; align-items: center; gap: 1.4rem; }
nav a {
  color: #94a3b8;
  text-decoration: none;
  font-size: .9rem;
  transition: color .15s;
}
nav a:hover { color: #fff; }
.btn-primary-sm {
  background: var(--primary) !important;
  color: #fff !important;
  padding: 6px 14px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  font-size: .85rem !important;
  text-decoration: none !important;
}
.btn-primary-sm:hover { background: var(--primary-hover) !important; color: #fff !important; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: #0f172a;
  color: #64748b;
  padding: 20px 0;
  margin-top: 56px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .85rem;
}
.footer-links { display: flex; gap: 1.4rem; }
.footer-links a, .site-footer a { color: #64748b; text-decoration: none; }
.footer-links a:hover, .site-footer a:hover { color: #94a3b8; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.btn-primary   { background: var(--primary);   color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-premium   { background: var(--premium);   color: #fff; }
.btn-premium:hover { background: var(--premium-hover); color: #fff; }
.btn-outline   { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-sm        { padding: 6px 14px; font-size: .85rem; }
.btn-lg        { padding: 14px 28px; font-size: 1.05rem; }
.btn-block     { width: 100%; }
.btn:disabled  { opacity: .5; cursor: default; }

/* ── Alerts ─────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: .92rem;
}
.alert-error   { background: #fef2f2; border: 1px solid #fecaca; color: var(--danger); }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: var(--success); }
.alert-info    { background: var(--primary-light); border: 1px solid #bfdbfe; color: var(--primary); }

/* ── Hero / VIN form ────────────────────────────────────── */
.hero          { padding: 52px 0 36px; text-align: center; }
.hero h1       { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.04em; margin-bottom: 12px; line-height: 1.15; }
.hero > p      { font-size: 1.05rem; color: var(--muted); margin-bottom: 28px; }
.hero .accent  { color: var(--primary); }
.hero-logo-wrap { display: flex; justify-content: center; margin-bottom: 16px; }
.hero-logo {
  height: 80px;
  width: auto;
  /* Dark logo — keep as-is on white/light background */
}
.hero-sub { font-size: 1.05rem; color: var(--muted); margin-bottom: 28px; }

.vin-form      { display: flex; gap: 10px; max-width: 560px; margin: 0 auto; }
.vin-input {
  flex: 1;
  padding: 13px 18px;
  font-size: 1.05rem;
  font-family: 'Courier New', monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  outline: none;
  transition: border-color .15s;
}
.vin-input:focus { border-color: var(--primary); }
.vin-input.error { border-color: var(--danger); }
.vin-input-sm   { padding: 9px 12px; font-size: .95rem; width: 220px; }

.vin-counter { font-size: .8rem; color: var(--muted); margin-top: 7px; text-align: right; max-width: 560px; margin-left: auto; margin-right: auto; }
.vin-counter.valid { color: var(--success); }

/* ── How it works ───────────────────────────────────────── */
.how-it-works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 36px 0;
}
.step          { text-align: center; padding: 24px 16px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.step-icon     { font-size: 1.8rem; margin-bottom: 10px; }
.step h3       { font-weight: 700; margin-bottom: 4px; }
.step p        { font-size: .88rem; color: var(--muted); }

/* ── Tier grid (index) ──────────────────────────────────── */
.tier-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 8px 0 40px; }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.card-premium  { border-color: var(--premium); }
.card-header   { font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 14px; }

/* ── Feature list (in tier cards) ─────────────────────── */
.feature-list  { list-style: none; }
.feature-list li { padding: 5px 0; font-size: .9rem; border-bottom: 1px solid var(--border); display: flex; gap: 8px; align-items: flex-start; }
.feature-list li:last-child { border-bottom: none; }
.feat-yes  { color: var(--success); font-weight: 700; flex-shrink: 0; }
.feat-no   { color: #cbd5e1; flex-shrink: 0; }

/* ── Result page ────────────────────────────────────────── */
.result-hero   { padding: 28px 0 20px; }
.result-hero h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 6px; }
.vin-badge {
  display: inline-block;
  background: #0f172a;
  color: #94a3b8;
  font-family: 'Courier New', monospace;
  font-size: .82rem;
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: .1em;
  margin-bottom: 14px;
}
.search-again-form { display: flex; gap: 8px; margin: 18px 0 0; }

.action-bar { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 22px; }

.premium-pill {
  display: inline-block;
  background: var(--premium-light);
  color: var(--premium);
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 4px;
}

.saved-indicator { color: var(--success); font-size: .88rem; font-weight: 600; align-self: center; }

/* ── Specs grid ─────────────────────────────────────────── */
.specs-outer { margin-bottom: 28px; }
.section-block { margin-bottom: 14px; }
.section-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
  gap: 8px;
}
.spec-row:last-child { border-bottom: none; }
.spec-label  { color: var(--muted); flex-shrink: 0; }
.spec-value  { font-weight: 600; text-align: right; }

/* ── Recalls ────────────────────────────────────────────── */
.recalls-section  { margin-bottom: 32px; }
.recall-card {
  border-left: 4px solid var(--warning);
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
}
.recall-top       { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.recall-component { font-weight: 700; }
.recall-number    { font-size: .78rem; color: var(--muted); font-family: monospace; }
.recall-text      { font-size: .88rem; color: var(--muted); margin-top: 4px; }
.no-recalls {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: var(--success);
  padding: 14px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .9rem;
}

/* ── Upgrade banners ────────────────────────────────────── */
.upgrade-banner {
  background: var(--premium-light);
  border: 1.5px solid #c4b5fd;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.upgrade-banner p   { font-weight: 600; color: var(--premium); margin: 0; }
.upgrade-banner small { display: block; color: var(--muted); font-weight: 400; }

.soft-upsell {
  background: var(--primary-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 18px;
  font-size: .88rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bottom-cta {
  background: var(--premium-light);
  border: 1px solid #c4b5fd;
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  margin-top: 32px;
}
.bottom-cta h3 { font-size: 1.15rem; font-weight: 700; color: var(--premium); margin-bottom: 6px; }
.bottom-cta p  { color: var(--muted); font-size: .9rem; margin-bottom: 16px; }

.data-source-note { font-size: .8rem; color: var(--muted); margin-top: 24px; text-align: center; }

/* ── Pricing page ───────────────────────────────────────── */
.pricing-page-header { text-align: center; padding: 36px 0 28px; }
.pricing-page-header h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; }
.pricing-page-header p  { color: var(--muted); margin-top: 8px; }

.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 40px; }
.pricing-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow);
}
.pricing-card.featured { border-color: var(--premium); box-shadow: 0 4px 24px rgba(124,58,237,.15); }
.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--premium);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  padding: 3px 16px;
  border-radius: 99px;
  white-space: nowrap;
}
.pricing-name      { font-weight: 700; font-size: 1.05rem; margin-bottom: 10px; }
.pricing-price     { font-size: 2.7rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.pricing-price sub { font-size: 1.1rem; font-weight: 500; color: var(--muted); vertical-align: baseline; }
.pricing-period    { font-size: .85rem; color: var(--muted); margin: 4px 0 18px; }
.pricing-features  { list-style: none; text-align: left; margin: 0 0 20px; }
.pricing-features li {
  padding: 7px 0;
  font-size: .88rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.pricing-features li:last-child { border-bottom: none; }
.feat-check { color: var(--success); font-weight: 700; flex-shrink: 0; }
.feat-x     { color: #cbd5e1; flex-shrink: 0; }
.already-premium {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: var(--success);
  border-radius: 8px;
  padding: 12px;
  font-weight: 600;
  font-size: .9rem;
}

/* FAQ */
.faq-section  { margin: 0 0 40px; }
.faq-section h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 18px; }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.faq-item strong { display: block; margin-bottom: 6px; font-size: .93rem; }
.faq-item p { font-size: .88rem; color: var(--muted); margin: 0; }

/* ── Dashboard ──────────────────────────────────────────── */
.dash-header { padding: 28px 0 20px; }
.dash-header h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; }
.dash-section { margin-bottom: 36px; }
.dash-section h2 { font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 14px; }

.saved-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.saved-table th { text-align: left; padding: 8px 12px; background: var(--bg); color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; }
.saved-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.saved-table tr:last-child td { border-bottom: none; }
.saved-table .vin-link { color: var(--primary); font-family: monospace; font-weight: 700; font-size: .88rem; text-decoration: none; }
.saved-table .vin-link:hover { text-decoration: underline; }

.status-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 99px; font-size: .8rem; font-weight: 700; margin-left: 10px; }
.status-active    { background: #dcfce7; color: var(--success); }
.status-free      { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.status-past_due  { background: #fef3c7; color: var(--warning); }
.status-cancelled { background: #fee2e2; color: var(--danger); }

.account-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }

/* ── Auth forms ─────────────────────────────────────────── */
.auth-page     { max-width: 420px; margin: 48px auto; }
.auth-page h1  { font-size: 1.6rem; font-weight: 800; margin-bottom: 24px; text-align: center; letter-spacing: -0.02em; }
.auth-card     { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-md); }
.form-group    { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.form-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  outline: none;
  transition: border-color .15s;
  background: var(--surface);
}
.form-group input:focus { border-color: var(--primary); }
.form-footer   { text-align: center; color: var(--muted); font-size: .88rem; margin-top: 16px; }
/* show/hide password */
.pw-wrap       { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle     { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 1rem; padding: 4px; }
/* Google sign-in button */
.google-btn-wrap { display: flex; justify-content: center; margin-bottom: 16px; }
.auth-divider  { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .82rem; margin-bottom: 16px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Subscribe success ──────────────────────────────────── */
.success-page  { text-align: center; padding: 48px 0 32px; max-width: 540px; margin: 0 auto; }
.success-icon  { font-size: 3.5rem; margin-bottom: 16px; }
.success-page h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 8px; }
.success-page p  { color: var(--muted); margin-bottom: 28px; }
.success-features { list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; text-align: left; margin-bottom: 28px; }
.success-features li { padding: 7px 0; border-bottom: 1px solid var(--border); font-size: .9rem; display: flex; gap: 8px; }
.success-features li:last-child { border-bottom: none; }

/* ── Prose pages (privacy / terms) ─────────────────────── */
.prose-page { max-width: 680px; margin: 36px auto; }
.prose-page h1 { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 4px; }
.prose-meta  { color: var(--muted); font-size: .88rem; margin-bottom: 28px; }
.prose-page h2 { font-size: 1.05rem; font-weight: 700; margin: 28px 0 8px; }
.prose-page p  { font-size: .93rem; color: #374151; margin-bottom: 10px; line-height: 1.7; }
.prose-page ul { font-size: .93rem; color: #374151; padding-left: 20px; margin-bottom: 12px; }
.prose-page li { margin-bottom: 5px; line-height: 1.6; }
.prose-page a  { color: var(--primary); }

/* ── Ads ─────────────────────────────────────────────────── */
.ad-banner { background: var(--bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 10px 0; }
.ad-top    { margin-bottom: 14px; }
.ad-bottom { margin-top: 20px; }

/* ── Print ──────────────────────────────────────────────── */
@media print {
  .site-header,
  .site-footer,
  .ad-banner,
  .action-bar,
  .upgrade-banner,
  .soft-upsell,
  .bottom-cta,
  .no-print { display: none !important; }
  body { background: white; }
  .card, .section-block .card { box-shadow: none; border: 1px solid #ccc; }
  .specs-grid { grid-template-columns: 1fr 1fr !important; }
  .container { max-width: 100%; padding: 0; }
}

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero h1           { font-size: 1.8rem; }
  .hero-logo         { height: 56px; }
  .vin-form          { flex-direction: column; }
  .how-it-works      { grid-template-columns: 1fr; }
  .tier-grid         { grid-template-columns: 1fr; }
  .pricing-grid      { grid-template-columns: 1fr; }
  .faq-grid          { grid-template-columns: 1fr; }
  .specs-grid        { grid-template-columns: 1fr; }
  .action-bar        { flex-direction: column; }
  .action-bar .btn   { width: 100%; }
  .upgrade-banner    { flex-direction: column; text-align: center; }
  .soft-upsell       { flex-direction: column; text-align: center; }
  .footer-inner      { flex-direction: column; gap: 12px; text-align: center; }
  .footer-links      { flex-wrap: wrap; justify-content: center; }
  nav                { gap: .7rem; }
  nav a              { font-size: .82rem; }
  .result-hero h1    { font-size: 1.4rem; }
  .search-again-form { flex-direction: column; }
  .vin-input-sm      { width: 100%; }
  .saved-table       { font-size: .82rem; }
  .saved-table th, .saved-table td { padding: 8px; }
  .auth-page         { margin: 24px auto; }
  .dash-header h1    { font-size: 1.3rem; }
  .complaint-badge   { flex-wrap: wrap; }
  .fuel-stat         { min-width: 80px; }
  .premium-gate-teaser { flex-direction: column; text-align: center; }
  .ncap-grid         { grid-template-columns: repeat(2, 1fr); }
}

/* ── Reliability & enrichment ────────────────────────────── */
.complaint-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--surface);
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.badge-green { border-color: #bbf7d0; background: #f0fdf4; }
.badge-yellow { border-color: #fde68a; background: #fffbeb; }
.badge-red { border-color: #fecaca; background: #fef2f2; }
.complaint-badge-icon { font-size: 1.4rem; flex-shrink: 0; }
.complaint-badge-text strong { display: block; font-size: .95rem; }
.complaint-badge-sub { font-size: .82rem; color: var(--muted); margin-top: 2px; }

.ai-summary-card {
  background: linear-gradient(135deg, #f5f3ff, #eff6ff);
  border: 1.5px solid #c4b5fd;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
}
.ai-summary-card p { font-size: .95rem; line-height: 1.7; margin: 8px 0 6px; color: var(--text); }
.ai-summary-card small { color: var(--muted); font-size: .78rem; }
.ai-badge {
  display: inline-block;
  background: var(--premium);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 4px;
  letter-spacing: .03em;
}

.complaint-categories {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

/* ═══════════════════════════════════════════════════════════════
   Scan page
═══════════════════════════════════════════════════════════════ */
.scan-page { max-width: 640px; margin: 0 auto; padding: 0 0 48px; }
.scan-hero { text-align: center; padding: 32px 0 24px; }
.scan-hero h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; }
.scan-hero p { color: var(--muted); margin-top: 8px; }
.scan-manual-section { text-align: center; }
.scan-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 28px 0; color: var(--muted); font-size: .85rem;
}
.scan-divider::before, .scan-divider::after { content:''; flex:1; height:1px; background:var(--border); }

.scan-camera-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; text-align: center;
  box-shadow: var(--shadow);
}
.scan-camera-card h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.camera-preview-wrap { position: relative; display: inline-block; margin: 16px 0; }
.camera-preview {
  width: 100%; max-width: 480px; border-radius: var(--radius);
  background: #000; display: block;
}
.scan-overlay {
  position: absolute; inset: 0; pointer-events: none;
}
.scan-line {
  position: absolute; top: 50%; left: 8%; right: 8%; height: 2px;
  background: rgba(37,99,235,.7);
  animation: scanline 2s ease-in-out infinite;
}
@keyframes scanline {
  0%,100% { top: 25%; }
  50% { top: 75%; }
}
.scan-status { font-size: .9rem; color: var(--muted); }
.scan-result { font-weight: 700; color: var(--success); font-size: 1rem; }
.scan-tip { font-size: .82rem; color: var(--muted); text-align: center; margin-top: 14px; }
.scan-phone-link { margin-top: 10px; font-size: .88rem; color: var(--muted); }

/* QR code promo sections */
.qr-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; text-align: center;
  box-shadow: var(--shadow);
}
.qr-card h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.qr-code-box { display: inline-block; padding: 8px; background: #fff;
  border-radius: 8px; border: 1px solid var(--border); margin: 12px 0; }
.qr-url { font-size: .82rem; color: var(--muted); }

.scan-qr-row { margin: 0 0 32px; }
.scan-qr-card {
  background: linear-gradient(135deg, #eff6ff, #f0fdf4);
  border: 1.5px solid #bfdbfe; border-radius: var(--radius);
  padding: 24px 28px; display: flex; align-items: center; gap: 28px;
  flex-wrap: wrap;
}
.scan-qr-text h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.scan-qr-text p { font-size: .88rem; color: var(--muted); margin-bottom: 12px; }

/* ═══════════════════════════════════════════════════════════════
   Window sticker page
═══════════════════════════════════════════════════════════════ */
.window-sticker {
  background: #fff; border: 2px solid #0f172a;
  border-radius: 4px; font-family: Arial, sans-serif; color: #0f172a;
  max-width: 820px; margin: 0 auto;
  box-shadow: 0 4px 24px rgba(0,0,0,.15);
}
.sticker-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  background: #0f172a; color: #fff; padding: 20px 24px 16px;
}
.sticker-make { font-size: 1.5rem; font-weight: 900; letter-spacing: .02em; }
.sticker-model { font-size: 1rem; opacity: .85; margin-top: 2px; }
.sticker-year { font-size: .85rem; opacity: .65; margin-top: 2px; }
.sticker-logo-area { text-align: right; }
.sticker-vin-bar {
  display: flex; align-items: center; gap: 8px;
  background: #f1f5f9; padding: 8px 24px; font-size: .82rem;
  border-bottom: 1px solid #e2e8f0;
}
.sticker-body { display: flex; gap: 0; min-height: 480px; }
.sticker-left { flex: 1.1; border-right: 1px solid #e2e8f0; padding: 18px 20px; }
.sticker-right { flex: 1; padding: 18px 20px; }
.sticker-section { margin-bottom: 20px; }
.sticker-section-title {
  font-size: .7rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; color: #64748b; margin-bottom: 8px;
  border-bottom: 1px solid #e2e8f0; padding-bottom: 4px;
}
.sticker-row {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: .8rem; padding: 3px 0; border-bottom: 1px solid #f1f5f9;
}
.sticker-row span { color: #475569; }
.sticker-row strong { text-align: right; color: #0f172a; }
.sticker-epa { background: #eff6ff; border-radius: 4px; padding: 12px 14px; }
.sticker-mpg-row { display: flex; gap: 16px; margin-bottom: 10px; }
.sticker-mpg { text-align: center; }
.sticker-mpg-num { font-size: 1.8rem; font-weight: 900; color: #1d4ed8; line-height: 1; }
.sticker-mpg-lbl { font-size: .65rem; text-transform: uppercase; letter-spacing: .04em; color: #64748b; }
.sticker-mpg-comb .sticker-mpg-num { font-size: 2.2rem; color: #0f172a; }
.sticker-recall { font-size: .78rem; padding: 4px 0; border-bottom: 1px solid #fee2e2; color: #7f1d1d; }
.sticker-footer {
  background: #f8fafc; border-top: 1px solid #e2e8f0; padding: 12px 24px;
  font-size: .72rem; color: #94a3b8; display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 4px;
}
@media print {
  .no-print { display: none !important; }
  .window-sticker { box-shadow: none; border-color: #000; max-width: 100%; }
  body { background: #fff !important; }
  .sticker-body { flex-direction: row; }
}
@media (max-width: 640px) {
  .sticker-body { flex-direction: column; }
  .sticker-left { border-right: none; border-bottom: 1px solid #e2e8f0; }
  .sticker-actions { flex-wrap: wrap; }
}

/* ═══════════════════════════════════════════════════════════════
   Bulk decoder
═══════════════════════════════════════════════════════════════ */
.bulk-page { max-width: 900px; }
.bulk-inputs { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.bulk-textarea-wrap { flex: 2; min-width: 240px; }
.bulk-textarea {
  width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; font-family: 'Courier New', monospace; font-size: .85rem;
  resize: vertical; background: var(--surface);
  transition: border-color .2s;
}
.bulk-textarea:focus { border-color: var(--primary); outline: none; }
.bulk-or {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; color: var(--muted); font-size: .8rem; padding-top: 24px;
}
.bulk-or-line { width: 1px; flex: 1; background: var(--border); }
.bulk-csv-wrap { flex: 1; min-width: 200px; padding-top: 24px; }
.bulk-file-input { width: 100%; }

.bulk-table {
  width: 100%; border-collapse: collapse; font-size: .82rem;
}
.bulk-table th {
  background: var(--surface); color: var(--muted); font-size: .72rem;
  text-transform: uppercase; letter-spacing: .04em;
  padding: 8px 10px; text-align: left;
  border-bottom: 2px solid var(--border); white-space: nowrap;
}
.bulk-table td {
  padding: 7px 10px; border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.bulk-table tr:hover td { background: #f8fafc; }
.bulk-row-error td { background: #fff5f5; }
.vin-link { font-family: monospace; font-size: .82rem; color: var(--primary); }
.bulk-results-section { margin-top: 20px; }

/* ═══════════════════════════════════════════════════════════════
   Recall alert subscribe widget
═══════════════════════════════════════════════════════════════ */
.alert-subscribe-widget {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1.5px solid #fcd34d; border-radius: var(--radius);
  padding: 16px 20px; margin: 20px 0;
}
.alert-subscribe-inner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.alert-subscribe-icon { font-size: 1.6rem; flex-shrink: 0; }
.alert-subscribe-text { flex: 1; min-width: 160px; }
.alert-subscribe-text strong { display: block; font-size: .92rem; margin-bottom: 2px; }
.alert-subscribe-text span { font-size: .82rem; color: var(--muted); }
.alert-subscribe-form { display: flex; gap: 8px; flex-wrap: wrap; }
.alert-email-input {
  border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 6px 12px; font-size: .85rem; min-width: 200px;
  background: #fff;
}
.alert-email-input:focus { border-color: var(--primary); outline: none; }
.alert-success-msg { color: var(--success); font-weight: 600; font-size: .88rem; margin-top: 8px; }
.complaint-categories h4 { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 10px; }
.complaint-cat-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.complaint-cat-row:last-child { border-bottom: none; }
.complaint-cat-count { font-weight: 700; color: var(--muted); }

.investigations-section { margin-bottom: 14px; }
.investigations-section h4 { font-size: .88rem; font-weight: 700; margin-bottom: 10px; color: var(--warning); }
.investigation-card {
  border-left: 4px solid var(--warning);
  padding: 10px 14px;
  background: #fffbeb;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 8px;
  font-size: .88rem;
}
.investigation-card strong { display: block; margin-bottom: 3px; }
.investigation-card p { color: var(--muted); margin: 0; line-height: 1.5; }

.premium-gate-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--surface);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 14px;
  font-size: .9rem;
  color: var(--muted);
}
.premium-gate-teaser strong { color: var(--text); }

/* ── EPA Fuel Economy ────────────────────────────────────── */
.fuel-mpg-row { display: flex; flex-wrap: wrap; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.fuel-stat { flex: 1; min-width: 90px; text-align: center; padding: 18px 12px; border-right: 1px solid var(--border); }
.fuel-stat:last-child { border-right: none; }
.fuel-num { font-size: 2.2rem; font-weight: 800; color: var(--text); line-height: 1; }
.fuel-num-lg { color: var(--primary); }
.fuel-label { font-size: .72rem; color: var(--muted); margin-top: 5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.fuel-note { font-size: .8rem; color: var(--muted); margin-top: 4px; }

/* ── NCAP Safety Ratings ─────────────────────────────────── */
.ncap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 16px; margin-bottom: 8px; }
.ncap-item { text-align: center; background: var(--bg); border-radius: 8px; padding: 14px 10px; }
.ncap-stars { font-size: 1.4rem; color: var(--warning); letter-spacing: 2px; }
.ncap-label { font-size: .78rem; color: var(--muted); margin-top: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }


/* ====================================================================
   MOBILE APP SHELL
   ==================================================================== */

/* Add bottom padding on mobile so content clears bottom nav */
@media (max-width: 640px) {
  body { padding-bottom: 70px; }
  .main-content { padding: 0 12px; }
}

/* ── Mobile bottom navigation bar ────────────────────────────── */
.mobile-bottom-nav {
  display: none;
}
@media (max-width: 640px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: #0f172a;
    border-top: 1px solid rgba(255,255,255,.08);
    height: 62px;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mbn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #64748b;
    text-decoration: none;
    font-size: .65rem;
    font-weight: 600;
    padding: 6px 4px;
    transition: color .15s;
  }
  .mbn-item:hover, .mbn-item:active { color: #fff; }
  .mbn-icon { font-size: 1.3rem; line-height: 1; }
  .mbn-label { text-transform: uppercase; letter-spacing: .04em; }
  .mbn-scan-item {
    background: var(--primary);
    border-radius: 10px;
    margin: 6px 4px;
    color: #fff;
  }
  .mbn-upgrade-item { color: #c4b5fd; }
  .mbn-premium-item { color: #fbbf24; }
  /* Hide desktop nav on mobile */
  .site-header nav { display: none; }
}

/* ── Mobile scan hero (camera first) ───────────────────────── */
.mobile-scan-hero { display: none; }
@media (max-width: 640px) {
  .mobile-scan-hero { display: block; margin-bottom: 4px; }
  .scan-phone-link { display: none; }
  /* Hide QR desktop section on mobile */
  .scan-qr-row { display: none !important; }
}
.btn-scan-big {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  padding: 22px 20px;
  background: var(--primary);
  color: #fff;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(37,99,235,.35);
  transition: background .15s, transform .1s;
}
.btn-scan-big:hover { background: var(--primary-hover); color: #fff; }
.btn-scan-big:active { transform: scale(.97); }
.scan-big-label { font-size: 1.25rem; margin-bottom: 2px; }
.btn-scan-big small { font-size: .8rem; font-weight: 400; opacity: .85; }

/* ── Mobile sticky premium bar (result page) ───────────────── */
.mobile-premium-bar { display: none; }
@media (max-width: 640px) {
  .mobile-premium-bar {
    display: block;
    position: fixed;
    bottom: 62px; /* above bottom nav */
    left: 0;
    right: 0;
    z-index: 190;
    background: #0f172a;
    border-top: 2px solid var(--premium);
    padding: 10px 14px;
  }
  .mpb-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .mpb-text { display: flex; flex-direction: column; gap: 1px; }
  .mpb-text strong { color: #fff; font-size: .9rem; }
  .mpb-text span { color: #94a3b8; font-size: .72rem; }
  /* Extra padding so content doesn't hide under premium bar + bottom nav */
  body { padding-bottom: 140px; }
}
