/* Lot theme. Built from its specimen (themes/lot/specimen/lot.css); tokens and rules are in themes/lot/DESIGN.md. */

@font-face {
  font-family: "Lot Figures";
  src: url("/bg/fonts/fira-sans-extra-condensed-cyrillic-700-normal-534d083d.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: block;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Lot Figures";
  src: url("/bg/fonts/fira-sans-extra-condensed-latin-700-normal-2f6eeb51.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: block;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Dealer slots (59): the only colours a dealer changes. */
  --brand: #1b3b8f;
  --on-brand: #ffffff;
  --tag: #ffd23f;
  --on-tag: #1a1a17;

  /* Theme neutrals, fixed. */
  --ground: #eceeef;
  --surface: #ffffff;
  --ink: #17181b;
  --ink-muted: #56595f;
  --line: #d8dbdd;
  --line-control: #7d8087;
  --cut: #b42318;
  /* Text and lines that the dark scheme changes (#579): the dealer's brand lifted, a lighter red, a footer one step below the ground. */
  --cut-text: #b42318;
  --brand-text: var(--brand);
  --foot: var(--ink);
  /* The selector's chosen option: the dealer's brand fill, ringed in ink. */
  --pref-on-bg: var(--brand);
  --pref-on-fg: var(--on-brand);
  --pref-ring: var(--ink);

  --font-text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", system-ui, "Helvetica Neue", Arial, sans-serif;
  --font-figure: "Lot Figures", "Roboto Condensed", "Arial Narrow", var(--font-text);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --radius: 4px;
  --gutter: 16px;
  --measure: 68ch;
  --wide: 1312px;

  color-scheme: light;
}

@media (min-width: 960px) {
  :root {
    --gutter: 32px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1rem/1.5 var(--font-text);
  overflow-wrap: break-word;
}

::selection {
  background: var(--tag);
  color: var(--on-tag);
}

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

a {
  color: var(--brand-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--brand-text);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  font-family: var(--font-figure);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-size: 1.75rem;
}
h2 {
  font-size: 1.5rem;
}
h3 {
  font-size: 1.125rem;
}
@media (min-width: 960px) {
  h1 {
    font-size: 2.25rem;
  }
  h2 {
    font-size: 1.75rem;
  }
}

p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wide) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.figure {
  font-family: var(--font-figure);
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
}

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

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Header band ---------- */

.skip {
  position: absolute;
  left: var(--space-2);
  top: -100px;
  background: var(--surface);
  color: var(--ink);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  z-index: 10;
}
.skip:focus {
  top: var(--space-2);
}

.band {
  background: var(--brand);
  color: var(--on-brand);
}
.band a {
  color: inherit;
}
.band :focus-visible {
  outline-color: var(--on-brand);
}
.band__row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 56px;
}
.dealer {
  overflow-wrap: anywhere;
  font-family: var(--font-figure);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1;
  text-decoration: none;
  margin-right: auto;
}
.nav {
  display: none;
}
.nav ul {
  display: flex;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  display: block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
}
.nav a:hover {
  text-decoration: underline;
}
.nav a[aria-current="page"] {
  background: var(--on-brand);
  color: var(--brand);
}
.band__phone {
  display: none;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-figure);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.band__icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: 1px solid currentColor;
}
.menu {
  position: relative;
}
.menu > summary {
  list-style: none;
  cursor: pointer;
}
.menu > summary::-webkit-details-marker {
  display: none;
}
.menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + var(--space-2));
  width: min(280px, calc(100vw - 2 * var(--gutter)));
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-2);
  z-index: 5;
}
.menu__panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu__panel a {
  display: block;
  padding: var(--space-3);
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.menu__panel a[aria-current="page"] {
  color: var(--brand-text);
  font-weight: 700;
}
@media (min-width: 960px) {
  .nav {
    display: block;
  }
  .band__phone {
    display: inline-flex;
  }
  .band__call,
  .menu {
    display: none;
  }
  .band__row {
    min-height: 72px;
  }
  .dealer {
    font-size: 1.625rem;
  }
}

/* ---------- Buttons and fields ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius);
  border: 1px solid var(--brand);
  background: var(--brand);
  color: var(--on-brand);
  font: 600 1rem/1.2 var(--font-text);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease-out, color 120ms ease-out;
}
.button:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
  text-decoration: none;
}
.button--line {
  background: var(--surface);
  color: var(--brand-text);
}
.button--line:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
}
.button--block {
  width: 100%;
}

.field {
  display: grid;
  align-content: start;
  gap: var(--space-1);
}
.field > label:not(.check),
.field > legend,
.label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-muted);
  padding: 0;
}
.input,
.select,
.textarea {
  width: 100%;
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line-control);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: 400 1rem/1.4 var(--font-text);
  accent-color: var(--brand-text);
}
.select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2317181b' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.textarea {
  min-height: 112px;
  resize: vertical;
}
.input::placeholder,
.textarea::placeholder {
  color: var(--ink-muted);
}
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 36px;
  cursor: pointer;
}
.check input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--brand-text);
}
.hint {
  font-size: 0.875rem;
  color: var(--ink-muted);
}
.field--error .input {
  border-color: var(--cut-text);
  border-width: 2px;
}
.error {
  font-size: 0.875rem;
  color: var(--cut-text);
  font-weight: 600;
}

/* ---------- The shelf label: the signature ---------- */

.cars {
  display: grid;
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 600px) {
  .cars {
    grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
    gap: var(--space-4);
  }
}

.car {
  position: relative;
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  grid-template-areas:
    "photo tag"
    "photo name"
    "facts facts";
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.car:hover {
  border-color: var(--line-control);
}
.car:has(.car__link:focus-visible) {
  outline: 2px solid var(--brand-text);
  outline-offset: 2px;
}
.car__photo {
  grid-area: photo;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--line);
}
.car__name {
  grid-area: name;
  padding: var(--space-2) var(--space-3) var(--space-2);
  font-family: var(--font-text);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.car__link {
  color: var(--ink);
  text-decoration: none;
}
.car__link:focus-visible {
  outline: none;
}
.car__link::after {
  content: "";
  position: absolute;
  inset: 0;
}
.car__link:hover {
  text-decoration: underline;
}

.tag {
  grid-area: tag;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  row-gap: 2px;
  background: var(--tag);
  color: var(--on-tag);
  padding: var(--space-2) var(--space-3);
}
.tag__price {
  font-family: var(--font-figure);
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  font-size: 2.25rem;
  line-height: 1;
  white-space: nowrap;
}
.car .tag__price--none {
  font-size: 1.25rem;
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: anywhere;
}
.tag__cur {
  font-size: 0.6em;
  margin-left: 0.08em;
}
.tag__was {
  order: -1;
  font-size: 0.8125rem;
  white-space: nowrap;
}
.tag__was s {
  font-variant-numeric: tabular-nums;
}
.cut {
  display: inline-block;
  background: var(--cut);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  padding: 3px var(--space-1);
  border-radius: 2px;
  vertical-align: 1px;
}

.facts {
  grid-area: facts;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
}
.facts > div {
  padding: var(--space-2) var(--space-2);
  min-width: 0;
}
/* The year's cell is wide enough for its label, "ГОДИНА", at 390 px: at 0.75fr the word broke in two. */
.car .facts {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.05fr) minmax(0, 0.9fr) minmax(0, 1.2fr);
}
.facts > div + div {
  border-left: 1px solid var(--line);
}
.facts dt {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  line-height: 1.3;
}
.facts dd {
  margin: 0;
  font-family: var(--font-figure);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.25;
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 600px) {
  .car {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "photo"
      "tag"
      "name"
      "facts";
    grid-template-rows: auto auto 1fr auto;
  }
  .car__name {
    min-height: calc(2 * 1.3em + var(--space-4));
  }
  .car .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .facts > div {
    padding-inline: var(--space-3);
  }
  .facts > div + div {
    border-left: 0;
  }
  .facts > div:nth-child(even) {
    border-left: 1px solid var(--line);
  }
  .facts > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (min-width: 1200px) {
  .cars {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- Page sections ---------- */

main {
  display: block;
}
.section {
  padding-block: var(--space-6);
}
.section + .section {
  border-top: 1px solid var(--line);
}
@media (min-width: 960px) {
  .section {
    padding-block: var(--space-7);
  }
}
.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-4);
}
.lede {
  font-size: 1.0625rem;
  max-width: var(--measure);
}
.prose {
  max-width: var(--measure);
  display: grid;
  gap: var(--space-3);
}
.prose p {
  margin: 0;
}
.count {
  font-family: var(--font-figure);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Intro */
.intro {
  padding-block: var(--space-5) var(--space-4);
}
.intro__grid {
  display: grid;
  gap: var(--space-5);
}
.intro h1 {
  max-width: 22ch;
}
.intro .lede {
  margin-top: var(--space-3);
}
.quick {
  display: grid;
  gap: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.quick__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}
.quick__query {
  grid-column: 1 / -1;
}
.quick__total {
  font-size: 0.875rem;
  color: var(--ink-muted);
}
@media (min-width: 960px) {
  .intro {
    padding-block: var(--space-7) var(--space-6);
  }
  .intro__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: var(--space-7);
  }
  .quick__fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* About */
.about {
  display: grid;
  gap: var(--space-5);
}
.sheet {
  display: grid;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.sheet > div {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}
.sheet > div + div {
  border-top: 1px solid var(--line);
}
.sheet dt {
  color: var(--ink-muted);
  font-size: 0.875rem;
  font-weight: 600;
}
.sheet dd {
  margin: 0;
}
@media (min-width: 960px) {
  .sheet > div {
    grid-template-columns: 9.5rem minmax(0, 1fr);
  }
  .about {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: var(--space-7);
  }
}

/* Services */
.services {
  display: grid;
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.services li + li {
  border-top: 1px solid var(--line);
}
.services a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-1) var(--space-4);
  align-items: center;
  padding: var(--space-4);
  color: var(--ink);
  text-decoration: none;
}
.services a:hover h3 {
  text-decoration: underline;
}
.services p {
  grid-column: 1;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}
.services .icon {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--brand-text);
}
@media (min-width: 960px) {
  .services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .services li + li {
    border-top: 0;
  }
  .services li:nth-child(even) {
    border-left: 1px solid var(--line);
  }
  .services li:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

/* Financing example */
.finance {
  display: grid;
  gap: var(--space-4);
}
.example {
  display: grid;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.example__terms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}
.example__terms > div {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
}
.example__terms > div:nth-child(even) {
  border-left: 1px solid var(--line);
}
.example__terms dt,
.example__month dt {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}
.example__terms dd {
  margin: 0;
  font-family: var(--font-figure);
  font-weight: 700;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums lining-nums;
}
.example__month {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--tag);
  color: var(--on-tag);
}
.example__month dt {
  color: inherit;
}
.example__month dd {
  margin: 0;
  font-family: var(--font-figure);
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums lining-nums;
}
.notice {
  font-size: 0.875rem;
  color: var(--ink-muted);
  max-width: var(--measure);
}
@media (min-width: 960px) {
  .finance {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: var(--space-7);
    align-items: start;
  }
}

/* Contact */
.contact {
  display: grid;
  gap: var(--space-5);
}
.reach {
  display: grid;
  gap: var(--space-3);
}
.reach__phone {
  font-family: var(--font-figure);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  color: var(--ink);
}
.reach__actions {
  display: grid;
  gap: var(--space-2);
}
@media (min-width: 600px) {
  .reach__actions {
    grid-template-columns: repeat(2, max-content);
  }
}
@media (min-width: 960px) {
  .contact {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-7);
  }
}

/* ---------- Inventory ---------- */

.crumbs {
  font-size: 0.875rem;
  color: var(--ink-muted);
  padding-top: var(--space-4);
}
.crumbs a {
  color: var(--ink-muted);
}
.listing-head {
  padding-block: var(--space-3) var(--space-4);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-3);
}
.listing-head p {
  color: var(--ink-muted);
}
.listing {
  position: relative;
  display: grid;
  gap: var(--space-3);
  padding-bottom: var(--space-7);
}
@media (min-width: 960px) {
  .listing {
    grid-template-columns: 272px minmax(0, 1fr);
    grid-template-areas:
      "filters toolbar"
      "filters results";
    grid-template-rows: auto 1fr;
    gap: var(--space-3) var(--space-5);
    align-items: start;
  }
  .filters {
    grid-area: filters;
  }
}

.filters {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filters > summary {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: var(--space-2) var(--space-4);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.filters > summary::-webkit-details-marker {
  display: none;
}
.filters > summary .badge {
  background: var(--brand);
  color: var(--on-brand);
  border-radius: 999px;
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding-inline: 6px;
}
.filters > summary .icon:last-child {
  margin-left: auto;
}
.filters[open] > summary .icon:last-child {
  transform: rotate(180deg);
}
.filters__body {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-4);
  border-top: 1px solid var(--line);
}
.filters__actions {
  display: grid;
  gap: var(--space-2);
  justify-items: center;
}
@media (min-width: 960px) {
  .filters {
    position: sticky;
    top: var(--space-4);
  }
  .filters > summary {
    pointer-events: none;
  }
  .filters > summary .icon:last-child {
    display: none;
  }
  .filters::details-content {
    content-visibility: visible;
    display: block;
  }
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 36px;
  padding: var(--space-1) var(--space-2) var(--space-1) var(--space-3);
  border: 1px solid var(--line-control);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}
.toolbar {
  list-style: none;
  padding: 0;
}
.chip .icon {
  width: 16px;
  height: 16px;
}
.chip:hover {
  border-color: var(--ink);
}
.sort {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
}
.sort > summary {
  min-height: 48px;
  padding-inline: var(--space-3) var(--space-4);
}
/* The applied filters show at every width: the specimen hid them on a phone to make room for its sort, which the
   inventory has none of (#298), and a chip is the quickest way to drop one filter. */
@media (min-width: 960px) {
  .sort {
    position: relative;
    grid-area: toolbar;
    justify-self: end;
    align-self: start;
  }
  .sort > summary {
    min-height: 36px;
    padding-inline: 0;
  }
  .toolbar {
    display: flex;
    grid-area: toolbar;
    margin: 0;
  }
  .results {
    grid-area: results;
  }
}
.sort > summary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 36px;
  font-size: 0.875rem;
  cursor: pointer;
  list-style: none;
}
.sort > summary::-webkit-details-marker {
  display: none;
}
.sort ul {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 4;
  list-style: none;
  margin: 0;
  padding: var(--space-1);
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.sort a {
  display: block;
  padding: var(--space-2) var(--space-3);
  color: var(--ink);
  text-decoration: none;
}
.sort a[aria-current="true"] {
  font-weight: 700;
  color: var(--brand-text);
}

/* No car matches, or the dealer has none: a label-white panel in the results' place, the way out first. */
.empty {
  display: grid;
  gap: var(--space-3);
  justify-items: start;
  padding: var(--space-5) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.empty h2 {
  font-size: 1.25rem;
}
.empty p {
  color: var(--ink-muted);
  max-width: var(--measure);
}
.pages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-1);
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
}
.pages a,
.pages span {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding-inline: var(--space-3);
  border-radius: var(--radius);
  font-family: var(--font-figure);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}
.pages a {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}
.pages a:hover {
  border-color: var(--ink);
}
.pages [aria-current="page"] {
  background: var(--brand);
  color: var(--on-brand);
}

/* ---------- Car page ---------- */

.car-page {
  display: grid;
  gap: var(--space-5);
  padding-block: var(--space-3) var(--space-7);
}
.gallery {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}
.car-gallery { --gallery-ground: var(--line); --gallery-selection: var(--brand-text); --gallery-radius: var(--radius); }
.gallery__none {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--line);
  color: var(--ink-muted);
  font-family: var(--font-figure);
  font-weight: 700;
  font-size: 1.5rem;
}

.label-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  align-self: start;
}
.label-card .tag {
  padding: var(--space-3) var(--space-4);
}
.label-card .tag__price {
  font-size: 3.25rem;
}
/* No price: words, not a figure. They wrap at the band's width and take a size that fits a phone (#786). */
.label-card .tag__price--none {
  font-size: 1.75rem;
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.label-card h1 {
  font-size: 1.625rem;
  padding: var(--space-3) var(--space-4) var(--space-1);
}
.label-card .sub {
  padding: 0 var(--space-4) var(--space-3);
  color: var(--ink-muted);
  font-size: 0.9375rem;
}
.label-card .facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.label-card .facts > div + div {
  border-left: 0;
}
.label-card .facts > div:nth-child(even) {
  border-left: 1px solid var(--line);
}
.label-card .facts > div:nth-child(n + 3) {
  border-top: 1px solid var(--line);
}
.label-card .facts dd {
  font-size: 1.125rem;
}
/* The VIN takes a whole row: seventeen characters never fit a half cell. */
.label-card .facts > .facts__wide {
  grid-column: 1 / -1;
  border-left: 0;
}
.label-card__actions {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  border-top: 1px solid var(--line);
}
.label-card__actions .pair {
  gap: var(--space-2);
}

.car-body {
  display: grid;
  gap: var(--space-6);
  min-width: 0;
}
.car-body h2 {
  margin-bottom: var(--space-3);
}
.equipment {
  columns: 2 12rem;
  column-gap: var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
}
.equipment li {
  break-inside: avoid;
  padding: var(--space-1) 0 var(--space-1) var(--space-5);
  position: relative;
}
.equipment li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--brand-text);
  border-bottom: 2px solid var(--brand-text);
  transform: rotate(-45deg);
}

.enquiry {
  display: grid;
  gap: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.enquiry__trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
/* A refused enquiry's alert and the sent state (#303): a seam in the cut colour, never a shadow. */
.enquiry > .error {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 2px solid var(--cut-text);
  border-radius: var(--radius);
}
.enquiry > .error p {
  display: flex;
  gap: var(--space-2);
  align-items: start;
}
.enquiry-sent {
  display: grid;
  gap: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.enquiry-sent h3 {
  font-size: 1.375rem;
}
.enquiry .small {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}
/* The form shown again to send after a post without script (#1824): a note in ink, not an error. */
.enquiry__confirm p {
  font-weight: 600;
  color: var(--ink);
}
.enquiry__row {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 600px) {
  .enquiry__row {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 960px) {
  .car-page {
    grid-template-columns: minmax(0, 1fr) 400px;
    grid-template-areas:
      "gallery label"
      "body label";
    column-gap: var(--space-6);
    row-gap: var(--space-6);
    align-items: start;
  }
  .gallery {
    grid-area: gallery;
  }
  .label-card {
    grid-area: label;
    position: sticky;
    top: var(--space-4);
  }
  .car-body {
    grid-area: body;
  }
  .enquiry {
    padding: var(--space-5);
  }
}

/* ---------- 410 ---------- */

.gone {
  padding-block: var(--space-7) var(--space-6);
  display: grid;
  gap: var(--space-3);
  max-width: 44rem;
}
.gone .notfound-search { max-width: 32rem; margin-top: var(--space-2); }
.notfound-search__row { display: flex; gap: var(--space-2); }
.notfound-search__row .input { flex: 1; min-width: 0; }
.gone__car {
  font-weight: 600;
}
.gone__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

/* ---------- Footer ---------- */

.foot {
  background: var(--foot);
  color: #e9e9e6;
  padding-block: var(--space-6);
  font-size: 0.9375rem;
}
.foot a {
  color: #ffffff;
}
.foot :focus-visible {
  outline-color: #ffffff;
}
.foot__grid {
  display: grid;
  gap: var(--space-5);
}
.foot__name {
  font-family: var(--font-figure);
  font-weight: 700;
  font-size: 1.25rem;
  color: #ffffff;
}
.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}
@media (min-width: 960px) {
  .foot__grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

.section[data-rule] {
  border-top: 1px solid var(--line);
}
.notice--after {
  margin-top: var(--space-3);
}

/* Phone filter bar: filters left, sort right, one seam between. */
.filters > summary .icon:last-child {
  margin-left: 0;
}
.sort > summary {
  height: 49px;
  border-left: 1px solid var(--line);
}
@media (min-width: 960px) {
  .sort > summary {
    height: auto;
    border-left: 0;
  }
}

/* Column cards keep a consistent tag height with room for a badge or promotion. */
@media (min-width: 600px) {
  .car .tag {
    min-height: 76px;
  }
}

/* ---------- The app's shared markup (app/storefront/common.tsx) ---------- */

/* A crawled dealer's notice (#430): under the header on every page, in the shelf-label surface, so it reads as the
   site's own statement and not as an advert. Links are underlined, the way a label's small print is. */
.crawled {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
}
.crawled__row {
  display: grid;
  gap: var(--space-2);
  padding-block: var(--space-3);
}
.crawled__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-5);
  font-weight: 600;
}
.crawled__links a {
  color: var(--brand-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding-block: var(--space-2);
}
@media (min-width: 960px) {
  .crawled__row {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: var(--space-6);
  }
}


.foot__dealer {
  display: grid;
  gap: var(--space-1);
}
.section__lede {
  margin-bottom: var(--space-5);
}

/* A page of its own (#300): about, contact, a service, privacy. The heading is the global h1. */
.section h1 {
  margin-bottom: var(--space-2);
}

/* ---------- The colour-scheme selector (app/storefront/scheme.tsx) ---------- */
/* Desktop (#579): a disclosure in the band, after the phone. Phone: the same disclosures inside the navigation. Each choice
   is a form post; which one is current is drawn by the palette style, from the root's data-scheme attribute (src/storefront-scheme.ts). */

.prefs {
  display: none;
  gap: var(--space-2);
}
.pref {
  position: relative;
}
.pref > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-width: 44px;
  height: 44px;
  padding-inline: var(--space-2);
  border-radius: var(--radius);
  border: 1px solid currentColor;
  font-family: var(--font-figure);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1;
}
.pref > summary::-webkit-details-marker {
  display: none;
}
.pref[open] > summary {
  background: var(--on-brand);
  color: var(--brand);
  border-color: var(--on-brand);
}
.pref__icon {
  width: 20px;
  height: 20px;
  flex: none;
}
.pref__menu {
  position: absolute;
  right: 0;
  top: calc(100% + var(--space-2));
  width: min(220px, calc(100vw - 2 * var(--gutter)));
  max-height: calc(100dvh - 5rem);
  overflow-y: auto;
  display: grid;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-2);
  z-index: 5;
}
.pref__head {
  padding: var(--space-1) var(--space-3) var(--space-2);
  font-size: 0.8125rem;
  color: var(--ink-muted);
}
.pref__menu button {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
  padding: 0 var(--space-3);
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: 500 1rem/1.2 var(--font-text);
  text-align: left;
  cursor: pointer;
}
.pref__menu button:hover {
  background: var(--ground);
}

.prefs--phone {
  display: flex;
  position: relative;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: var(--space-2);
}
.prefs--phone:has(.pref[open]) .pref:not([open]) {
  position: absolute;
  inset-block-start: var(--space-2);
  inset-inline-end: 0;
  z-index: 1;
}
.prefs--phone .pref[open] {
  width: 100%;
}
.prefs--phone .pref[open] > summary {
  display: flex;
  width: max-content;
  margin-inline-start: auto;
}
.prefs--phone:has(.pref[open]) .pref--lang:not([open]) {
  inset-inline-end: calc(44px + var(--space-2));
}
.prefs--phone .pref--lang[open] > summary {
  margin-inline-end: calc(44px + var(--space-2));
}
.prefs--phone .pref[open] > summary {
  background: var(--pref-on-bg);
  color: var(--pref-on-fg);
  border-color: var(--pref-on-bg);
}
.band .prefs--phone .pref[open] > summary:focus-visible {
  outline-color: var(--pref-ring);
}
.menu__panel:has(.prefs--phone) {
  max-height: calc(100dvh - 5rem);
  overflow-y: auto;
}
.prefs--phone .pref__menu {
  position: static;
  width: 100%;
  margin-block-start: var(--space-2);
  max-height: min(16rem, calc(100dvh - 6rem));
}

@media (min-width: 960px) {
  .prefs {
    display: flex;
  }
}

/* Menus that open from the band sit on the surface, so their focus ring goes back to the page's. */
.band .pref__menu :focus-visible,
.band .menu__panel :focus-visible {
  outline-color: var(--brand-text);
}
.pref__menu button {
  position: relative;
}

/* The language picker (#2787, app/storefront/language.tsx): the scheme selector's neighbour in the band, a globe and the page's
   language code in the figure face; the page's own choice is filled with the brand. */
.pref--lang > summary .pref__code {
  font-family: var(--font-figure);
}
.pref__menu button[aria-current="true"] {
  background: var(--pref-on-bg);
  color: var(--pref-on-fg);
  font-weight: 700;
}
.pref__menu button[aria-current="true"]:focus-visible {
  outline-color: var(--pref-ring);
}
/* ---------- The takedown form (#442) ---------- */

/* The form is the enquiry's panel; the car list scrolls inside its own box, so a site of hundreds of cars is one screen of choices. */
.takedown {
  max-width: 40rem;
}
.takedown__list {
  display: grid;
  max-height: 22rem;
  overflow-y: auto;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.takedown__photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: var(--space-3);
}
.takedown__photo {
  display: grid;
  gap: var(--space-1);
  align-content: start;
  cursor: pointer;
}
.takedown__photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--line);
}
/* The contact page's enquiry about no car (#1095): the car page's column width, under the contact section. */
.enquiry-page {
  max-width: 40rem;
}

/* A reserved car (#1767): the shelf label's own colours turned over, a dark strip lettered in the dealer's tag colour, above the price. The pair is the tag's, so the dealer's palette check (on-tag on tag, 4.5:1) already holds it, in both schemes. */
.reserved {
  align-self: flex-start;
  order: -2;
  background: var(--on-tag);
  color: var(--tag);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  padding: 4px var(--space-2);
  border-radius: 2px;
}

/* The note over a car's description when it is not in the page's language (#2786). */
.desc-note {
  font-size: 0.875rem;
  color: var(--ink-muted);
  margin: 0 0 8px;
}

.car-gallery { min-width: 0; }
.car-gallery__frame { position: relative; }
.car-gallery__open, .car-gallery__thumbs a, .car-gallery__zoom {
  display: grid;
  place-items: center;
  position: relative;
  background: var(--gallery-ground);
  overflow: hidden;
}
.car-gallery__open { aspect-ratio: 4 / 3; border-radius: var(--gallery-radius, 0); }
.car-gallery__open :is(picture, img), .car-gallery__thumbs img { width: 100%; height: 100%; }
.car-gallery__open > picture, .car-gallery__open > img, .car-gallery__thumbs img { position: absolute; inset: 0; }
.car-gallery__open img { display: block; object-fit: contain; }
.car-gallery__thumbs img { object-fit: cover; }
.car-gallery[data-enhanced] .car-gallery__open { touch-action: pan-y pinch-zoom; cursor: zoom-in; }
.car-gallery:not([data-enhanced]) .car-gallery__enhanced { display: none; }
.car-gallery__control {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  border: 1px solid #ffffff73;
  border-radius: var(--gallery-radius, 0);
  background: #101113e8;
  color: white;
  padding: 0;
  cursor: pointer;
}
.car-gallery__control:hover { background: #34363a; }
.car-gallery__control .icon { width: 22px; height: 22px; }
.car-gallery__previous, .car-gallery__next { top: 50%; translate: 0 -50%; }
.car-gallery__previous { inset-inline-start: 10px; }
.car-gallery__next, .car-gallery__close, .car-gallery__expand { inset-inline-end: 10px; }
.car-gallery__expand { bottom: 10px; }
.car-gallery__close { top: 10px; }
.car-gallery__open:focus-visible { outline-offset: -4px; z-index: 1; }
.car-gallery__viewer button:focus-visible, .car-gallery__control:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #101113;
}
.car-gallery__count { margin-block: 6px 0; font-size: .875rem; font-variant-numeric: tabular-nums; }
.car-gallery__thumbs {
  list-style: none;
  display: flex;
  gap: 6px;
  margin-block: 4px 0;
  padding: 4px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.car-gallery__thumbs li { flex: 0 0 auto; }
.car-gallery__thumbs a {
  width: 80px;
  height: 60px;
  border-radius: var(--gallery-radius, 0);
}
.car-gallery[data-enhanced] .car-gallery__thumbs a { cursor: pointer; }
.car-gallery[data-enhanced] .car-gallery__thumbs a:not([data-image-state="failed"]) > span:first-child { visibility: hidden; }
.car-gallery__thumbs a[aria-current="true"] { outline: 2px solid var(--gallery-selection); outline-offset: 1px; }
.car-gallery__thumbs a:focus-visible { outline: 2px dashed var(--gallery-selection); outline-offset: 1px; }
.car-gallery__thumbs .car-gallery__error { display: none; }
.car-gallery [data-image-state="failed"] img { visibility: hidden; }
.car-gallery__error { padding: .5em; text-align: center; }
.car-gallery__viewer {
  --gallery-ground: #18191c;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  box-sizing: border-box;
  margin: 0;
  border: 0;
  padding: 54px 0 38px;
  overflow: hidden;
  color: white;
  background: #101113;
}
.car-gallery__viewer::backdrop { background: #101113; }
html:has(.car-gallery__viewer[open]) { overflow: hidden; }
.car-gallery__viewer .car-gallery__count { position: absolute; bottom: 10px; width: 100%; text-align: center; }
.car-gallery__zoom {
  display: flex;
  justify-content: center;
  align-items: center;
  border: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: zoom-in;
}
.car-gallery__zoom[aria-pressed="true"] { cursor: grab; touch-action: none; }
.car-gallery__zoom[aria-pressed="true"]:active { cursor: grabbing; }
.car-gallery__zoom img { flex: none; display: block; max-width: 100%; max-height: 100%; min-width: 0; min-height: 0; user-select: none; }
.car-gallery__zoom[aria-pressed="true"] img { transform: scale(2.5); }
.car-gallery__zoom:focus-visible { outline-offset: -4px; }

.listing-promotions {
  max-inline-size: 64rem;
  margin: 2rem auto;
  padding-inline: 1rem;
}

.listing-promotions img,
.listing-promotions video {
  display: block;
  max-inline-size: 100%;
  block-size: auto;
  margin-block-end: 1rem;
}
