/* Order matters: tokens first, then base, then components. Inlined into this file by App\Asset\CssImportInliner. */
:root {
    /*
     * Text sizes are written as calc(<px>rem / 16): the same size at the browser's default font size, but scaled
     * when a visitor sets a larger one. The one breakpoint, 56.25rem (900px), likewise moves with it.
     *
     * Sizes come from one scale: text 15, 17, 20, 24, 32, 40 or 52px; spacing on a 4px grid; radii 4, 8 or 12px;
     * controls 44px (small) or 52px tall.
     */
    /* Brand, from the logo: red leads, gold accents, navy supports */
    --red: #990011;
    --red-deep: #7a000d;
    --gold: #ffd700;
    --navy: #14263f;
    --navy-deep: #0d1b2f;
    --navy-line: #2a3f60;
    --navy-text: #c9d3e1;

    --ink: #1b1d21;
    --ink-soft: #4a4f57;
    --ground: #f5f6f8;
    --rule: #e1e5eb;
    --steel: #c8cfd9;
    --steel-dark: #8f99aa;

    /* Status: published and success in green, draft and error in red */
    --green: #1d6b36;
    --green-tint: #e3f4e8;
    --red-tint: #fbe7ea;

    --font-display: 'Red Hat Display', system-ui, sans-serif;
    --font-body: 'Red Hat Text', system-ui, sans-serif;

    --radius: 12px;
    --page-width: 1240px;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(20, 38, 63, 0.07);
    --shadow-card-hover: 0 2px 4px rgba(0, 0, 0, 0.06), 0 18px 40px rgba(20, 38, 63, 0.14);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
*,
*::before,
*::after {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

/* In-page links glide, and stop clear of the sticky header */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

@media (width < 56.25rem) {
    html {
        scroll-padding-top: 76px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    display: flex;
    flex-direction: column;
    background-color: var(--ground);
    min-height: 100vh;
    color: var(--ink);
    font-family: var(--font-body);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

::selection {
    background: var(--gold);
    color: var(--navy);
}

/* Navy on light surfaces, gold on navy and red ones, so the ring always stands out */
:focus-visible {
    outline: 3px solid var(--navy);
    outline-offset: 3px;
}

:is(.hero, .info-strip, .site-footer, .contact-hero, .vehicle-hero, .notice, .draft-banner) :focus-visible {
    outline-color: var(--gold);
}

h1,
h2,
h3 {
    font-family: var(--font-display);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

ul {
    padding-left: 20px;
}

a {
    display: inline-block;
    color: inherit;
    text-decoration: none;
}

img {
    width: auto;
    height: auto;
    max-width: 100%;
}

.icon {
    vertical-align: -0.125em;
}

table {
    text-align: left;
}

/* A gap between columns; :where() lets a table set its own */
:where(th, td) + :where(th, td) {
    padding-left: 20px;
}

address {
    font-style: normal;
}

/*
 * Every page cross-fades into the next, and a car's card photo grows into its detail page photo
 * (they share view-transition-name: car-{id}). Browsers without support just navigate normally.
 */
@view-transition {
    navigation: auto;
}

/* Page and frame transitions (the vehicle list's sort) cut instead of fading */
@media (prefers-reduced-motion: reduce) {
    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
        animation: none;
    }
}
.site-header {
    position: sticky;
    top: 0;
    z-index: 9;
    background-color: #ffffff;
    border-bottom: 1px solid var(--rule);
}

.site-header-inner {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 16px 32px;
}

.toggle-menu-button {
    display: none;
    border: 0;
    padding: 12px;
    background: none;
    color: var(--navy);
    font-size: calc(20rem / 16);
    cursor: pointer;
}

.header-logo {
    min-width: 0;
}

/* Full size until the header runs out of room, then narrower and shorter together */
.header-logo img {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 60px;
}

.site-header nav {
    display: flex;
    gap: 32px;
    font-weight: 700;
    font-size: calc(17rem / 16);
    color: var(--navy);

    a {
        padding: 8px 0;
        box-shadow: inset 0 -3px 0 transparent;
        transition: box-shadow 160ms ease-out;

        &:hover,
        &[aria-current] {
            box-shadow: inset 0 -3px 0 var(--red);
        }
    }
}

.header-call {
    flex-shrink: 0;
    margin-left: auto;
}

.header-call-short,
.nav-chevron,
.toggle-menu-button .icon-close {
    display: none;
}

@media (width < 56.25rem) {
    .site-header-inner {
        position: relative;
        gap: 8px;
        padding: 12px 16px;
    }

    .toggle-menu-button {
        display: flex;
        margin-left: -12px;

        .icon {
            width: 28px;
            height: 22px;
            vertical-align: 0;
        }
    }

    .header-logo img {
        max-height: 44px;
    }

    .toggle-menu-button[aria-expanded="true"] {
        .icon-open {
            display: none;
        }

        .icon-close {
            display: block;
        }
    }

    .site-header nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        padding: 4px 16px 12px;
        background-color: var(--navy-deep);
        border-bottom: 4px solid var(--red);
        box-shadow: 0 24px 40px -16px rgba(13, 27, 47, 0.6);
        visibility: hidden;
        opacity: 0;
        transform: translateY(-8px);
        transition: opacity 160ms ease-out, transform 200ms var(--ease-out), visibility 0s 200ms;

        &.is-active {
            visibility: visible;
            opacity: 1;
            transform: none;
            transition: opacity 160ms ease-out, transform 200ms var(--ease-out);
        }

        a {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 16px 0;
            border-bottom: 1px solid var(--navy-line);
            font-family: var(--font-display);
            font-size: calc(20rem / 16);
            color: #ffffff;

            &:hover,
            &[aria-current] {
                box-shadow: none;
            }

            &[aria-current] {
                color: var(--gold);
            }

            &:focus-visible {
                outline-color: var(--gold);
            }

            &:last-child {
                border-bottom: 0;
            }
        }

        .nav-chevron {
            display: inline;
            font-size: calc(17rem / 16);
            color: var(--navy-text);
        }
    }

    .header-call {
        min-height: 44px;
        padding: 0 16px;
        font-size: calc(15rem / 16);
    }

    .header-call-number {
        display: none;
    }

    .header-call-short {
        display: inline;
    }
}


/* Signed-in staff only, under the header on every page */
.staff-bar {
    background-color: var(--navy-deep);
    color: var(--navy-text);
    font-weight: 500;
    font-size: calc(15rem / 16);
}

.staff-bar-inner {
    display: flex;
    flex-wrap: wrap;
    column-gap: 28px;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 0 32px;

    a {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-height: 44px;
        transition: color 160ms ease-out;

        &:hover,
        &[aria-current="page"] {
            color: #ffffff;
        }

        &:focus-visible {
            outline-color: var(--gold);
        }
    }
}

.staff-bar-logout {
    margin-left: auto;
}

@media (width < 56.25rem) {
    .staff-bar-inner {
        column-gap: 20px;
        padding: 0 16px;
    }
}
.site-footer {
    margin-top: auto;
    background-color: var(--navy);
    color: #e4e9f0;
    line-height: 1.5;

    h2 {
        margin-bottom: 12px;
        font-size: calc(20rem / 16);
        color: #ffffff;
    }

    a {
        color: var(--gold);

        &:hover {
            color: #ffffff;
        }
    }

    table {
        width: auto;
    }

    th {
        font-weight: 400;
    }
}

.site-footer-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 64px 32px 56px;
}

.footer-copyright {
    border-top: 1px solid var(--navy-line);
    font-size: calc(15rem / 16);
    color: #a9b6c8;

    .site-footer-inner {
        display: block;
        padding-top: 16px;
        padding-bottom: 16px;
    }
}

@media (width < 56.25rem) {
    .site-footer-inner {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 40px 16px;
    }
}
.hero {
    background-color: var(--navy);
    color: #ffffff;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 56px;
    align-items: center;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 72px 32px 80px;

    &:not(:has(.hero-feature)) {
        grid-template-columns: 1fr;
    }
}

.hero h1 {
    font-weight: 800;
    font-size: calc(52rem / 16);
    line-height: 1.05;
    letter-spacing: -0.02em;
    text-wrap: balance;

    em {
        font-style: normal;
        color: var(--gold);
    }
}

.hero-copy p {
    margin-top: 20px;
    max-width: 32em;
    font-size: calc(20rem / 16);
    line-height: 1.5;
    color: var(--navy-text);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 32px;
}

.hero-feature {
    position: relative;
    display: block;

    img {
        display: block;
        width: 100%;
        aspect-ratio: 4 / 3;
        object-fit: cover;
        background-size: cover;
        background-position: center;
        border-radius: var(--radius);
        box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.6);
    }
}

.hero-feature-tag {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(13, 27, 47, 0.92);
    border-radius: 8px;
    font-size: calc(15rem / 16);
    line-height: 1.3;
    color: var(--navy-text);

    b {
        display: block;
        font-family: var(--font-display);
        font-size: calc(20rem / 16);
        color: #ffffff;
    }
}

.hero-feature-price {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: calc(32rem / 16);
    color: var(--gold);
    white-space: nowrap;
}

.info-strip {
    background-color: var(--red);
    color: #ffffff;
}

.info-strip-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 16px 32px;
    font-weight: 500;
    font-size: calc(17rem / 16);

    > div {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .icon {
        color: var(--gold);
    }
}

.info-strip-status::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.info-strip-status.is-open::before {
    background: #7dff9b;
    box-shadow: 0 0 0 4px rgba(125, 255, 155, 0.25);
}

.info-strip-status.is-closed::before {
    background: var(--navy-text);
}

.inventory {
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 88px 32px 72px;
    width: 100%;
}

#lot {
    display: block;
}

.inventory-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;

    h2 {
        font-weight: 800;
        font-size: calc(40rem / 16);
        line-height: 1.1;
        letter-spacing: -0.02em;
        color: var(--navy);
    }

    p {
        margin-top: 8px;
        font-size: calc(17rem / 16);
        color: var(--ink-soft);
    }
}

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

/* Staff only, sized to the sort chips beside it */
.inventory-add {
    min-height: 44px;
    padding: 0 20px;
    font-size: calc(17rem / 16);
}

.inventory-sort {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: 0 16px;
        border: 2px solid var(--steel);
        border-radius: 999px;
        background-color: #ffffff;
        font-weight: 700;
        font-size: calc(17rem / 16);
        transition: border-color 160ms ease-out;

        &:hover {
            border-color: var(--navy);
        }

        &[aria-current] {
            border-color: var(--navy);
            background-color: var(--navy);
            color: #ffffff;
        }
    }
}

.repair {
    background-color: #ffffff;
}

.repair-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 80px 32px;

    h2 {
        font-weight: 800;
        font-size: calc(40rem / 16);
        line-height: 1.1;
        letter-spacing: -0.02em;
        color: var(--navy);
        text-wrap: balance;
    }

    p {
        max-width: 36em;
        font-size: calc(17rem / 16);
        line-height: 1.5;
        color: #3d4148;
    }

    .button {
        margin-top: 24px;
    }
}

@media (width < 56.25rem) {
    .hero-inner,
    .repair-inner {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 40px 16px 48px;
    }

    .hero h1 {
        font-size: calc(40rem / 16);
    }

    .hero-copy p {
        font-size: calc(17rem / 16);
    }

    /* Phones: the tag sits under the photo, so it never covers the car */
    .hero-feature img {
        border-radius: var(--radius) var(--radius) 0 0;
    }

    .hero-feature-tag {
        position: static;
        padding: 12px 16px;
        border-radius: 0 0 var(--radius) var(--radius);

        b {
            font-size: calc(17rem / 16);
        }
    }

    .hero-feature-price {
        font-size: calc(24rem / 16);
    }

    .info-strip-inner {
        flex-direction: column;
        padding: 16px;
        font-size: calc(17rem / 16);
    }

    .inventory {
        padding: 48px 16px;
    }

    .inventory-head h2,
    .repair-inner h2 {
        font-size: calc(32rem / 16);
    }
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    transition: box-shadow 200ms ease-out, transform 200ms var(--ease-out), opacity 160ms ease-out;
    /* Keeps the card on its own layer, so Firefox doesn't blur and re-snap the text as it lifts */
    will-change: transform;

    &:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-card-hover);
    }

    .product-card-image a {
        display: block;
    }

    .product-card-image img {
        display: block;
        width: 100%;
    }

    .vehicle-image-slider {
        width: 100%;
        background-color: var(--navy-deep);

        /* Only the photo on show grows into the vehicle page, never one swiped out of view */
        .is-current img,
        .slider-track:not(:has(.is-current)) > :first-child img {
            view-transition-name: var(--transition-name);

            /* While the lot re-sorts, the whole card moves instead */
            :root.is-sorting & {
                view-transition-name: none;
            }
        }
    }
}

.is-sorting .product-card {
    view-transition-name: var(--card-transition-name);
}

/* Staff only: a draft is ringed in red, with a strip under its photo */
.product-card.is-draft {
    box-shadow: 0 0 0 3px var(--red), var(--shadow-card);

    &:hover {
        box-shadow: 0 0 0 3px var(--red), var(--shadow-card-hover);
    }
}

.product-card-draft {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--red);
    color: #ffffff;
    font-weight: 700;
    font-size: calc(15rem / 16);
}

.vehicle-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--gold);
    color: var(--navy);
    font-weight: 700;
    font-size: calc(15rem / 16);
    line-height: 1.2;
}

.product-card-body {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    gap: 16px;
    padding: 20px 20px 20px;
}

.product-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.product-card-year-make {
    font-size: calc(15rem / 16);
    color: var(--ink-soft);
}

.product-card-model {
    margin-top: 4px;
    font-weight: 800;
    font-size: calc(20rem / 16);
    line-height: 1.2;
    color: var(--navy);
}

.product-card-price {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: calc(24rem / 16);
    color: var(--red);
    white-space: nowrap;
}

.product-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
    padding-top: 16px;
    border-top: 1px solid var(--rule);
    font-size: calc(15rem / 16);
    line-height: 1.3;

    dt {
        font-size: calc(15rem / 16);
        color: var(--ink-soft);
    }

    dd {
        font-weight: 700;
    }
}

.product-card-link {
    margin-top: auto;
    min-height: 44px;
    font-size: calc(17rem / 16);
}

@media (width < 56.25rem) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
.slider {
    position: relative;
}

.slider-track {
    display: flex;
    align-items: center;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    margin: 0;
    padding: 0;
    scrollbar-width: none;
    list-style: none;

    > li {
        flex: 0 0 100%;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }

    /* Low-res placeholder (inline background-image) shows until the lazy image loads */
    img {
        background-size: cover;
        background-position: center;
    }
}

.slider-previous,
.slider-next {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    border: 0;
    padding: 20px;
    background: none;
    color: #ffffff;
    font-size: calc(40rem / 16);
    cursor: pointer;
    transition: opacity 160ms ease-out;
    /* A shadow backs the white arrows on bright photos (text-shadow skips inline SVG) */
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 6px rgba(0, 0, 0, 0.35));

    /* Hidden by the HTML until the controller starts, so they never show without JavaScript */
    &[hidden] {
        display: none;
    }

    /* Hidden but still in place, so clicking past the last photo doesn't open the vehicle */
    &:disabled {
        opacity: 0;
        cursor: default;
    }

    .icon {
        will-change: transform;
        transition: transform 200ms ease-out;
    }

    &:hover .icon,
    &:focus-visible .icon {
        transform: scale(1.5);
    }
}

.slider-previous {
    left: 0;
}

.slider-next {
    right: 0;
}
.vehicle-page {
    width: 100%;
    line-height: 1.5;
}

.vehicle-hero {
    background-color: var(--navy);
    color: #ffffff;
}

.vehicle-hero-inner,
.vehicle-body {
    max-width: var(--page-width);
    margin: 0 auto;
    padding-inline: 32px;
}

.vehicle-hero-inner {
    padding-top: 24px;
    padding-bottom: 32px;
}

/*
 * Desktop: the first photo large, up to four more beside it, arranged by how many there are. The list clips
 * the outer corners. Phones: one swipeable strip of every photo.
 */
.vehicle-photos {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 12px;
    aspect-ratio: 3;
    overflow: hidden;
    border-radius: var(--radius);
    list-style: none;
    padding: 0;

    > li {
        position: relative;
        min-height: 0;

        &:first-child {
            grid-row: span 2;
        }

        &:nth-child(n + 6) {
            display: none;
        }
    }

    /* One photo: it takes the row */
    &:has(> li:only-child) {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
        aspect-ratio: 2;
    }

    /* Two: side by side */
    &:has(> li:nth-child(2):last-child) {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr;
        aspect-ratio: 8 / 3;
    }

    /* Three: the first large, two stacked beside it */
    &:has(> li:nth-child(3):last-child) {
        grid-template-columns: 2fr 1fr;
    }

    /* Four: the first large, two stacked, the last tall */
    &:has(> li:nth-child(4):last-child) > li:nth-child(4) {
        grid-column: 3;
        grid-row: 1 / span 2;
    }
}

.vehicle-photos-wrap {
    position: relative;
}

.vehicle-photo {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;

    img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        background-color: var(--navy-deep);
        background-size: cover;
        background-position: center;
        border-radius: 4px;
    }
}

.vehicle-all-photos {
    position: absolute;
    right: 16px;
    bottom: 16px;
    padding: 12px 16px;
    border: 0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
    color: var(--navy);
    font: inherit;
    font-weight: 700;
    font-size: calc(15rem / 16);
    cursor: pointer;
}

.vehicle-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 48px;
    align-items: start;
    padding-top: 32px;
}

/* The year and make sit above the model, inside the one heading */
.vehicle-title {
    margin-bottom: 20px;
}

.vehicle-make {
    display: block;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: calc(17rem / 16);
    line-height: 1.5;
    color: var(--navy-text);
}

.vehicle-model {
    display: block;
    font-weight: 800;
    font-size: calc(52rem / 16);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-wrap: balance;
}

.vehicle-main h2 {
    margin-top: 32px;
    font-weight: 800;
    font-size: calc(24rem / 16);
    color: var(--navy);
}

.vehicle-facts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 24px;
    padding: 0 0 24px;
    border-bottom: 1px solid var(--rule);

    dt {
        font-size: calc(15rem / 16);
        color: var(--ink-soft);
    }

    dd {
        font-weight: 700;
        font-size: calc(17rem / 16);
        line-height: 1.3;
    }
}

.vehicle-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    margin-top: 16px;
    padding: 0;
    list-style: none;

    li {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-weight: 500;
    }

    .icon {
        color: var(--red);
    }
}

.vehicle-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
    margin-top: 12px;

    > div {
        display: flex;
        justify-content: space-between;
        gap: 16px;
        padding: 12px 0;
        border-bottom: 1px solid var(--rule);
        font-size: calc(17rem / 16);
    }

    dt {
        color: var(--ink-soft);
    }

    dd {
        font-weight: 700;
        text-align: right;
    }
}

.vehicle-panel {
    position: sticky;
    top: 108px;
    padding: 28px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-card-hover);
}

.vehicle-price {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: calc(40rem / 16);
    line-height: 1;
    color: var(--red);

    small {
        margin-left: 8px;
        font-family: var(--font-body);
        font-weight: 700;
        font-size: calc(15rem / 16);
        letter-spacing: 0.02em;
        color: var(--ink-soft);
    }
}

.vehicle-included {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-weight: 500;

    .icon {
        color: var(--red);
    }
}

.vehicle-call {
    width: 100%;
    margin-top: 20px;
}

.vehicle-call-note {
    margin-top: 8px;
    font-size: calc(15rem / 16);
    color: var(--ink-soft);
}

.vehicle-staff {
    display: grid;
    gap: 16px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--rule);
}

.vehicle-staff-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

/* Only the gallery scrolls while it's open */
html:has(.vehicle-gallery[open]) {
    overflow: hidden;
}

.vehicle-gallery {
    overflow-y: auto;
    overscroll-behavior: contain;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: var(--navy-deep);
    color: #ffffff;

    &::backdrop {
        background: rgba(13, 27, 47, 0.8);
    }

    &[open] {
        animation: gallery-in 200ms var(--ease-out);
    }
}

@keyframes gallery-in {
    from {
        opacity: 0;
    }
}

.vehicle-gallery-bar {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 20px;
    background: var(--navy-deep);
    border-bottom: 1px solid var(--navy-line);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: calc(17rem / 16);
}

.vehicle-gallery-close {
    display: flex;
    padding: 12px;
    border: 0;
    background: none;
    color: #ffffff;
    cursor: pointer;

    .icon {
        width: 28px;
        height: 22px;
    }
}

.vehicle-gallery-photos {
    display: grid;
    gap: 12px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;

    /* Space held at the photo's shape, with the blurred preview until it loads */
    img {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
        object-fit: cover;
        background-color: var(--navy);
        background-size: cover;
        background-position: center;
        border-radius: 4px;
        scroll-margin-top: 80px;
    }
}

.more-from-lot {
    width: 100%;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 72px 32px 80px;
}

.more-from-lot-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;

    h2 {
        font-weight: 800;
        font-size: calc(40rem / 16);
        line-height: 1.1;
        letter-spacing: -0.02em;
        color: var(--navy);
    }

    a {
        font-weight: 700;
        color: var(--red);
    }
}

@media (width < 56.25rem) {
    .vehicle-hero-inner {
        padding: 16px 0 24px;
    }

    .back-link,
    .vehicle-title {
        margin-inline: 16px;
    }

    .vehicle-photos,
    .vehicle-photos:has(> li) {
        display: flex;
        gap: 8px;
        aspect-ratio: auto;
        overflow-y: hidden;
        border-radius: 0;
        padding: 0 16px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 16px;
        scrollbar-width: none;

        > li,
        > li:nth-child(n + 6) {
            display: block;
            flex: 0 0 calc(100% - 24px);
            scroll-snap-align: start;
        }

        > li:only-child {
            flex-basis: 100%;
        }

        img,
        > li:first-child img,
        > li:nth-child(n) img {
            aspect-ratio: 4 / 3;
            border-radius: var(--radius);
        }
    }

    .vehicle-all-photos {
        right: 28px;
    }

    .vehicle-body {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 24px 16px 0;
    }

    .vehicle-facts {
        padding-top: 0;
    }

    .vehicle-panel {
        position: static;
        order: -1;
    }

    .vehicle-model {
        font-size: calc(40rem / 16);
    }

    .vehicle-facts {
        grid-template-columns: 1fr 1fr;
    }

    .vehicle-specs {
        grid-template-columns: 1fr;
    }

    .more-from-lot {
        padding: 48px 16px 56px;
    }

    .more-from-lot-head h2 {
        font-size: calc(32rem / 16);
    }
}

/* Staff only: a draft vehicle's view and edit pages say so across the top */
.draft-banner {
    background-color: var(--red);
    color: #ffffff;
}

.draft-banner-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 12px 32px;
    font-size: calc(17rem / 16);

    p {
        display: flex;
        align-items: center;
        gap: 12px;
    }
}

@media (width < 56.25rem) {
    .draft-banner-inner {
        padding: 12px 16px;
    }
}
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 24px;
    border: 2px solid transparent;
    border-radius: 8px;
    font-weight: 700;
    font-size: calc(17rem / 16);
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 160ms ease-out, border-color 160ms ease-out;
}

.button-red {
    background-color: var(--red);
    color: #ffffff;

    &:hover {
        background-color: var(--red-deep);
    }
}

.button-navy {
    background-color: var(--navy);
    color: #ffffff;

    &:hover {
        background-color: var(--navy-deep);
    }
}

/* On light surfaces */
.button-ghost {
    border-color: var(--navy);
    color: var(--navy);

    &:hover {
        background-color: var(--navy);
        color: #ffffff;
    }
}

/* On navy, for the one action a navy band leads with */
.button-gold {
    background-color: var(--gold);
    color: var(--navy);

    &:hover {
        background-color: #ffffff;
    }
}

/* On navy */
.button-outline {
    border-color: #5b6f8e;
    color: #ffffff;

    &:hover {
        border-color: #ffffff;
    }
}

/* Back to the parent page, on a navy band */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-weight: 700;
    font-size: calc(15rem / 16);
    color: var(--navy-text);

    &:hover {
        color: #ffffff;
    }
}

/* A destructive action kept quiet next to the main ones */
.delete-link {
    border: 0;
    background: none;
    font-family: inherit;
    cursor: pointer;
    font-weight: 700;
    font-size: calc(15rem / 16);
    color: var(--red);

    &:hover {
        text-decoration: underline;
    }
}

/* Destructive, kept square and quiet until hovered */
.button-danger {
    padding: 0 16px;
    border-color: #f0c3ca;
    color: var(--red);

    &:hover {
        border-color: var(--red);
        background-color: var(--red-tint);
    }
}

.button-small {
    min-height: 44px;
    padding: 0 16px;
    font-size: calc(15rem / 16);
}
/* Form controls, shared by the contact, sign-in and backroom forms */
.field {
    display: grid;
    align-content: start;
    gap: 8px;

    > label {
        font-weight: 700;
        font-size: calc(15rem / 16);
        color: var(--navy);

        span {
            font-weight: 400;
            color: var(--ink-soft);
        }
    }

    .help-text {
        font-size: calc(15rem / 16);
        color: var(--ink-soft);
    }

    /* Validation messages from Symfony forms */
    /* Errors go under the input, so inputs side by side stay level when only one has an error */
    ul {
        order: 1;
        list-style: none;
        padding: 0;
        font-weight: 700;
        font-size: calc(15rem / 16);
        color: var(--red);
    }
}

/* :where() leaves components free to adjust a control */
:where(input:not([type="checkbox"], [type="radio"], [type="file"], [type="hidden"]), select, textarea) {
    width: 100%;
    min-height: 52px;
    padding: 12px 16px;
    border: 1.5px solid var(--steel);
    border-radius: 8px;
    background-color: #ffffff;
    color: var(--ink);
    font: inherit;
    font-size: calc(17rem / 16);
    transition: border-color 160ms ease-out;

    &:hover {
        border-color: var(--steel-dark);
    }

    &:focus-visible {
        border-color: var(--navy);
        outline-offset: 1px;
    }

    &:disabled {
        background-color: var(--ground);
        color: var(--ink-soft);
    }
}

:where(select) {
    appearance: none;
    padding-right: 40px;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2314263f' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center / 12px;
}

/* Grows with what's typed, starting at six lines; browsers without field-sizing keep the drag handle instead */
:where(textarea) {
    field-sizing: content;
    min-height: calc(6lh + 27px);
    resize: vertical;

    @supports (field-sizing: content) {
        resize: none;
    }
}

:where(input[type="checkbox"]) {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    accent-color: var(--navy);
}

/* A checkbox beside its label, with any hint under the label */
.check {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;

    small,
    .help-text {
        display: block;
        font-weight: 400;
        font-size: calc(15rem / 16);
        color: var(--ink-soft);
    }
}

/* An on/off setting: a checkbox with role="switch", or a .switch inside a link that flips it */
input[role="switch"],
.switch {
    appearance: none;
    position: relative;
    flex-shrink: 0;
    width: 46px;
    height: 28px;
    margin: 0;
    border-radius: 999px;
    background-color: var(--steel);
    cursor: pointer;
    transition: background-color 160ms ease-out;

    &::before {
        content: "";
        position: absolute;
        top: 3px;
        left: 3px;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background-color: #ffffff;
        box-shadow: 0 1px 3px rgba(13, 27, 47, 0.35);
        transition: translate 160ms var(--ease-out);
    }
}

input[role="switch"]:checked,
[aria-checked="true"] > .switch {
    background-color: var(--green);

    &::before {
        translate: 18px 0;
    }
}

.switch-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;

    b {
        display: block;
    }

    small {
        font-size: calc(15rem / 16);
        color: var(--ink-soft);
    }

    &:hover .switch {
        background-color: var(--steel-dark);
    }

    &[aria-checked="true"]:hover .switch {
        background-color: #15542a;
    }
}

/* A message at the top of a form or page */
.alert {
    padding: 16px 16px;
    border-radius: 8px;
    font-weight: 700;

    &.is-success {
        background: var(--green-tint);
        color: var(--green);
    }

    &.is-error {
        background: var(--red-tint);
        color: var(--red);
    }
}

/* A flash message spans the page under the header */
.flash {
    border-radius: 0;
    text-align: center;
}

/* A password input with a show/hide button inside its right edge */
.password-input {
    position: relative;

    input {
        padding-right: 52px;
    }

    /* Edge adds its own reveal button; ours replaces it */
    input::-ms-reveal {
        display: none;
    }
}

.password-toggle {
    position: absolute;
    top: 0;
    right: 0;
    display: grid;
    place-items: center;
    width: 50px;
    height: 100%;
    border: 0;
    border-radius: 0 8px 8px 0;
    background: none;
    color: var(--ink-soft);
    cursor: pointer;
    transition: color 160ms ease-out;

    &:hover {
        color: var(--navy);
    }

    .icon {
        width: 20px;
        height: 20px;
    }

    &[aria-pressed="true"] .is-show,
    &[aria-pressed="false"] .is-hide {
        display: none;
    }
}
.notice {
    background-color: var(--navy);
    color: #ffffff;

    h1 {
        font-weight: 800;
        font-size: calc(52rem / 16);
        line-height: 1.05;
        letter-spacing: -0.02em;
        text-wrap: balance;
    }

    p {
        max-width: 36em;
        margin-top: 16px;
        font-size: calc(20rem / 16);
        line-height: 1.5;
        color: var(--navy-text);
    }
}

.notice-inner {
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 72px 32px 80px;
}

/* Room for contact tiles that overlap the notice's bottom edge */
.notice:has(+ .contact-methods) .notice-inner {
    padding-bottom: 116px;
}

.notice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 32px;
}

@media (width < 56.25rem) {
    .notice h1 {
        font-size: calc(40rem / 16);
    }

    .notice p {
        font-size: calc(17rem / 16);
    }

    .notice-inner {
        padding: 40px 16px 48px;
    }

    .notice-actions .button {
        flex: 1 1 100%;
    }

    .notice:has(+ .contact-methods) .notice-inner {
        padding-bottom: 84px;
    }
}
.contact-hero {
    background-color: var(--navy);
    color: #ffffff;

    h1 {
        font-weight: 800;
        font-size: calc(52rem / 16);
        line-height: 1.05;
        letter-spacing: -0.02em;
        text-wrap: balance;
    }

    address {
        margin-top: 16px;
        font-size: calc(24rem / 16);
        line-height: 1.3;
    }
}

.contact-hero-inner {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 40px;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 56px 32px 72px;
}

.contact-status {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    font-weight: 500;
    font-size: calc(17rem / 16);
    color: var(--navy-text);

    &::before {
        content: "";
        width: 10px;
        height: 10px;
        border-radius: 50%;
    }

    &.is-open::before {
        background: #7dff9b;
        box-shadow: 0 0 0 4px rgba(125, 255, 155, 0.25);
    }

    &.is-closed::before {
        background: var(--navy-text);
    }
}

.contact-directions {
    min-height: 52px;
    padding: 0 32px;
    font-size: calc(17rem / 16);
}

/* Last on the page, so it needs room above the footer */
.contact-methods:last-child {
    margin-bottom: 72px;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    max-width: var(--page-width);
    margin: -32px auto 0;
    padding: 0 32px;
    list-style: none;
    line-height: 1.5;

    a {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        column-gap: 16px;
        padding: 20px 24px;
        border-radius: var(--radius);
        background: #ffffff;
        box-shadow: var(--shadow-card);
        transition: transform 200ms var(--ease-out), box-shadow 200ms ease-out;
        /* Keeps the card on its own layer, so Firefox doesn't blur and re-snap the text as it lifts */
        will-change: transform;

        &:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-card-hover);
        }
    }

    .icon {
        grid-row: span 2;
        width: 28px;
        height: 28px;
        color: var(--red);
    }

    span {
        font-size: calc(15rem / 16);
        color: var(--ink-soft);
    }

    b {
        font-family: var(--font-display);
        font-size: calc(20rem / 16);
        color: var(--navy);
        overflow-wrap: anywhere;
    }
}

.contact-body {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 28px;
    align-items: start;
    width: 100%;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 28px 32px 80px;
    line-height: 1.5;

    h2 {
        font-weight: 800;
        font-size: calc(24rem / 16);
        color: var(--navy);
    }
}

.contact-form {
    display: grid;
    gap: 16px;
    padding: 32px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-card-hover);
}

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

.contact-send {
    justify-self: start;
}

.contact-hours {
    padding: 32px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-card);

    table {
        width: 100%;
        margin-top: 12px;
        border-collapse: collapse;
        font-size: calc(17rem / 16);
    }

    th,
    td {
        padding: 8px 0;
        border-bottom: 1px solid var(--rule);
    }

    th {
        font-weight: 500;
        color: var(--ink-soft);
    }

    td {
        text-align: right;
        font-weight: 700;
    }
}

@media (width < 56.25rem) {
    .contact-hero h1 {
        font-size: calc(40rem / 16);
    }

    .contact-hero address {
        font-size: calc(20rem / 16);
    }

    .contact-hero-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 32px 16px 56px;
    }

    .contact-methods {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 16px;
    }

    .contact-body {
        grid-template-columns: 1fr;
        padding: 24px 16px 48px;
    }

    .contact-row {
        grid-template-columns: 1fr;
    }

    .contact-form,
    .contact-hours {
        padding: 20px;
    }

    .contact-send {
        justify-self: stretch;
    }
}

/* While sending, the fields dim and the button spins */
.contact-form[aria-busy="true"] {
    cursor: progress;

    > :not(.contact-send) {
        opacity: 0.5;
        transition: opacity 160ms ease-out;
    }

    .contact-send::before {
        content: "";
        width: 16px;
        height: 16px;
        border: 2px solid currentColor;
        border-right-color: transparent;
        border-radius: 50%;
        animation: contact-spin 700ms linear infinite;
    }
}

@keyframes contact-spin {
    to {
        transform: rotate(360deg);
    }
}

.contact-sent {
    /* Part of the sentence, so a long name wraps under it rather than beside it */
    .icon {
        width: 1.1em;
        height: 1.1em;
        margin-right: 4px;
        vertical-align: -0.2em;
        color: var(--green);
    }

    p {
        font-size: calc(17rem / 16);
        color: var(--ink-soft);
    }

    /* The number and its period wrap together */
    p span {
        white-space: nowrap;
    }

    a {
        font-weight: 700;
        color: var(--navy);
        text-decoration: underline;
    }
}
/* Staff sign-in and password pages: a short navy band with a white form card overlapping its bottom edge */
.sign-in {
    padding-bottom: 80px;
}

.sign-in-band {
    padding: 64px 16px 112px;
    background-color: var(--navy);
    color: #ffffff;
    text-align: center;

    h1 {
        font-weight: 800;
        font-size: calc(40rem / 16);
        line-height: 1.05;
        letter-spacing: -0.02em;
    }

    p {
        margin-top: 16px;
        font-size: calc(17rem / 16);
        line-height: 1.5;
        color: var(--navy-text);
    }

    a {
        font-weight: 700;
        color: var(--gold);
        text-decoration: underline;
        text-underline-offset: 3px;
    }
}

.sign-in-card {
    display: grid;
    gap: 16px;
    width: calc(100% - 32px);
    max-width: 440px;
    margin: -72px auto 0;
    padding: 32px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-card-hover);
    line-height: 1.5;

    .button {
        width: 100%;
    }
}

@media (width < 56.25rem) {
    .sign-in {
        padding-bottom: 48px;
    }

    .sign-in-band {
        padding: 40px 16px 96px;

        h1 {
            font-size: calc(32rem / 16);
        }

        p {
            font-size: calc(17rem / 16);
        }
    }

    .sign-in-card {
        padding: 20px;
    }
}
