.lang {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}

.lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  color: var(--fg-2);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .03em;
  text-decoration: none;
}

.lang a[aria-current="true"] { background: var(--fg); color: var(--bg); }

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--fg);
  font-weight: 700;
  text-decoration: none;
}

.pill-btn svg { color: var(--accent); }

.eyebrow {
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: transparent;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}

@media (hover: hover) {
  .card:hover { border-color: var(--line-hover); transform: translateY(-2px); }
}

.card:active { transform: scale(.985); }

.card-photo {
  display: block;
  margin: -20px -20px 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: var(--raised);
}

.card-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-head { display: flex; flex-direction: column; gap: 2px; }

.card-brand {
  font-size: 13px;
  font-weight: 700;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: .07em;
}

.card-model {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.2;
}

.card-spec { font-size: 14px; color: var(--fg-3); }

.card-price { container-type: inline-size; }

.card-price small { display: block; font-size: 13px; color: var(--fg-3); }

/* The range is ~11.2em wide; the size follows the card so it never breaks after the dash. */
.card-price b {
  display: block;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: min(27px, 8.6cqi);
  white-space: nowrap;
  color: var(--accent);
}

.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line-card);
}

.card-local { font-size: 14px; color: var(--fg-2); }

.card-go {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: var(--r-sm);
  background: var(--raised);
  font-weight: 700;
  font-size: 15px;
}

.tag {
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.tag-good { background: var(--accent-soft); color: var(--accent); }
.tag-flat { background: var(--raised); color: var(--fg-2); }

.request {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.request-text { display: flex; flex-direction: column; gap: 6px; }
.request-text b { font-size: 18px; }
.request-text span { color: var(--fg-3); }
.request .btn { flex: none; }

.vin-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.vin-fields { display: flex; align-items: flex-end; gap: 12px; }
.vin-fields .field:first-child { flex: 2; }
.vin-fields .field { flex: 1; min-width: 0; }
.vin-fields .btn { flex: none; min-height: 50px; }
.vin-fields input { width: 100%; }
#vin-input { text-transform: uppercase; letter-spacing: .04em; }

.vin-status { margin: 0; color: var(--fg-2); }
.vin-status:empty { display: none; }

.steps ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px;
  border-radius: var(--r-lg);
  background: var(--surface);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 30px;
  color: var(--accent);
}

.steps b { font-size: 17px; }
.steps span { font-size: 15px; color: var(--fg-3); }

.callbar { display: none; }

@media (max-width: 719px) {
  .lang a {
    min-width: 42px;
    min-height: 42px;
    padding: 0 4px;
    font-size: 11px;
  }

  .pill-btn {
    justify-content: center;
    width: 44px;
    min-height: 44px;
    padding: 0;
    border-color: transparent;
    background: var(--accent);
    color: var(--accent-ink);
  }

  .pill-btn svg { color: currentColor; }
  .pill-phone { display: none; }

  .eyebrow {
    padding: 0;
    border-radius: 0;
    background: none;
    font-size: 12px;
  }

  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .chips::-webkit-scrollbar { display: none; }

  .chip {
    flex: none;
    scroll-snap-align: start;
    font-size: 14px;
  }

  .chip:active { transform: scale(.97); }

  .grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }

  .card {
    position: relative;
    display: grid;
    grid-template-columns: min(47%, 170px) minmax(0, 1fr);
    gap: 6px 12px;
    padding: 12px 28px 12px 12px;
    align-items: start;
  }

  .card-photo {
    grid-row: 1 / span 2;
    align-self: center;
    width: 100%;
    margin: 0;
    border-radius: var(--r-sm);
    font-size: 12px;
    text-align: center;
  }

  .card-brand { font-size: 11px; }
  .card-model { font-size: 17px; }
  .card-spec { font-size: 13px; }
  /* Beside the photo the range only fits at ~12px, so it takes its own full-width row. */
  .card-price { grid-column: 1 / -1; grid-row: 3; }
  .card-price b { font-size: min(22px, 8.6cqi); }

  .card-price small,
  .card-local { display: none; }

  .card-foot {
    grid-column: 2;
    padding-top: 0;
    border-top: 0;
  }

  .tag { white-space: normal; }

  .card-go { display: none; }

  .card::after {
    content: '›';
    position: absolute;
    top: 50%;
    right: 12px;
    translate: 0 -50%;
    font-size: 24px;
    line-height: 1;
    color: var(--fg-3);
  }

  .request { flex-direction: column; align-items: stretch; margin-top: 10px; padding: 20px 18px; }

  .vin-card { gap: 14px; padding: 20px 18px; }
  .vin-fields { flex-direction: column; align-items: stretch; }

  .steps li { padding: 18px; }
  .steps li::before { font-size: 24px; }
  .steps b { font-size: 16px; }
  .steps span { font-size: 14px; }

  .footer-top .cta-row { width: 100%; }

  .callbar {
    position: fixed;
    inset: auto 0 0;
    z-index: 15;
    display: grid;
    grid-template-columns: 1fr 56px;
    gap: 10px;
    padding: 10px max(16px, env(safe-area-inset-right, 0px))
             calc(10px + env(safe-area-inset-bottom, 0px))
             max(16px, env(safe-area-inset-left, 0px));
    background: var(--bg-blur);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    translate: 0 110%;
    visibility: hidden;
    transition: translate .2s, visibility .2s;
  }

  .callbar.is-visible {
    translate: 0 0;
    visibility: visible;
  }

  .callbar .btn { padding: 0 14px; }

  .callbar-wa {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    color: var(--fg);
  }

  .callbar-wa:active { transform: scale(.97); }
}

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .card:hover,
  .card:active,
  .chip:active,
  .callbar-wa:active { transform: none; }
  .callbar { transition: none; }
}
