/* ==========================================================================
   Clear Auto Choice - Primary Site Stylesheet
   Covers: index, compare, methodology, about, contact, privacy, terms
   ========================================================================== */

:root {
  --ink: #14181F;
  --slate: #4B5563;
  --line: #E2E5EA;
  --paper: #FAFAF9;
  --white: #FFFFFF;
  --accent: #1D4ED8;
  --accent-dark: #1739A6;
  --confirmed: #0F5132;
  --confirmed-bg: #D1E7DD;
  --estimated: #664D03;
  --estimated-bg: #FFF3CD;
  --radius: 8px;
}

* { box-sizing: border-box; }

/* Several elements on this site (buttons, form steps, panels) are shown
   and hidden by toggling the native `hidden` attribute/property from JS
   (e.g. tools/intake.html's wizard steps, the "Next"/"Save" buttons at
   the end of the wizard). By default the browser hides a [hidden]
   element for free, but any author rule that sets `display` on the same
   element (like .btn's `display: inline-block` below) wins over that
   built-in behavior and the element stays visible anyway. This single
   reset makes `hidden` always win, sitewide, no matter what other
   display rules a class carries. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.55;
  font-size: 16px;
}

h1, h2, h3 {
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.125rem; }

p { margin: 0 0 16px; color: var(--slate); }
p.lead { font-size: 1.125rem; color: var(--slate); }

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / Nav ---------- */

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  /* Raised from 50 for more headroom above ordinary page content (cards,
     the sticky filter panel, breadcrumbs). Kept below 1000 on purpose —
     that's this site's convention for a true top layer (.listing-modal-
     overlay, .compare-drawer, .cac-toast all live at 1000+) which should
     still cover the header, not sit behind it, whenever one is open. */
  z-index: 500;
}

.nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--white);
  font-weight: 800;
  font-size: 0.9rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  flex: 1;
}

.nav-links a {
  color: var(--slate);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a.active { color: var(--ink); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--ink);
}

.nav-cta { white-space: nowrap; }

/* ---------- Nav dropdowns ("Shop", "Guides") ---------- */

.nav-dropdown { position: relative; }

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  color: var(--slate);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}
.nav-dropdown-toggle:hover { color: var(--ink); }
.nav-dropdown-toggle.active { color: var(--ink); }

.nav-caret { font-size: 0.65em; transition: transform 0.15s ease; }
.nav-dropdown.open .nav-caret { transform: rotate(180deg); }

.nav-dropdown-menu {
  list-style: none;
  margin: 0;
  padding: 6px;
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  min-width: 190px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  display: none;
  z-index: 550;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }

.nav-dropdown-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--slate);
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}

@media (max-width: 780px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; margin-left: auto; }

  .nav { flex-wrap: wrap; row-gap: 8px; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
  }

  .nav-links.open li { width: 100%; }
  .nav-links.open > li > a { display: block; padding: 10px 0; }

  .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 10px 0;
  }

  .nav-dropdown-menu {
    position: static;
    display: none;
    border: none;
    box-shadow: none;
    padding: 0 0 4px 14px;
  }

  .nav-dropdown.open .nav-dropdown-menu { display: block; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover { background: var(--accent-dark); }

.btn-secondary {
  background: var(--white);
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover { background: var(--paper); }

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

/* "Save My Preferences" only */
#submitBtn {
  padding: 6px 11px;
  font-size: 0.475rem;
}

/* ---------- Hero ---------- */

.hero {
  padding: 72px 0 56px;
  background: linear-gradient(180deg, #F2F5FF 0%, var(--paper) 100%);
}

.hero-inner { max-width: 720px; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  background: #E8EEFF;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 18px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ---------- Sections ---------- */

.section { padding: 64px 0; }
.section-tight { padding: 48px 0 72px; }

.text-center { text-align: center; }

/* ---------- Cards / Grid ---------- */

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 800px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.card .icon {
  font-size: 1.5rem;
  margin-bottom: 14px;
}

/* ---------- Top Pick cards ---------- */
/* Shared by inventory/ev-inventory.php's "Top Picks by Mileage" and
   "Matches for you" sections.
   Vertical spacing is intentionally compact. Photo dimensions are unchanged. */

.top-picks-head { margin-bottom: 14px; }

.top-picks-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

@media (max-width: 1300px) {
  .top-picks-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1100px) {
  .top-picks-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .top-picks-grid { grid-template-columns: 1fr; }
}

/*
 * TOP PICK CARD
 *
 * Reduced:
 * - outer padding
 * - spacing between content rows
 * - spacing around text
 * - action-area spacing
 *
 * NOT reduced:
 * - photo width
 * - photo height
 * - photo aspect ratio
 */
.top-pick-card {
  background: var(--white);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
}

/* Rank remains over the photo. */
.top-pick-rank {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  z-index: 2;
}

/*
 * Photo remains 16:10.
 * Negative margins are adjusted only because card padding changed from
 * 16px to 12px. The actual image dimensions are otherwise unchanged.
 */
.top-pick-media {
  margin: -12px -12px 7px;
}

.top-pick-card .thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: #E9ECEF;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9AA3AD;
  font-size: 28px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.top-pick-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  font-weight: 700;
  line-height: 1.15;
}

.top-pick-headline {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.18;
}

.top-pick-sub {
  font-size: 12px;
  color: var(--slate);
  line-height: 1.25;
  margin-bottom: 3px;
}

.top-pick-vehicle {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 2px;
  line-height: 1.2;
}

.top-pick-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
  line-height: 1.15;
}

.top-pick-mileage {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--slate);
  line-height: 1.2;
}

.top-pick-meta {
  font-size: 12px;
  color: var(--slate);
  margin-top: 1px;
  line-height: 1.2;
}

/* Compact action area while preserving the same buttons. */
.top-pick-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.top-pick-actions .btn {
  width: 100%;
  text-align: center;
}

/* "What if?" cost breakdown */
.top-pick-whatif-btn {
  width: 100%;
  background: none;
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 6px 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
}

.top-pick-whatif-btn:hover { background: var(--paper); }

.top-pick-whatif-panel {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
}

.top-pick-whatif-table {
  width: 100%;
  border-collapse: collapse;
}

.top-pick-whatif-table td {
  padding: 2px 0;
  color: var(--slate);
}

.top-pick-whatif-table td:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.top-pick-whatif-table tr.top-pick-whatif-total td {
  font-weight: 800;
  border-top: 1px solid var(--line);
  padding-top: 5px;
  color: var(--ink);
}

.top-pick-whatif-table tr.top-pick-whatif-total td:last-child {
  color: var(--accent);
  font-size: 13px;
}

.top-pick-whatif-table td.top-pick-whatif-under-max {
  color: var(--confirmed);
}

.top-pick-whatif-table td.top-pick-whatif-over-max {
  color: var(--estimated);
}

.top-pick-whatif-note {
  color: var(--slate);
  margin-top: 5px;
  line-height: 1.3;
}

.top-pick-order-btn {
  width: 100%;
  margin-top: 7px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.top-pick-order-btn:hover { background: var(--accent-dark); }

/* ---------- Two-column layout ---------- */

.two-col {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
}

.step-list {
  padding-left: 20px;
  color: var(--slate);
}

.step-list li { margin-bottom: 14px; }
.step-list strong { color: var(--ink); }

.callout {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: 40px 0;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--slate);
  margin: 0 0 4px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 0;
  margin: 0;
}

.footer-links a {
  color: var(--slate);
  font-size: 0.9rem;
}

.footer-links a:hover { color: var(--ink); }

.footer-admin-link {
  font-size: 0.75rem;
  margin: 10px 0 0;
}

.footer-admin-link a {
  color: var(--slate);
  opacity: 0.6;
}

.footer-admin-link a:hover { opacity: 1; }

/* ---------- Shared badges (used across pages, incl. compare tool) ---------- */

.badge-confirmed {
  background-color: var(--confirmed-bg);
  color: var(--confirmed);
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.badge-estimated {
  background-color: var(--estimated-bg);
  color: var(--estimated);
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
}

/* ---------- Forms (compare tool) ---------- */

.muted { color: var(--slate); }

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}

.field input,
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--white);
  color: var(--ink);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
}

.field-hint {
  font-size: 0.8rem;
  color: var(--slate);
  margin-top: 4px;
}

.btn-block {
  width: 100%;
  text-align: center;
}

.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}

/* ---------- Toolbar ---------- */

.toolbar {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 700px) {
  .toolbar { grid-template-columns: 1fr; }
}

.toolbar input,
.toolbar select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
}

/* ---------- Table ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead th {
  text-align: left;
  padding: 12px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  white-space: nowrap;
}

tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

tbody tr:last-child td { border-bottom: none; }

/* ---------- Details / summary (advanced sections) ---------- */

details.card summary {
  list-style: none;
}

details.card summary::-webkit-details-marker { display: none; }

/* ---------- Variable alias ---------- */

:root {
  --color-text: var(--ink);
  --color-text-muted: var(--slate);
  --color-border: var(--line);
  --color-surface: var(--white);
  --color-bg: var(--paper);
  --color-primary: var(--accent);
  --color-accent: var(--accent);
  --color-danger: #B42318;
  --color-estimated: var(--estimated);
  --color-estimated-bg: var(--estimated-bg);
  --radius-lg: var(--radius);
  --radius-md: var(--radius);
  --radius-sm: 6px;
  --shadow-card: none;
}

/* ---------- Badges (base) ---------- */

.badge {
  display: inline-block;
}

/* ---------- Status messages (contact form) ---------- */

.status-msg.success {
  background-color: var(--confirmed-bg);
  color: var(--confirmed);
  border: 1px solid #A3CFBB;
}

/* ---------- Textarea (matches input/select styling) ---------- */

.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--white);
  color: var(--ink);
  resize: vertical;
}

.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* ---------- Honeypot ---------- */

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Info page sub-nav ---------- */

.info-subnav {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 61px;
  z-index: 40;
  overflow-x: auto;
}

.info-tabs {
  display: flex;
  gap: 4px;
}

.info-tab {
  padding: 14px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--slate);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.info-tab:hover {
  color: var(--ink);
  text-decoration: none;
}

.info-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.info-section { scroll-margin-top: 118px; }
.info-section + .info-section { border-top: 1px solid var(--line); }

/* ---------- Breadcrumb ---------- */

.breadcrumb {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.breadcrumb .container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--slate);
}

.breadcrumb a { color: var(--slate); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--line); }
.breadcrumb .current { color: var(--ink); font-weight: 600; }
/* ==========================================================
   Clear Auto Choice — Uniform Matches / Top Picks cards
   ========================================================== */

.top-picks-grid {
  display: grid;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.top-picks-grid > .top-pick-card {
  box-sizing: border-box;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
}

.top-picks-grid > .top-pick-card .top-pick-media {
  flex: 0 0 auto;
  margin: -12px -12px 7px;
}

.top-picks-grid > .top-pick-card .thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-picks-grid > .top-pick-card .top-pick-label {
  min-height: 2.5em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.top-picks-grid > .top-pick-card .top-pick-highlight {
  box-sizing: border-box;
  min-height: 7.5em;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-wrap: anywhere;
}

.top-picks-grid > .top-pick-card .top-pick-headline {
  min-height: 2.5em;
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.top-picks-grid > .top-pick-card .top-pick-sub {
  min-height: 4.2em;
  margin-bottom: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.top-picks-grid > .top-pick-card .top-pick-vehicle {
  min-height: 2.7em;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.top-picks-grid > .top-pick-card .top-pick-price {
  min-height: 1.5em;
  margin-bottom: 3px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.top-picks-grid > .top-pick-card .top-pick-monthly-slot {
  min-height: 2.2em;
  display: flex;
  align-items: flex-start;
}

.top-picks-grid > .top-pick-card .top-pick-meta-slot {
  min-height: 3.4em;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.top-picks-grid > .top-pick-card .top-pick-vin-slot {
  min-height: 2.8em;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.top-picks-grid > .top-pick-card .top-pick-empty-slot {
  display: block;
  width: 100%;
  min-height: 1em;
}

.top-picks-grid > .top-pick-card .top-pick-actions {
  margin-top: auto;
  padding-top: 9px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.top-picks-grid > .top-pick-card .top-pick-actions .btn {
  box-sizing: border-box;
  width: 100%;
  min-height: 36px;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}

.top-picks-grid > .top-pick-card .top-pick-whatif-btn {
  flex: 0 0 auto;
  margin-top: 5px;
  line-height: 1.35;
  white-space: normal;
}

.top-picks-grid > .top-pick-card .top-pick-whatif-panel[hidden] {
  display: none !important;
}

.top-picks-grid > .top-pick-card .top-pick-whatif-panel:not([hidden]) {
  flex: 0 0 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .top-picks-grid {
    grid-auto-rows: auto;
  }

  .top-picks-grid > .top-pick-card {
    height: auto;
  }
}

/* Matches for You card details */

.matches-card .matches-price-status {
  margin: 3px 0 12px;
  color: var(--muted, #667085);
  font-size: 12px;
}

.matches-card .matches-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0;
}

.matches-card .matches-spec {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--border-color, #e2e7ef);
  border-radius: 8px;
}

.matches-card .matches-spec > span {
  color: var(--muted, #667085);
  font-size: 11px;
}

.matches-card .matches-spec > strong {
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.matches-card .matches-spec-note {
  color: var(--muted, #667085);
  font-size: 11px;
  font-weight: 400;
}

@media (max-width: 420px) {
  .matches-card .matches-specs {
    grid-template-columns: 1fr;
  }
}


/* Vehicle-card specification standardization */
.top-pick-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 12px;
  margin: 9px 0;
  padding: 10px;
  border: 1px solid var(--border-color, #dedede);
  border-radius: 9px;
  background: var(--surface-muted, rgba(127, 127, 127, .045));
}
.top-pick-spec, .matches-spec {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.top-pick-spec span, .matches-spec span, .card-field-label {
  color: var(--muted, #666);
  font-size: 11px;
  font-weight: 500;
}
.top-pick-spec strong, .matches-spec strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.4;
}
.top-pick-price .card-field-label { display: block; margin-bottom: 2px; }
@media (max-width: 480px) {
  .top-pick-specs { gap: 8px; padding: 8px; }
}


/* Clear Auto Choice: consistent vehicle specification labels and values */
.top-pick-specs,
.matches-card .matches-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 12px;
  row-gap: 10px;
  align-items: start;
}

.top-pick-spec,
.matches-card .matches-spec {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
  min-width: 0;
  line-height: 1.4;
}

.top-pick-spec > span,
.matches-card .matches-spec > span {
  display: block;
  margin: 0;
  color: var(--muted, #667085);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 500;
}

.top-pick-spec > strong,
.matches-card .matches-spec > strong {
  display: block;
  margin: 0;
  min-width: 0;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (max-width: 420px) {
  .matches-card .matches-specs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Unified vehicle-card appearance: match Top Picks */
.matches-card {
  box-sizing: border-box;
  background: var(--white);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px;
}

/* ==========================================================
   Look-only alignment: Matches and Comparison cards styled to
   match the Top Picks card. Card content and markup unchanged.
   ========================================================== */

/* ---- Matches: specification block looks like the Top Picks one ---- */
.matches-card .matches-specs {
  margin: 9px 0;
  padding: 10px;
  border: 1px solid var(--border-color, #dedede);
  border-radius: 9px;
  background: var(--surface-muted, rgba(127, 127, 127, .045));
}
.matches-card .matches-spec {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.matches-card .matches-price-status {
  margin: 0 0 3px;
  font-size: 12px;
  line-height: 1.25;
  color: var(--slate);
}

/* ---- Comparison tab: mini card restyled as a Top Picks card ---- */
#comparison-list-grid {
  align-items: stretch;
  grid-auto-rows: 1fr;
}
#comparison-list-grid .compare-mini-card {
  box-sizing: border-box;
  height: 100%;
  padding: 12px;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
}
#comparison-list-grid .compare-mini-card .compare-mini-media {
  flex: 0 0 auto;
  margin: -12px -12px 7px;
}
#comparison-list-grid .compare-mini-card .thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 0;
  font-size: 28px;
  border-radius: var(--radius) var(--radius) 0 0;
}
#comparison-list-grid .compare-mini-card .compare-mini-rank {
  top: 6px;
  left: 6px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
}
#comparison-list-grid .compare-mini-card .compare-mini-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
}
#comparison-list-grid .compare-mini-card .compare-mini-name {
  min-height: 2.7em;
  margin: 2px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  overflow-wrap: anywhere;
}
#comparison-list-grid .compare-mini-card .compare-mini-price {
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}
#comparison-list-grid .compare-mini-card .vehicle-vin {
  line-height: 1.4;
  overflow-wrap: anywhere;
}
/* The specification block carries inline styles, so !important is needed. */
#comparison-list-grid .compare-mini-card .compare-mini-specs {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  column-gap: 12px !important;
  row-gap: 10px !important;
  align-items: start !important;
  margin: 3px 0 0 !important;
  padding: 10px !important;
  border: 1px solid var(--border-color, #dedede) !important;
  border-radius: 9px !important;
  background: var(--surface-muted, rgba(127, 127, 127, .045)) !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
}
#comparison-list-grid .compare-mini-card .compare-mini-specs > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
#comparison-list-grid .compare-mini-card .compare-mini-specs > div > span {
  display: block !important;
  margin: 0 !important;
  color: var(--muted, #667085) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
}
#comparison-list-grid .compare-mini-card .compare-mini-specs > div > strong {
  display: block;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
#comparison-list-grid .compare-mini-card .compare-mini-actions {
  gap: 5px;
  margin-top: auto;
  padding: 9px 0 0;
  border-top: 1px solid var(--line);
}
#comparison-list-grid .compare-mini-card .compare-mini-action-btn,
#comparison-list-grid .compare-mini-card .compare-mini-remove-btn,
#comparison-list-grid .compare-mini-card .compare-mini-view-btn {
  box-sizing: border-box;
  width: 100%;
  min-height: 36px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: normal;
  overflow-wrap: anywhere;
  filter: none;
}
#comparison-list-grid .compare-mini-card .compare-mini-action-btn:hover,
#comparison-list-grid .compare-mini-card .compare-mini-remove-btn:hover,
#comparison-list-grid .compare-mini-card .compare-mini-view-btn:hover {
  background: var(--paper);
  filter: none;
}
#comparison-list-grid .compare-mini-empty {
  box-sizing: border-box;
  height: 100%;
  min-height: 200px;
  aspect-ratio: auto;
  padding: 12px;
}
@media (max-width: 560px) {
  #comparison-list-grid { grid-auto-rows: auto; }
  #comparison-list-grid .compare-mini-card { height: auto; }
}

/* Comparison tab cards behave like Top Picks cards: no hover lift, no
   hover border change, no pointer cursor (the card itself is not clickable;
   only its buttons are). */
#comparison-list-grid .compare-mini-card,
#comparison-list-grid .compare-mini-card:hover,
#comparison-list-grid .compare-mini-card.is-active {
  cursor: default;
  transform: none;
  transition: none;
  border: 1px solid var(--accent);
  box-shadow: none;
}
