*,
*::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 < 900px) {
    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.15;
    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) :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;
}

table th {
    font-weight: bold;
}

table td {
    font-weight: 400;
}

table th:not(:first-child),
table td:not(:first-child) {
    padding-left: calc(var(--spacing) / 2);
}

table th:not(:last-child),
table td:not(:last-child) {
    padding-right: calc(var(--spacing) / 2);
}

address {
    font-style: normal;
}

/* 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;
    }
}
