/* "Why Spotlight Autos" step-by-step explainer (/why-spotlight-autos). Dark tokens only (tokens.css);
   buttons/kicker/chips come from public.css. Layout: header, a 6-step progress rail, one slide
   (copy left, illustration right), back/next. Below 1000px the slide stacks; below 560px the rail
   keeps just the step numbers. The illustrations are decorative markup (aria-hidden), not images. */

.why {
    max-width: 1180px;
    margin: 0 auto;
    padding: 48px 24px 88px;
    box-sizing: border-box;
    outline: none;
}

.why__head {
    max-width: 760px;
    margin-bottom: 32px;
}

.why__head h1 {
    margin: 8px 0 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.7rem, 3.6vw, 2.5rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

/* ---------- progress rail ---------- */

.why-rail {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0 8px;
    margin-bottom: 24px;
}

.why-rail__group {
    padding-bottom: 8px;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--sa-line);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sa-ink-3);
}

.why-rail__group--what { grid-column: 1 / span 2; }
.why-rail__group--how { grid-column: 3 / span 4; }

.why-rail__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    background: none;
    border: 0;
    border-radius: var(--sa-radius-md);
    color: var(--sa-ink-3);
    font: inherit;
    cursor: pointer;
    transition: color 0.15s ease;
}

.why-rail__step:hover { color: var(--sa-ink); }
.why-rail__step:focus-visible { outline: 2px solid var(--sa-primary); outline-offset: 2px; }

.why-rail__n {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--sa-line);
    background: var(--sa-surface);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.why-rail__label {
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.why-rail__step.is-done .why-rail__n {
    background: var(--sa-primary-soft);
    border-color: var(--sa-primary);
    color: var(--sa-primary-ink);
}

.why-rail__step.is-current { color: var(--sa-ink); }

.why-rail__step.is-current .why-rail__n {
    background: var(--sa-amber);
    border-color: var(--sa-amber);
    color: var(--sa-on-amber);
}

/* ---------- slide ---------- */

.why-slide {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 40px;
    align-items: center;
    padding: 40px;
    background: var(--sa-surface);
    border: 1px solid var(--sa-line);
    border-radius: var(--sa-radius-xl);
    box-shadow: var(--sa-shadow);
    animation: why-slide-in 0.28s ease both;
}

@keyframes why-slide-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

.why-slide__phase {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sa-primary);
}

.why-slide__phase span { color: var(--sa-ink-3); margin-left: 6px; }

.why-slide__copy h2 {
    margin: 10px 0 14px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.5rem, 2.8vw, 2.1rem);
    line-height: 1.18;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.why-slide__lead {
    margin: 0 0 22px;
    color: var(--sa-ink-2);
    font-size: 1.08rem;
    line-height: 1.55;
    max-width: 56ch;
}

.why-slide__points {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.why-slide__points li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    line-height: 1.45;
    max-width: 56ch;
}

.why-slide__points .mud-icon-root {
    flex: none;
    margin-top: 2px;
    color: var(--sa-ok-ink);
}

.why-slide__visual {
    display: grid;
    place-items: center;
    min-width: 0;
    padding: 28px;
    border-radius: var(--sa-radius-lg);
    background: radial-gradient(ellipse at 30% 20%, var(--sa-surface-2), var(--sa-bg) 75%);
    border: 1px solid var(--sa-line-soft);
}

/* ---------- illustrations ---------- */

.why-mock {
    width: 100%;
    max-width: 420px;
    box-sizing: border-box;
    background: var(--sa-surface);
    border: 1px solid var(--sa-line);
    border-radius: var(--sa-radius-lg);
    box-shadow: var(--sa-shadow);
    padding: 16px;
}

.why-mock__note {
    margin: 12px 0 0;
    font-size: 0.75rem;
    color: var(--sa-ink-3);
}

.why-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--sa-surface-2);
    color: var(--sa-ink-2);
    font-size: 0.75rem;
    font-weight: 600;
}

.why-pill .mud-icon-root { font-size: 1rem; }
.why-pill--ok { background: var(--sa-ok-bg); color: var(--sa-ok-ink); }

/* listing card */
.why-mock--listing { padding: 0; overflow: hidden; }

.why-mock__photo {
    position: relative;
    display: grid;
    place-items: center;
    height: 150px;
    background: linear-gradient(135deg, var(--sa-img-a), var(--sa-img-b));
    color: var(--sa-img-ink);
}

.why-mock__car { width: 62%; }

.why-mock__photo .home-chip { position: absolute; top: 12px; left: 12px; }

.why-mock__body { padding: 14px 16px 16px; }
.why-mock__title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.why-mock__meta { margin: 4px 0 12px; font-size: 0.85rem; color: var(--sa-ink-3); }
.why-mock__row { display: flex; flex-wrap: wrap; gap: 8px; }

/* auction vs spotlight comparison */
.why-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; }

.why-compare__col {
    display: grid;
    gap: 8px;
    align-content: start;
    padding: 10px;
    border-radius: var(--sa-radius-md);
    background: var(--sa-bg);
}

.why-compare__col--us { background: var(--sa-primary-soft); outline: 1px solid var(--sa-primary); }

.why-compare__head {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--sa-line);
}

.why-compare__cell { font-size: 0.85rem; line-height: 1.3; color: var(--sa-ink); }

.why-compare__cell small {
    display: block;
    margin-bottom: 2px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sa-ink-3);
}

/* verification steps */
.why-flow { display: grid; gap: 4px; }

.why-flow__row { display: flex; gap: 12px; align-items: center; padding: 10px 6px; }

.why-flow__row div { display: grid; line-height: 1.3; }
.why-flow__row strong { font-size: 0.92rem; }
.why-flow__row span:not(.why-flow__dot) { font-size: 0.8rem; color: var(--sa-ink-3); }

.why-flow__dot {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--sa-line);
    color: var(--sa-ink-3);
}

.why-flow__dot .mud-icon-root { font-size: 1.05rem; }
.why-flow__dot.is-done { background: var(--sa-ok-bg); border-color: var(--sa-ok-ink); color: var(--sa-ok-ink); }
.why-flow__dot.is-now { background: var(--sa-warn-bg); border-color: var(--sa-warn-ink); color: var(--sa-warn-ink); }

/* inventory feed */
.why-inventory { display: grid; gap: 10px; justify-items: stretch; }

.why-inventory__source {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: var(--sa-radius-md);
    border: 1px dashed var(--sa-line);
    color: var(--sa-ink-2);
    font-weight: 600;
    font-size: 0.9rem;
}

.why-inventory__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--sa-primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.why-inventory__list { display: grid; gap: 8px; }

.why-inventory__item,
.why-search__result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--sa-radius-md);
    background: var(--sa-bg);
    border: 1px solid var(--sa-line-soft);
}

.why-inventory__item i,
.why-search__result i {
    flex: none;
    width: 52px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--sa-img-a), var(--sa-img-b));
}

.why-inventory__item div,
.why-search__result div { display: grid; flex: 1; min-width: 0; line-height: 1.3; }

.why-inventory__item strong,
.why-search__result strong { font-size: 0.88rem; }

.why-inventory__action {
    flex: none;
    padding: 6px 12px;
    border-radius: 8px;
    background: var(--sa-primary);
    color: var(--sa-on-primary);
    font-size: 0.75rem;
}

.why-inventory__item div span,
.why-search__result div span { font-size: 0.75rem; color: var(--sa-ink-3); }

/* search */
.why-search { display: grid; gap: 10px; }

.why-search__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--sa-radius-md);
    border: 1px solid var(--sa-primary);
    background: var(--sa-bg);
    font-size: 0.9rem;
}

.why-search__chips { display: flex; flex-wrap: wrap; gap: 6px; }

.why-search__chips span {
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--sa-surface-2);
    color: var(--sa-ink-2);
    font-size: 0.75rem;
    font-weight: 600;
}

.why-search__result b {
    flex: none;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: 8px;
    background: var(--sa-primary);
    color: var(--sa-on-primary);
    font-size: 0.75rem;
}

.why-search .why-mock__note { margin: 2px 0 0; }

/* negotiation chat */
.why-chat { display: grid; gap: 10px; }

.why-chat__bubble {
    max-width: 82%;
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 0.88rem;
    line-height: 1.35;
}

.why-chat__bubble--them { background: var(--sa-surface-2); border-bottom-left-radius: 4px; justify-self: start; }
.why-chat__bubble--me { background: var(--sa-primary); color: var(--sa-on-primary); border-bottom-right-radius: 4px; justify-self: end; }

.why-chat__offer {
    display: grid;
    gap: 2px;
    justify-self: stretch;
    padding: 12px 14px;
    border-radius: var(--sa-radius-md);
    border: 1px solid var(--sa-amber);
    background: var(--sa-bg);
}

.why-chat__offer small { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sa-amber); }
.why-chat__offer strong { font-family: var(--font-display); font-size: 1.15rem; }

.why-chat__offer span { display: flex; gap: 8px; margin-top: 8px; }

.why-chat__offer span b {
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid var(--sa-line);
    font-size: 0.75rem;
}

.why-chat__offer span b:first-child { background: var(--sa-primary); border-color: var(--sa-primary); color: var(--sa-on-primary); }

.why-chat__done {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--sa-radius-md);
    background: var(--sa-ok-bg);
    color: var(--sa-ok-ink);
    font-size: 0.85rem;
    font-weight: 700;
}

/* ---------- nav + finish ---------- */

.why__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
}

.why__nav .home-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.why__count {
    color: var(--sa-ink-3);
    font-size: 0.9rem;
    font-weight: 600;
}

.why-finish {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 28px;
    padding: 24px 28px;
    border-radius: var(--sa-radius-lg);
    background: var(--sa-primary-soft);
    border: 1px solid var(--sa-primary);
}

.why-finish h3 { margin: 0 0 4px; font-family: var(--font-display); font-size: 1.2rem; }
.why-finish p { margin: 0; color: var(--sa-ink-2); max-width: 60ch; }
.why-finish__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
    .why { padding: 32px 16px 72px; }

    .why-slide {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        padding: 24px;
    }

    .why-slide__visual { padding: 18px; }
}

@media (max-width: 560px) {
    /* Six labels will not fit across a phone - keep the numbers and the group headings. */
    .why-rail__label { display: none; }
    .why-rail__group { font-size: 0.66rem; letter-spacing: 0.08em; }

    .why-slide { padding: 20px 16px; }

    /* Give the illustrations the full width: thumbnails go, padding tightens, so row titles stay on one or two lines. */
    .why-slide__visual { padding: 12px; }
    .why-mock { padding: 12px; }
    .why-mock--listing { padding: 0; }
    .why-inventory__item i,
    .why-search__result i { display: none; }

    /* Back/Next stay a comfortable tap size; the "Step x of 6" text drops to its own line. */
    .why__nav { flex-wrap: wrap; }
    .why__count { order: -1; width: 100%; text-align: center; }
    .why__nav .home-btn { flex: 1; padding: 0 16px; }

    .why-finish { padding: 20px 16px; }
    .why-finish__actions { width: 100%; }
    .why-finish__actions .home-btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .why-slide { animation: none; }
}
