:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #dc2626;
  --accent-dark: #b91c1c;
  --dark: #0f172a;
  --green: #16a34a;
  --radius: 12px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* Header / Nav */
.site-header { background: var(--dark); color: #fff; position: sticky; top: 0; z-index: 100; border-bottom: 1px solid rgba(255,255,255,.08); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 58px; gap: 16px; }
.brand-logo { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; text-decoration: none !important; }
.brand-logo span { color: #ef4444; }
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-links a { color: #cbd5e1; font-size: 14px; font-weight: 500; white-space: nowrap; }
.nav-links a:hover, .nav-links a.active { color: #fff; text-decoration: none; }
@media (max-width: 767px) {
  .nav-inner { height: 50px; }
  .brand-logo { font-size: 17px; }
  .nav-links { gap: 12px; overflow-x: auto; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { font-size: 13px; }
}

/* Breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; color: var(--muted); margin: 12px 0; align-items: center; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }

/* Hero */
.hero { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); color: #fff; padding: 28px 0 24px; margin-bottom: 20px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(22px, 3.2vw, 34px); line-height: 1.18; letter-spacing: -0.02em; }
.hero p { margin: 0; color: #cbd5e1; font-size: 15px; max-width: 740px; }

/* Buttons & Pills */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 600; border: 1px solid transparent; cursor: pointer; text-decoration: none !important; transition: all .15s; white-space: nowrap; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-warning { background: #f59e0b; color: #111827; }
.btn-warning:hover { background: #d97706; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }

.hub-strip { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 18px; }
.hub-pill { display: inline-block; padding: 5px 11px; border-radius: 20px; background: #fff; border: 1px solid var(--border); color: var(--ink); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.hub-pill:hover, .hub-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; text-decoration: none; }
@media (max-width: 767px) {
  .hub-strip { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 4px; }
  .hub-strip::-webkit-scrollbar { display: none; }
  .hub-pill { flex-shrink: 0; }
}

/* Cards & Grids */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 18px; box-shadow: 0 1px 3px rgba(15,23,42,.04); }
.card-title { margin: 0 0 12px; font-size: 17px; font-weight: 700; }
.cars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 960px) { .cars-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .cars-grid { grid-template-columns: 1fr; } }

.car-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s; overflow: hidden; }
.car-card:hover { border-color: var(--accent); box-shadow: 0 6px 18px rgba(15,23,42,.07); }
.car-thumb-link { display: block; margin: -12px -12px 10px; aspect-ratio: 16 / 9; background: #f1f5f9; overflow: hidden; }
.car-thumb { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.car-card:hover .car-thumb { transform: scale(1.03); }
.car-hero-wrap { aspect-ratio: 16 / 9; max-height: 420px; width: 100%; border-radius: var(--radius); overflow: hidden; background: #0f172a; margin-bottom: 16px; }
.car-hero-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cmp-head-img { width: 112px; height: 63px; object-fit: cover; border-radius: 6px; display: block; margin-left: auto; margin-bottom: 4px; background: #f1f5f9; }
@media (max-width: 767px) { .cmp-head-img { width: 80px; height: 45px; } }
.car-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.car-brand-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.car-name { font-size: 16px; font-weight: 700; color: var(--ink); }
.car-price { font-size: 16px; font-weight: 800; color: var(--accent); white-space: nowrap; }
.spec-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 12px; }
.spec-chip { font-size: 11.5px; background: #f1f5f9; color: #334155; padding: 2px 7px; border-radius: 5px; white-space: nowrap; }
.car-card-foot { margin-top: auto; display: flex; gap: 6px; }
.car-card-foot .btn { flex: 1; }

/* KPI Strip */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.kpi-box { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.kpi-lbl { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.kpi-val { font-size: 18px; font-weight: 800; color: var(--ink); margin-top: 2px; font-variant-numeric: tabular-nums; }
@media (max-width: 767px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } .kpi-val { font-size: 15px; } }

/* Picker & Filter Controls */
.picker-grid { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; align-items: center; }
.picker-grid select, .filter-bar select, .filter-bar input { width: 100%; height: 38px; border: 1px solid var(--border); border-radius: 8px; padding: 0 10px; font-size: 13.5px; background: #fff; color: var(--ink); }
@media (max-width: 767px) { .picker-grid { grid-template-columns: 5fr 7fr auto; gap: 6px; } .picker-grid select { font-size: 12.5px; padding: 0 6px; } }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.dv-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.dv-table th, table.dv-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
table.dv-table th { background: #f8fafc; font-weight: 700; color: #334155; white-space: nowrap; }
table.dv-table td.num, table.dv-table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.dv-table tr.win td.win-cell, td.win-cell { background: #dcfce7; color: #166534; font-weight: 700; }
@media (max-width: 767px) { table.dv-table { font-size: 12px; } table.dv-table th, table.dv-table td { padding: 6px 7px; } }

/* Drag Race Simulator */
.drag-card { background: #0f172a; color: #fff; border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.drag-hdr { padding: 12px 14px; background: #1e293b; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.drag-hdr-top { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.drag-actions { display: flex; gap: 6px; align-items: center; }
.drag-track { padding: 12px 14px; }
.drag-lane { position: relative; height: 76px; border-bottom: 2px dashed rgba(255,255,255,.18); overflow: hidden; }
.drag-lane:last-of-type { border-bottom: none; }
.drag-lane-head { position: absolute; left: 2px; top: 4px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; background: rgba(15,23,42,.82); padding: 2px 8px; border-radius: 5px; max-width: calc(100% - 36px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drag-finish { position: absolute; right: 18px; top: 0; bottom: 0; width: 10px; background: repeating-linear-gradient(0deg, #fff 0 6px, #111 6px 12px); opacity: .75; }
.drag-racer { position: absolute; left: 8px; bottom: 5px; display: flex; flex-direction: column; align-items: center; will-change: left; }
.drag-badge-dot { font-size: 10px; font-weight: 800; background: #fff; color: #0f172a; padding: 1px 5px; border-radius: 4px; margin-bottom: 2px; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.drag-result { margin-top: 10px; padding: 8px 12px; border-radius: 8px; background: rgba(34,197,94,.18); border: 1px solid #22c55e; color: #bbf7d0; font-weight: 700; font-size: 13px; text-align: center; display: none; }
@media (max-width: 767px) {
  .drag-hdr { flex-direction: column; align-items: stretch; }
  .drag-hdr-top { width: 100%; }
  .drag-actions { display: grid; grid-template-columns: 1fr auto auto; width: 100%; }
}

/* TCO Sliders */
.sliders-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.sliders-grid label { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
.sliders-grid input[type=range] { width: 100%; accent-color: var(--accent); }
@media (max-width: 767px) { .sliders-grid { grid-template-columns: 1fr; gap: 10px; } }

/* FAQ */
details.faq-item { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; background: #fff; }
details.faq-item summary { padding: 12px 14px; font-weight: 600; font-size: 14px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
details.faq-item summary::after { content: '+'; color: var(--accent); font-weight: 800; }
details.faq-item[open] summary::after { content: '−'; }
details.faq-item .faq-body { padding: 0 14px 12px; font-size: 13.5px; color: #475569; }

/* Footer */
.site-footer { margin-top: 40px; padding: 28px 0; background: var(--dark); color: #94a3b8; font-size: 13px; }
.site-footer a { color: #cbd5e1; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
