:root {
  --primary: #5435dc;
  --primary-dark: #3923a8;
  --primary-soft: #f1edff;
  --ink: #111827;
  --muted: #667085;
  --line: #e5e7eb;
  --surface: #f6f7f9;
  --white: #ffffff;
  --success: #12b76a;
  --shadow: 0 26px 70px rgba(45, 31, 104, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #fbfbfd;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 85% 4%, rgba(84, 53, 220, 0.12), transparent 29rem),
    #fbfbfd;
}

button, input, select { font: inherit; }

.site-header {
  width: min(1440px, calc(100% - 48px));
  min-height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand { display: inline-flex; align-items: center; }
.brand img { display: block; width: 118px; height: auto; }

.product-name {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.product-divider { width: 1px; height: 30px; background: #d7d9df; }

.api-state {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.74);
  color: #475467;
  font-size: .88rem;
  font-weight: 650;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(18, 183, 106, .12);
}

main { width: min(1440px, calc(100% - 48px)); margin: 0 auto; }

.hero {
  min-height: 440px;
  padding: 76px 0 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(380px, .8fr);
  align-items: end;
  gap: 72px;
}

.eyebrow, .step-label {
  margin: 0 0 16px;
  color: var(--primary);
  font-size: .78rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(3rem, 6.6vw, 6.6rem);
  line-height: .91;
  letter-spacing: -.072em;
  font-weight: 790;
}

.hero-description {
  max-width: 680px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.4vw, 1.24rem);
  line-height: 1.65;
}

.coverage-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid rgba(84, 53, 220, .15);
  border-radius: 28px;
  background: linear-gradient(145deg, #5d3fe0, #4026b2);
  color: var(--white);
  box-shadow: var(--shadow);
}

.coverage-card::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -90px;
  top: -100px;
  border-radius: 50%;
  background: rgba(255,255,255,.11);
}

.coverage-topline, .coverage-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.coverage-topline { font-weight: 720; }

.coverage-live {
  position: relative;
  z-index: 1;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(255,255,255,.09);
  font-size: .72rem;
  font-weight: 700;
}

.coverage-number { margin: 28px 0 18px; line-height: .8; }
.coverage-number strong { font-size: clamp(4.6rem, 8vw, 7.4rem); letter-spacing: -.07em; }
.coverage-number span { margin-left: 6px; font-size: 1.7rem; font-weight: 750; opacity: .82; }

.progress-track {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #fff;
  transition: width .6s ease;
}

.coverage-detail { margin-top: 18px; align-items: flex-start; }
.coverage-detail p { margin: 0; color: rgba(255,255,255,.72); font-size: .83rem; line-height: 1.45; }
.coverage-detail p:last-child { text-align: right; }
.coverage-detail strong { color: #fff; }

.finder, .results {
  margin-bottom: 36px;
  padding: clamp(24px, 3.4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 16px 45px rgba(16, 24, 40, .06);
}

.finder-heading, .results-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 36px;
}

h2 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.8rem); line-height: 1; letter-spacing: -.045em; }
.finder-heading > p { max-width: 500px; margin: 0; color: var(--muted); line-height: 1.55; }

.selector-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.field label {
  display: block;
  margin: 0 0 13px;
  font-size: 1rem;
  font-weight: 760;
}

.select2-container { width: 100% !important; }
.select2-container .select2-selection--single {
  height: 72px;
  border: 1px solid #dfe2e7;
  border-radius: 16px;
  background: var(--surface);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  height: 70px;
  padding: 0 52px 0 22px;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 70px;
  font-weight: 660;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #a3a7af;
  font-weight: 620;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  top: 50%;
  right: 18px;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
  width: 9px;
  height: 9px;
  margin: -6px 0 0 -5px;
  border: 0;
  border-right: 2px solid #7a7f88;
  border-bottom: 2px solid #7a7f88;
  transform: rotate(45deg);
  transition: transform .18s ease, margin .18s ease;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
  width: 9px;
  height: 9px;
  margin: -2px 0 0 -5px;
  border: 0;
  border-right: 2px solid #5435dc;
  border-bottom: 2px solid #5435dc;
  transform: rotate(225deg);
}

.select2-container--default .select2-selection--single .select2-selection__clear {
  display: none !important;
}

.select2-container--open .select2-selection--single {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(84, 53, 220, .1);
}

.select2-container--default.select2-container--disabled .select2-selection--single {
  border-color: #eceef1;
  background: #f8f8f9;
  opacity: .68;
}

.select2-dropdown {
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(16,24,40,.14);
}

.select2-search--dropdown { padding: 10px; }
.select2-container--default .select2-search--dropdown .select2-search__field {
  padding: 11px 12px;
  border: 1px solid #d9dce2;
  border-radius: 9px;
  outline: none;
}
.select2-results__option { padding: 11px 14px; font-size: .95rem; }
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background: var(--primary); }

.flow-status {
  min-height: 52px;
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: .93rem;
}

.flow-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
}
.flow-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.flow-status.is-loading .flow-icon { animation: pulse 1s ease infinite alternate; }
.flow-status.is-error { color: #b42318; }
.flow-status.is-error .flow-icon { background: #fee4e2; color: #b42318; }

.results[hidden] { display: none; }
.results { animation: reveal .35s ease both; }
.results-heading { margin-bottom: 28px; }
.results-heading .step-label { margin-bottom: 12px; }
.results-heading p:not(.step-label) { margin: 12px 0 0; color: var(--muted); }
.result-count { padding: 9px 13px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-size: .84rem; font-weight: 750; }

.tire-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tire-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}
.tire-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--primary); }
.tire-card .axle { display: inline-flex; padding: 6px 9px; border-radius: 999px; background: #f2f4f7; color: #475467; font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.tire-card h3 { margin: 20px 0 12px; font-size: clamp(1.55rem, 2.3vw, 2.15rem); letter-spacing: -.045em; }
.tire-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: .87rem; }
.tire-meta strong { color: #344054; }
.result-note { margin: 24px 0 0; color: #7a818d; font-size: .83rem; line-height: 1.55; }

footer {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 44px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #8a909a;
  font-size: .82rem;
}
footer p { margin: 0; }

@keyframes reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pulse { from { opacity: .45; transform: scale(.92); } to { opacity: 1; transform: scale(1.06); } }

@media (max-width: 1060px) {
  .hero { grid-template-columns: 1fr; gap: 42px; padding-top: 54px; }
  .coverage-card { max-width: 660px; }
  .selector-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tire-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .site-header, main, footer { width: min(100% - 28px, 1440px); }
  .site-header { min-height: 78px; gap: 12px; }
  .brand img { width: 94px; }
  .product-divider { height: 24px; }
  .product-name { gap: 12px; font-size: .9rem; }
  .api-state { width: 10px; height: 10px; margin-left: auto; padding: 0; border: 0; background: transparent; font-size: 0; }
  .status-dot { width: 10px; height: 10px; }
  .hero { min-height: auto; padding: 56px 0 42px; }
  h1 { font-size: clamp(3.2rem, 16vw, 5rem); }
  .coverage-card { padding: 22px; border-radius: 22px; }
  .coverage-live { font-size: .65rem; }
  .coverage-detail { display: grid; }
  .coverage-detail p:last-child { text-align: left; }
  .finder, .results { padding: 24px 18px; border-radius: 22px; }
  .finder-heading, .results-heading { display: grid; gap: 18px; align-items: start; }
  .selector-grid, .tire-grid { grid-template-columns: 1fr; }
  .select2-container .select2-selection--single { height: 66px; }
  .select2-container--default .select2-selection--single .select2-selection__rendered { height: 64px; line-height: 64px; }
  footer { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
