/* ── Car Detail ── */

.car-detail-incomplete-banner {
    margin: 0 0 20px;
    padding: 12px 0;
    border: 0;
    border-top: 1px solid rgba(201, 152, 72, 0.55);
    border-bottom: 1px solid rgba(201, 152, 72, 0.55);
    background: none;
}

.car-detail-incomplete-title {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #c99848;
}

.car-detail-incomplete-lead {
    margin: 0 0 8px;
    font-size: 13px;
    color: #444;
}

.car-detail-incomplete-list {
    margin: 0;
    padding-left: 1.2em;
    font-size: 13px;
    color: #333;
    line-height: 1.45;
}

.car-detail-incomplete-list li {
    margin-bottom: 4px;
}

.car-detail-incomplete-list li:last-child {
    margin-bottom: 0;
}

/* ── Car detail page (VDP) — modern layout ── */
body.car-detail-page {
    --vdp-radius: 16px;
    --vdp-radius-sm: 12px;
    --vdp-shadow: 0 12px 40px rgba(20, 36, 54, 0.08);
    --vdp-shadow-soft: 0 4px 18px rgba(20, 36, 54, 0.06);
}

/* In-app WebView (?embed=1): no site nav or duplicate back control */
body.car-embed .topbar,
body.car-embed .guest-banner,
body.car-embed .nav-search,
body.car-embed .vdp-back {
    display: none !important;
}

body.car-embed .car-detail {
    padding: 12px 16px 32px;
    max-width: 100%;
}

body.car-embed .car-detail-info--hero {
    position: static;
    top: auto;
}

body.car-detail-page .car-detail {
    padding: clamp(20px, 3vw, 40px) clamp(16px, 3vw, 32px) clamp(48px, 5vw, 72px);
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
}

.car-detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: clamp(24px, 3vw, 40px);
    align-items: start;
    margin-bottom: clamp(28px, 4vw, 40px);
}

.car-detail-info--hero {
    position: sticky;
    top: calc(72px + env(safe-area-inset-top, 0px));
    padding: clamp(8px, 2vw, 20px) 0 0;
}

.car-detail-dealer-eyebrow {
    margin-bottom: 10px;
    letter-spacing: 0.14em;
}

/* Shown only when this listing's photographs place the car at a rooftop other than
   the one it is filed under (or the rooftop is served a group-wide feed). Reads as a
   qualifier on the dealer line above it, not as an alert about the car. */
.location-unconfirmed-tag {
    display: inline-block;
    margin-left: 6px;
    letter-spacing: 0.04em;
    font-size: 10px;
    color: var(--text-faint);
    border-bottom: 1px dotted var(--border-medium);
    padding: 0;
    cursor: help;
}

.car-detail-location-note {
    margin: -4px 0 12px;
    max-width: 56ch;
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-muted);
}

.car-detail-location-note--panel {
    margin: 4px 0 12px;
    font-size: 13px;
}

/* The dealer name is wrapped in an <a> that carried no styling at all, so it fell
   through to the UA default -- blue, purple once visited, permanently underlined.
   Inherit the eyebrow treatment and keep the affordance to hover. */
.car-detail-dealer-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.12s ease, border-color 0.12s ease;
}

.car-detail-dealer-link:visited {
    color: inherit;
}

.car-detail-dealer-link:hover,
.car-detail-dealer-link:focus-visible {
    color: var(--text);
    border-bottom-color: currentColor;
}

/* Same treatment wherever else the dealer's name links to their research page
   (the Dealership panel heading, the Overview lead line): inherit the surrounding
   type, never the UA blue/purple, and show the underline on hover. */
.dealer-name-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.12s ease, border-color 0.12s ease;
}

.dealer-name-link:visited {
    color: inherit;
}

.dealer-name-link:hover,
.dealer-name-link:focus-visible {
    color: var(--accent);
    border-bottom-color: currentColor;
}

.dealer-reputation-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin: 0 0 12px;
    max-width: 100%;
}

.dealer-reputation-block--card {
    margin: 0 0 10px;
}

.dealer-reputation-block[hidden] {
    display: none !important;
}

.reputation-stars {
    position: relative;
    display: inline-block;
    font-size: 1rem;
    letter-spacing: 0.06em;
    line-height: 1.2;
    white-space: nowrap;
}

.reputation-stars__track {
    color: var(--border-medium);
}

.reputation-stars__fill {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    color: var(--navy);
}

.dealer-review-rating {
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.dealer-review-count,
#dealer-review-count {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.3;
}

#dealer-trust-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: normal;
    text-align: left;
}

@media (max-width: 640px) {
    .dealer-reputation-block {
        gap: 6px 8px;
        margin-bottom: 10px;
    }

    #dealer-trust-badges {
        gap: 5px;
    }

    .badge {
        font-size: 0.7rem;
    }
}

.car-detail-title {
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: var(--text);
}

.car-detail-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
}

.car-detail-info--hero .car-detail-price {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.car-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.car-hero-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
    text-decoration: none;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.car-hero-link--dealer {
    padding: 9px 16px;
    border-radius: 4px;
    border: 1px solid var(--border-medium);
    background: transparent;
}

.car-hero-link--dealer:hover {
    border-color: var(--navy);
    background: var(--bg-elevated);
    color: var(--navy-deep);
}

.car-hero-link-unavailable {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.car-hero-link--share {
    padding: 9px 16px;
    border-radius: 4px;
    border: 1px solid var(--border-medium);
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

.car-hero-link--share:hover {
    border-color: var(--navy);
    background: var(--bg-elevated);
    color: var(--navy-deep);
}

.car-share-toast {
    display: inline-flex;
    align-items: center;
    padding: 9px 14px;
    border-radius: 4px;
    background: var(--navy, #1c2b46);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.car-share-toast[hidden] {
    display: none;
}

.car-gallery-badge {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 3;
    padding: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #fff;
    background: none;
    border: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85), 0 0 10px rgba(0, 0, 0, 0.5);
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

/* The photo is the frame: no rounded, bordered, shadowed box around it. */
.car-detail-image {
    border-radius: 0;
    box-shadow: none;
    border: 0;
}

.car-gallery-hero {
    border-radius: 0;
    overflow: hidden;
}

@media (min-width: 900px) {
    .car-gallery-controls {
        display: none;
    }
}

.car-vdp-tabs-wrap {
    margin-top: 8px;
}

@media (min-width: 901px) {
    /* Stick the tab ROW, not the wrap — the wrap also contains the panels, so
       a sticky wrap can never pin and the row just floats mid-content. The
       up-shadow is a page-colored mask so scrolling content doesn't peek out
       above the pinned pill. */
    body.car-detail-page .car-vdp-tabs {
        position: sticky;
        top: 0;
        z-index: 12;
        background: var(--bg-page);
        box-shadow: 0 -18px 0 8px var(--bg-page);
    }
}

/* Editorial section: a hairline above, no card. */
.car-hero-glance {
    margin: clamp(28px, 4vw, 40px) 0 clamp(20px, 2.5vw, 28px);
    padding: clamp(18px, 2.5vw, 24px) 0 0;
    background: none;
    border: 0;
    border-top: 1px solid var(--border-light);
    border-radius: 0;
    box-shadow: none;
}

.car-hero-glance-title {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--navy);
    margin: 0 0 14px;
}

.car-quick-specs--hero {
    margin: 0;
}

.car-vdp-panel-lead {
    margin: 0 0 16px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.55;
}

.car-vdp-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 0;
    margin-bottom: 24px;
    border-radius: 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--border-light);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.car-vdp-tabs::-webkit-scrollbar {
    display: none;
}

.car-vdp-tab {
    flex: 0 0 auto;
    padding: 12px 14px 11px;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    border-radius: 0;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.car-vdp-tab:hover {
    color: var(--navy);
    background: transparent;
}

.car-vdp-tab--active {
    color: var(--navy);
    background: transparent;
    border-bottom-color: var(--navy);
    box-shadow: none;
}

.car-vdp-tab:focus-visible {
    outline: 2px solid var(--navy);
    outline-offset: 2px;
}

.car-vdp-panels {
    min-height: 200px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

/* Specs tab: two cards (spec sheet + trim ladder) span same width as At a glance */
.car-vdp-panels:has(#car-panel-specs:not([hidden])) {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    min-height: 0;
}

.car-specs-split {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    gap: clamp(16px, 2.5vw, 24px);
    align-items: start;
    width: 100%;
}

.car-specs-split--single {
    grid-template-columns: 1fr;
}

.car-specs-split__col--ladder[hidden] {
    display: none !important;
}

.car-specs-split__col {
    min-width: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.car-specs-split__col .car-vdp-panel-title {
    margin-bottom: 14px;
}

.car-vdp-panel--specs {
    animation: none;
}

.car-vdp-panel {
    animation: car-vdp-panel-in 0.18s ease;
}

.car-vdp-panel[hidden] {
    display: none !important;
}

.car-vdp-panel:not([hidden]) {
    display: block;
}

@keyframes car-vdp-panel-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .car-vdp-panel {
        animation: none;
    }
}

.car-vdp-panel-title {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--navy);
    margin: 0 0 16px;
}

.car-pricing-insights {
    margin-bottom: 28px;
    padding: 22px 0 0;
    border-radius: 0;
    border: 0;
    border-top: 1px solid var(--border-light);
    background: none;
    box-shadow: none;
}

.car-pricing-insights .car-vdp-panel-title {
    margin-bottom: 14px;
}

@media (min-width: 720px) {
    .car-pricing-insights {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px 20px;
    }

    .car-pricing-insights .car-vdp-panel-title,
    .car-pricing-insights .car-pricing-disclaimer {
        grid-column: 1 / -1;
    }

    .car-pricing-insights .car-pricing-block:only-of-type {
        grid-column: 1 / -1;
        max-width: 520px;
    }
}

.car-pricing-block {
    padding: 0;
    border-radius: 0;
    background: none;
    border: 0;
}

.car-pricing-block-label {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.car-pricing-block .car-market-line {
    margin: 8px 0;
    font-size: 0.95rem;
}

.car-pricing-block .car-market-vs {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
    font-size: 0.95rem;
}

.car-pricing-block .car-market-vs--below_market {
    color: var(--deal-below);
}

.car-pricing-block .car-market-vs--above_market {
    color: var(--deal-above);
}

.car-pricing-disclaimer {
    margin: 14px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-faint);
}

/* Coarse market deal badge shown next to the VDP price. */
.deal-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    margin: 10px 0 0;
    padding: 0;
    border-radius: 0;
    background: none;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
}

.deal-badge__detail {
    font-weight: 600;
    opacity: 0.85;
}

.deal-badge--below_market {
    color: var(--deal-below);
}

.deal-badge--above_market {
    color: var(--deal-above);
}

.deal-badge--at_market {
    color: var(--deal-near);
}

/* Hero headline — price, mileage and the market verdict share one scan line.
   Those three decide whether a listing is worth opening; trim moved up to a
   subtitle and the payment estimate below was toned down because both were
   competing with them for attention. */
.car-detail-headline {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px 20px;
    margin: 0 0 14px;
}

.car-detail-headline .car-detail-price {
    margin: 0;
    font-size: clamp(2.25rem, 4.6vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

/* The feed put an advertised monthly payment in the price field: print it at
   caption weight so it never reads as the sale price. */
.car-detail-headline .car-detail-price .car-detail-price--payment {
    display: block;
    font-size: clamp(1.25rem, 2.2vw, 1.6rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-secondary);
}

/* Mileage reads as a peer of price, not a caption: on a used car the two numbers are
   judged together, so they share weight and only differ in colour. The rule before it
   supplies the "price | mileage" divider. */
.car-detail-headline-mileage {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    margin: 0;
    font-size: clamp(1.9rem, 3.9vw, 2.7rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.car-detail-headline-mileage::before {
    content: "";
    align-self: center;
    width: 2px;
    height: 0.66em;
    margin-right: 16px;
    border-radius: 1px;
    background: var(--text-muted);
    opacity: 0.45;
}

.car-detail-headline-mileage__unit {
    font-size: 0.5em;
    font-weight: 700;
    color: var(--text-muted);
}

/* DC-6 / IH-03: "Mileage not listed" reads as a statement, not a figure. */
.car-detail-headline-mileage--unlisted .car-detail-headline-mileage__unit {
    font-size: 0.45em;
    font-weight: 600;
    letter-spacing: 0;
}

/* IH-08: dealership place and distance beside the dealer name. */
.car-detail-eyebrow-place {
    font-weight: 500;
    color: var(--text-muted);
}

/* Lives in the Save/Compare row. It keeps its own line at narrow widths so the
   detail text is never squeezed off the end. */
.deal-badge--hero {
    order: 3;
    flex-basis: 100%;
    width: fit-content;
    margin: 2px 0 0;
    padding: 0;
    font-size: 14px;
}

@media (min-width: 900px) {
    .deal-badge--hero {
        flex-basis: auto;
        margin: 0;
    }
}

/* Absence of a verdict is itself information, so it gets a quiet line of text
   rather than an empty gap. */
.deal-badge--unknown {
    background: none;
    color: var(--text-muted);
}

.deal-badge--hero .deal-badge__label {
    font-weight: 800;
    letter-spacing: -0.01em;
}

/* Inventory rarity — sits with the market verdict in the decision row.
   Champagne-on-navy family, distinct from the deal verdict colors so a
   rare car reads as "special", not "cheap/expensive". */
.rarity-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    order: 3;
    width: fit-content;
    margin: 2px 0 0;
    padding: 0;
    border-radius: 0;
    font-size: 14px;
    line-height: 1.2;
    background: none;
    color: var(--rarity-fg, #6d5311);
    cursor: help;
}

.rarity-badge__score {
    font-weight: 800;
    letter-spacing: -0.01em;
}

.rarity-badge__den {
    font-weight: 600;
    opacity: 0.7;
    font-size: 12px;
}

.rarity-badge__label {
    font-weight: 600;
    opacity: 0.85;
}

/* ---- Dealership tab ---- */

.dealer-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px 24px;
    margin-bottom: 16px;
}

.dealer-panel-address {
    font-style: normal;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 15px;
    color: var(--text-secondary);
}

/* Doubled class beats the base .car-dealer-map height further down the file: this
   instance is the point of its own tab rather than a thumbnail inside Overview. */
.car-dealer-map.car-dealer-map--panel {
    width: 100%;
    height: 340px;
    border-radius: 12px;
    overflow: hidden;
}

.dealer-panel-section {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--border-light);
}

.dealer-panel-section-title {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}

.dealer-panel-section-hint {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--text-muted);
}

/* ---- Comment threads (cars + dealerships) ---- */

.ds-comments__composer {
    margin-bottom: 20px;
}

.ds-comments__input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font: inherit;
    font-size: 15px;
    line-height: 1.45;
    color: var(--text);
    background: var(--surface, #fff);
    resize: vertical;
}

.ds-comments__input:focus-visible {
    outline: 2px solid var(--accent, #24466d);
    outline-offset: 1px;
}

.ds-comments__composer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.ds-comments__submit {
    padding: 8px 16px;
    border: 0;
    border-radius: 4px;
    background: var(--accent, #24466d);
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

.ds-comments__submit[disabled] {
    opacity: 0.55;
    cursor: default;
}

.ds-comments__status {
    margin: 0;
    margin-right: auto;
    font-size: 13px;
    color: var(--text-muted);
}

.ds-comments__status--error {
    color: var(--deal-above, #a33);
    font-weight: 600;
}

.ds-comments__signin,
.ds-comments__empty {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--text-muted);
}

.ds-comments__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ds-comments__item {
    padding: 14px 0 0;
    border: 0;
    border-top: 1px solid var(--border-light);
    border-radius: 0;
    background: none;
}

.ds-comments__item-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.ds-comments__author {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.ds-comments__time {
    font-size: 12px;
    color: var(--text-muted);
}

.ds-comments__body {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    overflow-wrap: anywhere;
}

.ds-comments__item-tools {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.ds-comments__link {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: underline;
    cursor: pointer;
}

.ds-comments__link:hover {
    color: var(--text);
}

/* ---- Comment photo attachments ---- */

/* The real control is the <label>; the input stays focusable but off-screen so
   the composer keeps one visual language. */
.ds-comments__file {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.ds-comments__attach {
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    cursor: pointer;
}

.ds-comments__attach:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.ds-comments__file:focus-visible + .ds-comments__attach {
    outline: 2px solid var(--accent, #24466d);
    outline-offset: 1px;
}

.ds-comments__previews,
.ds-comments__media {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 10px 0 0;
    padding: 0;
}

/* [hidden] loses to the display:flex above without this. */
.ds-comments__previews[hidden] {
    display: none;
}

.ds-comments__preview img {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.ds-comments__media {
    margin-top: 10px;
}

.ds-comments__thumb {
    display: block;
    padding: 0;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: none;
    overflow: hidden;
    cursor: zoom-in;
}

.ds-comments__thumb img {
    display: block;
    width: 96px;
    height: 96px;
    object-fit: cover;
}

.ds-comments__thumb:focus-visible {
    outline: 2px solid var(--accent, #24466d);
    outline-offset: 2px;
}

.ds-comments__lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(12, 15, 20, 0.88);
    cursor: zoom-out;
}

.ds-comments__lightbox[hidden] {
    display: none;
}

.ds-comments__lightbox-img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

.ds-comments__lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    padding: 8px 16px;
    border: 0;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.car-quick-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0 24px;
    margin: 0 0 28px;
}

/* A definition list on hairlines, not a row of tiles. */
.car-quick-spec-item {
    padding: 10px 0 12px;
    border-radius: 0;
    background: none;
    border: 0;
    border-top: 1px solid var(--border-light);
    box-shadow: none;
}

.car-quick-spec-item dt {
    margin: 0 0 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.car-quick-spec-item dd {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    word-break: break-word;
}

.car-dealer-map {
    height: 220px;
    margin: 14px 0 10px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    z-index: 0;
}

.car-dealer-map-actions {
    margin: 0;
    font-size: 14px;
}

.car-dealer-map-actions-sep {
    margin: 0 6px;
    color: var(--text-muted);
}

.dealer-card-link--maps {
    font-weight: 600;
}

.car-vdp-panel .car-specs.car-spec-sheet {
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

@media (min-width: 640px) {
    .car-vdp-panel .car-specs.car-spec-sheet {
        display: grid;
        /* Panel width ≠ viewport width (sidebar, padding): auto-fill drops to
           one column when a 2-up layout would crush the values into a letter
           stack. */
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 0;
        padding: 4px 0;
    }

    .car-vdp-panel .car-specs .spec-row {
        padding: 12px 0;
        border-bottom: 1px solid var(--border-light);
    }

    .car-vdp-panel .car-specs .spec-row:nth-last-child(-n+2) {
        border-bottom: none;
    }
}

/* Trim ladder timeline (premium specs tab) */
.car-specs-split__col--ladder {
    display: flex;
    flex-direction: column;
}

.car-trim-ladder {
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.car-trim-ladder__title {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: 0.02em;
}

.car-trim-ladder__chevron {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    margin-left: auto;
    border-right: 2px solid var(--navy);
    border-bottom: 2px solid var(--navy);
    transform: rotate(45deg);
    transition: transform 0.28s ease;
}

.car-trim-ladder__step--active .car-trim-ladder__chevron {
    transform: rotate(225deg);
}

.car-trim-ladder__card--expandable {
    cursor: pointer;
}

.car-trim-ladder__timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 4px;
    position: relative;
    max-width: 720px;
}

.car-trim-ladder__timeline::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: var(--border-medium);
    border-radius: 0;
}

.car-trim-ladder__step {
    position: relative;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    margin-bottom: 18px;
}

.car-trim-ladder__step:last-child {
    margin-bottom: 0;
}

.car-trim-ladder__node {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 10px 0 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 1;
}

.car-trim-ladder__node:focus-visible {
    outline: 2px solid var(--navy);
    outline-offset: 3px;
    border-radius: 50%;
}

.car-trim-ladder__dot {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--navy);
    background: var(--bg-page);
    box-shadow: none;
    transition:
        border-color 0.28s ease,
        background 0.28s ease,
        transform 0.28s ease,
        width 0.28s ease,
        height 0.28s ease,
        box-shadow 0.28s ease;
}

.car-trim-ladder__step--active .car-trim-ladder__dot {
    width: 22px;
    height: 22px;
    border-color: var(--navy);
    background: var(--navy);
    box-shadow: none;
    transform: none;
}

.car-trim-ladder__card {
    grid-column: 2;
    grid-row: 1;
    padding: 10px 0 12px;
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid var(--border-light);
    background: none;
    min-width: 0;
    cursor: pointer;
    text-align: left;
    transition:
        border-color 0.3s ease,
        background 0.3s ease,
        box-shadow 0.3s ease,
        padding 0.3s ease,
        transform 0.3s ease;
}

.car-trim-ladder__card:focus-visible {
    outline: 2px solid var(--navy);
    outline-offset: 2px;
}

.car-trim-ladder__step--active .car-trim-ladder__card {
    border-color: var(--navy);
    background: none;
    box-shadow: none;
    padding: 10px 0 12px;
}

.car-trim-ladder__card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
}

.car-trim-ladder__name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.car-trim-ladder__step--passed .car-trim-ladder__name {
    color: var(--text-muted);
}

.car-trim-ladder__badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--navy);
    background: none;
    padding: 0;
    border-radius: 0;
}

.car-trim-ladder__panel {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        max-height 0.38s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.28s ease,
        margin-top 0.28s ease,
        visibility 0s linear 0.38s;
}

.car-trim-ladder__step--active .car-trim-ladder__panel {
    max-height: 2400px;
    opacity: 1;
    margin-top: 12px;
    visibility: visible;
    pointer-events: auto;
    transition:
        max-height 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.32s ease 0.04s,
        margin-top 0.32s ease,
        visibility 0s;
}

.car-trim-ladder__specs {
    margin: 0;
    padding: 0;
}

.car-trim-ladder__panel-label {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--navy);
}

/* Provenance line under sticker-diffed adds — quiet, but present: the claim
   is checkable against photographed documents and says so. */
.car-trim-ladder__provenance {
    margin: 8px 0 0;
    font-size: 11px;
    font-style: italic;
    color: var(--text-muted);
}

.car-trim-ladder__adds {
    margin: 0;
    padding-left: 18px;
    line-height: 1.5;
    font-size: 13px;
    color: var(--text-secondary);
}

.car-trim-ladder__confidence {
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.car-trim-ladder__confidence--low {
    color: #b45309;
    text-transform: none;
    font-weight: 500;
    letter-spacing: normal;
    font-size: 13px;
}

.car-specs-split__col--ladder .car-trim-ladder__timeline {
    max-width: none;
    flex: 1;
    max-height: min(72vh, 640px);
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
}

@media (prefers-reduced-motion: reduce) {
    .car-trim-ladder__dot,
    .car-trim-ladder__card,
    .car-trim-ladder__panel {
        transition: none !important;
    }

    .car-trim-ladder__step--active .car-trim-ladder__card {
        transform: none;
    }
}

@media (max-width: 960px) {
    .car-specs-split {
        grid-template-columns: 1fr;
    }

    .car-specs-split__col--ladder .car-trim-ladder__timeline {
        max-height: none;
    }
}

@media (max-width: 640px) {
    .car-trim-ladder__step {
        grid-template-columns: 28px 1fr;
    }
}

body.car-detail-page .car-packages-section--tab {
    max-width: none;
    margin: 0;
    padding: 0;
    border-top: none;
}

body.car-detail-page .car-premium-upsell--inline {
    padding: 20px 0;
    border-radius: 0;
    border: 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    background: none;
}

body.car-detail-page .car-vdp-panel .car-detail-history {
    margin-top: 0;
    padding: 18px 0 0;
    border-radius: 0;
    background: none;
    border: 0;
    border-top: 1px solid var(--border-light);
    box-shadow: none;
}

.carfax-hint {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 16px;
    padding: 0;
    border-radius: 0;
    background: none;
    border: 0;
}

@media (max-width: 960px) {
    .car-detail-hero {
        grid-template-columns: 1fr;
    }

    .car-detail-info--hero {
        position: static;
        padding: 0;
    }

}

@media (max-width: 700px) {
    body.car-detail-page .car-detail-info h1,
    body.car-detail-page .car-detail-title {
        font-size: 1.45rem;
    }

    /* Gallery height at this width lives after the base .car-detail-image
       rule below (M2): here it lost to the later unconditional 500px. */

    .car-gallery-hero {
        max-height: none;
    }
}

/* Legacy alias */

.car-detail-gallery {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.car-gallery-main {
    position: relative;
    width: 100%;
    min-width: 0;
}

.car-gallery-hero {
    position: relative;
    width: 100%;
    max-height: 500px;
    cursor: pointer;
}

.car-gallery-hero:focus {
    outline: none;
}

.car-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(20, 36, 54, 0.55);
    color: #fff;
    font-size: inherit;
    line-height: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 2;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.car-gallery-arrow:hover:not(:disabled) {
    background: rgba(20, 36, 54, 0.8);
    border-color: rgba(255, 255, 255, 0.55);
}

.car-gallery-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.car-gallery-arrow-prev {
    left: 16px;
}

.car-gallery-arrow-next {
    right: 16px;
}

.car-detail-image {
    position: relative;
    width: 100%;
    height: 500px;
    max-height: 500px;
    border-radius: 0;
    /* Square, borderless photo mat: letterboxing a photo, not framing a card. */
    background-color: var(--bg-subtle);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

/* M2 (visual review 2026-09-28): at phone widths the 500px box letterboxed a
   4:3 photo into ~268px with ~115px grey bands and pushed the price below the
   first screen. Must follow the base rule above (same specificity). */
@media (max-width: 700px) {
    .car-detail-image {
        aspect-ratio: 4 / 3;
        height: auto;
        max-height: none;
    }
}

.car-detail-image .car-gallery-main-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: var(--bg-subtle);
}

.car-gallery-empty-msg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 24px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.04);
    pointer-events: none;
}

.car-gallery-empty-msg[hidden] {
    display: none;
}

/* ---- Photo lightbox: full-viewport zoom/pan view, built by car_page.js ---- */
body.car-lightbox-open {
    overflow: hidden;
}

.car-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 12, 18, 0.94);
}

.car-lightbox[hidden] {
    display: none;
}

.car-lightbox-stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
}

.car-lightbox-img {
    max-width: 92vw;
    max-height: 88vh;
    cursor: grab;
    touch-action: none;
    transform-origin: center center;
    transition: transform 0.08s ease-out;
    user-select: none;
    -webkit-user-drag: none;
}

.car-lightbox-img--zoomed {
    cursor: grab;
    transition: none;
}

.car-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(20, 36, 54, 0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
}

.car-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(20, 36, 54, 0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
}

.car-lightbox-nav:hover {
    background: rgba(20, 36, 54, 0.85);
}

.car-lightbox-prev {
    left: 16px;
}

.car-lightbox-next {
    right: 16px;
}

.car-lightbox-counter {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.car-lightbox-hint {
    position: absolute;
    bottom: 18px;
    right: 18px;
    margin: 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.72rem;
}

@media (max-width: 640px) {
    .car-lightbox-nav {
        width: 40px;
        height: 40px;
    }
    .car-lightbox-hint {
        display: none;
    }
}

.car-gallery-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
}

.car-gallery-counter {
    font-size: 14px;
    color: var(--text-muted);
    min-width: 64px;
    text-align: center;
}

.car-gallery-btn {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: 1px solid var(--border-medium);
    background: var(--chrome-face);
    color: var(--navy);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.car-gallery-btn:hover:not(:disabled) {
    background: #fff;
    border-color: var(--navy);
}

.car-gallery-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Scrollable thumbnail strip */
.car-gallery-thumbs-wrap {
    margin-top: 16px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(28, 53, 82, 0.25) transparent;
    -webkit-overflow-scrolling: touch;
}

.car-gallery-thumbs-wrap::-webkit-scrollbar {
    height: 6px;
}

.car-gallery-thumbs-wrap::-webkit-scrollbar-thumb {
    background: rgba(28, 53, 82, 0.22);
    border-radius: 3px;
}

.car-gallery-thumbs {
    display: flex;
    gap: 10px;
    padding: 4px 0;
    min-height: 72px;
}

.car-gallery-thumb {
    flex: 0 0 96px;
    width: 96px;
    height: 610px;
    border-radius: 10px;
    border: 2px solid transparent;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-subtle);
    cursor: pointer;
    padding: 0;
    transition: border-color 0.2s ease, opacity 0.2s ease;
}

.car-gallery-thumb:hover {
    opacity: 0.95;
}

.car-gallery-thumb.active {
    border-color: var(--navy);
    box-shadow: 0 0 0 1px rgba(28, 53, 82, 0.35);
}

.car-detail-info h1,
.car-detail-title {
    font-size: 36px;
    margin-bottom: 12px;
}

.car-detail-price {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 0;
}

/* Price $0 but MSRP present — hero MSRP (large) */
.car-detail-price .price-msrp-hero {
    display: block;
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

.car-detail-price .price-msrp-secondary {
    display: block;
    margin-top: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Original-MSRP line under the asking price: the struck-through sticker
   figure and the savings delta share one calm, properly-spaced row instead
   of a bold string jammed against the price. */
.car-detail-price .price-msrp-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin-top: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.car-detail-price .price-msrp-line__label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.car-detail-price .price-msrp-line__figure {
    font-variant-numeric: tabular-nums;
}

.car-detail-price .price-msrp-line__delta {
    font-weight: 700;
    color: var(--deal-below, #1a5f4a);
}

/* A markup over MSRP (new, non-CPO only; IH-06 / DC-4). */
.car-detail-price .price-msrp-line__delta--over {
    color: var(--deal-above, #9a3412);
}

.car-detail-price .price-msrp-line .price-msrp-source {
    margin-left: 0; /* flex gap already spaces it */
}

/* Provenance for a sticker-derived MSRP. The figure is only ever shown when it
   came from a window sticker we hold or from new inventory, so this reads as an
   attribution, not a disclaimer. */
.car-detail-price .price-msrp-source {
    margin-left: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: 0.75;
}

/* Single spec sheet — engine/EPA data merged into rows (see car.html) */
.car-specs.car-spec-sheet {
    margin-top: 28px;
    margin-bottom: 32px;
    padding: 0;
    border-radius: 0;
    border: 0;
    border-top: 1px solid var(--border-light);
    background: none;
}

.car-specs .spec-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    font-family: var(--font-ui);
}

.car-specs .spec-row:last-child {
    border-bottom: none;
}

.spec-label {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.spec-value {
    flex: 1;
    text-align: right;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    word-break: break-word;
}

/* Metadata column */
.car-detail-info {
    padding: 24px 0 32px;
    min-width: 0;
}

/* Column 3: Vehicle History Highlights panel */
.car-detail-history {
    background: none;
    border: 0;
    border-top: 1px solid var(--border-light);
    border-radius: 0;
    padding: 20px 0 0;
    min-width: 0;
    box-shadow: none;
}

.history-panel-title {
    margin: 0 0 20px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text);
}

.history-highlights-list {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}

.history-highlight-item {
    position: relative;
    padding: 9px 0;
    margin: 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    line-height: 1.45;
    color: var(--text);
}

.history-highlight-item::before {
    content: none;
}

.history-no-highlights {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0 0 24px;
}

.carfax-report-btn {
    display: inline-block;
    width: auto;
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: var(--navy);
    border: none;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s ease;
    box-sizing: border-box;
}

.carfax-report-btn:hover {
    background: var(--navy-deep);
    color: #fff;
}

.carfax-report-btn-secondary {
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    color: var(--text);
}

.carfax-report-btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--navy);
}

/* Negotiation leverage tracker (User Story #7) */
#negotiation-radar-widget,
.negotiation-radar-widget {
    margin: 0 0 20px;
    padding: 18px 0 0;
    border-radius: 0;
    border: 0;
    border-top: 1px solid var(--border-light);
    background: none;
}

#negotiation-radar-widget h4,
.negotiation-radar-widget h4 {
    margin: 0 0 10px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--navy);
}

#negotiation-radar-widget .days-on-lot-text,
.negotiation-radar-widget .days-on-lot-text {
    margin: 0 0 12px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

#negotiation-radar-widget .days-on-lot-count,
.negotiation-radar-widget .days-on-lot-count {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--navy);
}

#negotiation-badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.radar-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border-radius: 0;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.3;
    border: 0;
    background: none;
}

/* Leverage reads as coloured text, not a filled chip. */
.radar-badge.high-leverage {
    color: var(--deal-above);
}

.radar-badge.mid-leverage {
    color: #b45309;
}

.radar-badge.recent-listing {
    color: var(--text-muted);
}

.days-on-lot-source {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.price-history-timeline {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.price-history-timeline h5 {
    margin: 0 0 10px;
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.price-history-empty {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.price-history-steps {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.price-history-step {
    position: relative;
    padding: 9px 0 9px 18px;
    border-radius: 0;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.price-history-step:last-child {
    border-bottom: 0;
}

.price-history-step::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-radius: 50%;
    background: var(--navy);
    box-shadow: none;
}

/* Standalone NHTSA VIN recall lookup (/nhtsa-recalls) */
.nhtsa-recalls-section {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 20px 48px;
}

.nhtsa-recalls-header h1 {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
}

.nhtsa-recalls-lead {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.nhtsa-recalls-lead--error {
    color: #b45309;
}

.nhtsa-recalls-vin {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: 0.04em;
}

.nhtsa-recalls-status {
    margin: 0 0 16px;
    padding: 12px 0;
    border-radius: 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    font-size: 15px;
    line-height: 1.45;
}

.nhtsa-recalls-status--clear {
    color: #065f46;
}

.nhtsa-recalls-status--error {
    color: #991b1b;
}

.nhtsa-recalls-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 0 0 20px;
}

.nhtsa-recalls-form__label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.nhtsa-recalls-form__input {
    flex: 1 1 16rem;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--border-medium);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 16px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nhtsa-recalls-form__submit {
    min-height: 44px;
    padding: 8px 18px;
    border: 1px solid var(--navy-deep, var(--navy));
    border-radius: 6px;
    background: var(--navy);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.nhtsa-recalls-form__submit:hover {
    background: var(--navy-deep, var(--navy));
}

.nhtsa-recalls-list {
    margin: 0 0 20px;
    padding-left: 1.25rem;
}

.nhtsa-recalls-disclaimer {
    margin: 20px 0 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.nhtsa-recalls-official {
    margin: 0;
}

.nhtsa-recalls-official-link {
    display: inline-flex;
    width: auto;
    min-width: 240px;
}

/* Vehicle history tools (History tab) */
.car-vdp-panel .vehicle-history-tools {
    margin-top: 24px;
    padding: 18px 0 0;
    border-radius: 0;
    border: 0;
    border-top: 1px solid var(--border-light);
    background: none;
    box-shadow: none;
}

.vehicle-history-tools-heading {
    margin: 0 0 14px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.vehicle-history-actions-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vehicle-history-actions-row .carfax-report-btn {
    margin: 0;
}

.vehicle-history-premium-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    background: transparent;
    transition: border-color 0.18s ease, background 0.18s ease;
    box-sizing: border-box;
    cursor: pointer;
}

.vehicle-history-premium-btn:hover:not(:disabled) {
    border-color: var(--navy);
    background: var(--bg-elevated);
}

.vehicle-history-premium-btn:disabled {
    opacity: 0.72;
    cursor: wait;
}

.vehicle-history-tools-note {
    margin: 12px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-muted);
}

.vehicle-history-tools-note a {
    color: var(--navy);
    font-weight: 600;
}

/* Legacy hero button styles (nhtsa recalls page) */
.btn.btn-nhtsa-safety {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 240px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    text-align: center;
    border: none;
    border-radius: 4px;
    background: var(--navy);
    transition: background 0.2s ease, transform 0.15s ease;
    box-sizing: border-box;
    cursor: pointer;
}

.btn.btn-nhtsa-safety:hover {
    color: #fff;
    background: var(--navy-deep);
    transform: translateY(-1px);
}

/* Vehicle history hero actions (User Story #4) — legacy, kept for embeds */
.vehicle-history-action-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.premium-history-upsell {
    padding: 14px 0;
    border-radius: 0;
    border: 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    background: none;
}

.premium-history-upsell__title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.premium-history-upsell__dismiss {
    margin-top: 10px;
    padding: 0;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}

.vehicle-history-intelligence-results {
    margin-top: 4px;
}

.vehicle-history-intelligence-panel {
    padding: 14px 0 0;
    border-radius: 0;
    border: 0;
    border-top: 1px solid var(--border-light);
    background: none;
}

.vehicle-history-intelligence-title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
}

.vehicle-history-intelligence-flags {
    margin: 0;
    padding: 0;
    list-style: none;
}

.vehicle-history-flag {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    line-height: 1.45;
}

.vehicle-history-flag:last-child {
    border-bottom: none;
}

.vehicle-history-flag--warning .vehicle-history-flag__value {
    color: #b45309;
    font-weight: 600;
}

.vehicle-history-flag__label {
    font-weight: 600;
    color: var(--text-secondary);
}

.vehicle-history-intelligence-disclaimer,
.vehicle-history-intelligence-loading,
.vehicle-history-intelligence-error,
.vehicle-history-intelligence-empty {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-muted);
}

.vehicle-history-recalls-details {
    margin-top: 10px;
    font-size: 13px;
}

.vehicle-history-recalls-details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--navy);
}

.vehicle-history-recalls-list {
    margin: 8px 0 0;
    padding-left: 18px;
    color: var(--text-secondary);
}

/* ---- Printable build sheet ----
   #build-sheet-print-btn (car_page.js initBuildSheetPrint) switches to the
   Options tab -- so #build-sheet-panel is actually on screen, not
   [hidden] -- and then calls window.print(). This block hides the rest of
   the page (nav, hero, other tabs, chrome) so the printout / "save as PDF"
   is just the build sheet itself. */
@media print {
    body * {
        visibility: hidden;
    }
    #build-sheet-panel,
    #build-sheet-panel * {
        visibility: visible;
    }
    #build-sheet-panel {
        position: absolute;
        inset: 0;
        width: 100%;
        margin: 0;
        border: none;
        box-shadow: none;
    }
    .build-sheet-print-btn,
    .car-lightbox,
    .car-share-toast {
        display: none !important;
    }
    @page {
        margin: 1.5cm;
    }
}

