:root {
  --ink: #171815;
  --muted: #73766c;
  --paper: #f2f0ea;
  --card: #fbfaf6;
  --line: #dcd9cf;
  --lime: #d9ff67;
  --green: #1f6a43;
  --blue: #3157d5;
  --orange: #ef7c3a;
  --radius: 26px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }

.topbar {
  height: 78px; padding: 0 max(24px, calc((100vw - 1320px) / 2)); display: flex;
  align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font-size: 18px; font-weight: 750; letter-spacing: -.02em; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--ink); color: var(--lime); font-size: 13px; letter-spacing: .02em; }
.freshness { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14px; font-weight: 650; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #4bb878; box-shadow: 0 0 0 4px #4bb8781d; }

main, footer { width: min(1320px, calc(100% - 48px)); margin: 0 auto; }
.hero { min-height: 500px; display: grid; grid-template-columns: 1.12fr .88fr; gap: 72px; align-items: center; padding: 70px 0 58px; }
.eyebrow { margin: 0 0 14px; color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: .13em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 24px; font-size: clamp(72px, 8.5vw, 126px); line-height: .84; letter-spacing: -.075em; }
h1 small { display: block; margin-top: 22px; font-size: 19px; line-height: 1; letter-spacing: -.02em; font-weight: 650; color: var(--muted); }
.hero-delta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 17px; border-radius: 99px; background: var(--lime); font-size: 17px; font-weight: 750; }
.range-card { padding: 34px; background: var(--ink); color: white; border-radius: 34px; box-shadow: 0 22px 60px #1f211c18; }
.range-top { display: flex; justify-content: space-between; gap: 24px; }
.range-top > div { display: flex; flex-direction: column; gap: 7px; }
.metric-label { color: #adafa7; font-size: 14px; font-weight: 650; }
.range-top strong { font-size: 38px; letter-spacing: -.055em; }
.align-right { text-align: right; }
.range-track { position: relative; height: 12px; margin: 72px 0 12px; border-radius: 99px; background: #3a3c36; }
.range-fill { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, #4961d8, var(--lime)); opacity: .95; }
.range-pin { position: absolute; top: 50%; width: 22px; height: 22px; transform: translate(-50%, -50%); border: 4px solid white; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px #d9ff6728; }
.range-pin span { position: absolute; bottom: 29px; left: 50%; transform: translateX(-50%); font-size: 13px; font-weight: 800; white-space: nowrap; }
.range-labels { display: flex; justify-content: space-between; color: #adafa7; font-size: 14px; font-weight: 650; }

.overview-grid { display: grid; grid-template-columns: 1.8fr .8fr; gap: 20px; }
.panel { min-height: 380px; padding: 32px; background: var(--card); border: 1px solid #e5e2d8; border-radius: var(--radius); }
.panel-head, .section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
h2 { margin-bottom: 0; font-size: clamp(32px, 4vw, 54px); line-height: 1; letter-spacing: -.055em; }
.segmented, .filters { display: inline-flex; padding: 4px; gap: 3px; border: 1px solid var(--line); border-radius: 99px; background: #ebe9e2; }
.segmented button, .filters button { min-height: 38px; padding: 0 16px; border: 0; border-radius: 99px; background: transparent; cursor: pointer; font-size: 14px; font-weight: 750; }
.segmented button.active, .filters button.active { background: var(--ink); color: white; }
.chart { height: 250px; margin-top: 30px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart-label { fill: var(--muted); font-size: 12px; font-weight: 650; }
.pulse-panel { display: flex; flex-direction: column; }
.pulse-main { margin-top: 30px; }
.pulse-main strong { display: block; font-size: clamp(78px, 8vw, 116px); line-height: .82; letter-spacing: -.08em; }
.pulse-main span { display: block; margin-top: 18px; color: var(--muted); font-size: 18px; font-weight: 650; }
.pulse-change { margin-top: 18px; font-size: 16px; font-weight: 800; color: var(--green); }
.activity-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: auto; }
.activity-row > div { padding: 16px; border-radius: 18px; background: var(--paper); }
.activity-row strong { display: block; font-size: 28px; letter-spacing: -.04em; }
.activity-row span { color: var(--muted); font-size: 13px; font-weight: 650; }

.compare { padding: 110px 0 40px; }
.section-head { align-items: end; }
.insight-strip { display: flex; gap: 10px; margin: 34px 0 18px; overflow-x: auto; scrollbar-width: none; }
.insight-strip::-webkit-scrollbar { display: none; }
.insight { flex: 0 0 auto; padding: 10px 14px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: var(--card); font-size: 14px; font-weight: 700; }
.insight strong { color: var(--ink); }
.car-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.car-card { min-width: 0; padding: 24px; border: 1px solid #e2dfd5; border-radius: 24px; background: var(--card); transition: transform .18s ease, box-shadow .18s ease; }
.car-card:hover { transform: translateY(-4px); box-shadow: 0 18px 38px #25281f12; }
.car-card.hidden { display: none; }
.car-top { display: flex; justify-content: space-between; gap: 16px; }
.car-brand { margin: 0 0 6px; color: var(--muted); font-size: 12px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.car-name { min-height: 52px; margin: 0; font-size: 21px; line-height: 1.12; letter-spacing: -.035em; }
.body-icon { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--paper); font-size: 18px; }
.car-price { margin-top: 30px; font-size: 38px; font-weight: 820; letter-spacing: -.065em; }
.change { margin-top: 6px; color: var(--muted); font-size: 13px; font-weight: 750; }
.change.up { color: var(--green); }
.price-bar { position: relative; height: 8px; margin: 26px 0 8px; border-radius: 99px; background: #e6e3da; overflow: hidden; }
.price-bar span { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.range-mini { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; font-weight: 650; }
.car-stats { display: flex; gap: 20px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.car-stats strong { display: block; font-size: 20px; letter-spacing: -.04em; }
.car-stats span { color: var(--muted); font-size: 12px; font-weight: 650; }
.spark { height: 38px; margin-top: 16px; }
.spark svg { width: 100%; height: 100%; overflow: visible; }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 28px 0 44px; color: var(--muted); font-size: 13px; font-weight: 650; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 36px; }
  .overview-grid { grid-template-columns: 1fr; }
  .pulse-panel { min-height: 330px; }
  .car-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .topbar { height: 68px; padding: 0 18px; }
  .brand { font-size: 16px; }
  .freshness { font-size: 12px; }
  main, footer { width: min(100% - 28px, 1320px); }
  .hero { min-height: auto; padding: 48px 0 28px; gap: 30px; }
  h1 { font-size: clamp(62px, 21vw, 92px); margin-bottom: 20px; }
  h1 small { font-size: 17px; margin-top: 16px; }
  .hero-delta { min-height: 40px; font-size: 15px; }
  .range-card { padding: 24px; border-radius: 26px; }
  .range-top strong { font-size: 32px; }
  .range-track { margin-top: 62px; }
  .overview-grid { gap: 14px; }
  .panel { min-height: 0; padding: 22px; border-radius: 22px; }
  .panel-head { align-items: center; }
  .panel-head h2 { font-size: 34px; }
  .panel-head .eyebrow { display: none; }
  .segmented button { min-height: 42px; padding: 0 14px; }
  .chart { height: 190px; margin-top: 22px; }
  .pulse-panel { min-height: 300px; }
  .pulse-main strong { font-size: 92px; }
  .compare { padding-top: 72px; }
  .section-head { display: block; }
  .section-head h2 { max-width: 330px; font-size: 42px; }
  .filters { position: sticky; top: 8px; z-index: 5; margin-top: 24px; width: 100%; box-shadow: 0 8px 24px #191b1714; }
  .filters button { flex: 1; min-height: 46px; }
  .insight-strip { margin-top: 20px; margin-right: -14px; }
  .car-grid { grid-template-columns: 1fr; gap: 12px; }
  .car-card { padding: 22px; }
  .car-name { min-height: 0; font-size: 24px; }
  .car-price { font-size: 44px; }
  footer { flex-direction: column; padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
