.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(246, 248, 251, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-shell { min-height: 72px; display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-3); align-items: center; }
.brand {
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-self: center;
  gap: var(--space-2);
}
.brand-logo {
  width: 120px;
  height: auto;
  max-width: none;
  object-fit: contain;
  border-radius: 0;
  display: block;
}
.menu-toggle {
  min-height: var(--tap);
  min-width: var(--tap);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 1.3rem;
}
.site-nav { display: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.site-nav.is-open { display: block; position: absolute; left: 0; right: 0; top: 72px; background: var(--surface); border-bottom: 1px solid var(--border); padding: var(--space-3) 4vw; }
.nav-link { display: block; padding: var(--space-2); border-radius: var(--radius-sm); text-decoration: none; min-height: var(--tap); color: var(--text); }
.nav-link span { display: block; font-weight: 700; color: var(--text); }
.nav-link.is-active { background: var(--surface-alt); }
.nav-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  padding: 0;
}
.nav-link-icon svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: currentColor;
  display: block;
}
.header-account {
  justify-self: end;
}

@media (max-width: 979px) {
  .nav-shell {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "toggle brand account"
      "menu menu menu";
  }

  .menu-toggle {
    grid-area: toggle;
  }

  .brand {
    grid-area: brand;
    justify-self: center;
  }

  .site-nav.is-open {
    position: static;
    grid-area: menu;
    top: auto;
    left: auto;
    right: auto;
    border-bottom: 1px solid var(--border);
    padding: var(--space-3) 0 0;
  }

  .header-account {
    grid-area: account;
    justify-self: end;
  }
}

.button {
  border: 1px solid transparent;
  min-height: var(--tap);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  text-decoration: none;
  display: inline-flex;
  gap: var(--space-1);
  align-items: center;
  font-weight: 700;
}
.button-primary { background: var(--primary); color: var(--primary-ink); }
.button-secondary { background: var(--surface); border-color: var(--border); color: var(--text); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.hero-grid { display: grid; gap: var(--space-4); }
.panel, .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}
.trust-panel { align-self: start; }
.stat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.stat-list li { display: grid; gap: 0.2rem; }
.stat-list strong { font-size: var(--font-size-4); }
.card-grid { display: grid; gap: var(--space-3); }
.badge { display: inline-block; font-size: var(--font-size-1); text-transform: capitalize; background: var(--surface-alt); padding: 0.3rem 0.6rem; border-radius: 999px; }
.cta-band { background: linear-gradient(135deg, #07326a, #0059c6); color: #fff; }
.cta-band p, .cta-band small, .cta-band h2 { color: #fff; }
.cta-band .button-primary { background: #fff; color: #06306d; }
.timeline { display: grid; gap: var(--space-3); }
.timeline article { background: var(--surface); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); padding: var(--space-3); }
.filter-row { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); }
.chip { min-height: var(--tap); border-radius: 999px; border: 1px solid var(--border); background: var(--surface); padding: 0 1rem; }
.chip.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }
.resource-card[hidden] { display: none; }
.content-hub-grid { display: grid; gap: var(--space-4); }
.content-article-grid { align-items: start; }
.content-article-card { display: grid; gap: var(--space-2); }
.content-article-card-meta,
.content-article-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--font-size-1);
  color: #5a6471;
}
.content-article-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.content-article-tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: var(--surface-alt);
  font-size: var(--font-size-1);
  color: #334155;
}
.content-article-detail {
  align-self: start;
}
.content-article-detail-shell {
  display: grid;
  gap: var(--space-3);
}
.content-article-detail-body {
  display: grid;
  gap: var(--space-3);
}
.content-article-detail-body .autocarro-article {
  margin: 0;
}
.content-article-detail-body .autocarro-article footer {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}
.content-article-detail-cta {
  display: grid;
  gap: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}
@media (min-width: 900px) {
  .content-hub-grid { grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr); }
}
.badge-grid { display: grid; gap: var(--space-3); }
.trust-badge { border-radius: var(--radius-md); padding: var(--space-4); color: #fff; }
.trust-badge.high { background: #0f805e; }
.trust-badge.medium { background: #1968c8; }
.trust-badge.caution { background: #8a4e00; }
.faq button {
  width: 100%;
  text-align: left;
  min-height: var(--tap);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-1);
  background: var(--surface);
  padding: 0.8rem;
  font: inherit;
}
.faq div { padding: 0 var(--space-2) var(--space-2); }
.onboarding fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
}
.onboarding input {
  width: 100%;
  min-height: var(--tap);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.7rem;
}
.stepper {
  list-style: none;
  margin: 0 0 var(--space-3);
  padding: 0;
  display: grid;
  gap: var(--space-2);
}
.stepper li { padding: var(--space-2); border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); }
.stepper li.is-active { border-color: var(--primary); color: var(--primary); font-weight: 700; }
.privacy-note { font-size: var(--font-size-1); }
.site-footer { background: #0d223d; color: #fff; padding: var(--space-6) 0; }
.site-footer p, .site-footer h2, .site-footer a, .site-footer small { color: #fff; }
.footer-grid { display: grid; gap: var(--space-3); }
.footer-links { display: grid; gap: var(--space-1); align-content: start; }
.home-section-head {
  align-items: end;
}
.home-browse-grid {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.home-browse-link {
  display: grid;
  gap: 0.2rem;
  min-height: 100px;
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #fff, #eef4fc);
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.home-browse-link strong {
  font-size: 1.08rem;
}
.home-browse-link span {
  color: var(--muted);
}
.home-rail-group {
  display: grid;
  gap: var(--space-3);
}
.home-rail-card {
  display: grid;
  gap: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}
.home-rail-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  align-items: flex-start;
  flex-wrap: wrap;
}
.home-rail-title {
  display: grid;
  gap: 0.25rem;
}
.home-rail-title h2 {
  margin-bottom: 0;
}
.home-rail-title small {
  color: var(--muted);
}
.home-rail-head a {
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.home-rail-summary {
  margin: 0;
  color: var(--muted);
}
.home-budget-grid,
.home-trade-grid {
  display: grid;
  gap: var(--space-4);
  align-items: start;
}
.home-insight-grid {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.home-insight-card {
  display: grid;
  gap: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
}
.home-insight-card strong {
  font-size: 1.05rem;
}
.home-insight-card p {
  margin: 0;
}
.home-budget-card {
  display: grid;
  gap: var(--space-3);
}
.home-budget-summary {
  display: grid;
  gap: 0.35rem;
}
.home-budget-summary h3 {
  margin-bottom: 0;
}
.home-budget-payment {
  color: var(--primary);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
}
.home-budget-note {
  margin: 0;
  color: var(--muted);
}
.home-budget-form,
.home-trade-form {
  display: grid;
  gap: var(--space-2);
}
.home-budget-field {
  display: grid;
  gap: 0.35rem;
}
.home-budget-field span {
  font-size: var(--font-size-1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #1f3048;
}
.home-budget-field input,
.home-budget-field select {
  width: 100%;
  min-height: var(--tap);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.7rem;
  background: #fff;
  font: inherit;
  color: var(--text);
}
.home-trade-card {
  display: grid;
  gap: var(--space-3);
}
.home-trade-card .button {
  justify-content: center;
}
.home-trade-card .privacy-note {
  margin: 0;
}
.home-research-grid {
  display: grid;
  gap: var(--space-3);
}
.home-research-card {
  display: grid;
  gap: 0.45rem;
}
.home-research-card h3 {
  margin-bottom: 0;
}
.tap-group {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.tap-group-label {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  align-items: baseline;
}
.tap-group-label span {
  color: var(--muted);
  font-size: var(--font-size-1);
}
.tap-options-grid {
  display: grid;
  gap: var(--space-2);
}
.tap-option {
  min-height: 92px;
  border: 1px solid #bfd0e8;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #fff, #edf4fd);
  padding: 0.9rem;
  text-align: left;
  display: grid;
  gap: 0.4rem;
  align-content: start;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}
.tap-option:hover,
.tap-option:focus-visible {
  transform: translateY(-1px);
  border-color: #8eb6eb;
  box-shadow: var(--shadow-sm);
}
.tap-option.is-active {
  border-color: #0059c6;
  background: linear-gradient(180deg, #0e61ca, #0a4fa2);
  color: #fff;
}
.tap-option.is-active small,
.tap-option.is-active strong {
  color: #fff;
}
.tap-option-icon {
  width: 42px;
  height: 26px;
  border-radius: 999px;
  background: rgba(0, 89, 198, 0.12);
  position: relative;
}
.tap-option.is-active .tap-option-icon { background: rgba(255, 255, 255, 0.16); }
.tap-option-icon::before,
.tap-option-icon::after {
  content: "";
  position: absolute;
  background: currentColor;
  opacity: 0.92;
}
.icon-commute::before { left: 8px; right: 8px; bottom: 7px; height: 9px; border-radius: 10px 10px 6px 6px; }
.icon-commute::after { width: 10px; height: 10px; border-radius: 50%; bottom: 2px; left: 10px; box-shadow: 14px 0 0 currentColor; }
.icon-family::before { left: 6px; right: 6px; top: 6px; bottom: 6px; border-radius: 14px; }
.icon-family::after { width: 10px; height: 10px; border-radius: 50%; bottom: 2px; left: 8px; box-shadow: 16px 0 0 currentColor; }
.icon-work::before { left: 6px; width: 16px; bottom: 8px; top: 8px; border-radius: 4px; }
.icon-work::after { right: 6px; width: 10px; bottom: 8px; top: 12px; border-radius: 3px; box-shadow: -16px 10px 0 -2px currentColor, -1px 10px 0 -2px currentColor; }
.icon-suv::before { left: 6px; right: 6px; bottom: 8px; height: 10px; border-radius: 8px 10px 6px 6px; }
.icon-suv::after { width: 9px; height: 9px; border-radius: 50%; bottom: 2px; left: 8px; box-shadow: 17px 0 0 currentColor; }
.icon-sedan::before { left: 7px; right: 7px; bottom: 8px; height: 8px; border-radius: 10px 10px 5px 5px; }
.icon-sedan::after { width: 9px; height: 9px; border-radius: 50%; bottom: 2px; left: 8px; box-shadow: 17px 0 0 currentColor; }
.icon-pickup::before { left: 6px; width: 15px; bottom: 8px; top: 10px; border-radius: 4px; }
.icon-pickup::after { right: 6px; width: 12px; bottom: 8px; top: 13px; border-radius: 2px; box-shadow: -16px 10px 0 -2px currentColor, 0 10px 0 -2px currentColor; }
.icon-coupe::before { left: 8px; right: 8px; bottom: 8px; height: 8px; border-radius: 8px 12px 4px 4px; }
.icon-coupe::after { width: 9px; height: 9px; border-radius: 50%; bottom: 2px; left: 9px; box-shadow: 15px 0 0 currentColor; }
.icon-budget::before { left: 7px; right: 7px; top: 6px; bottom: 6px; border-radius: 7px; }
.icon-budget::after { left: 12px; right: 12px; top: 12px; height: 2px; border-radius: 999px; background: rgba(255, 255, 255, 0.85); }
.tap-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}
.results-preview-header {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.results-preview-actions {
  display: grid;
  gap: var(--space-2);
  align-content: start;
}
.home-preview-results {
  margin-bottom: var(--space-3);
}
.anonymous-shortlist {
  display: grid;
  gap: var(--space-2);
}
.anonymous-shortlist-header {
  display: grid;
  gap: 0.15rem;
}
.shortlist-list {
  margin: 0;
}
.field-grid {
  display: grid;
  gap: var(--space-2);
}
.field-grid label {
  display: grid;
  gap: 0.3rem;
  font-weight: 700;
  color: #1f3048;
  text-transform: uppercase;
  font-size: var(--font-size-1);
}
.custom-select { position: relative; }
.custom-select-trigger {
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 1rem;
  color: #10223a;
  line-height: 1.2;
  min-height: var(--tap);
  border: 1px solid #c7d4e8;
  border-radius: var(--radius-sm);
  background: #dfe7f5;
  padding: 0 2.2rem 0 0.8rem;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, #253a59 50%),
    linear-gradient(135deg, #253a59 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 2px),
    calc(100% - 11px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.custom-select-menu {
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #b8c8df;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  z-index: 1200;
  overflow: hidden;
}
.custom-select-menu button {
  width: 100%;
  border: 0;
  background: #fff;
  color: #10223a;
  min-height: 40px;
  text-align: left;
  padding: 0 0.8rem;
  font: inherit;
  cursor: pointer;
}
.custom-select-menu button:hover,
.custom-select-menu button:focus-visible {
  background: #e7effa;
}
.search-button { width: 100%; justify-content: center; margin-top: var(--space-3); }
.image-card { padding: 0; overflow: hidden; }
.image-card img { width: 100%; height: 210px; object-fit: cover; display: block; }
.card-content { padding: var(--space-3); }
.inventory-card {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 0.9rem;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.inventory-card:hover {
  transform: translateY(-2px);
  border-color: rgba(11, 44, 117, 0.35);
  box-shadow: 0 12px 26px rgba(19, 42, 76, 0.14);
}
.inventory-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.inventory-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  min-height: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.95), rgba(238, 241, 244, 0.92) 38%, rgba(222, 226, 233, 0.94) 100%);
  border-bottom: 1px solid rgba(200, 209, 223, 0.8);
  overflow: hidden;
}
.inventory-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #f4f5f7;
}
.inventory-card-fallback {
  position: relative;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.9), rgba(241, 243, 246, 0.95) 60%, rgba(228, 232, 238, 0.98));
}
.inventory-card-fallback-label {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  max-width: calc(100% - 0.9rem);
  padding: 0.25rem 0.4rem;
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.85);
  color: #405371;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}
.inventory-card-fallback .inventory-card-fallback-car {
  object-fit: cover;
  object-position: center;
  background: transparent;
}
.inventory-card-score,
.inventory-card-certified {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.9rem;
  box-shadow: 0 8px 22px rgba(4, 24, 55, 0.14);
}
.inventory-card-score {
  top: auto;
  right: 0.55rem;
  bottom: 0.55rem;
  min-width: 56px;
  padding: 0.34rem 0.42rem;
  border-radius: 0.7rem;
  align-items: center;
  color: #fff;
  text-align: center;
}
.inventory-card-score strong {
  font-size: 1rem;
  line-height: 1;
}
.inventory-card-score span {
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.inventory-card-score.is-positive { background: linear-gradient(180deg, #14835e, #0e6a4d); }
.inventory-card-score.is-neutral { background: linear-gradient(180deg, #0a3c90, #092f70); }
.inventory-card-score.is-caution { background: linear-gradient(180deg, #b14f00, #8a3d00); }
.inventory-card-certified {
  left: 0.55rem;
  bottom: 0.55rem;
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.96);
  color: #0b2c75;
  font-weight: 800;
  font-size: 0.7rem;
}
.inventory-card-certified-icon {
  width: 1.2rem;
  height: 1.2rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #0b2c75;
  color: #fff;
  font-size: 0.8rem;
  line-height: 1;
}
.inventory-card-content {
  display: grid;
  gap: 0.4rem;
  padding: 0.6rem;
}
.inventory-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  justify-content: space-between;
}
.inventory-card-titlewrap {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}
.inventory-card-titlewrap h3 {
  margin: 0;
  color: #12213a;
  font-size: clamp(1.05rem, 4.6vw, 1.45rem);
  line-height: 1.06;
  font-weight: 800;
}
.inventory-card-favorite {
  min-width: 2rem;
  min-height: 2rem;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: #7a7f88;
  font-size: 1.55rem;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  margin-top: 0.1rem;
}
.inventory-card-favorite:hover,
.inventory-card-favorite:focus-visible {
  color: #0b2c75;
  background: rgba(11, 44, 117, 0.08);
}
.inventory-card-footer {
  display: block;
}
.inventory-card-pricing {
  min-width: 0;
}
.inventory-card-price {
  color: #0b2c75;
  font-size: clamp(1.2rem, 5vw, 1.7rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.inventory-card-stars {
  display: inline-flex;
  gap: 0.08rem;
  line-height: 1;
}
.inventory-card-star {
  color: #f2b51f;
  font-size: 0.92rem;
}
.inventory-card-star.is-empty {
  color: #e1e5ea;
}
.inventory-card-star.is-half {
  color: #f2b51f;
  opacity: 0.72;
}
.inventory-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.listing-detail-page[hidden] {
  display: none;
}
.listing-detail-shell {
  display: grid;
  gap: var(--space-4);
}
.listing-detail-loading {
  text-align: center;
  display: grid;
  gap: var(--space-2);
}
.listing-detail-hero,
.listing-detail-analysis,
.listing-detail-specs,
.listing-detail-dealer {
  overflow: hidden;
}
.listing-detail-hero {
  padding: 0;
}
.listing-detail-gallery {
  display: grid;
  gap: var(--space-2);
}
.listing-detail-gallery-media {
  position: relative;
  background: radial-gradient(circle at top, #eef3fb, #d9e2ef 70%, #c8d6ea);
  min-height: clamp(280px, 52vw, 520px);
  overflow: hidden;
}
.listing-detail-gallery-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.listing-detail-gallery-fallback {
  min-height: inherit;
  display: grid;
  place-items: center;
  color: #607086;
  font-weight: 700;
  text-align: center;
  padding: var(--space-5);
}
.listing-detail-gallery-fallback > div {
  display: grid;
  gap: var(--space-3);
  justify-items: center;
}
.listing-detail-gallery-fallback strong {
  color: #30435f;
  font-size: 1.05rem;
}
.listing-detail-reference-link {
  text-decoration: none;
}
.listing-detail-gallery-fallback small {
  max-width: 22rem;
  font-weight: 500;
  line-height: 1.45;
}
.listing-detail-gallery-counter {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  background: rgba(8, 28, 65, 0.84);
  color: #fff;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: 0 10px 24px rgba(2, 12, 30, 0.22);
}
.listing-detail-gallery-controls {
  display: flex;
  gap: var(--space-2);
  padding: 0 var(--space-4) var(--space-4);
}
.listing-detail-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: start;
  padding: 0 var(--space-4) var(--space-4);
}
.listing-detail-summary-copy {
  min-width: 0;
}
.listing-detail-kicker {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #697282;
  font-weight: 800;
  font-size: 0.82rem;
}
.listing-detail-summary h1 {
  margin: 0;
  color: #12213a;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.03;
  font-weight: 900;
}
.listing-detail-subtitle {
  margin: 0.55rem 0 0;
  color: #586170;
  font-size: 1.04rem;
}
.listing-detail-pricebox {
  display: grid;
  justify-items: end;
  gap: 0.45rem;
}
.listing-detail-price {
  color: #0b2c75;
  font-size: clamp(2.1rem, 6vw, 3.2rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
}
.listing-detail-dealbadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.85rem;
  border-radius: 0.7rem;
  font-size: 0.85rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(180deg, #0a3c90, #092f70);
}
.listing-detail-dealbadge.is-positive { background: linear-gradient(180deg, #14835e, #0e6a4d); }
.listing-detail-dealbadge.is-caution { background: linear-gradient(180deg, #b14f00, #8a3d00); }
.listing-detail-section-head {
  display: grid;
  gap: 0.2rem;
  margin-bottom: var(--space-3);
}
.listing-detail-section-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  line-height: 1.1;
}
.listing-detail-analysis {
  background: #dce9fb;
  border-color: #c0d4ef;
}
.listing-detail-analysis-grid {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.listing-detail-analysis-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #cfd9ea;
  border-radius: var(--radius-md);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
}
.listing-detail-analysis-card span {
  display: block;
  color: #56616f;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.listing-detail-analysis-card strong {
  display: block;
  margin-top: 0.35rem;
  color: #0b2c75;
  font-size: 1.35rem;
  line-height: 1.1;
}
.listing-detail-analysis-card small {
  display: block;
  margin-top: 0.25rem;
  color: #24784f;
  font-weight: 700;
}
.listing-detail-analysis-copy {
  margin: var(--space-3) 0 0;
  color: #334155;
  font-size: 1.02rem;
}
.listing-detail-spec-grid {
  display: grid;
  gap: 0;
  border-top: 1px solid #e4e9f1;
}
.listing-detail-spec-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2);
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid #e4e9f1;
}
.listing-detail-spec-row span {
  color: #5d6775;
}
.listing-detail-spec-row strong {
  color: #12213a;
  text-align: right;
}
.listing-detail-dealer-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
}
.listing-detail-dealer-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(180deg, #0d3b8d, #0b2c75);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  font-size: 1.3rem;
}
.listing-detail-dealer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.listing-detail-dealer-copy h2 {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}
.listing-detail-dealer-copy p {
  margin: 0.2rem 0 0;
  color: #56616f;
}
.listing-detail-dealer-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.45rem;
}
.listing-detail-dealer-badge {
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  background: #eef4fb;
  color: #0b2c75;
  font-weight: 800;
}
.listing-detail-dealer-actions,
.listing-detail-primary-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.listing-detail-primary-action {
  background: linear-gradient(180deg, #10815b, #0d694c);
  color: #fff;
  border-color: transparent;
}
.listing-detail-primary-action:hover,
.listing-detail-primary-action:focus-visible {
  background: linear-gradient(180deg, #0e6d4e, #0b5a40);
  color: #fff;
}
.kpi-panel article { text-align: center; }
.kpi-panel strong {
  display: block;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: #001f6b;
  line-height: 1.1;
}
.kpi-panel span { text-transform: uppercase; font-size: var(--font-size-1); letter-spacing: 0.04em; color: #1b2b4a; }
.app-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #f4f7fc;
  border-top: 1px solid #cad5e7;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  z-index: 1100;
}
.app-bottom-nav a {
  min-height: 58px;
  display: grid;
  place-items: center;
  text-decoration: none;
  color: #243753;
  font-weight: 600;
}
.app-bottom-nav a[aria-current="page"] { color: #001f6b; border-top: 3px solid #001f6b; }

.inventory-form, .inline-form {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.inventory-search-intro { padding: 1.25rem 0 1rem; background: #fff; }
.inventory-search-intro h1 { margin-bottom: 0.85rem; font-size: clamp(1.65rem, 3vw, 2.4rem); }
.inventory-keyword-form {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}
.inventory-keyword-form input {
  min-width: 0;
  flex: 1;
  min-height: var(--tap);
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font: inherit;
}
.inventory-active-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.7rem;
}
.inventory-active-search[hidden], .inventory-filter-panel[hidden] { display: none; }
.inventory-active-search .search-summary-chips { margin: 0; gap: 0.4rem; }
.inventory-active-search .badge { border: 1px solid var(--border); background: #fff; font-size: 0.78rem; }
.inventory-clear-search { border: 0; background: transparent; color: var(--primary); font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; padding: 0.3rem; }
.inventory-body-style-rail {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  padding: 0.85rem 0 0.35rem;
}
.inventory-body-style-tile {
  flex: 0 0 112.5px;
  min-height: 90px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.15rem;
  padding: 0.3375rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  scroll-snap-align: start;
  overflow: hidden;
}
.inventory-body-style-tile img {
  display: block;
  width: 103.5px;
  height: 52.5px;
  object-fit: cover;
  object-position: center;
  /* Uniform scaling preserves the original square PNG proportions. */
  transform: none;
}
.inventory-body-style-tile:hover { border-color: var(--primary); }
.inventory-body-style-tile[aria-pressed="true"] { border: 2px solid var(--primary); background: #eef5ff; color: var(--primary); }
.inventory-browse-section { padding-top: 1.2rem; }
.inventory-results-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 0.8rem; }
.inventory-results-toolbar h2 { margin-bottom: 0.1rem; font-size: clamp(1.35rem, 2.5vw, 2rem); }
.inventory-results-toolbar .status-message { margin: 0; color: var(--muted); }
.inventory-filter-toggle { white-space: nowrap; }
.inventory-filter-panel {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
}
.inventory-form label,
.inline-form label,
.account-grid label {
  display: grid;
  gap: 0.35rem;
}
.inventory-form input,
.inventory-form select,
.inline-form input,
.account-grid input,
.account-grid textarea {
  width: 100%;
  min-height: var(--tap);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.7rem;
  background: #fff;
}
.status-message { font-size: var(--font-size-1); margin: 0 0 var(--space-3); }
.inventory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.inventory-pagination {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.inventory-sentinel {
  width: 100%;
  height: 1px;
}
.inventory-load-more {
  min-width: min(100%, 320px);
}
.account-grid { display: grid; gap: var(--space-3); }
.simple-list { margin: 0; padding-left: 1rem; display: grid; gap: 0.5rem; }

@media (min-width: 720px) {
  .hero-grid { grid-template-columns: 1.2fr 0.8fr; align-items: center; }
  .card-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .inventory-results.card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .badge-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stepper { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 2fr 1fr; }
  .field-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi-panel { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .inventory-form { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
  .inventory-form .inventory-actions { grid-column: 1 / -1; }
  .inline-form { grid-template-columns: 1fr 1fr auto; }
  .account-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tap-search-shell { grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr); align-items: start; }
  .hero-benefits { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tap-options-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tap-options-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .results-preview-header { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .home-browse-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-budget-grid,
  .home-trade-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
  .home-insight-grid,
  .home-research-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 980px) {
  .nav-shell {
    display: flex;
    gap: var(--space-4);
    align-items: center;
  }
  .menu-toggle { display: none; }
  .brand { justify-self: start; flex: 0 0 auto; }
  .site-nav { display: flex; gap: var(--space-3); align-items: center; position: static; flex: 0 0 auto; }
  .site-nav ul { display: flex; gap: var(--space-1); align-items: center; flex: 0 0 auto; }
  .site-nav.is-open { all: unset; display: flex; gap: var(--space-3); align-items: center; }
  .brand-logo { width: 136px; }
  .header-account {
    margin-left: auto;
  }
  .app-bottom-nav { display: none; }
  .home-browse-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
  .inventory-results.card-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .inventory-card-content { padding: 0.75rem; }
  .inventory-card-titlewrap h3 { font-size: 1.35rem; }
  .inventory-card-price { font-size: 1.6rem; }
}

.search-topic-page { max-width: 980px; }
.search-topic-page h1 { max-width: 800px; }
.search-topic-page .lead { max-width: 760px; }
.search-breadcrumb { color: #526278; font-size: 0.9rem; margin-bottom: 1.5rem; }
.search-breadcrumb a { color: #0b3a83; }
.search-topic-note { max-width: 720px; color: #526278; font-size: 0.92rem; margin-top: 1rem; }
.search-topic-advice { max-width: 760px; margin: 2rem 0; padding: 1.5rem; border: 1px solid #ced9e8; border-radius: 1rem; background: #f5f8fc; }
.search-topic-advice h2 { margin-top: 0; }
.search-topic-section { margin: 2.5rem 0; }
.search-topic-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.search-topic-grid a { display: flex; align-items: center; min-height: 3.5rem; padding: 0.9rem 1rem; border: 1px solid #ced9e8; border-radius: 0.8rem; background: white; font-weight: 700; text-decoration: none; }
.search-topic-grid a:hover, .search-topic-grid a:focus-visible { border-color: #0b3a83; background: #f5f8fc; }

.inventory-statistics { margin: 0 0 1rem; padding: 1rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); }
.inventory-statistics[hidden] { display: none; }
.inventory-stats-header { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.inventory-stats-header h3 { font-size: 1.1rem; margin: 0 0 .2rem; }
.inventory-stats-header p, .stats-chart p { font-size: .78rem; color: var(--muted); margin: 0 0 .7rem; }
.inventory-stats-grid { display: grid; gap: 1rem; }
.stats-chart { min-width: 0; }
.stats-chart h4 { font-size: .95rem; margin: .4rem 0 .2rem; }
.stats-histogram { display: flex; gap: .25rem; align-items: stretch; }
.stats-histogram button { flex: 1; min-width: 0; padding: .2rem 0; border: 0; background: transparent; cursor: pointer; color: #193556; }
.stats-histogram strong { font-size: .7rem; }
.stats-histogram small { display: block; font-size: .61rem; line-height: 1.3; white-space: nowrap; }
.stats-bar-track { display: flex; align-items: end; height: 105px; margin: .2rem .1rem .35rem; border-bottom: 1px solid var(--border); }
.stats-bar-track span { width: 100%; background: #1764c0; border-radius: 4px 4px 0 0; min-height: 1px; }
.stats-histogram button:hover .stats-bar-track span { background: #0b9b86; }
.stats-histogram button:disabled { opacity: .35; cursor: default; }
.stats-pie-layout { display: flex; gap: .6rem; align-items: center; }
.stats-pie-layout svg { width: 120px; flex: 0 0 120px; overflow: visible; }
.stats-pie-layout svg [role=button] { cursor: pointer; stroke: #fff; stroke-width: 1; }
.stats-pie-layout svg [role=button]:hover { opacity: .75; }
.stats-legend { flex: 1; min-width: 0; max-height: 150px; overflow: auto; }
.stats-legend button { display: flex; gap: .3rem; align-items: center; width: 100%; border: 0; background: transparent; text-align: left; padding: .35rem .15rem; font-size: .72rem; cursor: pointer; }
.stats-legend button:hover { background: #edf3fa; }
.stats-legend strong { margin-left: auto; font-size: .7rem; }
.stats-legend small { color: #52627a; min-width: 1.4rem; text-align: right; }
.stats-dot { flex: 0 0 8px; height: 8px; border-radius: 50%; }
.stats-active { font-size: .8rem; color: #0b2c75; margin: .2rem 0 .7rem; }
.stats-price-presence { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .7rem; color: #52627a; font-size: .78rem; }
.stats-price-presence button { min-height: 34px; padding: .4rem .65rem; border: 1.5px solid #1764c0; border-radius: 8px; background: #f1f6ff; color: #0b3a83; font: inherit; font-weight: 700; box-shadow: 0 2px 3px rgba(23, 100, 192, .1); cursor: pointer; }
.stats-price-presence button:hover, .stats-price-presence button[aria-pressed=true] { background: #1764c0; color: #fff; }
.stats-price-presence button:disabled { opacity: .5; cursor: default; }
.stats-year-list { display: grid; gap: .15rem; max-height: 170px; overflow: auto; padding-right: .2rem; }
.stats-year-list button { display: grid; grid-template-columns: 3.3rem minmax(0, 1fr) 3rem; align-items: center; gap: .65rem; width: 100%; min-height: 32px; padding: .4rem .5rem; border: 1px solid #e8eef6; border-radius: 6px; background: #fff; color: #193556; font-size: .78rem; text-align: left; cursor: pointer; }
.stats-year-list button > span:first-child { font-weight: 700; }
.stats-year-list button:hover { background: #edf3fa; }
.stats-year-list strong { text-align: right; font-variant-numeric: tabular-nums; font-weight: 800; }
.stats-year-track { display: block; height: 9px; border-radius: 5px; overflow: hidden; background: #edf2f8; }
.stats-year-track span { display: block; height: 100%; background: #1764c0; border-radius: 5px; }
.inventory-statistics button:focus-visible, .inventory-statistics svg [role=button]:focus-visible { outline: 2px solid #1764c0; outline-offset: 2px; }
@media(min-width: 980px) { .inventory-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.inventory-card-recommendation {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 3px;
  color: #087b55;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px #142c3b33;
}
.inventory-card-recommendation svg { width: 100%; height: 100%; }
.stats-legend button > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.stats-legend strong, .stats-legend small, .stats-dot { flex-shrink: 0; }
