:root {
  --bg: #f7f8fc;
  --surface-2: #ebeffc;
  --border: #dce2f0;
  --fg: #121e39;
  --muted: #52617b;
  --accent: #2346bb;
  --accent-soft: #e8edff;
  --navy: #142759;
  --radius: 14px;
  --display: var(--font);
}

html { scroll-padding-top: 5.65rem; }
body { display: flex; flex-direction: column; min-height: 100vh; }
main.shell { flex: 1 0 auto; margin: 0 auto; }
.shell, .top-inner { width: min(1180px, calc(100% - 72px)); }
body .view-hidden,
.has-js .home-page:not([data-view-ready]) [data-view]:not([data-view=browse]),
.has-js .car-page:not([data-view-ready]) [data-view]:not([data-view=prices]) { display: none !important; }
.topbar { position: sticky; border: none; box-shadow: none; background: var(--bg); backdrop-filter: none; }
.top-inner { min-height: 78px; gap: clamp(1rem, 4vw, 3rem); }
.brand { color: var(--fg); font: 750 1.32rem/1 var(--font); letter-spacing: -.065em; text-transform: none; gap: .48rem; }
.brand > span:last-child, .site-footer .brand > span:last-child { color: inherit; }
.brand-icon { display: block; flex: none; border-radius: 8px; }
.primary-nav { gap: .32rem; }
nav a, .top-link, .tools-menu summary { color: var(--fg); font-size: .9rem; font-weight: 650; }
.primary-nav a, .top-link, .tools-menu summary { display: block; padding: .55rem .76rem; border: 0; border-radius: 8px; white-space: nowrap; }
.primary-nav a:hover, .top-link:hover, .tools-menu summary:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.primary-nav [aria-current], .header-tools [aria-current], .car-jump [aria-current] {
  color: var(--accent); background: var(--accent-soft);
}
.header-tools { display: flex; align-items: center; gap: .3rem; margin-left: auto; }
.tools-menu { position: relative; }
.tools-menu summary { cursor: pointer; list-style: none; }
.tools-menu summary::-webkit-details-marker { display: none; }
.tools-menu summary::after { content: '⌄'; margin-left: .35rem; }
.tools-menu-links {
  position: absolute; z-index: 6; right: 0; top: calc(100% + .2rem);
  min-width: 12rem; padding: .35rem; background: white; border: 1px solid var(--border);
  border-radius: 11px; box-shadow: 0 12px 35px #14275920;
}
.tools-menu-links a { display: block; padding: .63rem .7rem; border-radius: 6px; text-decoration: none; font-size: .91rem; }
.tools-menu-links a:hover { background: var(--accent-soft); }

.intro {
  align-items: center; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(1.2rem, 4vw, 3.75rem); padding: clamp(1.2rem, 3.9vw, 3.5rem);
  margin: .75rem 0 0; background: #e8edfc; border: none; border-radius: 22px;
}
.intro h1 { font-size: clamp(2.5rem, 5.3vw, 5.1rem); line-height: .99; letter-spacing: -.077em; margin-bottom: 1rem; }
.intro h1 em { color: #2346bb; }
.lede { color: #354564; margin-bottom: 1.55rem; }
.hero-input { border-color: #c6d1ef; border-radius: 11px; padding: .35rem .35rem .35rem .8rem; box-shadow: none; }
.hero-input:focus-within { outline: 2px solid var(--accent); }
.hero-input button, .button { color: #fff; background: var(--accent); border-color: var(--accent); }
.hero-input button { padding-inline: .9rem; }
.hero-input button:hover, .button:hover { background: #17369c; }
.button.secondary { background: #f0f3fd; color: #233c87; border-color: #d7def2; }
.button.secondary:hover { color: #132e96; background: var(--accent-soft); border-color: #b1c0eb; }
.search-icon { border-color: #53678d; }
.search-icon::after { background: #53678d; }
.popular-cars { margin-top: .9rem; gap: .32rem .66rem; }
.popular-cars a { background: transparent; border: none; padding: .13rem 0; color: #263f86; text-decoration: underline; }
.popular-cars a:hover { color: var(--accent); background: transparent; }

.market-preview { display: block; overflow: hidden; min-width: 0; background: white; border-radius: 14px; }
.hero-car { width: 100%; height: auto; aspect-ratio: 1.65; display: block; object-fit: cover; object-position: center; }
.market-preview-content {
  display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-areas: 'title amount' 'time action';
  gap: .35rem .65rem; align-items: center; padding: .9rem 1rem;
}
.market-preview-content > div:first-child { display: contents; }
.market-preview-content h2 { grid-area: title; color: var(--fg); font-size: clamp(.95rem, 1.55vw, 1.16rem); letter-spacing: -.02em; }
.market-preview-content p { grid-area: time; margin: 0; color: var(--muted); font-size: .83rem; }
.market-preview-content .preview-quote { grid-area: amount; justify-content: end; }
.market-preview-content a { grid-area: action; justify-self: end; color: var(--accent); }
.market-preview .delta { border: none; border-radius: 6px; padding: .18rem .45rem; }
.section-head { align-items: center; margin-bottom: .95rem; }
h2 { font-size: clamp(1.52rem, 3vw, 2.05rem); letter-spacing: -.046em; }
h3 { letter-spacing: -.022em; }
.home-page main > section:not(.intro):not(#explore) { margin-top: 1.45rem; }
main .intro + section { margin-top: clamp(1.5rem, 3.5vw, 2.8rem); }
.explorer { padding: 0; background: transparent; border: 0; }
.filter-bar { grid-template-columns: minmax(0,1.4fr) repeat(2,minmax(0,.8fr)); }
.filter-bar > label { min-width: 0; }
.browse-filters { margin: .55rem 0 .85rem; color: var(--accent); }
.browse-filters summary { width: fit-content; padding: .3rem 0; font-size: .91rem; font-weight: 700; cursor: pointer; }
.advanced-filter-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .6rem; margin-top: .4rem; }
.catalog-meta { min-height: 2rem; }
.vehicle-grid { gap: .85rem; }
.vehicle-card-shell { border-radius: 12px; }
.vehicle-card-shell:hover { border-color: #9aaedf; box-shadow: 0 5px 15px #2237760c; }
.vehicle-card-shell .vehicle-card { padding: .9rem; gap: .35rem; }
.vehicle-card .vehicle-card-heading strong { font: 750 1.2rem/1.15 var(--font); color: var(--fg); }
.vehicle-card .card-price { font-weight: 750; color: #193995; }
.vehicle-card .card-coverage { padding: 0; background: transparent; border: 0; font-size: .77rem; color: var(--muted); }
.vehicle-card .vehicle-image { margin-bottom: .3rem; }
.garage-star { border-color: #d2daef; color: #28469e; }
.garage-star:hover { background: #e9efff; }
.site-footer { background: transparent; border: 0; }
.site-footer .shell { padding: 1.4rem 0; }
.site-footer .brand-icon { width: 28px; height: 28px; }
.site-footer .brand { font-size: 1.1rem; }
.site-footer nav a { color: var(--muted); font-size: .88rem; }
.example-opt-in { display: flex; align-items: center; gap: .55rem; margin: .8rem 0 1.2rem; color: var(--muted); font-size: .91rem; }
.example-opt-in input { width: 1rem; min-height: auto; margin: 0; accent-color: var(--accent); }
.leaderboard-panel > summary { font-weight: 700; cursor: pointer; }
.legend-dot { background: #254dcb; }
.legend-dot.compare-dot { background: #b45525; }

.car-shell { --car-ink: var(--fg); --model-border: var(--border); }
.breadcrumb { margin: .55rem 0 1rem; gap: 1.1rem; }
.breadcrumb a:first-child { color: var(--accent); }
.model-masthead {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(1rem, 3vw, 2.6rem); align-items: center; padding: clamp(1.1rem, 3vw, 2.5rem);
  border: 0; border-radius: 20px; background: #e8edfc;
}
.model-masthead:not(:has(.model-photo:not([hidden]))) { grid-template-columns: minmax(0,1fr); }
.model-masthead:not(:has(.model-photo:not([hidden]))) .model-side { display: none; }
.model-identity { padding: 0; }
.model-identity h1 { font-size: clamp(2.25rem, 5.5vw, 4.65rem); letter-spacing: -.07em; line-height: 1; }
.model-deck { font-size: 1rem; }
.model-identity .model-facts { display: none; }
.model-photo { border-radius: 12px; background: transparent; }
.model-photo img { height: auto; aspect-ratio: 1.75; object-fit: cover; border-radius: 10px; }
.model-photo figcaption { position: static; max-width: 100%; background: transparent; color: #435574; font-size: .74rem; padding: .33rem 0 0; }
.model-photo figcaption a { color: #294695; }
.model-intro-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: .28rem .8rem; margin: .9rem 0 0; }
.model-intro-price strong { color: #1d3da8; font-size: clamp(1.65rem,3vw,2.6rem); line-height: 1.1; letter-spacing: -.05em; }
.model-intro-price span { color: #435574; font-size: .88rem; }
.model-actions { margin-top: 1.15rem; }
.model-evidence { display: flex; flex-wrap: wrap; gap: 1rem 2rem; padding: 0 0 1.15rem; }
.model-evidence > div + div { padding-left: 0; border: 0; }
.model-evidence dd { color: var(--fg); letter-spacing: -.04em; }
.car-jump { gap: .35rem; margin: .9rem 0 1.5rem; padding: 0; border: 0; }
.car-jump a { color: var(--fg); padding: .49rem .75rem; border-radius: 8px; font-size: .89rem; }
.car-jump a:hover { color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.car-shell > section[data-view] { margin-top: 0; }
.car-shell > section#alternatives { margin-top: 1.7rem; }
.car-research { display: flex; flex-direction: column; gap: .65rem; }
.car-research .cohort-filters { align-self: flex-start; width: 100%; background: transparent; }
.cohort-filters:not([open]) { width: fit-content; }
.cohort-filters > summary { padding: .5rem .8rem; color: var(--accent); }
.cohort-form { grid-template-columns: repeat(3,minmax(0,1fr)); }
.cohort-form fieldset { grid-column: 1/-1; grid-template-columns: repeat(3,minmax(0,1fr)); }
.cohort-form .subtle { grid-column: 1/-1; }
.research-results { width: 100%; grid-template-columns: minmax(0,1.85fr) minmax(238px,1fr); align-items: start; }
.research-results > .observation-panel { grid-column: 1/-1; }
.price-panel:has(+ #quote-check[hidden]) { grid-column: 1/-1; }
.price-panel .quote strong { font-size: clamp(1.55rem,3.4vw,2.8rem); letter-spacing: -.05em; }
.price-panel .inline-note { font-size: .87rem; }
.price-panel .tag { border: 0; background: var(--accent-soft); color: #234294; border-radius: 6px; }
.car-plot { height: clamp(185px, 22vw, 290px); }
.comparison-check { display: grid; grid-template-columns: 1fr; background: #f0f4fe; border-color: #dce5fb; padding: 1.1rem; }
.comparison-check label, .comparison-check .quote-result { width: auto; }
.quote-result { border-color: #d7e1f6; }
.quote-result .band-labels { color: var(--fg); }
.cohort-form label, .comparison-check label { color: #425473; }
.data-overflow th { background: #f1f4fc; color: #334b85; }
.related-card { color: #244293; }
.related-card:hover { background: #eef3fd; border-color: #a9bae8; }

@media (max-width: 860px) {
  .shell, .top-inner { width: calc(100% - 40px); }
  .top-inner { gap: .65rem; }
  .primary-nav a, .top-link, .tools-menu summary { padding-inline: .55rem; }
}
@media (max-width: 690px) {
  html { scroll-padding-top: 6.65rem; }
  .shell, .top-inner { width: calc(100% - 30px); }
  .top-inner { display: grid; min-height: 0; grid-template-columns: minmax(0,1fr) auto; row-gap: .27rem; padding-top: .75rem; }
  .top-inner .primary-nav { grid-row: 2; grid-column: 1/-1; display: flex; padding: .17rem 0 .4rem; }
  .top-inner .header-tools { grid-row: 1; grid-column: 2; }
  .top-link, .tools-menu summary { font-size: .83rem; padding-inline: .36rem; }
  .brand { font-size: 1.22rem; }
  .intro { grid-template-columns: 1fr; padding: 1.15rem; gap: 1.05rem; border-radius: 16px; margin-top: .32rem; }
  .intro h1 { max-width: 10em; font-size: clamp(2.25rem, 9.7vw, 3.8rem); }
  .intro .desktop-break { display: none; }
  .lede { margin-bottom: 1.05rem; }
  .hero-input button { padding-inline: .6rem; }
  .hero-car { aspect-ratio: 2.65; }
  .market-preview-content { padding: .6rem .7rem; }
  .filter-bar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filter-bar > label:last-child { grid-column: auto; }
  .filter-bar .search-field { grid-column: 1/-1; }
  .advanced-filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .advanced-filter-grid > label:last-child { grid-column: 1/-1; }
  .vehicle-grid { gap: .5rem; }
  .vehicle-card-shell .vehicle-card { padding: .65rem; }
  .vehicle-card .vehicle-card-heading strong { font-size: 1rem; }
  .site-footer .shell { flex-wrap: wrap; }
  .model-masthead { grid-template-columns: 1fr; gap: .85rem; padding: 1rem; border-radius: 15px; }
  .model-side .model-photo img { height: auto; aspect-ratio: 2.15; }
  .car-jump { margin-top: .7rem; gap: .22rem; }
  .car-jump a { padding: .42rem .49rem; font-size: .8rem; }
  .cohort-form, .cohort-form fieldset { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cohort-form select, .cohort-form input { min-width: 0; }
  .research-results { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 365px) {
  .hero-input { grid-template-columns: minmax(0,1fr) auto; padding-left: .45rem; }
  .hero-input .search-icon { display: none; }
  .hero-input input { font-size: .86rem; }
  .section-head { gap: .45rem; }
  .section-link { white-space: normal; }
}


.live-price-panel { margin-top: 1rem; }
.live-price-panel > summary { padding: .85rem 1rem; color: var(--accent); font-weight: 700; }
.live-price-content { padding: 0 1rem 1rem; }
.live-price-content .subtle:empty { display: none; }
.live-price-content .data-overflow { max-width: 100%; }
.live-price-content td:first-child { font-weight: 750; color: var(--fg); }

.with-make-logo { --logo-size: 1.05rem; }
.with-make-logo:where(a, small, strong, p) { display: inline-flex; align-items: center; gap: .4rem; }
.make-logo { width: var(--logo-size, 1.05rem); height: var(--logo-size, 1.05rem); object-fit: contain; flex: 0 0 auto; vertical-align: middle; }
th.with-make-logo .make-logo { margin-right: .4rem; }
.model-identity .model-make { --logo-size: 1.5rem; margin: 0 0 .45rem; gap: .52rem; color: #354665; font-size: .86rem; font-weight: 700; }
.suggestion .make-logo { --logo-size: .9rem; }
.popular-cars .make-logo { --logo-size: .9rem; }
.artwork-credits { padding-block: 2.25rem; }
.artwork-credits h1 { font-size: clamp(2.25rem, 7vw, 4rem); }
.artwork-credits li { margin-block: .35rem; }

.brand { gap: .54rem; font-size: 1.4rem; letter-spacing: -.052em; }
.brand-icon { border-radius: 0; }
.brand > span > span { color: #2545a1; }
.site-footer .brand { font-size: 1.16rem; }
