/* ==========================================================================
   Ninebark Motors — Design System
   1. Tokens          6. Header / nav      11. Inventory browse
   2. Reset & base    7. Footer            12. Vehicle detail
   3. Typography      8. Hero + search     13. Forms & flows
   4. Layout          9. Tiles & rails     14. Content blocks
   5. Buttons        10. Vehicle card      15. Responsive & a11y
   ========================================================================== */

/* ==========================================================================
   1. TOKENS
   ========================================================================== */
:root {
  /* Warm neutral base — deliberately not the sterile blue-white every
     dealership portal defaults to. */
  --bg:          #FBFAF8;
  --surface:     #FFFFFF;
  --surface-2:   #F4F1EC;
  --surface-3:   #EBE6DE;

  --ink:         #14110E;
  --ink-2:       #3B3530;
  --ink-3:       #6B635A;
  --ink-4:       #948B80;

  --line:        #E5DFD6;
  --line-2:      #D3CBBF;

  /* Signal orange — CTAs only, so it always means "do this". */
  --accent:      #DC4C1E;
  --accent-ink:  #B93B12;
  --accent-soft: #FDF0EA;

  /* Deal ratings */
  --great:       #0B7A52;
  --great-soft:  #E6F4EE;
  --good:        #1A6C9C;
  --good-soft:   #E8F2F8;
  --fair:        #6B635A;
  --fair-soft:   #F0EDE8;
  --high:        #A85610;
  --high-soft:   #FBF0E2;

  --gold:        #C98A15;

  /* Type */
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Space — 4px base */
  --s1: 4px;   --s2: 8px;   --s3: 12px;  --s4: 16px;
  --s5: 20px;  --s6: 24px;  --s8: 32px;  --s10: 40px;
  --s12: 48px; --s16: 64px; --s20: 80px; --s24: 96px;

  --r-sm: 6px; --r: 10px; --r-lg: 16px; --r-xl: 24px; --r-full: 999px;

  --shadow-sm: 0 1px 2px rgba(20,17,14,.06), 0 1px 1px rgba(20,17,14,.04);
  --shadow:    0 2px 4px rgba(20,17,14,.04), 0 6px 16px -6px rgba(20,17,14,.12);
  --shadow-lg: 0 4px 8px rgba(20,17,14,.05), 0 16px 40px -12px rgba(20,17,14,.18);
  --shadow-xl: 0 24px 64px -16px rgba(20,17,14,.28);

  --header-h: 68px;
  --container: 1240px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

/* Inline icon placeholders get a predictable box; component rules below
   (.btn svg, .icon-btn svg, …) intentionally override these defaults. */
[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex: none; }
[data-icon] > svg { width: 1.15em; height: 1.15em; flex: none; }

[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}
:focus:not(:focus-visible) { outline: none; }

::selection { background: var(--ink); color: var(--bg); }

.skip-link {
  position: absolute; top: -100px; left: var(--s4); z-index: 200;
  background: var(--ink); color: #fff; padding: var(--s3) var(--s5);
  border-radius: var(--r); font-weight: 600; transition: top .2s var(--ease);
}
.skip-link:focus { top: var(--s3); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */
.display, h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: 'SOFT' 0, 'WONK' 0, 'opsz' 40;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 1.25rem + 2.1vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 1.1rem + .7vw, 1.5rem); }

h4, h5, h6 {
  font-family: var(--font-ui);
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
h4 { font-size: 1.0625rem; }
h5 { font-size: .9375rem; }

p { text-wrap: pretty; }

.eyebrow {
  font-family: var(--font-ui);
  font-size: .75rem;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.eyebrow--muted { color: var(--ink-4); }

.lede {
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 62ch;
}

.small { font-size: .875rem; }
.tiny  { font-size: .8125rem; }
.muted { color: var(--ink-3); }
.faint { color: var(--ink-4); }
.num   { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.strong{ font-weight: 650; }
.center{ text-align: center; }

/* ==========================================================================
   4. LAYOUT
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s6);
}
.container--narrow { max-width: 780px; }
.container--wide   { max-width: 1440px; }

.section { padding-block: clamp(var(--s16), 8vw, var(--s24)); }
.section--tight { padding-block: clamp(var(--s12), 6vw, var(--s16)); }
.section--dark { background: var(--ink); color: #F4F1EC; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--dark .muted { color: #A99F93; }
.section--soft { background: var(--surface-2); }
.section--paper { background: var(--surface); }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--s6); margin-bottom: var(--s10); flex-wrap: wrap;
}
.section-head__text { max-width: 60ch; }
.section-head .eyebrow { margin-bottom: var(--s3); display: block; }
.section-head p { margin-top: var(--s3); color: var(--ink-3); }

.grid { display: grid; gap: var(--s6); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.stack { display: flex; flex-direction: column; gap: var(--s4); }
.row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.spacer { flex: 1; }

hr.rule { border: 0; border-top: 1px solid var(--line); margin-block: var(--s8); }

/* ==========================================================================
   5. BUTTONS
   ========================================================================== */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  --btn-bd: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  padding: 13px 22px;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1.5px solid var(--btn-bd);
  border-radius: var(--r-full);
  font-size: .9375rem; font-weight: 600; letter-spacing: -.005em;
  white-space: nowrap; text-align: center;
  transition: transform .16s var(--ease), box-shadow .2s var(--ease),
              background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

.btn--accent { --btn-bg: var(--accent); --btn-bd: var(--accent); }
.btn--accent:hover { --btn-bg: var(--accent-ink); --btn-bd: var(--accent-ink); }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line-2); }
.btn--ghost:hover { --btn-bd: var(--ink); --btn-bg: var(--surface); }

.btn--light { --btn-bg: #fff; --btn-fg: var(--ink); --btn-bd: #fff; }
.btn--onDark { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255,255,255,.35); }
.btn--onDark:hover { --btn-bd: #fff; --btn-bg: rgba(255,255,255,.08); }

.btn--sm { padding: 9px 16px; font-size: .875rem; }
.btn--lg { padding: 16px 30px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled='true'] {
  opacity: .45; pointer-events: none;
}
.btn svg { width: 18px; height: 18px; flex: none; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: .9375rem; color: var(--ink);
  border-bottom: 1.5px solid var(--line-2); padding-bottom: 2px;
  transition: border-color .18s var(--ease), color .18s var(--ease), gap .18s var(--ease);
}
.link-arrow:hover { color: var(--accent-ink); border-color: var(--accent); gap: 10px; }
.link-arrow svg { width: 15px; height: 15px; }

/* ==========================================================================
   6. HEADER / NAV
   ========================================================================== */
.topbar {
  background: var(--ink); color: #C9C0B4;
  font-size: .8125rem; letter-spacing: .005em;
}
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s5); min-height: 38px; padding-block: 6px;
}
.topbar a { color: #E8E2D9; font-weight: 550; }
.topbar a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.topbar__items { display: flex; align-items: center; gap: var(--s5); }
.topbar__item { display: inline-flex; align-items: center; gap: 6px; }
.topbar__item svg { width: 14px; height: 14px; opacity: .8; }

.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,250,248,.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s var(--ease), background-color .25s var(--ease);
}
.header.is-stuck { box-shadow: 0 1px 0 var(--line), 0 8px 24px -14px rgba(20,17,14,.28); }

.header__inner {
  display: flex; align-items: center; gap: var(--s6);
  min-height: var(--header-h);
}

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.logo__mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--ink); color: #fff;
  display: grid; place-items: center; flex: none;
}
.logo__mark svg { width: 20px; height: 20px; }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__name {
  font-family: var(--font-display); font-weight: 600; font-size: 1.1875rem;
  letter-spacing: -.02em; color: var(--ink);
  font-variation-settings: 'SOFT' 0, 'WONK' 0, 'opsz' 24;
}
.logo__sub {
  font-size: .5625rem; font-weight: 650; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-4); margin-top: 3px;
}

/* Primary nav */
.nav { display: flex; align-items: center; gap: 2px; }
.nav__link {
  position: relative;
  padding: 9px 13px; border-radius: var(--r-sm);
  font-size: .9375rem; font-weight: 550; color: var(--ink-2);
  transition: color .16s var(--ease), background-color .16s var(--ease);
}
.nav__link:hover { color: var(--ink); background: var(--surface-2); }
.nav__link[aria-current='page'] { color: var(--ink); font-weight: 650; }
.nav__link[aria-current='page']::after {
  content: ''; position: absolute; left: 13px; right: 13px; bottom: 2px;
  height: 2px; background: var(--accent); border-radius: 2px;
}

.header__actions { display: flex; align-items: center; gap: var(--s2); margin-left: auto; }

.icon-btn {
  position: relative;
  width: 40px; height: 40px; border-radius: var(--r-full);
  display: grid; place-items: center; color: var(--ink-2);
  transition: background-color .16s var(--ease), color .16s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn__count {
  position: absolute; top: 3px; right: 3px;
  min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--accent); color: #fff;
  border-radius: var(--r-full); border: 2px solid var(--bg);
  font-size: .625rem; font-weight: 700; line-height: 13px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.icon-btn__count:empty, .icon-btn__count[data-count='0'] { display: none; }

.hamburger { display: none; }

/* Mobile drawer */
.drawer {
  position: fixed; inset: 0; z-index: 150;
  visibility: hidden; pointer-events: none;
}
.drawer.is-open { visibility: visible; pointer-events: auto; }
.drawer__scrim {
  position: absolute; inset: 0; background: rgba(20,17,14,.45);
  opacity: 0; transition: opacity .3s var(--ease);
  backdrop-filter: blur(2px);
}
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel {
  position: absolute; inset-block: 0; right: 0;
  width: min(380px, 88vw); background: var(--bg);
  box-shadow: var(--shadow-xl);
  transform: translateX(100%);
  transition: transform .34s var(--ease-out);
  display: flex; flex-direction: column;
  overflow-y: auto; overscroll-behavior: contain;
}
.drawer.is-open .drawer__panel { transform: translateX(0); }
.drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--bg); z-index: 2;
}
.drawer__body { padding: var(--s5); flex: 1; }
.drawer__nav { display: flex; flex-direction: column; }
.drawer__nav a {
  padding: var(--s4) var(--s2); font-size: 1.125rem; font-weight: 600;
  border-bottom: 1px solid var(--line); display: flex;
  align-items: center; justify-content: space-between;
}
.drawer__nav a:hover { color: var(--accent-ink); }
.drawer__nav a svg { width: 16px; height: 16px; color: var(--ink-4); }
.drawer__foot { padding: var(--s5); border-top: 1px solid var(--line); display: grid; gap: var(--s3); }

body.is-locked { overflow: hidden; }

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.footer { background: var(--ink); color: #A99F93; padding-block: var(--s16) var(--s8); }
.footer a { color: #D8D1C6; }
.footer a:hover { color: #fff; }
.footer__top {
  display: grid; grid-template-columns: 1.4fr repeat(3, 1fr) 1.3fr;
  gap: var(--s10) var(--s8); padding-bottom: var(--s12);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer .logo__name { color: #fff; }
.footer .logo__sub { color: #7E7469; }
.footer__blurb { margin-top: var(--s4); font-size: .875rem; line-height: 1.65; max-width: 34ch; }
.footer h5 {
  color: #fff; font-size: .75rem; letter-spacing: .1em;
  text-transform: uppercase; margin-bottom: var(--s4); font-weight: 650;
}
.footer__links { display: grid; gap: 11px; font-size: .875rem; }
.footer__hours { display: grid; gap: 7px; font-size: .8125rem; }
.footer__hours div { display: flex; justify-content: space-between; gap: var(--s4); }
.footer__hours span:last-child { color: #D8D1C6; font-variant-numeric: tabular-nums; }
.footer__bottom {
  padding-top: var(--s6); display: flex; justify-content: space-between;
  gap: var(--s5); flex-wrap: wrap; font-size: .8125rem;
}
.footer__legal { max-width: 76ch; color: #7E7469; line-height: 1.6; font-size: .75rem; }
.footer__social { display: flex; gap: var(--s2); }
.footer__social a {
  width: 36px; height: 36px; border-radius: var(--r-full);
  border: 1px solid rgba(255,255,255,.16);
  display: grid; place-items: center;
  transition: background-color .18s var(--ease), border-color .18s var(--ease);
}
.footer__social a:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.4); }
.footer__social svg { width: 17px; height: 17px; }

/* ==========================================================================
   8. HERO + SEARCH
   ========================================================================== */
.hero { position: relative; isolation: isolate; background: var(--ink); }
.hero__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; }
.hero__media::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(12,10,8,.72) 0%, rgba(12,10,8,.34) 38%, rgba(12,10,8,.18) 60%, rgba(20,17,14,.86) 100%),
    linear-gradient(90deg, rgba(12,10,8,.55) 0%, rgba(12,10,8,0) 55%);
}
.hero__inner {
  position: relative;
  padding-block: clamp(var(--s16), 9vw, 132px) clamp(var(--s12), 7vw, var(--s20));
  color: #fff;
}
.hero h1 { color: #fff; max-width: 15ch; }
.hero h1 em {
  font-style: italic; font-variation-settings: 'SOFT' 20, 'WONK' 1, 'opsz' 60;
  color: #FFD9C7;
}
.hero__sub {
  margin-top: var(--s5); font-size: clamp(1rem, .95rem + .35vw, 1.1875rem);
  color: rgba(255,255,255,.86); max-width: 48ch; line-height: 1.55;
}
.hero__trust {
  display: flex; flex-wrap: wrap; gap: var(--s2) var(--s6);
  margin-top: var(--s6); font-size: .875rem; color: rgba(255,255,255,.82);
}
.hero__trust li { display: flex; align-items: center; gap: 7px; }
.hero__trust svg { width: 16px; height: 16px; color: #7FD4AC; flex: none; }

/* Search card */
.searchcard {
  margin-top: clamp(var(--s8), 4vw, var(--s10));
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(20px);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--s3) var(--s3) var(--s5);
  max-width: 940px;
  color: var(--ink);
}
.searchcard__tabs {
  display: flex; gap: 2px; padding: 4px;
  background: var(--surface-2); border-radius: var(--r-full);
  margin-bottom: var(--s4); width: fit-content; max-width: 100%;
  overflow-x: auto; scrollbar-width: none;
}
.searchcard__tabs::-webkit-scrollbar { display: none; }
.searchcard__tab {
  padding: 8px 18px; border-radius: var(--r-full); white-space: nowrap;
  font-size: .875rem; font-weight: 600; color: var(--ink-3);
  transition: background-color .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease);
}
.searchcard__tab:hover { color: var(--ink); }
.searchcard__tab[aria-selected='true'] {
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm);
}
.searchcard__form {
  display: grid; grid-template-columns: 1.15fr 1.15fr 1fr auto;
  gap: var(--s3); align-items: end; padding-inline: var(--s3);
}
.searchcard__foot {
  display: flex; align-items: center; gap: var(--s4) var(--s5); flex-wrap: wrap;
  margin-top: var(--s4); padding: var(--s4) var(--s3) 0;
  border-top: 1px solid var(--line); font-size: .8125rem; color: var(--ink-3);
}
.searchcard__foot strong { color: var(--ink); font-weight: 650; }
.quick-links { display: flex; gap: var(--s2); flex-wrap: wrap; }
.quick-links a {
  padding: 5px 12px; border-radius: var(--r-full);
  background: var(--surface-2); font-size: .8125rem; font-weight: 550; color: var(--ink-2);
  transition: background-color .16s var(--ease), color .16s var(--ease);
}
.quick-links a:hover { background: var(--ink); color: #fff; }

/* ==========================================================================
   FORM CONTROLS
   ========================================================================== */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label {
  font-size: .75rem; font-weight: 650; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-3);
}
.field__hint { font-size: .8125rem; color: var(--ink-4); }
.field__error { font-size: .8125rem; color: var(--accent-ink); font-weight: 550; display: none; }
.field.has-error .field__error { display: block; }
.field.has-error .input, .field.has-error .select { border-color: var(--accent); }

.input, .select, textarea.input {
  width: 100%; padding: 12px 14px;
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line-2); border-radius: var(--r);
  font-size: .9375rem; line-height: 1.4;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background-color .16s var(--ease);
}
.input::placeholder { color: var(--ink-4); }
.input:hover, .select:hover { border-color: var(--ink-4); }
.input:focus, .select:focus {
  outline: none; border-color: var(--ink);
  box-shadow: 0 0 0 3.5px rgba(20,17,14,.09);
}
textarea.input { resize: vertical; min-height: 108px; }

.select {
  appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B635A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 16px;
}

.input-icon { position: relative; }
.input-icon svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--ink-4); pointer-events: none;
}
.input-icon .input { padding-left: 42px; }

.checkline { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .875rem; }
.checkline input[type='checkbox'], .checkline input[type='radio'] {
  appearance: none; width: 19px; height: 19px; flex: none; margin-top: 1px;
  border: 1.5px solid var(--line-2); border-radius: 5px; background: var(--surface);
  cursor: pointer; transition: background-color .14s var(--ease), border-color .14s var(--ease);
}
.checkline input[type='radio'] { border-radius: 50%; }
.checkline input:checked {
  background: var(--ink); border-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 13px; background-position: center; background-repeat: no-repeat;
}
.checkline input[type='radio']:checked {
  background-image: none;
  box-shadow: inset 0 0 0 4px var(--surface);
}
.checkline:hover input { border-color: var(--ink-3); }
.checkline span { line-height: 1.45; }
.checkline .count { margin-left: auto; color: var(--ink-4); font-size: .8125rem; font-variant-numeric: tabular-nums; }

/* Segmented control */
.segmented {
  display: flex; padding: 3px; gap: 2px;
  background: var(--surface-2); border-radius: var(--r); width: fit-content; max-width: 100%;
}
.segmented button {
  padding: 8px 15px; border-radius: 7px; font-size: .8125rem; font-weight: 600;
  color: var(--ink-3); white-space: nowrap;
  transition: background-color .16s var(--ease), color .16s var(--ease), box-shadow .16s var(--ease);
}
.segmented button:hover { color: var(--ink); }
.segmented button svg { width: 17px; height: 17px; }
.segmented button[aria-pressed='true'], .segmented button.is-active {
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm);
}

/* Range slider */
input[type='range'] {
  appearance: none; width: 100%; height: 4px; border-radius: 2px;
  background: var(--line-2); outline: none; cursor: pointer;
}
input[type='range']::-webkit-slider-thumb {
  appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--ink);
  box-shadow: var(--shadow-sm); cursor: grab;
  transition: transform .12s var(--ease);
}
input[type='range']::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.12); }
input[type='range']::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--ink);
  box-shadow: var(--shadow-sm); cursor: grab;
}

/* ==========================================================================
   9. TILES & RAILS
   ========================================================================== */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(268px, 1fr);
  gap: var(--s5); overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: var(--s4); margin-inline: calc(var(--s6) * -1);
  padding-inline: var(--s6); scrollbar-width: thin;
}
.rail > * { scroll-snap-align: start; }
.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-track { background: var(--surface-2); border-radius: 3px; }
.rail::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }
.rail::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }

/* Body-type tile */
.bodytype-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s3); }
.bodytype {
  display: flex; flex-direction: column; align-items: center; gap: var(--s3);
  padding: var(--s5) var(--s3); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--r-lg);
  text-align: center;
  transition: transform .2s var(--ease-out), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.bodytype:hover {
  transform: translateY(-3px); border-color: var(--ink); box-shadow: var(--shadow);
}
.bodytype svg { width: 82px; height: 45px; color: var(--ink); flex: none; }
.bodytype__label { font-weight: 650; font-size: .9375rem; line-height: 1.2; }
.bodytype__count { font-size: .75rem; color: var(--ink-4); font-variant-numeric: tabular-nums; }

/* Brand chip */
.brand-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: var(--s4) var(--s3); }
.brand {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.brand__disc {
  width: 74px; height: 74px; border-radius: 50%;
  background: var(--surface); border: 1.5px solid var(--line);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 1.5rem;
  letter-spacing: -.03em; color: var(--ink);
  font-variation-settings: 'SOFT' 0, 'WONK' 0, 'opsz' 30;
  transition: transform .2s var(--ease-out), border-color .2s var(--ease),
              background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.brand:hover .brand__disc {
  transform: translateY(-3px) scale(1.03);
  background: var(--ink); color: #fff; border-color: var(--ink);
  box-shadow: var(--shadow);
}
.brand__name { font-size: .8125rem; font-weight: 550; color: var(--ink-2); text-align: center; }
.brand__name span { display: block; color: var(--ink-4); font-size: .75rem; font-variant-numeric: tabular-nums; }

/* Promise card */
.promise {
  display: flex; flex-direction: column; gap: var(--s3);
  padding: var(--s6); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: border-color .2s var(--ease), transform .2s var(--ease-out);
}
.promise:hover { border-color: var(--line-2); transform: translateY(-2px); }
.promise__icon {
  width: 42px; height: 42px; border-radius: var(--r);
  background: var(--accent-soft); color: var(--accent-ink);
  display: grid; place-items: center; flex: none;
}
.promise__icon svg { width: 21px; height: 21px; }
.promise h4 { font-size: 1rem; }
.promise p { font-size: .875rem; color: var(--ink-3); line-height: 1.6; }

/* Stat */
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat__value {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 1.4rem + 2vw, 3rem); line-height: 1;
  letter-spacing: -.03em; font-variation-settings: 'SOFT' 0, 'WONK' 0, 'opsz' 60;
}
.stat__label { font-size: .875rem; color: var(--ink-3); margin-top: var(--s2); }
.section--dark .stat__label { color: #A99F93; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: var(--r-full);
  font-size: .75rem; font-weight: 650; letter-spacing: .005em;
  background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
}
.badge svg { width: 13px; height: 13px; }
.badge--great { background: var(--great-soft); color: var(--great); }
.badge--good  { background: var(--good-soft);  color: var(--good); }
.badge--fair  { background: var(--fair-soft);  color: var(--fair); }
.badge--high  { background: var(--high-soft);  color: var(--high); }
.badge--cpo   { background: var(--ink); color: #fff; }
.badge--new   { background: var(--accent-soft); color: var(--accent-ink); }

.stars { display: inline-flex; gap: 1px; color: var(--gold); }
.stars svg { width: 15px; height: 15px; }

/* ==========================================================================
   10. VEHICLE CARD
   ========================================================================== */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(276px, 1fr));
  gap: var(--s6) var(--s5);
}

.vcard {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.vcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }

.vcard__media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.vcard__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease-out);
}
.vcard:hover .vcard__media img { transform: scale(1.045); }

.vcard__flags {
  position: absolute; top: var(--s3); left: var(--s3);
  display: flex; flex-direction: column; align-items: flex-start; gap: 5px; z-index: 2;
}
.vcard__flags .badge { box-shadow: var(--shadow-sm); }

.vcard__save {
  position: absolute; top: var(--s3); right: var(--s3); z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.94); backdrop-filter: blur(6px);
  display: grid; place-items: center; color: var(--ink-2);
  box-shadow: var(--shadow-sm);
  transition: transform .18s var(--ease), color .18s var(--ease), background-color .18s var(--ease);
}
.vcard__save:hover { transform: scale(1.08); color: var(--accent); }
.vcard__save svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.vcard__save[aria-pressed='true'] { color: var(--accent); }
.vcard__save[aria-pressed='true'] svg { fill: currentColor; }

.vcard__photos {
  position: absolute; bottom: var(--s3); right: var(--s3); z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: var(--r-full);
  background: rgba(20,17,14,.72); color: #fff;
  font-size: .6875rem; font-weight: 600; backdrop-filter: blur(4px);
}
.vcard__photos svg { width: 12px; height: 12px; }

.vcard__body { padding: var(--s4) var(--s5) var(--s5); display: flex; flex-direction: column; flex: 1; gap: var(--s3); }
.vcard__title { font-size: 1rem; font-weight: 650; letter-spacing: -.012em; line-height: 1.3; }
.vcard__title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.vcard__trim { font-size: .8125rem; color: var(--ink-3); margin-top: 2px; }

.vcard__meta {
  display: flex; flex-wrap: wrap; gap: 4px 10px;
  font-size: .8125rem; color: var(--ink-3);
}
.vcard__meta li { display: flex; align-items: center; gap: 5px; }
.vcard__meta li + li::before {
  content: ''; width: 3px; height: 3px; border-radius: 50%;
  background: var(--line-2); margin-right: 5px;
}

.vcard__price { margin-top: auto; padding-top: var(--s3); border-top: 1px solid var(--line); }
.vcard__price-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.vcard__amount {
  font-size: 1.375rem; font-weight: 700; letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
}
.vcard__payment { font-size: .8125rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.vcard__payment strong { color: var(--ink); font-weight: 650; }
.vcard__savings {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 5px; font-size: .8125rem; font-weight: 600; color: var(--great);
  font-variant-numeric: tabular-nums;
}
.vcard__savings svg { width: 13px; height: 13px; }

.vcard__compare {
  position: relative; z-index: 2; margin-top: var(--s3);
  font-size: .8125rem; color: var(--ink-3);
}

/* Skeleton loading */
.vcard--skeleton { pointer-events: none; }
.skel { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ==========================================================================
   11. INVENTORY BROWSE
   ========================================================================== */
.browse { display: grid; grid-template-columns: 282px 1fr; gap: var(--s10); align-items: start; }

.filters {
  position: sticky; top: calc(var(--header-h) + var(--s5));
  max-height: calc(100vh - var(--header-h) - var(--s10));
  overflow-y: auto; overscroll-behavior: contain;
  padding-right: var(--s2); scrollbar-width: thin;
}
.filters::-webkit-scrollbar { width: 5px; }
.filters::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }

.filters__head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: var(--s4); margin-bottom: var(--s2);
  border-bottom: 1.5px solid var(--ink);
}
.filters__head h2 { font-family: var(--font-ui); font-size: 1.0625rem; font-weight: 650; }

.fgroup { border-bottom: 1px solid var(--line); }
.fgroup__toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: var(--s4) 0; font-size: .9375rem; font-weight: 650; text-align: left;
}
.fgroup__toggle svg {
  width: 17px; height: 17px; color: var(--ink-4);
  transition: transform .24s var(--ease);
}
.fgroup[open] .fgroup__toggle svg { transform: rotate(180deg); }
.fgroup__body { padding-bottom: var(--s5); display: grid; gap: 11px; }
.fgroup__body--scroll { max-height: 232px; overflow-y: auto; padding-right: var(--s2); }
.fgroup summary { list-style: none; cursor: pointer; }
.fgroup summary::-webkit-details-marker { display: none; }

.range-row { display: flex; align-items: center; gap: var(--s3); }
.range-row .input { padding: 9px 11px; font-size: .875rem; }
.range-row span { color: var(--ink-4); font-size: .875rem; }
.range-out {
  display: flex; justify-content: space-between; font-size: .8125rem;
  font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums;
}

.toolbar {
  display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap;
  padding-bottom: var(--s5); margin-bottom: var(--s6);
  border-bottom: 1px solid var(--line);
}
.toolbar__count { font-size: .9375rem; }
.toolbar__count strong { font-weight: 650; font-variant-numeric: tabular-nums; }
.toolbar .select { width: auto; padding-block: 9px; font-size: .875rem; }

.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s5); }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 8px 6px 13px; border-radius: var(--r-full);
  background: var(--ink); color: #fff; font-size: .8125rem; font-weight: 550;
}
.chip button {
  width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.18); color: #fff;
  transition: background-color .16s var(--ease);
}
.chip button:hover { background: rgba(255,255,255,.35); }
.chip button svg { width: 11px; height: 11px; }
.chip--clear {
  background: none; color: var(--ink-3); padding: 6px 12px;
  border: 1.5px dashed var(--line-2); font-weight: 600;
}
.chip--clear:hover { color: var(--accent-ink); border-color: var(--accent); }

.filters-fab { display: none; }

.empty {
  grid-column: 1 / -1; text-align: center; padding: var(--s20) var(--s6);
  background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r-lg);
}
.empty svg { width: 46px; height: 46px; color: var(--ink-4); margin: 0 auto var(--s5); }
.empty h3 { margin-bottom: var(--s3); }
.empty p { color: var(--ink-3); max-width: 44ch; margin: 0 auto var(--s6); }

.pagination { display: flex; align-items: center; justify-content: center; gap: var(--s2); margin-top: var(--s12); }
.pagination button {
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--r-sm);
  font-size: .9375rem; font-weight: 600; color: var(--ink-2);
  border: 1.5px solid transparent;
  transition: background-color .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease);
}
.pagination button:hover:not([disabled]) { background: var(--surface); border-color: var(--line-2); }
.pagination button[aria-current='true'] { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination button[disabled] { opacity: .35; cursor: default; }

/* List view */
.card-grid.is-list { grid-template-columns: 1fr; gap: var(--s4); }
.is-list .vcard { flex-direction: row; }
.is-list .vcard__media { aspect-ratio: auto; width: 300px; flex: none; }
.is-list .vcard__body { padding: var(--s5) var(--s6); }
.is-list .vcard__price { border-top: 0; padding-top: 0; }

/* ==========================================================================
   12. VEHICLE DETAIL
   ========================================================================== */
.breadcrumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  font-size: .8125rem; color: var(--ink-3); padding-block: var(--s5);
}
.breadcrumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumbs svg { width: 13px; height: 13px; color: var(--line-2); }

.vdp { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s10); align-items: start; }

/* Gallery */
.gallery { display: grid; gap: var(--s3); }
.gallery__stage {
  position: relative; aspect-ratio: 3 / 2; border-radius: var(--r-lg);
  overflow: hidden; background: var(--surface-2); cursor: zoom-in;
}
.gallery__stage img { width: 100%; height: 100%; object-fit: cover; }
.gallery__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,.94); color: var(--ink);
  display: grid; place-items: center; box-shadow: var(--shadow);
  transition: transform .18s var(--ease), background-color .18s var(--ease);
}
.gallery__nav:hover { transform: translateY(-50%) scale(1.07); background: #fff; }
.gallery__nav--prev { left: var(--s4); }
.gallery__nav--next { right: var(--s4); }
.gallery__nav svg { width: 20px; height: 20px; }
.gallery__counter {
  position: absolute; bottom: var(--s4); right: var(--s4);
  padding: 5px 12px; border-radius: var(--r-full);
  background: rgba(20,17,14,.74); color: #fff; backdrop-filter: blur(6px);
  font-size: .75rem; font-weight: 600; font-variant-numeric: tabular-nums;
}
.gallery__thumbs { display: flex; gap: var(--s2); overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.gallery__thumb {
  width: 104px; aspect-ratio: 4/3; flex: none; border-radius: var(--r-sm);
  overflow: hidden; border: 2px solid transparent; opacity: .62;
  transition: opacity .18s var(--ease), border-color .18s var(--ease);
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb:hover { opacity: 1; }
.gallery__thumb[aria-current='true'] { opacity: 1; border-color: var(--ink); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(12,10,8,.96);
  display: grid; place-items: center; padding: var(--s6);
  opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), visibility .25s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 100%; max-height: 88vh; object-fit: contain; border-radius: var(--r); }
.lightbox__close {
  position: absolute; top: var(--s6); right: var(--s6);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center;
}
.lightbox__close:hover { background: rgba(255,255,255,.26); }
.lightbox__close svg { width: 22px; height: 22px; }

/* VDP heading */
.vdp__head { margin-bottom: var(--s6); }
.vdp__head h1 {
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); line-height: 1.1;
}
.vdp__subtitle { font-size: 1.0625rem; color: var(--ink-3); margin-top: var(--s2); }
.vdp__flags { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }

/* Price panel (sticky rail) */
.pricebox {
  position: sticky; top: calc(var(--header-h) + var(--s5));
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
  overflow: hidden;
}
.pricebox__main { padding: var(--s6); }
.pricebox__label { font-size: .8125rem; color: var(--ink-3); }
.pricebox__price {
  font-size: 2.5rem; font-weight: 700; letter-spacing: -.035em;
  line-height: 1.05; font-variant-numeric: tabular-nums; margin-top: 2px;
}
.pricebox__market {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s3); margin-top: var(--s4); padding-top: var(--s4);
  border-top: 1px solid var(--line); font-size: .875rem;
}
.pricebox__market s { color: var(--ink-4); }

/* Market position bar */
.marketbar { margin-top: var(--s4); }
.marketbar__track {
  position: relative; height: 7px; border-radius: 4px;
  background: linear-gradient(90deg, var(--great) 0%, #6BAE8C 32%, var(--line-2) 58%, #D9A05F 82%, var(--high) 100%);
}
.marketbar__pin {
  position: absolute; top: 50%; width: 15px; height: 15px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--ink);
  transform: translate(-50%, -50%); box-shadow: var(--shadow-sm);
}
.marketbar__scale {
  display: flex; justify-content: space-between; margin-top: 7px;
  font-size: .6875rem; font-weight: 600; color: var(--ink-4);
  text-transform: uppercase; letter-spacing: .04em;
}

.pricebox__ctas { padding: 0 var(--s6) var(--s6); display: grid; gap: var(--s3); }
.pricebox__foot {
  padding: var(--s4) var(--s6); background: var(--surface-2);
  border-top: 1px solid var(--line); font-size: .8125rem; color: var(--ink-3);
  display: grid; gap: 7px;
}
.pricebox__foot div { display: flex; align-items: center; gap: 8px; }
.pricebox__foot svg { width: 15px; height: 15px; color: var(--great); flex: none; }

/* Spec grid */
.specs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.spec { background: var(--surface); padding: var(--s5); display: flex; flex-direction: column; gap: 3px; }
.spec__label {
  font-size: .6875rem; font-weight: 650; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-4);
}
.spec__value { font-size: .9375rem; font-weight: 600; }

.spec-table { font-size: .9375rem; }
.spec-table tr { border-bottom: 1px solid var(--line); }
.spec-table tr:last-child { border-bottom: 0; }
.spec-table th {
  text-align: left; font-weight: 550; color: var(--ink-3);
  padding: 13px var(--s5) 13px 0; width: 45%; vertical-align: top;
}
.spec-table td { padding: 13px 0; font-weight: 600; }

.feature-cols { columns: 2; column-gap: var(--s10); }
.feature-cols li {
  break-inside: avoid; display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0; font-size: .9375rem;
}
.feature-cols svg { width: 17px; height: 17px; color: var(--great); flex: none; margin-top: 2px; }

/* History report */
.history { display: grid; gap: var(--s3); }
.history__row {
  display: flex; align-items: center; gap: var(--s4);
  padding: var(--s4) var(--s5); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r);
}
.history__icon {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--great-soft); color: var(--great);
}
.history__icon--warn { background: var(--high-soft); color: var(--high); }
.history__icon svg { width: 17px; height: 17px; }
.history__row strong { display: block; font-size: .9375rem; font-weight: 650; }
.history__row span { font-size: .8125rem; color: var(--ink-3); }

/* Payment calculator */
.calc {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--s8); box-shadow: var(--shadow-sm);
}
.calc__grid { display: grid; grid-template-columns: 1fr 300px; gap: var(--s10); align-items: start; }
.calc__controls { display: grid; gap: var(--s6); }
.calc__control { display: grid; gap: 9px; }
.calc__control-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.calc__control-head label { font-size: .875rem; font-weight: 600; }
.calc__control-head output {
  font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.calc__result {
  background: var(--ink); color: #fff; border-radius: var(--r-lg);
  padding: var(--s6); text-align: center;
}
.calc__result-label { font-size: .8125rem; color: #A99F93; }
.calc__result-value {
  font-family: var(--font-display); font-weight: 600;
  font-size: 3rem; line-height: 1.05; letter-spacing: -.035em; margin-block: 4px;
  font-variation-settings: 'SOFT' 0, 'WONK' 0, 'opsz' 60;
}
.calc__result-value sup { font-size: 1.25rem; vertical-align: super; margin-right: 2px; }
.calc__breakdown {
  margin-top: var(--s5); padding-top: var(--s5);
  border-top: 1px solid rgba(255,255,255,.14);
  display: grid; gap: 9px; font-size: .8125rem; text-align: left;
}
.calc__breakdown div { display: flex; justify-content: space-between; gap: var(--s3); color: #A99F93; }
.calc__breakdown span:last-child { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Sticky mobile CTA */
.vdp-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 90;
  background: rgba(255,255,255,.97); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); box-shadow: 0 -6px 24px -12px rgba(20,17,14,.24);
  padding: var(--s3) var(--s5) calc(var(--s3) + env(safe-area-inset-bottom));
  display: none; align-items: center; gap: var(--s4);
}
.vdp-bar__price { font-size: 1.25rem; font-weight: 700; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.vdp-bar__sub { font-size: .75rem; color: var(--ink-3); }

/* ==========================================================================
   13. FORMS & FLOWS
   ========================================================================== */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: clamp(var(--s6), 4vw, var(--s10));
}
.panel--flush { padding: 0; overflow: hidden; }
.panel__head { padding-bottom: var(--s6); margin-bottom: var(--s6); border-bottom: 1px solid var(--line); }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s5); }
.form-grid .field--full { grid-column: 1 / -1; }

/* Stepper */
.steps { display: flex; gap: var(--s2); margin-bottom: var(--s8); }
.step { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.step__bar { height: 4px; border-radius: 2px; background: var(--surface-3); transition: background-color .3s var(--ease); }
.step.is-done .step__bar, .step.is-active .step__bar { background: var(--ink); }
.step__label { font-size: .8125rem; font-weight: 600; color: var(--ink-4); transition: color .3s var(--ease); }
.step.is-active .step__label, .step.is-done .step__label { color: var(--ink); }
.step__num { font-variant-numeric: tabular-nums; }

.step-panel { display: none; }
.step-panel.is-active { display: block; animation: fadeUp .32s var(--ease-out); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.form-actions {
  display: flex; align-items: center; gap: var(--s3);
  margin-top: var(--s8); padding-top: var(--s6); border-top: 1px solid var(--line);
}

/* Choice cards */
.choices { display: grid; gap: var(--s3); }
.choices--2 { grid-template-columns: repeat(2, 1fr); }
.choice {
  position: relative; display: flex; align-items: flex-start; gap: var(--s3);
  padding: var(--s5); border: 1.5px solid var(--line-2); border-radius: var(--r);
  background: var(--surface); cursor: pointer;
  transition: border-color .18s var(--ease), background-color .18s var(--ease), box-shadow .18s var(--ease);
}
.choice:hover { border-color: var(--ink-4); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) {
  border-color: var(--ink); background: var(--surface);
  box-shadow: 0 0 0 1.5px var(--ink), var(--shadow-sm);
}
.choice__dot {
  width: 19px; height: 19px; border-radius: 50%; flex: none; margin-top: 2px;
  border: 1.5px solid var(--line-2); background: var(--surface);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background-color .16s var(--ease);
}
.choice:has(input:checked) .choice__dot {
  border-color: var(--ink); background: var(--ink); box-shadow: inset 0 0 0 4px var(--surface);
}
.choice strong { display: block; font-size: .9375rem; font-weight: 650; }
.choice span { display: block; font-size: .8125rem; color: var(--ink-3); margin-top: 2px; line-height: 1.5; }

/* Result callout */
.result-card {
  background: var(--ink); color: #fff; border-radius: var(--r-lg);
  padding: clamp(var(--s6), 4vw, var(--s10)); text-align: center;
}
.result-card__label { font-size: .875rem; color: #A99F93; }
.result-card__value {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem); line-height: 1.05;
  letter-spacing: -.03em; margin-block: var(--s2) var(--s3);
  font-variation-settings: 'SOFT' 0, 'WONK' 0, 'opsz' 60;
}
.result-card p { color: #A99F93; font-size: .9375rem; max-width: 48ch; margin-inline: auto; }

/* Alert / note */
.note {
  display: flex; gap: var(--s3); padding: var(--s4) var(--s5);
  background: var(--surface-2); border-radius: var(--r);
  font-size: .875rem; color: var(--ink-2); line-height: 1.55;
}
.note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--ink-3); }
.note--good { background: var(--great-soft); color: #075E3F; }
.note--good svg { color: var(--great); }
.note--accent { background: var(--accent-soft); color: var(--accent-ink); }
.note--accent svg { color: var(--accent); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: var(--s8); z-index: 300;
  transform: translate(-50%, 120%);
  display: flex; align-items: center; gap: 10px;
  padding: 13px 20px; border-radius: var(--r-full);
  background: var(--ink); color: #fff; font-size: .875rem; font-weight: 550;
  box-shadow: var(--shadow-xl);
  transition: transform .38s var(--ease-out);
  max-width: calc(100vw - 32px);
}
.toast.is-visible { transform: translate(-50%, 0); }
.toast svg { width: 17px; height: 17px; color: #7FD4AC; flex: none; }

/* ==========================================================================
   14. CONTENT BLOCKS
   ========================================================================== */
.split { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(var(--s8), 5vw, var(--s16)); align-items: center; }
.split__media { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4/3; background: var(--surface-2); }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split--reverse .split__media { order: 2; }

.checklist { display: grid; gap: var(--s3); margin-top: var(--s6); }
.checklist li { display: flex; align-items: flex-start; gap: 11px; font-size: .9375rem; line-height: 1.55; }
.checklist svg { width: 20px; height: 20px; color: var(--great); flex: none; margin-top: 1px; }

/* Testimonial */
.quote {
  display: flex; flex-direction: column; gap: var(--s4);
  padding: var(--s6); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); height: 100%;
}
.quote p { font-size: .9375rem; line-height: 1.65; color: var(--ink-2); flex: 1; }
.quote__who { display: flex; align-items: center; gap: var(--s3); padding-top: var(--s4); border-top: 1px solid var(--line); }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: var(--surface-3); color: var(--ink-2);
  display: grid; place-items: center;
  font-size: .875rem; font-weight: 650; letter-spacing: -.01em;
}
.avatar--lg { width: 60px; height: 60px; font-size: 1.25rem; }
.quote__who strong { font-size: .875rem; font-weight: 650; display: block; }
.quote__who span { font-size: .75rem; color: var(--ink-4); }

/* Accordion */
.accordion { border-top: 1px solid var(--line); }
.acc { border-bottom: 1px solid var(--line); }
.acc summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s5);
  padding: var(--s5) 0; cursor: pointer; list-style: none;
  font-size: 1.0625rem; font-weight: 600; letter-spacing: -.01em;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary:hover { color: var(--accent-ink); }
.acc summary svg { width: 20px; height: 20px; flex: none; color: var(--ink-4); transition: transform .26s var(--ease); }
.acc[open] summary svg { transform: rotate(45deg); }
.acc__body { padding-bottom: var(--s5); color: var(--ink-3); font-size: .9375rem; line-height: 1.65; max-width: 72ch; }

/* Team */
.team-card { text-align: left; display: flex; flex-direction: column; gap: var(--s3); }
.team-card__top { display: flex; align-items: center; gap: var(--s4); }
.team-card strong { font-size: 1rem; font-weight: 650; display: block; }
.team-card em { font-style: normal; font-size: .8125rem; color: var(--accent-ink); font-weight: 600; }
.team-card p { font-size: .875rem; color: var(--ink-3); line-height: 1.6; }

/* CTA band */
.cta-band {
  background: var(--ink); color: #fff; border-radius: var(--r-xl);
  padding: clamp(var(--s8), 5vw, var(--s16));
  display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s10); align-items: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #A99F93; margin-top: var(--s4); max-width: 46ch; }
.cta-band__actions { display: flex; flex-direction: column; gap: var(--s3); }

/* Page header */
.pagehead { padding-block: clamp(var(--s10), 6vw, var(--s16)) clamp(var(--s8), 4vw, var(--s12)); }
.pagehead h1 { max-width: 18ch; }
.pagehead p { margin-top: var(--s5); }

/* Service specials */
.special {
  display: flex; flex-direction: column; gap: var(--s3);
  padding: var(--s6); border: 1.5px dashed var(--line-2);
  border-radius: var(--r-lg); background: var(--surface);
}
.special__price {
  font-family: var(--font-display); font-size: 2rem; font-weight: 600;
  letter-spacing: -.03em; line-height: 1;
  font-variation-settings: 'SOFT' 0, 'WONK' 0, 'opsz' 48;
}
.special__price s { font-size: 1rem; color: var(--ink-4); font-family: var(--font-ui); margin-left: 8px; letter-spacing: 0; }
.special p { font-size: .875rem; color: var(--ink-3); line-height: 1.6; flex: 1; }

/* Compare drawer */
.compare-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 95;
  background: var(--ink); color: #fff;
  padding: var(--s4) var(--s6) calc(var(--s4) + env(safe-area-inset-bottom));
  transform: translateY(110%); transition: transform .34s var(--ease-out);
  box-shadow: 0 -10px 40px -16px rgba(0,0,0,.6);
}
.compare-bar.is-visible { transform: translateY(0); }
.compare-bar__inner { display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; }
.compare-bar__items { display: flex; gap: var(--s3); flex: 1; flex-wrap: wrap; }
.compare-item {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px 6px 6px; border-radius: var(--r); background: rgba(255,255,255,.1);
  font-size: .8125rem; font-weight: 550;
}
.compare-item img { width: 44px; height: 33px; object-fit: cover; border-radius: 5px; }
.compare-item button { color: rgba(255,255,255,.6); display: grid; place-items: center; }
.compare-item button:hover { color: #fff; }
.compare-item button svg { width: 14px; height: 14px; }

/* Compare table */
.compare-table { width: 100%; font-size: .875rem; }
.compare-table th, .compare-table td {
  padding: var(--s4); text-align: left; border-bottom: 1px solid var(--line); vertical-align: top;
}
.compare-table thead th { background: var(--surface-2); font-weight: 650; }
.compare-table tbody th { font-weight: 550; color: var(--ink-3); width: 200px; }
.compare-table td { font-weight: 600; }

/* ==========================================================================
   15. RESPONSIVE
   ========================================================================== */
@media (max-width: 1180px) {
  .footer__top { grid-template-columns: 1.4fr 1fr 1fr; }
  .brand-grid { grid-template-columns: repeat(6, 1fr); }
  .vdp { grid-template-columns: minmax(0, 1fr) 330px; gap: var(--s8); }
  .browse { grid-template-columns: 250px 1fr; gap: var(--s8); }
}

@media (max-width: 1024px) {
  .nav { display: none; }
  .hamburger { display: grid; }
  .header__actions { gap: 0; }
  .bodytype-grid { grid-template-columns: repeat(3, 1fr); }
  .specs { grid-template-columns: repeat(2, 1fr); }
  .calc__grid { grid-template-columns: 1fr; gap: var(--s8); }
  .cta-band { grid-template-columns: 1fr; gap: var(--s8); }
  .cta-band__actions { flex-direction: row; flex-wrap: wrap; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .searchcard__form { grid-template-columns: 1fr 1fr; }
  .searchcard__form .field--go { grid-column: 1 / -1; }
  .searchcard__form .btn { width: 100%; }
}

@media (max-width: 900px) {
  :root { --header-h: 60px; }

  .vdp { grid-template-columns: 1fr; }
  .pricebox { position: static; }
  .vdp-bar { display: flex; }
  body.has-vdp-bar { padding-bottom: 86px; }

  /* Filters become a bottom sheet */
  .browse { grid-template-columns: 1fr; }
  .filters {
    position: fixed; inset: 0; top: auto; z-index: 140;
    max-height: 86vh; height: 86vh; background: var(--bg);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    box-shadow: var(--shadow-xl); padding: var(--s5) var(--s5) 100px;
    transform: translateY(100%); transition: transform .34s var(--ease-out);
    visibility: hidden;
  }
  .filters.is-open { transform: translateY(0); visibility: visible; }
  .filters__head { position: sticky; top: calc(var(--s5) * -1); background: var(--bg); z-index: 2; padding-top: var(--s3); }
  .filters__close { display: grid !important; }
  .filters-fab {
    display: inline-flex; position: fixed; z-index: 92;
    left: 50%; transform: translateX(-50%);
    bottom: calc(var(--s5) + env(safe-area-inset-bottom));
    box-shadow: var(--shadow-xl);
  }
  .filters-scrim {
    position: fixed; inset: 0; z-index: 139; background: rgba(20,17,14,.45);
    opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
  }
  .filters-scrim.is-open { opacity: 1; visibility: visible; }

  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .feature-cols { columns: 1; }
  .footer__top { grid-template-columns: 1fr 1fr; gap: var(--s8); }
  .form-grid { grid-template-columns: 1fr; }
  .is-list .vcard { flex-direction: column; }
  .is-list .vcard__media { width: 100%; aspect-ratio: 4/3; }
  .compare-table tbody th { width: 130px; }
}

@media (max-width: 720px) {
  .container { padding-inline: var(--s5); }
  .brand-grid { grid-template-columns: repeat(4, 1fr); }
  .bodytype-grid { grid-template-columns: repeat(2, 1fr); }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .searchcard { border-radius: var(--r-lg); }
  .searchcard__form { grid-template-columns: 1fr; }
  .topbar__items .topbar__item--hide { display: none; }
  .steps .step__label { font-size: .6875rem; }
  .choices--2 { grid-template-columns: 1fr; }
  .gallery__stage { border-radius: var(--r); }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
  .cta-band__actions { flex-direction: column; }
  .cta-band__actions .btn { width: 100%; }
}

@media (max-width: 620px) {
  /* The drawer already carries this CTA — dropping it here keeps the
     logo, saved-count and menu button on one line without overflowing. */
  .header__actions > .btn { display: none; }
  .logo__sub { display: none; }
}

@media (max-width: 560px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .specs { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; }
  .hero__trust { gap: var(--s2) var(--s4); font-size: .8125rem; }
  .pricebox__price { font-size: 2.125rem; }
  .brand-grid { grid-template-columns: repeat(3, 1fr); }
  .toolbar { gap: var(--s3); }
  .toolbar__count { width: 100%; }
}

/* ==========================================================================
   MOTION & PRINT
   ========================================================================== */
[data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  .header, .topbar, .footer, .vdp-bar, .compare-bar, .filters, .filters-fab,
  .pricebox__ctas, .gallery__nav { display: none !important; }
  body { background: #fff; }
  .vdp { grid-template-columns: 1fr; }
  a[href]::after { content: ' (' attr(href) ')'; font-size: .75rem; color: #666; }
}

/* ==========================================================================
   16. MODAL (native <dialog>)
   ========================================================================== */
.modal {
  border: 0; padding: 0; max-width: 520px; width: calc(100vw - 32px);
  border-radius: var(--r-lg); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-xl); overflow: visible;
}
.modal::backdrop { background: rgba(20,17,14,.55); backdrop-filter: blur(3px); }
.modal[open] { animation: modalIn .28s var(--ease-out); }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.modal__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4);
  padding: var(--s6) var(--s6) var(--s4);
}
.modal__head h3 { font-size: 1.375rem; }
.modal__head p { font-size: .875rem; color: var(--ink-3); margin-top: 6px; }
.modal__body { padding: 0 var(--s6) var(--s6); display: grid; gap: var(--s4); }
.modal__vehicle {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3); background: var(--surface-2); border-radius: var(--r);
  font-size: .875rem;
}
.modal__vehicle img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; flex: none; }
.modal__vehicle strong { display: block; font-weight: 650; }
.modal__vehicle span { color: var(--ink-3); font-size: .8125rem; }

/* Vehicle-detail supporting blocks */
.vdp-section { padding-top: var(--s12); }
.vdp-section > h2 {
  font-family: var(--font-ui); font-size: 1.375rem; font-weight: 650;
  letter-spacing: -.02em; margin-bottom: var(--s5);
}
.notes {
  background: var(--surface); border-left: 3px solid var(--accent);
  border-radius: 0 var(--r) var(--r) 0; padding: var(--s5) var(--s6);
  font-size: .9375rem; line-height: 1.7; color: var(--ink-2);
}
.notes__by { display: block; margin-top: var(--s3); font-size: .8125rem; color: var(--ink-4); }

.vdp-cta-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s3); }
@media (max-width: 560px) { .vdp-cta-row { grid-template-columns: 1fr; } }

/* Saved page empty state reuses .empty */
.saved-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s5); flex-wrap: wrap; }
