:root {
  color-scheme: light;
  --ink: #121212;
  --muted: rgba(18, 18, 18, 0.75);
  --line: rgba(18, 18, 18, 0.12);
  --border: rgba(18, 18, 18, 0.12);
  --surface: #ffffff;
  --canvas: #ffffff;
  --accent: #121212;
  --accent-dark: #000000;
  --accent-soft: #f3f3f3;
  --warning: #8a5a12;
  --warning-soft: #fff6df;
  --danger: #9b2f32;
  --danger-soft: #fff0f0;
  --shadow: none;
  --radius: 0;
  font-family: Assistant, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.04em;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--canvas);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--muted);
  font-weight: 400;
  line-height: 1.8;
}

html.is-embedded,
html.is-embedded body {
  min-height: 0;
  height: auto;
  overflow: hidden;
}

html.is-embedded .finder-shell {
  margin-bottom: 8px;
}

html.is-embedded .finder-panel {
  min-height: 0;
}

button,
select {
  color: inherit;
  font: inherit;
}

button,
a,
select {
  touch-action: manipulation;
}

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

.finder-shell {
  width: min(100% - 32px, 1100px);
  margin: 8px auto 0;
}

.progress {
  margin: 0 auto 6px;
  overflow: hidden;
}

.progress ol {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.progress ol::-webkit-scrollbar {
  display: none;
}

.progress li {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  color: rgba(18, 18, 18, 0.45);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1;
  white-space: nowrap;
}

.progress li:not(:last-child)::after {
  content: "›";
  color: rgba(18, 18, 18, 0.28);
  font-size: 0.95rem;
}

.progress li.is-active,
.progress li.is-complete {
  color: var(--ink);
}

.step-dot {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  font-size: 0.62rem;
  line-height: 1;
}

.is-active .step-dot {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.is-complete .step-dot {
  border-color: var(--ink);
  background: var(--accent-soft);
  color: var(--ink);
}

.finder-panel {
  min-height: 480px;
  padding: 8px 0 48px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.back-button:hover {
  color: var(--ink);
}

.step {
  animation: step-in 180ms ease-out;
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  max-width: 700px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.lead {
  max-width: 620px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 26px;
}

.card-grid.motor-grid {
  grid-template-columns: 1fr;
}

.question-visual {
  display: flex;
  justify-content: center;
  margin: 24px 0;
}

.question-visual img {
  display: block;
  width: min(100%, 520px);
  height: auto;
  border: 1px solid var(--border);
  border-radius: 0;
  background: white;
}

.choice-card {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 88px;
  align-items: center;
  gap: 15px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color 130ms ease;
}

.choice-card:hover {
  border-color: var(--ink);
  box-shadow: none;
  transform: none;
}

.choice-card:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.back-button:focus-visible,
select:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.choice-card.is-selected {
  border-color: var(--ink);
  background: var(--surface);
  box-shadow: none;
}

.choice-card.is-featured {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 12px 15px;
}

.choice-card.is-featured > img {
  grid-column: 1;
  grid-row: 2;
}

.choice-card.is-featured .choice-copy {
  display: contents;
}

.choice-card.is-featured .choice-copy strong {
  grid-column: 1 / 3;
  grid-row: 1;
}

.choice-card.is-featured .choice-copy small {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  margin-top: 0;
}

.choice-card.is-featured .choice-arrow {
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
}

.choice-icon {
  display: grid;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.choice-card img {
  width: 92px;
  height: 72px;
  flex: 0 0 92px;
  border-radius: 0;
  background: #f3f3f3;
  cursor: zoom-in;
  object-fit: cover;
}

.choice-card.image-small-contain img {
  background: white;
  object-fit: contain;
}

.choice-card.image-contain img {
  width: 120px;
  height: 120px;
  flex-basis: 120px;
  background: white;
  object-fit: contain;
}

.choice-card.image-contain:not(.is-featured) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
}

.choice-card.image-contain:not(.is-featured) .choice-copy {
  grid-column: 1;
  grid-row: 1;
}

.choice-card.image-contain:not(.is-featured) img {
  grid-column: 1 / 3;
  grid-row: 2;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-width: 0;
  min-height: 0;
  flex: none;
  margin-top: 12px;
}

.choice-card.image-contain.image-medium:not(.is-featured) img {
  width: min(100%, 260px);
  justify-self: start;
}

.choice-card.no-image-zoom img {
  cursor: pointer;
}

.choice-card.image-contain:not(.is-featured) .choice-arrow {
  grid-column: 2;
  grid-row: 1;
}

.choice-card.image-contain.hide-label:not(.is-featured) img {
  grid-row: 1;
  margin-top: 0;
}

.choice-card.image-contain.hide-label:not(.is-featured) .choice-arrow {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.choice-card.logo-card {
  min-height: 72px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.choice-card.logo-card.image-contain:not(.is-featured) {
  display: flex;
  align-items: center;
  justify-content: center;
}

.choice-card.logo-card .choice-copy {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.choice-card.logo-card.image-contain.hide-label:not(.is-featured) img {
  width: min(200px, 70%);
  max-height: 44px;
  margin: 0;
  flex: none;
}

.choice-copy {
  min-width: 0;
}

.choice-copy strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
}

.choice-copy small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
  white-space: pre-line;
}

.choice-arrow {
  margin-left: auto;
  color: rgba(18, 18, 18, 0.4);
  font-size: 1.35rem;
}

.inline-notice {
  display: flex;
  gap: 11px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.inline-notice.warning {
  background: var(--warning-soft);
  color: #70470e;
}

.inline-notice.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.result-card {
  display: grid;
  gap: 24px;
  margin-top: 22px;
}

.result-visual {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #f3f3f3;
}

.result-visual img {
  display: block;
  width: min(100%, 340px);
  max-height: 250px;
  cursor: zoom-in;
  object-fit: contain;
  filter: none;
}

.result-visual a {
  display: grid;
  place-items: center;
}

.result-visual a img {
  cursor: pointer;
}

.image-dialog {
  width: min(94vw, 980px);
  max-width: none;
  max-height: 92vh;
  margin: auto;
  padding: 44px 18px 18px;
  overflow: auto;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: white;
  box-shadow: none;
}

.image-dialog::backdrop {
  background: rgba(18, 18, 18, 0.72);
  backdrop-filter: none;
}

.image-dialog img {
  display: block;
  width: 100%;
  max-height: calc(92vh - 100px);
  border-radius: 0;
  object-fit: contain;
}

.image-dialog p {
  margin: 12px 4px 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.image-dialog-close {
  position: absolute;
  top: 8px;
  right: 9px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 12px;
  padding: 8px 12px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: white;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status.incompatible {
  background: white;
  color: var(--danger);
  border-color: var(--danger);
}

.result-copy h1 {
  font-size: clamp(1.65rem, 6vw, 2.4rem);
  font-weight: 400;
}

.result-copy p {
  color: var(--muted);
  line-height: 1.6;
}

.warning-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.warning-list li {
  position: relative;
  margin-top: 9px;
  padding-left: 24px;
  color: var(--warning);
  font-size: 0.9rem;
  line-height: 1.45;
}

.warning-list li::before {
  position: absolute;
  left: 0;
  content: "!";
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 900;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 30px;
  border-radius: 0;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: white;
}

.primary-button:hover {
  background: #000;
}

.secondary-button {
  border: 1px solid var(--ink);
  background: white;
  color: var(--ink);
}

.secondary-button:hover {
  background: #f3f3f3;
}

@media (min-width: 620px) {
  .finder-shell {
    margin-top: 10px;
  }

  .progress li {
    font-size: 0.74rem;
  }

  .finder-panel {
    min-height: 520px;
    padding: 10px 0 64px;
    border-radius: 0;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 32px;
  }

  .card-grid.motor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .motor-grid .choice-card.image-contain:not(.is-featured):not(.image-medium) img {
    width: 100%;
    max-width: 100%;
    height: 200px;
    object-fit: contain;
  }

  .choice-card {
    min-height: 105px;
    padding: 19px;
  }

  .actions {
    flex-direction: row;
  }

  .primary-button,
  .secondary-button {
    min-width: 170px;
  }
}

@media (min-width: 820px) {
  .result-card {
    grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
    align-items: center;
    gap: 42px;
  }
}

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