@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
    --main-radius: 10px;
    --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

    /* Luxury interior palette — warm cream, navy, fine wood trim, chrome accents */
    --bg-page: #f4f2ec;
    --bg-subtle: #ebe6dd;
    --bg-elevated: #faf8f5;
    --bg-card: #ffffff;
    --navy: #1c3552;
    --navy-deep: #142a40;
    --navy-soft: rgba(28, 53, 82, 0.08);
    --text: #1a2744;
    --text-muted: #5c6778;
    --text-faint: #8a929e;
    --border-light: rgba(28, 53, 82, 0.1);
    --border-medium: rgba(28, 53, 82, 0.18);
    --stitch-light: rgba(255, 252, 248, 0.55);
    --chrome-line: #c8cdd6;
    --chrome-face: linear-gradient(165deg, #f3f5f8 0%, #dce1e8 45%, #eef1f5 100%);
    --wood-trim: linear-gradient(
        90deg,
        #4a3428 0%,
        #7a5c47 18%,
        #a68968 42%,
        #7a5c47 62%,
        #5c4336 100%
    );

    /* Chevron for selects on light backgrounds */
    --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%231a2744' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    color-scheme: light;
}

/* Inter is loaded via @import above — standard UI typography */
body {
    font-family: var(--font-ui);
    background: var(--bg-page);
    background-image: radial-gradient(ellipse 120% 80% at 50% -30%, rgba(28, 53, 82, 0.06) 0%, transparent 55%);
    color: var(--text);
    min-height: 100vh;
}

h1,
h2,
h3 {
    font-family: var(--font-ui);
    font-weight: 600;
}

/* Native dropdowns — light surfaces, navy chevron */
select {
    background-color: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border-medium);
    border-radius: var(--main-radius);
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    cursor: pointer;
    background-image: var(--select-chevron);
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    outline: none;
}

select:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 2px rgba(28, 53, 82, 0.15);
}

select option {
    background-color: var(--bg-card);
    color: var(--text);
    padding-block: 8px;
}

.page {
    min-height: 100vh;
    width: 100%;
}

.topbar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 48px;
    border-bottom: 1px solid rgba(255, 252, 248, 0.12);
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
    position: sticky;
    top: 0;
    backdrop-filter: blur(12px);
    z-index: 10;
    box-shadow:
        0 1px 0 var(--stitch-light) inset,
        0 8px 32px rgba(20, 36, 54, 0.22);
}

.topbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--wood-trim);
    opacity: 0.92;
    pointer-events: none;
}

/* Landing + auth pages: wrap cleanly on narrow viewports */
.topbar--public {
    flex-wrap: wrap;
    gap: 12px 20px;
    row-gap: 14px;
}

.topbar--public .logo {
    flex-shrink: 0;
    min-width: min-content;
}

.topbar--public .nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    row-gap: 10px;
    column-gap: 20px;
    max-width: 100%;
}

.logo {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    /* Same cream as body background — readable on navy (do not use inherit on .logo--link or it pulls body --text) */
    color: var(--bg-page);
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    color: rgba(252, 250, 246, 0.82);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #ffffff;
}

/* Outline pill — chrome-edge CTA on navy bar */
.nav-links a.nav-link-cta {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 252, 248, 0.45);
    background: rgba(255, 252, 248, 0.08);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset;
    font-size: 14px;
    font-weight: 500;
    color: #fdfcfa;
}

.nav-links a.nav-link-cta:hover {
    color: #ffffff;
    border-color: rgba(255, 252, 248, 0.65);
    background: rgba(255, 252, 248, 0.14);
}

.nav-links a.nav-link-cta[aria-current="page"] {
    color: #ffffff;
    border-color: rgba(255, 252, 248, 0.55);
    background: rgba(255, 252, 248, 0.12);
    cursor: default;
    pointer-events: none;
}

.logo--link {
    text-decoration: none;
}

/*
 * Browser default `a:link` / `:visited` wins over `.logo` alone — pin brand color on the nav.
 */
.topbar a.logo.logo--link:link,
.topbar a.logo.logo--link:visited {
    color: var(--bg-page);
}

.topbar a.logo.logo--link:hover {
    color: var(--bg-elevated);
}

.topbar a.logo.logo--link:focus-visible {
    color: var(--bg-page);
    outline: 2px solid rgba(255, 252, 248, 0.45);
    outline-offset: 3px;
}

.nav-links a[aria-current="page"]:not(.nav-link-cta) {
    color: #ffffff;
    font-weight: 600;
}

.nav-links-meta {
    font-size: 12px;
    color: rgba(252, 250, 246, 0.55);
    align-self: center;
}

.dev-logout-form {
    display: inline;
    margin: 0;
}

.dev-logout-button {
    background: none;
    border: none;
    color: rgba(252, 250, 246, 0.82);
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    text-decoration: none;
}

.dev-logout-button:hover {
    color: #ffffff;
}

.hero {
    padding: 90px 48px 50px 48px;
}

.hero-content {
    max-width: 760px;
}

.eyebrow {
    color: var(--text-muted);
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

h1 {
    font-size: 64px;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 18px;
    color: var(--text);
}

.hero-text {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 640px;
    margin-bottom: 28px;
}

.primary-button,
.secondary-button {
    border-radius: 999px;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.primary-button {
    background: linear-gradient(180deg, #2a4d73 0%, var(--navy) 55%, var(--navy-deep) 100%);
    color: #fdfcfa;
    text-decoration: none;
    display: inline-block;
    border: 1px solid rgba(255, 252, 248, 0.35);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.22) inset,
        0 4px 14px rgba(20, 42, 64, 0.25);
}

.primary-button:hover {
    background: linear-gradient(180deg, #335a82 0%, #243e5c 100%);
    border-color: rgba(255, 252, 248, 0.5);
}

.secondary-button {
    background: var(--bg-card);
    color: var(--navy);
    border: 1px solid var(--border-medium);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.secondary-button:hover {
    background: var(--bg-elevated);
    border-color: var(--navy);
}

.secondary-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.secondary-button:disabled:hover {
    background: var(--bg-card);
}

.page-header {
    padding: 70px 48px 30px 48px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 10px 48px 48px 48px;
}

.info-card {
    background: linear-gradient(180deg, #ffffff 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border-light);
    border-radius: 22px;
    padding: 28px;
    min-height: 180px;
    box-shadow: 0 8px 28px rgba(20, 36, 54, 0.08);
}

.info-card h2 {
    font-size: 22px;
    margin-bottom: 14px;
    color: var(--text);
}

.info-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 10px 48px 48px 48px;
}

.listing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 32px rgba(20, 36, 54, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 44px rgba(20, 36, 54, 0.14);
}

.listing-image {
    height: 220px;
    background: linear-gradient(135deg, #e8e4dc, #d4cfc5);
}

.listing-content {
    padding: 22px;
}

.listing-content h2 {
    font-size: 22px;
    margin-bottom: 10px;
}

.listing-price {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.listing-meta {
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 18px;
}

.error-box {
    background: rgba(220, 50, 50, 0.12);
    border: 1px solid rgba(220, 50, 50, 0.35);
    border-radius: 12px;
    padding: 13px 16px;
    color: #f87171;
    font-size: 14px;
    margin-bottom: 20px;
}

.auth-section {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 80px 24px;
}

.auth-section--admin {
    align-items: center;
    flex: 1;
    min-height: 0;
    padding: 40px 20px 56px;
}

.page--admin-login {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-card {
    width: 100%;
    max-width: 440px;
}

.auth-card--admin {
    max-width: 400px;
    padding: 28px 32px 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-sizing: border-box;
    box-shadow: 0 12px 36px rgba(20, 36, 54, 0.08);
}

.page-dealer-auth .auth-card--dealer {
    max-width: 480px;
    padding: 28px 32px 30px;
    background: rgba(40, 90, 130, 0.12);
    border: 1px solid rgba(120, 190, 255, 0.2);
    border-radius: 16px;
    box-sizing: border-box;
}

.page-dealer-auth .topbar .logo,
.page-dealer-auth .topbar a.logo.logo--link:link,
.page-dealer-auth .topbar a.logo.logo--link:visited {
    color: #b8d8ff;
}

.page-dealer-auth .topbar a.logo.logo--link:hover {
    color: #d6ebff;
}

.auth-card__head {
    margin-bottom: 20px;
}

.auth-card--admin .eyebrow {
    margin-bottom: 8px;
}

.auth-card__lede {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-muted);
}

.auth-card--admin .auth-card__lede code {
    font-size: 13px;
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--navy-soft);
}

.admin-credential-hint {
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.22);
}

.admin-credential-hint__title {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #93c5fd;
}

.admin-credential-hint__kv {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 14px;
    margin: 0 0 10px;
    align-items: baseline;
    font-size: 14px;
}

.admin-credential-hint__kv dt {
    margin: 0;
    color: var(--text-muted);
    font-weight: 500;
}

.admin-credential-hint__kv dd {
    margin: 0;
}

.admin-credential-hint__kv kbd {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    font-size: 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: var(--text);
}

.admin-credential-hint__note {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-muted);
}

.admin-credential-hint__note code {
    font-size: 11px;
}

.error-box--admin {
    margin-bottom: 16px;
}

.auth-card h1 {
    font-size: 42px;
    margin-bottom: 36px;
}

.auth-card--admin h1 {
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.auth-form--admin {
    gap: 16px;
    margin-bottom: 0;
}

.auth-form--admin .field-group input::placeholder {
    color: #555;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.field-group input {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
}

.field-group input:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 2px rgba(28, 53, 82, 0.12);
}

.search-select {
    width: 100%;
    padding: 14px 16px;
    padding-right: 42px;
    font-size: 15px;
    background-color: var(--bg-card);
    background-image: var(--select-chevron);
    background-position: right 16px center;
    transition: border-color 0.2s ease;
}

.search-select:focus {
    border-color: var(--navy);
}

.full-width {
    width: 100%;
    text-align: center;
    margin-top: 4px;
    padding: 15px 24px;
}

.auth-footer {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
}

.auth-footer a {
    color: var(--navy);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Smart search (listings) — width set by .filter-search-row */
.smart-search-wrap {
    width: 100%;
    max-width: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-search-row {
    width: 100%;
    flex-shrink: 0;
}

.filter-controls-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px 10px;
    width: 100%;
    flex-shrink: 0;
    min-height: 44px;
    padding-top: 12px;
    margin-top: 10px;
    border-top: 1px solid var(--border-light);
}

/* ZIP and radius always appear first in the pill row */
.filter-controls-row .pill-group:has(input[name="zip_code"]) { order: -2; }
.filter-controls-row .pill-group:has(select[name="radius"])  { order: -1; }

.smart-search-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.smart-search-input {
    width: 100%;
    padding: 10px 14px;
    min-height: 40px;
    box-sizing: border-box;
    border-radius: var(--main-radius);
    border: 1px solid var(--border-medium);
    background: var(--bg-card);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.smart-search-input:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(28, 53, 82, 0.12);
}

.smart-search-input::placeholder {
    color: var(--text-faint);
}

.smart-parse-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 0;
}

.smart-parse-chip {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(28, 53, 82, 0.08);
    border: 1px solid rgba(28, 53, 82, 0.22);
    color: var(--navy);
}

.pill-trigger.smart-parse-active,
.acc-trigger.smart-parse-active {
    border-color: rgba(0, 189, 227, 0.65);
    box-shadow: 0 0 0 1px rgba(0, 189, 227, 0.22);
    color: #e8f8fc;
}

.pill-group.pill-select-group.smart-parse-active .pill-select-label,
.acc-plain-group.smart-parse-active .acc-plain-label {
    color: #00bde3;
}

.pill-group.pill-select-group.smart-parse-active .pill-select,
.acc-plain-group.smart-parse-active .sidebar-select,
.acc-plain-group.smart-parse-active .sidebar-input {
    border-color: rgba(0, 189, 227, 0.5);
}

.smart-parse-chips.smart-parse-active {
    outline: 1px solid rgba(0, 189, 227, 0.45);
    border-radius: var(--main-radius);
    padding: 8px 10px;
}

/* ══════════════════════════════════════════════════
   FILTER BAR — starts centered top, docks left on scroll
══════════════════════════════════════════════════ */

.filter-bar {
    position: fixed;
    top: 73px;
    left: 0;
    right: 0;
    z-index: 40;
    pointer-events: none;
    height: 0; /* collapse wrapper so it never blocks scroll */
    overflow: visible;
}

/* ── TOP MODE: centered horizontal pill row ── */

.filter-top-row {
    pointer-events: all;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px 32px 16px;
    background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-page) 100%);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-light);
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 12px 40px rgba(20, 36, 54, 0.06);
}

/* hidden when docked */
.filter-bar.docked .filter-top-row {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
}

/* ── Pill buttons ── */

.pill-group {
    position: relative;
}

.pill-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: 999px;
    padding: 7px 14px;
    color: var(--text-muted);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.pill-trigger:hover {
    background: var(--bg-elevated);
    color: var(--text);
    border-color: var(--navy);
}

.pill-trigger.has-selection {
    background: rgba(28, 53, 82, 0.08);
    border-color: rgba(28, 53, 82, 0.35);
    color: var(--navy);
}

.pill-trigger.electric-mode {
    border-color: rgba(100,200,255,0.4);
    color: #7dd3fc;
    cursor: default;
}

.pill-label {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.03em;
}

.pill-count {
    background: var(--navy);
    color: #fdfcfa;
    font-size: 10px;
    font-weight: 700;
    border-radius: 99px;
    padding: 1px 5px;
    line-height: 1.6;
}

.pill-chevron {
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.pill-trigger.open .pill-chevron {
    transform: rotate(180deg);
}

/* ── Pill dropdowns ── */

.pill-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: 14px;
    padding: 6px;
    min-width: 180px;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 18px 44px rgba(20, 36, 54, 0.14);
    z-index: 100;
    scrollbar-width: thin;
    scrollbar-color: rgba(28, 53, 82, 0.2) transparent;
}

.pill-dropdown.open {
    display: block;
}

.pill-options {
    display: flex;
    flex-direction: column;
}

/* ── Pill inline selects (price, mileage, zip, radius) ── */

.pill-select-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.pill-select-label {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding-left: 2px;
}

.pill-select {
    padding: 9px 14px;
    padding-right: 30px;
    font-size: 12px;
    background-color: var(--bg-card);
    background-image: var(--select-chevron);
    background-position: right 10px center;
    transition: border-color 0.15s ease;
}

.pill-select:focus {
    border-color: var(--navy);
}

.pill-zip {
    background-color: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--main-radius);
    padding: 9px 12px;
    color: var(--text);
    font-size: 12px;
    font-family: inherit;
    width: 88px;
    outline: none;
    transition: border-color 0.15s ease;
}

.pill-zip:focus {
    border-color: var(--navy);
}

.pill-actions {
    display: flex;
    align-items: center;
    align-self: center;
    gap: 10px;
    margin-left: 4px;
}

.pill-search-btn {
    padding: 7px 18px;
    font-size: 13px;
    border-radius: 999px;
}

.pill-clear-btn {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.pill-clear-btn:hover {
    color: var(--navy);
}

/* ── DOCKED MODE: vertical sidebar ── */

.filter-docked-inner {
    pointer-events: none;
    position: fixed;
    top: 73px;
    left: 0;
    width: 240px;
    height: calc(100vh - 73px);
    background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-subtle) 100%);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateX(-20px);
    /* Animated by Motion.dev on listings page when docking */
}

.filter-bar.docked .filter-docked-inner {
    pointer-events: all;
}

.docked-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.docked-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.docked-count {
    background: var(--navy);
    color: var(--bg-elevated);
    font-size: 10px;
    font-weight: 700;
    border-radius: 99px;
    padding: 1px 7px;
    line-height: 1.6;
}

.docked-body {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(28, 53, 82, 0.25) transparent;
}

.docked-body::-webkit-scrollbar { width: 3px; }
.docked-body::-webkit-scrollbar-thumb {
    background: rgba(28, 53, 82, 0.2);
    border-radius: 2px;
}

.docked-footer {
    padding: 14px;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.docked-search-btn {
    flex: 1;
    text-align: center;
    padding: 11px 14px;
    font-size: 13px;
}

.docked-clear-btn {
    padding: 11px 14px;
    font-size: 13px;
    text-align: center;
}

/* ── Accordion (docked sidebar) ── */

.acc-section {
    border-bottom: 1px solid var(--border-light);
}

.acc-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    padding: 11px 18px;
    cursor: pointer;
    color: var(--text);
    font-family: inherit;
    transition: background 0.12s ease;
}

.acc-trigger:hover {
    background: var(--navy-soft);
}

.acc-trigger.has-selection .acc-label { color: var(--navy); }
.acc-trigger.electric-mode { cursor: default; }
.acc-trigger.electric-mode .acc-label { color: #7dd3fc; }

.acc-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-align: left;
}

.acc-right {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}

.acc-count {
    background: var(--navy);
    color: var(--bg-elevated);
    font-size: 10px;
    font-weight: 700;
    border-radius: 99px;
    padding: 1px 5px;
    line-height: 1.6;
}

.acc-chevron {
    color: var(--text-faint);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.acc-trigger.open .acc-chevron { transform: rotate(180deg); }

.acc-body {
    display: none;
    padding-bottom: 4px;
}

.acc-body.open { display: block; }

.acc-options { display: flex; flex-direction: column; }

.acc-plain-group {
    padding: 10px 0 4px 0;
    border-bottom: 1px solid var(--border-light);
}

/* Location group at top of sidebar — subtle highlight to distinguish */
.acc-plain-group.sidebar-location-group {
    background: var(--navy-soft);
    border-bottom-color: var(--border-medium);
}

.acc-plain-group.sidebar-location-group .acc-plain-label {
    color: var(--text-muted);
}

.acc-plain-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0 18px 5px 18px;
}

/* ── Shared checkbox options ── */

.filter-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 18px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
    transition: background 0.1s ease;
    user-select: none;
}

.filter-option:hover { background: var(--navy-soft); }

.filter-option input[type="checkbox"] {
    appearance: none;
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--border-medium);
    border-radius: 4px;
    background: var(--bg-card);
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.filter-option input[type="checkbox"]:checked {
    background: var(--navy);
    border-color: var(--navy);
}

.filter-option input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 5px;
    height: 8px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: translate(-50%, -50%) rotate(45deg);
}

/* ── Shared sidebar selects / input ── */

.sidebar-select,
.sidebar-input {
    display: block;
    width: calc(100% - 36px);
    margin: 0 18px 10px 18px;
    border-radius: var(--main-radius);
    padding: 11px 13px;
    color: var(--text);
    font-size: 12px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
}

.sidebar-input {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
}

.sidebar-select {
    cursor: pointer;
    background-color: var(--bg-card);
    background-image: var(--select-chevron);
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
    border: 1px solid var(--border-medium);
}

.sidebar-select:focus,
.sidebar-input:focus {
    border-color: var(--navy);
}

/* ── Main content area ── */

/* Clears fixed nav + filter stack; raise middle term in 5px steps if count clips under bar */
.dash-content {
    margin: 0 auto;
    padding: calc(73px + 105px + 10px) 40px 80px 40px;
    /* margin-left animated by Motion.dev on listings page when filter docks */
}

.listings-main.dash-content {
    max-width: 1240px;
    padding: calc(73px + 218px + 10px) 32px 96px 32px;
    transition: padding-top 0.45s cubic-bezier(0.33, 1, 0.68, 1);
    box-sizing: border-box;
}

/* Listings-only: sidebar + main column (see listings.html .listings-layout) */
body.listings-page .listings-main.dash-content {
    padding: 0 0 96px 0;
    transition: none;
}

.page.docked .dash-content {
    margin-right: 0;
    padding: 36px 32px 80px 32px;
}

.page.docked .listings-main.dash-content {
    padding-top: 36px;
}

/* ── Listings page (search) — layout & atmosphere ── */

body.listings-page {
    background-color: var(--bg-page);
    background-image:
        radial-gradient(ellipse 90% 70% at 50% -25%, rgba(28, 53, 82, 0.07) 0%, transparent 52%),
        radial-gradient(ellipse 55% 45% at 100% 10%, rgba(92, 67, 56, 0.05) 0%, transparent 48%);
    overflow-x: hidden;
}

/* Filters live in a left column; results use the remaining width — no full-width fixed strip */
body.listings-page .listings-filter-shell.filter-bar {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    z-index: 1;
    height: auto;
    pointer-events: auto;
    overflow: visible;
}

body.listings-page .listings-layout {
    display: grid;
    grid-template-columns: minmax(252px, 300px) minmax(0, 1fr);
    gap: 28px 36px;
    max-width: 1560px;
    margin: 0 auto;
    padding: 20px 32px 80px;
    box-sizing: border-box;
    align-items: start;
}

body.listings-page .listings-sidebar {
    position: sticky;
    top: 88px;
    align-self: start;
    min-width: 0;
}

body.listings-page .listings-main-column {
    min-width: 0;
}

body.listings-page .filter-top-row {
    position: static;
    display: block;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}

.listings-filter-inner {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

body.listings-page .listings-filter-inner {
    max-width: none;
    margin: 0;
}

.listings-intro {
    text-align: center;
    margin-bottom: 22px;
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
}

body.listings-page .listings-intro {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 16px;
    max-width: none;
}

.listings-intro-eyebrow {
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 8px;
}

.listings-intro-heading {
    font-size: clamp(22px, 3.2vw, 30px);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0 0 8px;
    color: var(--text);
}

.listings-intro-sub {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 0;
}

/* Full-width example (wraps); avoids truncated placeholder in narrow sidebar */
.smart-search-hint {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 4px 18px rgba(20, 36, 54, 0.05);
    font-size: 13px;
    line-height: 1.55;
    color: var(--text);
    box-sizing: border-box;
    width: 100%;
}

.smart-search-hint__label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.listings-search-card {
    background: linear-gradient(165deg, #ffffff 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 20px 22px 18px;
    box-shadow: 0 10px 36px rgba(20, 36, 54, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.listings-page .filter-controls-row {
    justify-content: flex-start;
    border-top: 1px solid var(--border-light);
    margin-top: 16px;
    padding-top: 16px;
    gap: 10px 12px;
}

body.listings-page .pill-actions {
    align-self: stretch;
    margin-left: 0;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    width: 100%;
    justify-content: flex-start;
}

body.listings-page .listings-sidebar .pill-dropdown {
    left: 0;
    transform: none;
    min-width: 100%;
    box-sizing: border-box;
}

body.listings-page .smart-search-input {
    min-height: 48px;
    padding: 12px 18px;
    font-size: 15px;
    border-radius: 14px;
    border: 1px solid var(--border-medium);
    background: var(--bg-card);
    box-shadow: inset 0 1px 2px rgba(20, 36, 54, 0.04);
}

body.listings-page .smart-search-input:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(28, 53, 82, 0.12), inset 0 1px 2px rgba(20, 36, 54, 0.04);
}

body.listings-page .pill-select {
    border-radius: 12px;
}

body.listings-page .pill-zip {
    border-radius: 12px;
}

/* Legacy scroll-dock sidebar (duplicate accordion) — hidden; filters are in .listings-sidebar */
body.listings-page .filter-docked-inner {
    display: none !important;
}

@media (max-width: 960px) {
    body.listings-page .listings-layout {
        grid-template-columns: 1fr;
        padding: 16px 20px 64px;
        gap: 24px;
    }

    body.listings-page .listings-sidebar {
        position: static;
        max-height: none;
        overflow: visible;
    }

    body.listings-page .listings-intro {
        text-align: center;
        max-width: 40rem;
        margin-left: auto;
        margin-right: auto;
    }

    body.listings-page .smart-search-hint {
        text-align: center;
    }
}

/* Compact-on-scroll: intro folds away inside the sidebar card */
.filter-top-row {
    transition:
        padding 0.45s cubic-bezier(0.33, 1, 0.68, 1),
        box-shadow 0.35s ease;
}

.filter-top-row .listings-intro {
    transition:
        max-height 0.48s cubic-bezier(0.33, 1, 0.68, 1),
        opacity 0.34s ease,
        margin-bottom 0.38s ease,
        transform 0.42s cubic-bezier(0.33, 1, 0.68, 1);
}

.filter-top-row:not(.listings-filters-compact) .listings-intro {
    max-height: 320px;
}

.filter-top-row.listings-filters-compact .listings-intro {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    overflow: hidden;
    transform: translateY(-8px);
    pointer-events: none;
}

.filter-top-row .listings-search-card {
    transition:
        padding 0.42s cubic-bezier(0.33, 1, 0.68, 1),
        border-radius 0.35s ease,
        box-shadow 0.35s ease;
}

.filter-top-row.listings-filters-compact {
    padding: 12px 20px 14px !important;
    box-shadow: 0 12px 36px rgba(20, 36, 54, 0.12);
}

/* Sidebar layout: keep compact padding on the card, not the column wrapper */
body.listings-page .filter-top-row.listings-filters-compact {
    padding: 0 !important;
    box-shadow: none;
}

.filter-top-row.listings-filters-compact .listings-search-card {
    padding: 12px 16px 10px;
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(20, 36, 54, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.filter-top-row.listings-filters-compact .filter-controls-row {
    margin-top: 12px;
    padding-top: 12px;
}

.filter-top-row.listings-filters-compact .smart-search-input {
    min-height: 42px;
    padding: 10px 16px;
    font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
    .filter-top-row,
    .filter-top-row .listings-intro,
    .filter-top-row .listings-search-card {
        transition: none !important;
    }

    .filter-top-row.listings-filters-compact .listings-intro {
        transform: none;
    }
}

@media (prefers-reduced-motion: no-preference) {
    body.listings-page .listings-intro,
    body.listings-page .smart-search-hint,
    body.listings-page .listings-search-card {
        animation: listings-hero-in 0.75s cubic-bezier(0.22, 1, 0.36, 1) backwards;
    }

    body.listings-page .smart-search-hint {
        animation-delay: 0.05s;
    }

    body.listings-page .listings-search-card {
        animation-delay: 0.1s;
    }
}

@keyframes listings-hero-in {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.listings-page .listings-intro,
    body.listings-page .smart-search-hint,
    body.listings-page .listings-search-card {
        animation: none !important;
    }
}

/* ── Welcome state ── */

.welcome-state {
    margin-bottom: 48px;
    text-align: center;
}

.welcome-state h1 {
    font-size: 52px;
    margin-bottom: 14px;
}

.welcome-state .hero-text {
    max-width: 500px;
    margin: 0 auto;
}

/* ── Results ── */

.results-count {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 16px 0;
    padding: 0;
}

.listings-main .results-count {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    letter-spacing: 0.06em;
}

/* No “ghost pill” when count text is empty (e.g. before JS or when no matches / filters incomplete) */
.listings-main .results-count:empty {
    display: none;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.result-card {
    background: linear-gradient(180deg, #ffffff 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border-light);
    border-radius: var(--main-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: block;
}

.result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(20, 36, 54, 0.12);
}

body.listings-page .result-card {
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, var(--bg-elevated) 100%);
    border-color: var(--border-light);
}

body.listings-page .result-card:hover {
    border-color: var(--border-medium);
}

.result-image-wrap {
    position: relative;
}

.result-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-subtle);
    border-top-left-radius: var(--main-radius);
    border-top-right-radius: var(--main-radius);
}

.result-photo-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(26, 39, 58, 0.88);
    color: var(--bg-elevated);
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 6px;
}

.result-content { padding: 18px; }

.result-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.result-title-row h2 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    min-width: 0;
}

.result-incomplete-pill {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #e8b86a;
    border: 1px solid rgba(232, 184, 106, 0.45);
    border-radius: 6px;
    padding: 3px 7px;
    line-height: 1.2;
}

.result-card--incomplete {
    border-color: rgba(232, 184, 106, 0.2);
}

.result-trim {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.result-price {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.result-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.result-meta--specs {
    font-size: 11px;
    color: var(--text-faint);
    margin-top: 2px;
    margin-bottom: 4px;
}

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

.empty-state {
    padding: 60px 0;
}

.listings-main .empty-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: min(52vh, 520px);
    padding: 32px 16px 72px;
}

.listings-empty-card {
    width: 100%;
    max-width: 440px;
    padding: 40px 32px;
    text-align: center;
    background: linear-gradient(165deg, #ffffff 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    box-shadow: 0 20px 48px rgba(20, 36, 54, 0.1);
}

.listings-empty-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
    color: var(--text-faint);
}

.no-results {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 8px;
}

.no-results-sub {
    color: var(--text-muted);
    font-size: 14px;
}

.listings-main .no-results {
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.listings-main .no-results-sub {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
    max-width: 28rem;
    margin: 0 auto;
}

/* ── Car Detail ── */

.car-detail-incomplete-banner {
    margin: 0 0 20px;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid rgba(232, 184, 106, 0.45);
    background: rgba(232, 184, 106, 0.08);
}

.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 {
    padding: 48px 24px;
    max-width: 95%;
    width: 1800px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Prevent gallery from expanding past grid; keeps 3-column proportions */
.car-detail-info-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
    margin-bottom: 32px;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--navy);
}

.car-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.8fr);
    gap: 30px;
    align-items: flex-start;
    width: 100%;
}

.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: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(20, 36, 54, 0.55);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    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: 20px;
    background-color: var(--bg-subtle);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.car-detail-image .car-gallery-main-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.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: 50%;
    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: 64px;
    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-price .price-msrp-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.car-detail-info h1 {
    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);
}

.car-kbb-panel {
    margin-top: 20px;
    margin-bottom: 4px;
    padding: 14px 16px;
    border-radius: var(--main-radius);
    border: 1px solid var(--border-medium);
    background: var(--bg-card);
    box-shadow: 0 4px 18px rgba(20, 36, 54, 0.06);
    max-width: 520px;
}

.car-kbb-eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 10px;
}

.car-kbb-line {
    margin: 6px 0;
    font-size: 0.98rem;
    color: var(--text);
}

.car-kbb-label {
    display: inline-block;
    min-width: 11rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.car-kbb-vs {
    margin: 12px 0 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy);
}

.car-kbb-disclaimer,
.car-kbb-meta {
    margin: 10px 0 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--text-muted);
}

.car-kbb-meta {
    margin-top: 8px;
    color: var(--text-faint);
}

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

.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;
}

.car-detail-actions {
    display: flex;
    gap: 12px;
}

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

/* Column 3: Vehicle History Highlights panel */
.car-detail-history {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 24px;
    min-width: 0;
    box-shadow: 0 6px 24px rgba(20, 36, 54, 0.06);
}

.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-left: 28px;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text);
}

.history-highlight-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    width: 18px;
    height: 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c3552' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

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

.carfax-report-btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: var(--navy);
    border: none;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease;
    box-sizing: border-box;
}

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

.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);
}

.oem-vin-lookup-hint {
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-muted);
    margin: 14px 0 10px;
}

/* ── Dashboard ── */

body.db-page {
    background-color: var(--bg-page);
    background-image:
        radial-gradient(ellipse 90% 55% at 50% -28%, rgba(28, 53, 82, 0.08) 0%, transparent 52%),
        radial-gradient(ellipse 50% 45% at 95% 12%, rgba(92, 67, 56, 0.05) 0%, transparent 48%),
        radial-gradient(ellipse 45% 35% at 5% 55%, rgba(28, 53, 82, 0.04) 0%, transparent 45%);
}

.db-welcome {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-light);
}

.db-welcome-glow {
    position: absolute;
    inset: -40% -20% auto;
    height: 140%;
    background: radial-gradient(circle at 50% 0%, rgba(28, 53, 82, 0.06) 0%, transparent 55%);
    pointer-events: none;
}

.db-welcome-inner {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: 48px 48px 44px;
}

.db-welcome-eyebrow {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.db-welcome-title {
    font-size: clamp(28px, 4.5vw, 40px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 14px;
    word-break: break-word;
}

.db-welcome-sub {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-muted);
    max-width: 36rem;
    margin-bottom: 28px;
}

.db-welcome-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.db-welcome-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    font-size: 14px;
    transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.db-welcome-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(20, 36, 54, 0.18);
}

.db-welcome-cta-icon {
    transition: transform 0.22s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.db-welcome-cta:hover .db-welcome-cta-icon {
    transform: translateX(4px);
}

.db-welcome-secondary {
    padding: 13px 22px;
    font-size: 14px;
}

@media (prefers-reduced-motion: no-preference) {
    .db-reveal {
        animation: db-reveal-up 0.75s cubic-bezier(0.22, 1, 0.36, 1) backwards;
    }

    .db-layout > .db-section.db-reveal:nth-child(1) {
        animation-delay: 0.06s;
    }

    .db-layout > .db-section.db-reveal:nth-child(2) {
        animation-delay: 0.14s;
    }

    .db-layout > .db-section.db-reveal:nth-child(3) {
        animation-delay: 0.22s;
    }
}

@keyframes db-reveal-up {
    from {
        opacity: 0;
        transform: translateY(32px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .db-reveal {
        animation: none !important;
    }

    .db-welcome-cta:hover {
        transform: none;
        box-shadow: none;
    }
}

.db-layout {
    max-width: 960px;
    margin: 0 auto;
    padding: 56px 48px 100px;
    display: flex;
    flex-direction: column;
    gap: 72px;
}

.db-section {}

.db-section-header {
    margin-bottom: 22px;
}

.db-eyebrow {
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.db-section-title {
    font-size: clamp(22px, 2.8vw, 30px);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.db-section-hint {
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-muted);
    margin-top: 10px;
    max-width: 42rem;
}

/* Find Cars card */

.find-cars-card {
    display: block;
    background: linear-gradient(165deg, #ffffff 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border-light);
    border-radius: 22px;
    padding: 30px 34px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 12px 40px rgba(20, 36, 54, 0.1);
    transition:
        border-color 0.28s ease,
        background 0.28s ease,
        transform 0.28s cubic-bezier(0.34, 1.15, 0.64, 1),
        box-shadow 0.28s ease;
}

.find-cars-card:hover {
    background: linear-gradient(165deg, var(--bg-elevated) 0%, #ffffff 100%);
    border-color: var(--border-medium);
    transform: translateY(-4px);
    box-shadow: 0 20px 48px rgba(20, 36, 54, 0.14);
}

@media (prefers-reduced-motion: reduce) {
    .find-cars-card:hover {
        transform: none;
    }
}

.find-cars-card-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.find-cars-label {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 6px;
}

.find-cars-sub {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.55;
    max-width: 520px;
}

.find-cars-arrow {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--chrome-face);
    color: var(--navy);
    border: 1px solid var(--chrome-line);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.28s cubic-bezier(0.34, 1.25, 0.64, 1);
    box-shadow: 0 4px 14px rgba(20, 36, 54, 0.12);
}

.find-cars-card:hover .find-cars-arrow {
    transform: translateX(6px) scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
    .find-cars-card:hover .find-cars-arrow {
        transform: none;
    }
}

.find-cars-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    font-size: 11px;
    letter-spacing: 0.06em;
    background: var(--navy-soft);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    padding: 6px 13px;
    color: var(--text-muted);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.find-cars-card:hover .tag {
    border-color: var(--border-medium);
    color: var(--text);
}

/* Saved Cars */

.saved-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.saved-card {
    background: linear-gradient(180deg, #ffffff 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border-light);
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition:
        transform 0.28s cubic-bezier(0.34, 1.12, 0.64, 1),
        box-shadow 0.28s ease,
        border-color 0.22s ease;
    display: block;
}

.saved-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 42px rgba(20, 36, 54, 0.12);
    border-color: var(--border-medium);
}

@media (prefers-reduced-motion: reduce) {
    .saved-card:hover {
        transform: none;
    }
}

.saved-image {
    height: 140px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-subtle);
}

.saved-info {
    padding: 14px 16px;
}

.saved-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.saved-trim {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.saved-price {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.saved-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.saved-empty {
    background: linear-gradient(180deg, #ffffff 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border-light);
    border-radius: 22px;
    padding: 52px 40px;
    text-align: center;
    box-shadow: 0 12px 36px rgba(20, 36, 54, 0.08);
}

.saved-empty-cta {
    margin-top: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.saved-empty-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
}

.saved-empty-sub {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.55;
}

/* ── Save button (car detail page) ── */

.car-detail-price-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.save-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 999px;
    border: 1.5px solid var(--border-medium);
    background: var(--chrome-face);
    color: var(--navy);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.12s;
    flex-shrink: 0;
}

.save-btn:hover {
    background: #fff;
    border-color: var(--navy);
    color: var(--navy-deep);
    transform: scale(1.03);
}

.save-btn .save-icon {
    fill: none;
    transition: fill 0.18s;
}

.save-btn--saved {
    background: #e11d48;
    border-color: #e11d48;
    color: #fff;
    box-shadow: 0 0 18px rgba(225, 29, 72, 0.45);
}

.save-btn--saved .save-icon {
    fill: currentColor;
}

.save-btn--saved:hover {
    background: #be123c;
    border-color: #be123c;
    box-shadow: 0 0 24px rgba(225, 29, 72, 0.6);
    transform: scale(1.03);
}

.save-btn:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
}

/* ── Recommendations carousel ── */

.reco-carousel-wrap {
    position: relative;
}

.reco-track-outer {
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    box-shadow: 0 10px 32px rgba(20, 36, 54, 0.08);
}

.reco-track {
    display: flex;
    gap: 16px;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.reco-card {
    flex: 0 0 220px;
    background: linear-gradient(180deg, #ffffff 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition:
        border-color 0.24s ease,
        transform 0.26s cubic-bezier(0.34, 1.12, 0.64, 1),
        box-shadow 0.24s ease;
    display: flex;
    flex-direction: column;
}

.reco-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(20, 36, 54, 0.12);
}

@media (prefers-reduced-motion: reduce) {
    .reco-card:hover {
        transform: none;
    }
}

.reco-card-image {
    width: 100%;
    aspect-ratio: 16/10;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-subtle);
    flex-shrink: 0;
}

.reco-card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.reco-card-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reco-card-trim {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reco-card-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-top: 6px;
}

.reco-card-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.reco-nav {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    justify-content: flex-end;
}

.reco-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--chrome-face);
    border: 1px solid var(--chrome-line);
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    flex-shrink: 0;
}

.reco-nav-btn:hover {
    background: #fff;
    border-color: var(--navy);
    color: var(--navy-deep);
}

.reco-nav-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

@media (max-width: 1400px) {
    .results-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1000px) {
    .results-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid, .listings-grid { grid-template-columns: 1fr; }
    .car-detail-layout { grid-template-columns: 1fr; }
    .car-detail-info { padding: 24px 0 32px; }
    h1 { font-size: 44px; }
}

#browse-section,
#saved-section {
    scroll-margin-top: 96px;
}

@media (max-width: 700px) {
    .db-welcome-inner {
        padding: 36px 22px 32px;
    }

    .db-layout {
        padding: 36px 22px 72px;
        gap: 52px;
    }

    .find-cars-card {
        padding: 24px 22px;
    }

    .find-cars-card-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .find-cars-arrow {
        align-self: flex-end;
    }

    .topbar {
        padding: 20px;
        flex-direction: column;
        gap: 14px;
        align-items: flex-start;
    }
    .results-grid { grid-template-columns: 1fr; }
    .dash-content { padding: calc(73px + 88px + 10px) 20px 60px 20px; }
    .listings-main.dash-content {
        padding: calc(73px + 300px + 8px) 16px 64px 16px;
    }
    body.listings-page .listings-main.dash-content {
        padding: 0 0 48px 0;
    }
    body.listings-page .listings-layout {
        padding: 12px 14px 48px;
        gap: 20px;
    }
    .page.docked .listings-main.dash-content {
        padding-top: 24px;
    }
    .listings-search-card {
        padding: 16px 14px 14px;
    }
    .listings-intro {
        margin-bottom: 16px;
    }
    .listings-main .empty-state {
        min-height: 36vh;
        padding: 24px 12px 48px;
    }
    .filter-docked-inner { display: none; }
    .page.docked .dash-content { margin-left: 0; }
    .car-detail { padding: 20px; }
}

.carfax-hint {
    margin: 0 0 20px 0;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    max-width: 720px;
}

/* ── Developer dashboard ── */
.dev-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 48px 80px;
}

.dev-hero {
    margin-bottom: 40px;
}

.dev-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 10px;
}

.dev-sub {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 640px;
}

.dev-section {
    margin-bottom: 28px;
}

.dev-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.dev-status-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--main-radius);
    padding: 18px 20px;
    box-shadow: 0 4px 18px rgba(20, 36, 54, 0.06);
}

.dev-status-label {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.dev-status-value {
    font-size: 18px;
    font-weight: 600;
}

.dev-status-value.dev-ok {
    color: #7dffb2;
}

.dev-status-value.dev-bad {
    color: #ff8a8a;
}

.dev-status-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    word-break: break-all;
}

.dev-refresh-status {
    margin-top: 4px;
}

.dev-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
}

@media (max-width: 900px) {
    .dev-two-col {
        grid-template-columns: 1fr;
    }
}

.dev-form .field-group input {
    width: 100%;
    background-color: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border-medium);
    border-radius: var(--main-radius);
    padding: 12px 14px;
    font-family: inherit;
    font-size: 14px;
}

.dev-form .field-group input:focus {
    border-color: var(--navy);
    outline: none;
}

.dev-form-row {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 16px;
}

.dev-state-input {
    text-transform: uppercase;
}

.dev-form-msg {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 12px;
    min-height: 1.2em;
}

.dev-hint {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 14px;
}

.dev-hint code {
    font-size: 12px;
    background: var(--navy-soft);
    padding: 2px 6px;
    border-radius: 6px;
}

.dev-playground-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 12px;
}

.dev-scan-input {
    flex: 1;
    min-width: 200px;
}

.dev-log-pre {
    margin: 0;
    padding: 16px 18px;
    min-height: 200px;
    max-height: 420px;
    overflow: auto;
    background: #14222e;
    border: 1px solid var(--border-medium);
    border-radius: var(--main-radius);
    font-size: 12px;
    line-height: 1.5;
    color: #c8e6c9;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

.dev-log-pre--compact {
    min-height: 80px;
    max-height: 220px;
}

.dev-tools-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
}

.dev-tool-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dev-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-light);
    border-radius: var(--main-radius);
    background: var(--bg-card);
}

.dev-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.dev-table th,
.dev-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.dev-table th {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-elevated);
}

.dev-table tbody tr:hover {
    background: var(--navy-soft);
}

.dev-table-link {
    color: var(--navy);
    text-decoration: none;
    word-break: break-all;
}

.dev-table-link:hover {
    text-decoration: underline;
}

.dev-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    color: var(--text-muted);
}

.dev-delete-btn {
    background: transparent;
    border: 1px solid rgba(255, 120, 120, 0.45);
    color: #ff9b9b;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
}

.dev-delete-btn:hover {
    background: rgba(255, 80, 80, 0.12);
}

.dev-empty-row td {
    color: var(--text-muted);
    text-align: center;
    padding: 28px;
}

.dev-discovery-panel {
    margin: 20px 0 16px;
    padding: 16px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--main-radius);
}

.dev-discovery-title {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.dev-discovery-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dev-discovery-item {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
}

.dev-discovery-item:last-child {
    border-bottom: none;
}

.dev-discovery-placeholder {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
}

.dev-textarea-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dev-url-textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px 16px;
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border-medium);
    border-radius: var(--main-radius);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    line-height: 1.45;
    resize: vertical;
}

.dev-url-textarea:focus {
    outline: none;
    border-color: var(--navy);
}

.dev-playground-row--mt {
    margin-top: 14px;
}

.dev-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
}

.dev-queue-panel {
    margin: 20px 0 16px;
}

.dev-queue-table-wrap {
    max-height: 220px;
    overflow: auto;
}

.dev-queue-table td:last-child {
    white-space: nowrap;
}

.dev-view-site-btn {
    display: inline-block;
    font-size: 12px;
    color: var(--navy);
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid var(--border-medium);
    border-radius: 8px;
}

.dev-view-site-btn:hover {
    background: var(--navy-soft);
}

/* ── Dev: Missing / Incomplete cars section ── */

.dev-incomplete-issues {
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--main-radius);
    background: var(--bg-card);
}

.dev-incomplete-issues-title {
    font-size: 1rem;
    margin: 0 0 8px;
    font-weight: 600;
}

.dev-incomplete-issues-lead {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 10px;
    line-height: 1.45;
}

.dev-incomplete-issues-list {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text);
}

.dev-incomplete-issues-list li {
    margin-bottom: 4px;
}

.dev-incomplete-issues-label {
    font-weight: 600;
}

.dev-incomplete-issues-meta {
    margin-left: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 400;
}

.dev-incomplete-count {
    display: inline-block;
    background: #ef4444;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 99px;
    padding: 2px 10px;
    margin-left: 8px;
    vertical-align: middle;
    line-height: 1.6;
}

.dev-incomplete-toolbar-panel {
    margin: 18px 0 16px;
    padding: 22px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--main-radius);
}

.dev-incomplete-toolbar-eyebrow {
    margin: 0 0 16px;
}

.dev-incomplete-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px 20px;
    margin: 0;
}

.dev-incomplete-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    flex: 1 1 260px;
}

.dev-incomplete-filter label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.dev-incomplete-filter select {
    flex: 1 1 280px;
    min-width: min(380px, 100%);
    min-height: 48px;
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--main-radius);
}

.dev-incomplete-log-btn.secondary-button {
    flex: 0 0 auto;
    padding: 16px 26px;
    font-size: 15px;
    white-space: nowrap;
}

.dev-incomplete-filter-hint {
    margin: 14px 0 0;
    font-size: 0.9rem;
    color: rgba(251, 191, 36, 0.95);
}

.dev-incomplete-action-msg {
    margin: 10px 0 0;
    font-size: 0.88rem;
    color: rgba(158, 203, 255, 0.92);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    line-height: 1.45;
    min-height: 1.35em;
}

.dev-incomplete-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 8px;
}

@media (max-width: 1200px) {
    .dev-incomplete-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .dev-incomplete-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .dev-incomplete-grid { grid-template-columns: 1fr; }
}

.dev-incomplete-card {
    display: flex;
    flex-direction: column;
    border-color: rgba(239, 68, 68, 0.25);
}

.dev-incomplete-card:hover {
    border-color: rgba(239, 68, 68, 0.45);
}

.dev-incomplete-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(239, 68, 68, 0.85);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dev-incomplete-missing {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.dev-missing-tag {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    letter-spacing: 0.03em;
}

.dev-incomplete-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    align-items: center;
}

.dev-incomplete-empty {
    padding: 32px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--main-radius);
    margin-top: 16px;
}

.dev-log-line {
    display: block;
    white-space: pre-wrap;
    word-break: break-word;
}

.dev-log-turbo {
    color: #7dd3fc;
}

.dev-log-slow {
    color: #fde047;
}

.dev-log-discovery {
    color: #86efac;
}

.dev-log-err {
    background: rgba(127, 29, 29, 0.45);
    color: #fecaca;
}

/* Car detail — Claude chat */
.car-chat-section {
    max-width: 960px;
    margin: 32px auto 48px;
    padding: 0 20px 24px;
    border-top: 1px solid var(--border-light);
    padding-top: 28px;
}

.car-chat-heading {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.car-chat-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.car-chat-hint code {
    font-size: 12px;
    color: var(--text-muted);
}

.car-chat-messages {
    min-height: 120px;
    max-height: 320px;
    overflow-y: auto;
    padding: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--main-radius);
    margin-bottom: 12px;
}

.car-chat-bubble {
    max-width: 92%;
    padding: 10px 14px;
    margin-bottom: 10px;
    border-radius: 10px;
    line-height: 1.45;
    font-size: 14px;
    white-space: pre-wrap;
    word-break: break-word;
}

.car-chat-bubble--user {
    margin-left: auto;
    background: #1c3d5c;
    color: #e8f4ff;
}

.car-chat-bubble--assistant {
    margin-right: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text);
}

.car-chat-bubble--error {
    margin-right: auto;
    background: rgba(127, 29, 29, 0.35);
    border: 1px solid #7f1d1d;
    color: #fecaca;
}

.car-chat-input-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.car-chat-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 14px;
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border-medium);
    border-radius: var(--main-radius);
    font-family: var(--font-ui);
    font-size: 14px;
}

.car-chat-input:focus {
    outline: none;
    border-color: var(--navy);
}

.car-chat-send:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ── Car detail: back control (button styled as link; avoids javascript: href CSP) ── */
button.back-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

/* ── Car detail: gallery thumbnail strip (moved from car.html for CSP style-src) ── */
.car-gallery-thumbs-wrap {
    overflow: hidden;
}

.car-gallery-thumbs {
    display: flex;
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    padding: 8px 0 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

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

.car-gallery-thumbs::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.car-gallery-thumb {
    flex: 0 0 80px;
    height: 58px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #eee;
    border: 2px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    scroll-snap-align: start;
    opacity: 0.65;
    transition: opacity 0.18s, border-color 0.18s;
    padding: 0;
}

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

.car-gallery-thumb.active {
    border-color: #1a73e8;
    opacity: 1;
}

/* ── Car detail: history highlights label/value ── */
.history-highlight-item .hh-label {
    font-weight: 600;
    color: #555;
    margin-right: 0.3em;
}

.history-highlight-item .hh-value {
    color: #222;
}

.car-detail-dealer-link-unavailable {
    opacity: 0.55;
    pointer-events: none;
}

/* ── Car detail: listing-derived packages (native disclosure) ── */
.listing-packages-panel {
    margin-top: 20px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--main-radius);
    background: rgba(255, 255, 255, 0.02);
}

.listing-packages-heading {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.listing-packages-lead {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 12px;
}

.listing-packages-empty {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 10px 0 0;
}

.listing-vision-guess {
    font-size: 0.9rem;
    margin: 8px 0 0 1.1rem;
    color: rgba(255, 255, 255, 0.86);
}

.listing-vision-evidence {
    font-size: 0.82rem;
    margin: 8px 0 0 1.1rem;
    color: rgba(255, 255, 255, 0.55);
    font-style: italic;
}

.listing-packages-sub-heading {
    font-size: 0.92rem;
    margin: 16px 0 8px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
}

.listing-package-inline-list {
    margin-top: 6px;
}

.listing-package-disclosure {
    border-top: 1px solid var(--border-light);
    padding: 10px 0;
}

.listing-package-disclosure:first-of-type {
    border-top: none;
    padding-top: 4px;
}

.listing-package-summary {
    font-family: var(--font-ui);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    user-select: none;
    transition: opacity 0.15s ease-out;
}

.listing-package-summary:hover {
    opacity: 0.85;
}

.listing-package-summary::-webkit-details-marker {
    display: none;
}

.listing-package-summary::before {
    content: "▸";
    display: inline-block;
    width: 1.2em;
    text-align: center;
    color: var(--text-muted);
    transition: transform 0.2s ease-out;
    font-size: 0.9em;
    margin-right: 0.2em;
}

details[open] > .listing-package-summary::before {
    transform: rotate(90deg);
    color: var(--text);
}

.listing-package-title {
    flex: 1 1 auto;
}

.listing-package-features {
    margin: 12px 0 0 2.2rem;
    padding: 0;
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.55;
    list-style: disc;
}

.listing-package-features li {
    margin-bottom: 6px;
    padding-left: 0;
}

.listing-package-features li:last-child {
    margin-bottom: 0;
}

.spec-source-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--border-medium);
    color: var(--text-muted);
    background: var(--navy-soft);
    vertical-align: middle;
}

/* ── Dealer portal (/inventory) ── */
.nav-link-active {
    color: #ffffff;
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 255, 255, 0.35);
    padding-bottom: 2px;
}

.dealer-inv-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 48px 64px;
}

.dealer-inv-flash-wrap {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dealer-inv-flash {
    padding: 12px 16px;
    border-radius: var(--main-radius);
    font-size: 0.92rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.dealer-inv-flash--success {
    background: rgba(46, 160, 67, 0.15);
    border-color: rgba(46, 160, 67, 0.35);
}

.dealer-inv-flash--error {
    background: rgba(200, 60, 60, 0.15);
    border-color: rgba(200, 60, 60, 0.35);
}

.dealer-inv-flash--info {
    background: rgba(80, 140, 220, 0.12);
    border-color: rgba(120, 160, 255, 0.3);
}

.dealer-inv-section {
    margin-bottom: 40px;
}

.dealer-inv-hint {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 16px;
    max-width: 720px;
    line-height: 1.5;
}

.dealer-inv-vin-form {
    margin-top: 8px;
}

.dealer-inv-vin-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.dealer-inv-label {
    flex: 1 1 100%;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.dealer-inv-vin-input {
    flex: 1 1 280px;
    min-width: 200px;
    padding: 12px 14px;
    border-radius: var(--main-radius);
    border: 1px solid var(--border-medium);
    background: var(--bg-card);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
}

.dealer-inv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.dealer-inv-card {
    border: 1px solid var(--border-light);
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-card);
}

.dealer-inv-card-img {
    height: 180px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--border-light);
}

.dealer-inv-card-body {
    padding: 16px 18px 20px;
}

.dealer-inv-card-title {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.dealer-inv-card-vin {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.dealer-inv-edit-form .dealer-inv-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
    margin-bottom: 12px;
}

.dealer-inv-edit-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.dealer-inv-edit-form input,
.dealer-inv-edit-form textarea {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-medium);
    background: var(--bg-card);
    color: var(--text);
    font-family: inherit;
    font-size: 0.88rem;
}

.dealer-inv-notes {
    grid-column: 1 / -1;
}

.dealer-inv-upload-form {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
}

.dealer-inv-upload-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.dealer-inv-file-input {
    display: block;
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.dealer-inv-thumb-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.dealer-inv-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border-light);
}

.dealer-inv-delete-form {
    margin-top: 14px;
}

.dealer-inv-delete-btn {
    background: transparent;
    border: 1px solid rgba(200, 80, 80, 0.45);
    color: rgba(255, 160, 160, 0.95);
    padding: 8px 12px;
    border-radius: var(--main-radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
}

.dealer-inv-delete-btn:hover {
    background: rgba(200, 60, 60, 0.12);
}

.dealer-inv-empty {
    padding: 28px;
    text-align: center;
    color: var(--text-muted);
    border: 1px dashed var(--border-medium);
    border-radius: var(--main-radius);
}

/* —— Store admin (/admin) —— */
.admin-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 48px;
}

.admin-lead,
.admin-muted {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.95rem;
    line-height: 1.5;
}

.admin-muted {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.48);
}

.admin-flash-wrap {
    max-width: 1200px;
    margin: 12px auto 0;
    padding: 0 20px;
}

.admin-flash {
    padding: 10px 14px;
    border-radius: var(--main-radius);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.admin-flash-error {
    background: rgba(120, 40, 40, 0.35);
    border: 1px solid rgba(255, 120, 120, 0.25);
}

.admin-flash-success {
    background: rgba(40, 100, 60, 0.3);
    border: 1px solid rgba(120, 220, 160, 0.2);
}

.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.admin-kpi-card {
    padding: 16px 18px;
    border-radius: var(--main-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.admin-kpi-label {
    margin: 0 0 6px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.5);
}

.admin-kpi-value {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
}

.admin-kpi-hint {
    margin: 8px 0 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
}

.admin-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: flex-end;
    margin: 20px 0;
    font-size: 0.88rem;
}

.admin-filters label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: rgba(255, 255, 255, 0.75);
}

.admin-filters input[type="search"],
.admin-filters select {
    min-width: 160px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #0c0c0c;
    color: #fff;
}

.admin-table-wrap {
    overflow-x: auto;
    margin-top: 12px;
    border-radius: var(--main-radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.admin-table th,
.admin-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: top;
}

.admin-table th {
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-table a {
    color: rgba(140, 200, 255, 0.95);
}

.admin-issues {
    max-width: 220px;
    color: rgba(255, 220, 160, 0.9);
    font-size: 0.8rem;
}

.admin-pagination {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

.admin-inline-kpis {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
}

.admin-back {
    margin: 0 0 12px;
}

.admin-back a {
    color: rgba(160, 200, 255, 0.9);
}

.admin-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 16px;
}

.admin-subh {
    font-size: 1.05rem;
    margin: 24px 0 10px;
}

.admin-issue-list,
.admin-checklist {
    margin: 0;
    padding-left: 1.1rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.5;
}

.admin-mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.admin-mini-table th,
.admin-mini-table td {
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    vertical-align: top;
}

.admin-gallery-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.admin-gallery-thumb img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-textarea {
    width: 100%;
    max-width: 720px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-medium);
    background: var(--bg-card);
    color: var(--text);
    font-family: inherit;
    margin-bottom: 10px;
}

.admin-notes-form,
.admin-inline-form {
    margin-top: 8px;
}

.admin-json {
    max-height: 420px;
    overflow: auto;
    padding: 14px;
    background: #14222e;
    border-radius: var(--main-radius);
    border: 1px solid var(--border-medium);
    font-size: 0.78rem;
    line-height: 1.4;
    color: rgba(220, 240, 255, 0.92);
}

.admin-table-tall th {
    width: 180px;
}

.admin-error-text,
.admin-error-wrap code {
    color: rgba(255, 180, 160, 0.95);
    font-size: 0.78rem;
    word-break: break-word;
}

/* ══════════════════════════════════════════════════
   LANDING PAGE
══════════════════════════════════════════════════ */

.lp-body {
    background: var(--bg-page);
    overflow-x: hidden;
}

.lp-hero {
    position: relative;
    padding: 100px 48px 80px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lp-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.lp-hero .lp-cta-row {
    justify-content: center;
}

.lp-hero-glow {
    position: absolute;
    top: -120px;
    left: 50%;
    width: 640px;
    height: 640px;
    margin-left: -320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(28, 53, 82, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.lp-headline {
    font-size: clamp(52px, 7.5vw, 88px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    color: var(--text);
}

.lp-subhead {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.65;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 36px;
}

.lp-cta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.lp-cta-row--center {
    justify-content: center;
    margin-top: 32px;
}

.lp-features-eyebrow {
    padding: 0 48px 24px;
    text-align: center;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.lp-cta-primary {
    font-size: 15px;
    padding: 14px 28px;
}

.lp-cta-secondary {
    font-size: 15px;
    padding: 14px 28px;
}

/* ── Marquee — full-bleed strip; track is two identical halves (translate -50% = seamless loop) ── */

.lp-marquee-wrap {
    width: 100%;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    padding: 14px 0;
    /* Light edge soften only — avoids large dead-looking margins that read as “blank” */
    mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
}

.lp-marquee-view {
    width: 100%;
    overflow: hidden;
}

.lp-marquee-track {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 28px;
    width: max-content;
    /* Longer track + slower duration ≈ similar perceived speed; linear + infinite = no pause */
    animation: lp-marquee 100s linear infinite;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    will-change: transform;
}

.lp-marquee-dot {
    flex-shrink: 0;
    color: var(--text-faint);
}

.lp-marquee-track span:not(.lp-marquee-dot) {
    flex-shrink: 0;
    white-space: nowrap;
}

@keyframes lp-marquee {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(-50%, 0, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .lp-marquee-track {
        animation: none;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        max-width: 960px;
        margin: 0 auto;
        row-gap: 10px;
        padding: 0 16px;
        box-sizing: border-box;
    }

    .lp-marquee-wrap {
        mask-image: none;
        -webkit-mask-image: none;
    }
}

/* ── vs. competitors ── */

.lp-vs {
    padding: 80px 48px;
}

.lp-vs-inner {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.lp-about-copy {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 640px;
    margin-top: 8px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 28px;
}

.lp-vs-card--solo {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.lp-vs-card--solo .lp-vs-list {
    margin-top: 0;
}

.lp-vs-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-top: 14px;
    margin-bottom: 22px;
    line-height: 1.1;
}

.lp-vs-card {
    border-radius: 20px;
    padding: 32px;
}

.lp-vs-good {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    box-shadow: 0 8px 32px rgba(20, 36, 54, 0.06);
}

.lp-vs-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lp-vs-list li {
    font-size: 15px;
    line-height: 1.4;
    padding-left: 22px;
    position: relative;
}

.lp-vs-good .lp-vs-list li {
    color: var(--text);
}

.lp-vs-good .lp-vs-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--navy);
    font-size: 13px;
}

/* ── Feature grid ── */

.lp-features {
    padding: 20px 48px 80px;
}

.lp-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.lp-feature-card {
    background: linear-gradient(180deg, #ffffff 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 28px;
    transition: border-color 0.2s ease;
}

.lp-feature-card:hover {
    border-color: var(--border-medium);
}

.lp-feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--navy-soft);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    color: var(--navy);
}

.lp-feature-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
}

.lp-feature-body {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ── Bottom CTA ── */

.lp-bottom-cta {
    padding: 80px 48px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.lp-bottom-title {
    font-size: clamp(24px, 3.5vw, 38px);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-top: 14px;
    color: var(--text);
}

.lp-bottom-sub {
    font-size: 15px;
    color: var(--text-muted);
    margin-top: 12px;
}

/* ── Footer ── */

.lp-footer {
    padding: 28px 48px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.lp-footer-copy {
    font-size: 13px;
    color: var(--text-muted);
}

/* ── Responsive ── */

@media (max-width: 900px) {
    .lp-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .lp-hero {
        padding: 64px 24px 56px;
    }

    .lp-features {
        padding: 16px 24px 56px;
    }

    .lp-features-eyebrow {
        padding-left: 24px;
        padding-right: 24px;
    }

    .lp-features-grid {
        grid-template-columns: 1fr;
    }

    .lp-vs {
        padding: 56px 24px;
    }

    .lp-bottom-cta {
        padding: 56px 24px;
    }

    .lp-footer {
        padding: 24px;
    }

    .topbar--public .nav-links {
        width: 100%;
        justify-content: flex-start;
    }

    .lp-marquee-track {
        font-size: 10px;
        gap: 20px;
    }
}

/* ── Dealership card (car detail page) ─────────────────────────────── */
.car-dealer-card-section {
    max-width: 960px;
    margin: 0 auto 0;
    padding: 0 20px;
}

.car-dealer-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 24px 28px;
    margin: 28px 0;
    box-shadow: 0 4px 16px rgba(20, 36, 54, 0.05);
}

.dealer-card-heading {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 0 0 12px;
}

.dealer-card-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 4px;
}

.dealer-card-address,
.dealer-card-location {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 4px;
}

.dealer-card-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent, #1a6fe0);
    text-decoration: none;
}

.dealer-card-link:hover {
    text-decoration: underline;
}

/* ── Dealer filter in sidebar (listings page) ───────────────────────── */
.dealer-filter-group {
    border-top: 1px solid var(--border-light);
    padding-top: 12px;
    margin-top: 4px;
}

.dealer-filter-list {
    max-height: 220px;
    overflow-y: auto;
    margin-top: 6px;
}

.dealer-filter-loading {
    font-size: 13px;
    color: var(--text-muted);
    margin: 4px 0;
}

.dealer-filter-option small {
    color: var(--text-muted);
    font-size: 11px;
}
