/* Every car in one list (/voitures, src/app/explorer/). The app's tokens only: this sheet never writes a colour.

   Under the title, one row of pills (the search is the bar's): each filter in sight, a pill in force in ink and saying
   its value, each opening its small panel (the shared `.pick` and `.pop` of app.css), "En promotion" a switch. Phone:
   the row slides sideways under the title, the sort pinned beside it, and it stays under the bar while the cards scroll; each car is a card, larger,
   with a line of what it is and the figure of the sort. With room: a real table in its own box, the heads (each the
   button that sorts by it) and the car's column staying while the rest scrolls. */

.ex { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; width: 100%; max-width: 1480px; margin: 0 auto; padding: 10px var(--pad) 0; }
/* The icons drawn many times are uses of their symbols (view.ts, `ic`): filled with the text's colour, as the family is. */
.ex-ic { fill: currentColor; }

/* ── The head: the title, its counts, and the two views ──────────────────────────────────────────────── */
.ex-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "h h" "sub views"; align-items: center; gap: 4px 12px; padding-top: 4px; }
.ex-title { display: contents; }
.ex-h { grid-area: h; font: 800 1.75rem/1.02 var(--display); letter-spacing: -0.03em; }
.ex-sub { grid-area: sub; font: 500 0.71875rem/1.3 var(--label); letter-spacing: 0.01em; color: var(--soft); font-variant-numeric: tabular-nums; }
.ex-views { grid-area: views; display: flex; align-items: center; gap: 10px; }
.ex-mine-pick { display: none; }

/* The form holds what the address keeps and the panels: it takes no room of its own. */
.ex-form { display: contents; }

/* ── The tools: the sort (a phone's), the pills, "Effacer" ───────────────────────────────────────────── */
/* On a phone the row stays under the bar while the cards scroll, its pills sliding sideways beside the sort; the
   cards pass under it, fading at its foot. */
.ex-tools { position: sticky; top: var(--bar-h); z-index: 6; display: flex; align-items: center; gap: 8px; margin: -4px calc(var(--pad) * -1) 0; padding: 6px var(--pad); background: var(--paper); }
.ex-tools::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; background: linear-gradient(var(--paper), transparent); pointer-events: none; }
/* The row sticks right under the bar, within the few pixels of air the page keeps under it: the keyboard coming to
   one of its controls leaves the page where it is (app.css says why, of the bar). */
.ex-tools :is(a, button, input, summary) { scroll-margin-top: -12px; }
.ex-sorter { flex: none; display: flex; }
/* The sort is always in force: its pill keeps an ink edge, beside the pills of the filters. */
.ex-sorter .pick { padding-left: 12px; border-color: var(--ink); }
.ex-sorter .pick b { max-width: 7.2em; }
.ex-sk { font-weight: 500; color: var(--soft); }
.ex-pills { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 2px 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; mask-image: linear-gradient(90deg, var(--ink) calc(100% - 28px), transparent); }
.ex-pills::-webkit-scrollbar { display: none; }
/* Once the row has slid, its left edge fades too, under the sort (where the browser can follow the scroll). */
@property --ex-fade { syntax: "<length>"; inherits: false; initial-value: 0px; }
@supports (animation-timeline: scroll()) {
  .ex-pills { mask-image: linear-gradient(90deg, transparent 0, var(--ink) var(--ex-fade), var(--ink) calc(100% - 28px), transparent); animation: ex-slid linear both; animation-timeline: scroll(self inline); }
  @keyframes ex-slid { from { --ex-fade: 0px; } 4%, to { --ex-fade: 18px; } }
}
.ex-pills .pick b, .ex-sorter .pick b { overflow: hidden; text-overflow: ellipsis; padding-block: 3px; line-height: 1.15; }
.ex-pills .pick b { max-width: 11em; }
.ex-pills .pick:last-of-type { margin-right: 4px; }
.ex-pills .pick[data-ex-pill="q"] b { display: inline-flex; align-items: center; gap: 5px; max-width: none; }
.ex-qt { max-width: 9em; overflow: hidden; text-overflow: ellipsis; }
.ex-pills .pick[data-ex-pill="q"] b .ic { width: 14px; height: 14px; opacity: 0.72; }
.ex-clear { position: relative; flex: none; display: inline-flex; align-items: center; height: 40px; padding: 0 8px; margin-right: 24px; border-radius: var(--r-pill); font: 600 0.84rem/1 var(--body); color: var(--soft); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; white-space: nowrap; }
.ex-clear::after { content: ""; position: absolute; inset: -2px 0; }

/* ── The small panels of the pills (the shared `.pop`) ──────────────────────────────────────────────────── */
/* Inside a panel its title says what the part is about: the part's own legend is kept for a screen reader. */
.pop .fx-part > .fx-set > legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.fx-part { display: grid; gap: 16px; min-width: 0; }
.ex-pfoot { position: sticky; z-index: 1; bottom: calc(-14px - env(safe-area-inset-bottom, 0px)); margin: 16px calc(var(--pad) * -1) 0; padding: 12px var(--pad) 4px; background: var(--card); box-shadow: 0 -1px 0 var(--line); }
.ex-pfoot .btn { width: 100%; }
.ex.is-live .ex-nojs { display: none; }
@media (min-width: 760px) {
  .pop[id^="ex-p-"], #ex-sort { width: 340px; }
  #ex-p-boite, #ex-p-genre { width: max-content; min-width: 260px; }
  .ex-pfoot { bottom: -8px; margin: 14px -16px 0; padding: 10px 16px 10px; }
}
/* Marque: a field finds one among the 61; the makes, the most versions first, scroll under it. */
.fx-find { position: sticky; z-index: 1; top: -18px; display: flex; align-items: center; gap: 8px; height: 44px; margin: -2px 0 0; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--r-pill); background: var(--card); }
.fx-find:focus-within { border-color: var(--ink); }
.fx-find .ic { flex: none; width: 17px; height: 17px; color: var(--soft); }
.fx-find input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: none; font: 550 0.9375rem/1 var(--body); }
.fx-find input::placeholder { color: var(--soft); opacity: 1; }
.fx-find input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
@media (min-width: 760px) { .fx-find { top: -14px; } }
.fx-makes > label[hidden] { display: none; }
/* The field needs the script that finds: without one the makes are all there to tick. */
.ex:not(.is-live) .fx-find { display: none; }

/* ── The chips of every group (one set, in a panel or lent to the sheet) ────────────────────────────── */
.ex-set { margin-top: 14px; }
.ex-set legend { margin-bottom: 8px; }
.ex-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-pick { position: relative; display: inline-flex; cursor: pointer; }
.ex-pick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ex-pick span { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px; border: 1.5px solid var(--line); border-radius: var(--r-pill); font: 550 0.8125rem/1 var(--body); white-space: nowrap; transition: background-color var(--quick), border-color var(--quick), color var(--quick); }
.ex-pick span .ic { flex: none; width: 16px; height: 16px; margin-left: -2px; color: var(--soft); }
.ex-pick:hover span { border-color: var(--edge); }
.ex-pick input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.ex-pick input:checked + span .ic { color: inherit; }
.ex-pick input:focus-visible + span { outline: 2.5px solid var(--ink); outline-offset: 2px; }
/* The way of the sort: two halves, each its arrow and its words. */
.ex-way { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 2px; }
.ex-way .ex-pick span { width: 100%; height: auto; min-height: 44px; justify-content: center; padding: 8px 12px; white-space: normal; text-align: center; line-height: 1.2; }
.ex-way .ex-pick span .ic { width: 15px; height: 15px; color: inherit; }

/* The sort: the few most people want, then every criterion one tap away. */
.ex-all { margin-top: 14px; border-top: 1px solid var(--line); }
.ex-all > summary, .fx-more > summary { display: flex; align-items: center; gap: 8px; min-height: 48px; cursor: pointer; list-style: none; font: 600 0.875rem/1 var(--body); color: var(--soft); }
.ex-all > summary::-webkit-details-marker, .fx-more > summary::-webkit-details-marker, .fx-g > summary::-webkit-details-marker { display: none; }
.ex-all > summary .num, .fx-more > summary .num { font: 500 0.71875rem/1 var(--label); color: var(--faint); font-variant-numeric: tabular-nums; }
.ex-all > summary .ic { width: 18px; height: 18px; margin-left: auto; transition: rotate var(--calm) var(--ease); }
.ex-all[open] > summary .ic { rotate: 180deg; }
.ex-all > .ex-set:first-of-type { margin-top: 2px; }

/* ── The full sheet: "Tous les filtres" ──────────────────────────────────────────────────────────────── */
.ex-pop {
  position: fixed; inset: auto 0 0 0; width: 100%; max-width: 560px; max-height: 86dvh; margin: 0 auto; padding: 0 var(--pad) calc(18px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto; overscroll-behavior: contain; border: 0; border-radius: var(--r-l) var(--r-l) 0 0; background: var(--card); color: var(--ink); box-shadow: var(--lift-2);
  opacity: 0; translate: 0 24px; transition: opacity 0.2s, translate var(--calm) var(--ease), overlay var(--calm) allow-discrete, display var(--calm) allow-discrete;
}
.ex-pop:popover-open { opacity: 1; translate: 0 0; }
@starting-style { .ex-pop:popover-open { opacity: 0; translate: 0 24px; } }
.ex-pop::backdrop { background: color-mix(in srgb, var(--on-paint) 50%, transparent); }
.ex-pop-head h2 { display: flex; align-items: baseline; }
.ex-pop-head { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; margin: 0 calc(var(--pad) * -1); padding: 14px 6px 6px var(--pad); background: var(--card); }
.ex-pop-foot { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom, 0px)); margin: 18px calc(var(--pad) * -1) 0; padding: 12px var(--pad) 18px; background: var(--card); }
.ex-pop-foot .btn { width: 100%; }
.fx { max-height: 92dvh; padding-bottom: 0; }
.fx-head { gap: 2px; }
.fx-head h2 { margin-right: auto; }
.fx-i { color: var(--soft); }
.fx-i .ic { width: 20px; height: 20px; }
.fx-clear { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font: 600 0.8125rem/1 var(--body); color: var(--soft); text-decoration: none; }
.fx-method { position: fixed; inset: 64px var(--pad) auto; width: auto; max-width: 400px; margin: 0 auto; padding: 14px 16px; border: 0; border-radius: var(--r-m); background: var(--ink); color: var(--paper); box-shadow: var(--lift-2); font: 450 0.78rem/1.45 var(--body); }
.fx-method::backdrop { background: transparent; }

.fx-g { border-top: 1px solid var(--line); }
.fx-g:first-of-type { border-top: 0; }
.fx-g > summary { display: flex; align-items: center; gap: 10px; min-height: 56px; cursor: pointer; list-style: none; }
.fx-gl { font: 700 1.0625rem/1 var(--display); letter-spacing: -0.013em; }
.fx-gn { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--ink); color: var(--paper); font: 700 0.71875rem/1 var(--label); font-variant-numeric: tabular-nums; }
.fx-gn:empty { display: none; }
.fx-g > summary .ic { width: 20px; height: 20px; margin-left: auto; color: var(--soft); transition: rotate var(--calm) var(--ease); }
.fx-g[open] > summary .ic { rotate: 180deg; }
.fx-body { display: grid; gap: 18px; padding: 2px 0 22px; }
.fx-body > *, .fx-r { min-width: 0; }
/* A part lives in its pill's panel and comes into its slot while the sheet is open. Without a script a slot stays
   empty, and a group whose every control is a pill's is not shown: its pill has it. */
.fx-slot:empty { display: none; }
.fx-g:has(> .fx-body > .fx-slot:only-child:empty) { display: none; }
.fx-set { display: grid; gap: 8px; }
.fx-set legend { margin-bottom: 8px; }
.fx-toggles { margin-top: -4px; }

/* A chip and its count: the count is small, in the small labels' tabular figures; a chip that would leave no car fades. */
.fx-n { margin-left: 2px; font: 500 0.71875rem/1 var(--label); letter-spacing: 0.005em; color: var(--faint); font-variant-numeric: tabular-nums; }
.fx-n:empty { display: none; }
.ex-pick input:checked + span .fx-n { color: color-mix(in srgb, var(--paper) 62%, transparent); }
.ex-pick input:disabled + span { opacity: 0.38; cursor: not-allowed; }
.ex-pick:has(input:disabled) { cursor: not-allowed; }
.fx-more { margin-top: 4px; }
.fx-more > summary { min-height: 40px; font-size: 0.8125rem; }
.fx-more > .ex-picks { padding-bottom: 6px; }

/* A range: its name and its bounds in large figures, the spread of the cars, the thumbs. */
.fx-r { display: grid; gap: 6px; }
.fx-r[hidden] { display: none; }
.fx-rh { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.fx-rl { font: 600 0.875rem/1.2 var(--body); }
.fx-rv { font: 750 1.0625rem/1 var(--display); letter-spacing: -0.017em; font-variant-numeric: tabular-nums; color: var(--faint); white-space: nowrap; }
.fx-r.is-on .fx-rv { color: var(--ink); }
.fx-hist { display: grid; grid-template-columns: repeat(28, minmax(0, 1fr)); align-items: end; gap: 2px; height: 34px; margin-top: 4px; }
.fx-hist:empty { display: none; }
/* Free, the spread is quiet; set, the cars kept are in ink and the others fade. */
.fx-hist > i { display: block; height: calc(var(--h, 0) * 100%); min-height: 0; border-radius: 2px 2px 0 0; background: color-mix(in srgb, var(--soft) 45%, var(--line)); transition: height var(--quick), background-color var(--quick); }
.fx-r.is-on .fx-hist > i { background: color-mix(in srgb, var(--line) 80%, transparent); }
.fx-r.is-on .fx-hist > i.is-in { background: var(--ink); }
.fx-slide { position: relative; height: 28px; margin-top: -14px; }
.fx-slide::before { content: ""; position: absolute; inset: 13px 0 auto; height: 2px; border-radius: 1px; background: var(--line); }
.fx-slide input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.fx-slide input::-webkit-slider-runnable-track { height: 28px; background: none; }
.fx-slide input::-moz-range-track { height: 28px; background: none; }
.fx-slide input::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 26px; height: 26px; margin-top: 1px; border: 2px solid var(--ink); border-radius: 50%; background: var(--card); box-shadow: var(--lift-1); pointer-events: auto; cursor: grab; }
.fx-slide input::-moz-range-thumb { width: 22px; height: 22px; border: 2px solid var(--ink); border-radius: 50%; background: var(--card); box-shadow: var(--lift-1); pointer-events: auto; cursor: grab; }
.fx-slide input:focus-visible::-webkit-slider-thumb { outline: 2.5px solid var(--ink); outline-offset: 2px; }
.fx-slide input:active::-webkit-slider-thumb { cursor: grabbing; scale: 1.08; }
.fx-miss { justify-self: end; font: 500 0.71875rem/1 var(--label); color: var(--soft); font-variant-numeric: tabular-nums; }
.fx-miss:empty { display: none; }
/* Without a script, two boxes; with one, the slider writes into them. */
.fx-boxes { display: flex; gap: 8px; }
.fx-r.is-live .fx-boxes { display: none; }
.fx-box { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: var(--r-m); background: var(--paper); }
.fx-box input { flex: 1; width: 0; min-width: 0; border: 0; outline: none; background: none; font: 650 0.9375rem/1 var(--display); font-variant-numeric: tabular-nums; }
.fx-u { font: 500 0.71875rem/1 var(--label); color: var(--soft); font-variant-numeric: tabular-nums; }
.fx-foot { z-index: 2; margin-top: 4px; padding-top: 12px; box-shadow: 0 -1px 0 var(--line); }
.fx-go b { font-weight: 800; font-variant-numeric: tabular-nums; }
.fx-go.is-none { opacity: 0.5; }
.is-counting .fx-n { opacity: 0.4; }

/* ── A row: what every screen shares ─────────────────────────────────────────────────────────────────── */
.ex-results { min-width: 0; scroll-margin-top: calc(var(--bar-h) + 64px); transition: opacity var(--quick); }
.ex-results[aria-busy="true"] { opacity: 0.55; }
.ex-scroll { outline: none; }
.ex-car { text-align: left; font-weight: inherit; }
.ex-id { min-width: 0; color: inherit; text-decoration: none; }
.ex-pic { display: grid; place-items: end; }
.ex-hero { display: none; }
.ex-make { font-size: 0.65625rem; line-height: 1; }
.ex-name { min-width: 0; font: 700 1.0625rem/1.12 var(--display); letter-spacing: -0.017em; text-wrap: balance; }
.ex-trim { min-width: 0; font: 550 0.8125rem/1.3 var(--body); }
/* What it is: energy, gearbox, seats, each its icon then its word, in the soft voice of facts. */
.ex-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; min-width: 0; font: 550 0.75rem/1.2 var(--body); color: var(--soft); }
.ex-facts:empty { display: none; }
.ex-f { position: relative; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.ex-f .ic { flex: none; width: 14px; height: 14px; }
.ex-price .price { gap: 0 0.45em; }
.ex-price .price b { font-size: 0.9375rem; font-weight: 750; }
.ex-price .price-list s { font-size: 0.71875rem; }
.ex-unfold { position: relative; display: inline-flex; align-items: center; gap: 1px; height: 26px; padding: 0 4px 0 9px; border-radius: var(--r-pill); background: var(--road); font: 650 0.75rem/1 var(--label); color: var(--soft); text-decoration: none; transition: background-color var(--quick), color var(--quick); font-variant-numeric: tabular-nums; }
.ex-unfold::after { content: ""; position: absolute; inset: -9px -4px; }
.ex-unfold .ic { width: 15px; height: 15px; transition: rotate var(--calm) var(--ease); }
.ex-unfold[aria-expanded="true"] { background: var(--ink); color: var(--paper); }
.ex-unfold[aria-expanded="true"] .ic { rotate: 180deg; }
.ex-keep .ic { width: 21px; height: 21px; }
.ex-none { color: var(--soft); }
/* No car answers: where the cars would be, in the same card, the bird at rest, one line, one way back (as the garage
   with nothing kept). The pills above say what is in force, each a tap from being loosened. */
.ex-nobody { display: grid; justify-items: center; align-content: center; gap: 14px; min-height: 300px; padding: var(--sp-6) var(--sp-5) var(--sp-7); border-radius: var(--r-l); background: var(--card); box-shadow: var(--lift-1); text-align: center; }
.ex-nobody-bird { margin-bottom: -6px; }
.ex-fill { padding: 0; }
.ex-more { display: flex; justify-content: center; padding: 18px 0 8px; }
.ex-more .btn small { margin-left: 6px; font: 500 0.71875rem/1 var(--label); color: var(--soft); font-variant-numeric: tabular-nums; }

/* ── A phone: cards ──────────────────────────────────────────────────────────────────────────────────────
   The whole card is the way to the car: at the list's one scale, its make (and at its right the figure of the sort when
   it is not the price), its name, its price, and under them what it is. Its versions and its heart sit over its
   bottom right corner, the line of facts leaving them the room. */
@media (max-width: 759px) {
  .ex-table, .ex-table tbody { display: block; width: 100%; }
  .ex-table thead { display: none; }
  .ex-table tbody { display: grid; gap: 8px; }
  .ex-row {
    --pic: 108px;
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto 48px; grid-template-rows: minmax(0, 1fr) 44px;
    border-radius: var(--r-m); background: var(--card); box-shadow: var(--lift-1); transition: scale var(--quick);
  }
  .ex-row > .ex-car { display: contents; }
  .ex-id {
    grid-column: 1 / -1; grid-row: 1 / -1; display: grid; grid-template-columns: var(--pic) minmax(0, 1fr) auto; grid-template-rows: auto auto auto auto 44px;
    column-gap: 12px; row-gap: 2px; padding: 12px 12px 0; border-radius: var(--r-m);
  }
  .ex-id:focus-visible { outline-offset: -2px; }
  .ex-pic { --mm: 0.02px; grid-column: 1; grid-row: 1 / 5; align-self: end; min-height: 28px; padding-bottom: 2px; }
  .ex-make { grid-column: 2; grid-row: 1; align-self: center; }
  .ex-name { grid-column: 2 / 4; grid-row: 2; }
  .ex-trim { grid-column: 2 / 4; grid-row: 3; }
  .ex-price { grid-column: 2 / 4; grid-row: 4; padding-top: 2px; }
  .ex-table.is-by-price .ex-price .price b { font-size: 1.0625rem; }
  /* The figure of the sort, at the right of the make, where the eye runs down the list. */
  .ex-hero { grid-column: 3; grid-row: 1; justify-self: end; align-self: center; display: block; font: 750 1rem/1 var(--display); letter-spacing: -0.017em; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .ex-hero b { font: inherit; }
  .ex-hero .ex-none { font: 500 0.9375rem/1 var(--label); color: var(--faint); font-variant-numeric: tabular-nums; }
  /* The best glows in a pill that reaches into the card's margin: the figure's own box holds it, its text stays in line. */
  .ex-hero.is-best { margin-right: -7px; }
  .ex-hero.is-best b { display: inline-block; padding: 3px 7px; margin: -3px 0; border-radius: 8px; background: var(--good-soft); color: var(--good); }
  .ex-facts { grid-column: 1 / -1; grid-row: 5; align-self: center; padding-right: 96px; }
  .ex-fill { display: none; }
  .ex-v { display: none; }
  .ex-unfold { position: relative; z-index: 1; grid-column: 2; grid-row: 2; align-self: center; margin-right: 2px; }
  .ex-keep { position: relative; z-index: 1; grid-column: 3; grid-row: 2; align-self: center; }
  @media (prefers-reduced-motion: no-preference) { .ex-row:has(.ex-id:active) { scale: 0.985; } }
  /* A name's other versions: lighter cards hung under it, each its own words, its price, what it is, its heart. */
  .ex-row.is-version { margin: -2px 0 0 20px; background: color-mix(in srgb, var(--card) 50%, var(--paper)); box-shadow: inset 0 0 0 1px var(--line); }
  .ex-row.is-version .ex-id { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto 44px; padding-top: 10px; }
  .ex-row.is-version .ex-trim { grid-column: 1; grid-row: 1; }
  .ex-row.is-version .ex-hero { grid-column: 2; grid-row: 1; align-self: start; }
  .ex-row.is-version .ex-price { grid-column: 1 / -1; grid-row: 2; }
  .ex-row.is-version .ex-facts { grid-row: 3; }
  .ex-gap { display: block; padding: 14px 4px 2px; font: 500 0.71875rem/1.3 var(--label); color: var(--soft); font-variant-numeric: tabular-nums; }
  .ex-gap td { display: block; }
}
@media (max-width: 379px) {
  .ex-row { --pic: 96px; }
  .ex-pic { --mm: 0.0178px; }
  .ex-h { font-size: 1.625rem; }
}

/* ── With room: the table ───────────────────────────────────────────────────────────────────────────── */
@media (min-width: 760px) {
  .ex { --above: 236px; gap: 14px; padding-top: 18px; }
  .ex-head { grid-template-areas: "h views" "sub views"; }
  .ex-h { font-size: 2.125rem; }
  .ex-tools { position: static; flex-wrap: wrap; margin: 0; padding: 0; background: none; }
  .ex-tools::after { display: none; }
  .ex-sorter { display: none; }
  .ex-pills { flex-wrap: wrap; overflow: visible; mask-image: none; animation: none; padding: 0; }
  .ex-pills .pick:last-of-type { margin-right: 0; }
  .ex-clear { margin-right: 0; }
  .ex-mine-pick { display: flex; }

  .ex-scroll {
    --car-w: 372px; --pic: 112px;
    max-height: calc(100dvh - var(--bar-h) - var(--held-h) - var(--above)); min-height: 360px; overflow: auto; overscroll-behavior: contain;
    border-radius: var(--r-l); background: var(--card); box-shadow: var(--lift-1); scrollbar-width: thin; scrollbar-color: var(--line) transparent;
  }
  .ex-table { display: table; width: 100%; border-collapse: separate; border-spacing: 0; }
  .ex-fill { width: 100%; }

  /* The heads stay at the top of the box, the car's column at its left. Each head is the button that sorts by it. */
  .ex-heads > * { position: sticky; z-index: 2; top: 0; height: 54px; padding: 0 4px; background: var(--card); border-bottom: 1px solid var(--line); text-align: right; vertical-align: middle; white-space: nowrap; }
  .ex-car-h { left: 0; z-index: 3 !important; width: var(--car-w); min-width: var(--car-w); padding-left: 20px !important; text-align: left !important; font: 600 0.65625rem/1 var(--label); letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); box-shadow: inset -1px 0 var(--line); font-variant-numeric: tabular-nums; }
  .ex-sort { position: relative; display: inline-flex; align-items: center; gap: 5px; height: 38px; padding: 0 6px 0 8px; border-radius: var(--r-s); font: 600 0.8125rem/1 var(--body); color: var(--soft); text-decoration: none; transition: background-color var(--quick), color var(--quick); }
  .ex-sort > .ic { width: 16px; height: 16px; }
  .ex-arrows { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 1px; }
  .ex-arrows .ic { width: 15px; height: 15px; color: var(--faint); transition: color var(--quick); }
  .ex-ch.is-sorted { background: color-mix(in srgb, var(--ink) 5%, var(--card)); }
  .ex-ch.is-sorted .ex-sort, .ex-ch.is-asked .ex-sort { color: var(--ink); font-weight: 700; }
  .ex-ch.is-sorted .ex-arrows .ic, .ex-ch.is-asked .ex-arrows .ic { color: var(--ink); }
  .ex-sort:focus-visible { outline-offset: -2px; }

  /* A row: the car at the list's one scale (about 110 px for 4,5 m), its make and name, what it is; the figures. */
  .ex-row > th, .ex-row > td { border-bottom: 1px solid var(--line); }
  .ex-row:last-child > * { border-bottom: 0; }
  .ex-car { position: sticky; left: 0; z-index: 1; width: var(--car-w); min-width: var(--car-w); max-width: var(--car-w); padding: 0; background: var(--card); box-shadow: inset -1px 0 var(--line); text-align: left; font-weight: inherit; vertical-align: middle; }
  .ex-id { display: grid; grid-template-columns: var(--pic) minmax(0, 1fr); grid-template-rows: auto auto auto auto; column-gap: 14px; row-gap: 3px; align-items: center; min-height: 80px; padding: 11px 56px 11px 16px; border-radius: 0; }
  .ex-pic { --mm: 0.0204px; grid-column: 1; grid-row: 1 / 5; align-self: end; height: 52px; }
  .ex-make { grid-column: 2; grid-row: 1; align-self: end; }
  .ex-name { grid-column: 2; grid-row: 2; font-size: 1rem; }
  .ex-row:not(.is-version) .ex-trim { grid-column: 2; grid-row: 3; font-size: 0.75rem; color: var(--soft); }
  .ex-facts { grid-column: 2; grid-row: 4; align-self: start; margin-top: 3px; gap: 2px 9px; font-size: 0.71875rem; }
  .ex-f { gap: 3px; }
  .ex-f .ic { width: 13px; height: 13px; }
  .ex-price { display: none; }
  .ex-car > .ex-keep { position: absolute; top: 50%; right: 8px; translate: 0 -100%; }
  .ex-car > .ex-unfold { position: absolute; top: 50%; right: 14px; margin-top: 6px; }
  .ex-car:not(:has(> .ex-unfold)) > .ex-keep { translate: 0 -50%; }
  .ex-row:hover > * { background: color-mix(in srgb, var(--road) 55%, var(--card)); }
  .ex-row:hover > .ex-v.is-sorted { background: color-mix(in srgb, var(--ink) 8%, var(--card)); }
  .ex-row.is-version > * { background: color-mix(in srgb, var(--sunk) 55%, var(--card)); }
  .ex-row.is-version .ex-id { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; min-height: 56px; padding: 9px 60px 9px calc(16px + var(--pic) + 14px); }
  .ex-row.is-version .ex-trim { grid-column: 1; grid-row: 1; }
  .ex-row.is-version .ex-facts { grid-column: 1; grid-row: 2; }

  /* A figure: right-aligned on its units; the column sorted tinted; the best of a column glowing. */
  .ex-v { position: relative; min-width: 108px; padding: 0 16px 0 10px; text-align: right; vertical-align: middle; white-space: nowrap; font: 650 0.9375rem/1 var(--display); letter-spacing: -0.013em; font-variant-numeric: tabular-nums; }
  .ex-v > .num, .ex-v .price b { display: inline-block; padding: 4px 0; font: inherit; }
  .ex-v .price { flex-direction: column; align-items: flex-end; gap: 1px; }
  .ex-v .price-list s { font-size: 0.65625rem; }
  .ex-v .ex-none { font: 500 0.84375rem/1 var(--label); color: var(--faint); font-variant-numeric: tabular-nums; }
  .ex-v.is-sorted { background: color-mix(in srgb, var(--ink) 5%, var(--card)); font-weight: 780; }
  /* The best glows in a pill that reaches into the cell's padding; each box holds what it draws, the figures stay in line. */
  .ex-v.is-best > .num, .ex-v.is-best .price > b { padding: 4px 8px; border-radius: 8px; background: var(--good-soft); color: var(--good); }
  .ex-v.is-best > .num, .ex-v.is-best .price { margin-right: -8px; }
  .ex-v.is-best .price-list { padding-right: 8px; }
  .ex-gap td { position: sticky; left: 0; padding: 18px 20px 8px; border-bottom: 1px solid var(--line); background: var(--card); font: 500 0.71875rem/1.3 var(--label); color: var(--soft); text-align: left; font-variant-numeric: tabular-nums; }
  .ex-v.is-g1, .ex-ch.is-g1 { box-shadow: inset 1px 0 var(--line); }

  /* The full sheet with room: a drawer from the right, the table still in sight beside it. */
  .ex-pop { inset: 10vh 0 auto 0; max-height: 80vh; border-radius: var(--r-l); padding-bottom: 18px; }
  .ex-pop-foot { bottom: -18px; }
  .ex-pop.fx { inset: 0 0 0 auto; width: 420px; max-width: 100vw; height: 100dvh; max-height: none; margin: 0; padding-bottom: 0; border-radius: var(--r-l) 0 0 var(--r-l); translate: 32px 0; }
  .ex-pop.fx:popover-open { translate: 0 0; }
  @starting-style { .ex-pop.fx:popover-open { translate: 32px 0; } }
  .ex-pop.fx::backdrop { background: color-mix(in srgb, var(--on-paint) 22%, transparent); }
  .ex-pop.fx .ex-pop-foot { bottom: 0; padding-bottom: 18px; }
  .fx-method { inset: 64px 24px auto auto; margin: 0; width: 360px; }
}
/* With more room the cars take their full size. */
@media (min-width: 1100px) {
  /* The title and one line of pills above the table: the box takes the rest of the screen. */
  .ex { --above: 196px; }
  .ex-pills { gap: 6px; }
  /* The cars at about 103 px for 4,5 m, then 110 px with more room: one scale down the column, whatever the row. */
  .ex-scroll { --car-w: 376px; --pic: 124px; }
  .ex-pic { --mm: 0.0229px; height: 56px; }
}
/* Under 1440 the heads draw closer, so that the first seven columns fit beside the car from 1280 px. */
@media (min-width: 760px) and (max-width: 1439px) {
  .ex-heads > * { padding: 0 2px; }
  .ex-sort { gap: 4px; padding: 0 4px 0 6px; }
  .ex-v { min-width: 96px; padding: 0 14px 0 8px; }
  .ex-id { padding-left: 14px; padding-right: 52px; }
  .ex-row.is-version .ex-id { padding-left: calc(14px + var(--pic) + 14px); padding-right: 52px; }
  .ex-car > .ex-keep { right: 4px; }
  .ex-car > .ex-unfold { right: 6px; }
}
@media (min-width: 1440px) {
  .ex-scroll { --car-w: 424px; --pic: 136px; }
  .ex-pic { --mm: 0.0244px; }
}
@media (min-width: 760px) and (hover: hover) {
  .ex-sort:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
  .ex-sort:hover .ex-arrows .ic { color: var(--soft); }
  .ex-ch.is-sorted .ex-sort:hover .ex-arrows .ic { color: var(--ink); }
  .ex-id:hover .ex-name { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
}
@media (hover: hover) { .ex-clear:hover { color: var(--ink); } }

/* ── The grid (`vue=grille`, src/app/explorer/grid.ts) ──────────────────────────────────────────────────────
   The same cars as cards, one per name: two a row on a phone, three from 560 px, four from 1100, five from 1300, six
   from 1560. A card reads as the street's middle car, small: its make, its name, the car, its price, four figures.
   One scale for the whole grid: the picture's box holds the longest car on sale (5,6 m in the card's width), the tallest
   picture in its height (2,05 m), and every car stands on its ground line. Every card of a row is one height whatever
   it holds: the name has two lines, the list price its own place, a missing figure says "—" in its own. A card is a
   container: what is inside it follows its own width (compact under 200 px: a phone's two a row, a small tablet's
   three), never the screen's. */
.gx-all { display: grid; gap: 8px; }
.gx { --cols: 2; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .gx { --cols: 3; gap: 10px; } }
@media (min-width: 1100px) { .gx { --cols: 4; gap: 12px; } }
@media (min-width: 1300px) { .gx { --cols: 5; } }
@media (min-width: 1560px) { .gx { --cols: 6; } }
.gx-gap { padding: 10px 2px 0; font: 500 0.71875rem/1.3 var(--label); color: var(--soft); font-variant-numeric: tabular-nums; }
.gx-c { container-type: inline-size; position: relative; min-width: 0; border-radius: var(--r-m); background: var(--card); box-shadow: var(--lift-1); transition: scale var(--quick); }
.gx-a {
  /* A browser without the card's own units: one scale that the narrowest card holds (5 600 mm in 140 px). */
  --in: 10px; --mm: 0.025px;
  display: grid; grid-template-columns: minmax(0, 1fr); align-content: start;
  height: 100%; padding: var(--in) var(--in) 8px; border-radius: var(--r-m); color: inherit; text-decoration: none;
}
/* One scale for every card: the picture's box (the card less its padding) holds 5 600 mm; the longest car is 5 410. */
@supports (width: 1cqi) { .gx-a { --mm: calc((100cqi - 2 * var(--in)) / 5600); } }
.gx-a:focus-visible { outline-offset: 2px; border-radius: var(--r-m); }
/* The make, the heart's room at its right. */
.gx-make { min-width: 0; padding-right: 30px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.65625rem; line-height: 1.2; }
.gx-make.is-marked { justify-self: start; margin-left: -4px; padding: 2px 4px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 7%, var(--card)); color: var(--ink); }
/* The name in a box of two lines: its first leaves the heart its room, its second ends on how many versions (a float
   before the words, a line tall: the words flow around it). */
.gx-name { --nm: 0.9375rem; display: block; height: calc(2 * 1.15 * var(--nm)); margin-top: 3px; overflow: hidden; font: 700 var(--nm)/1.15 var(--display); letter-spacing: -0.017em; }
.gx-name::before { content: ""; float: right; width: 24px; height: calc(1.15 * var(--nm)); }
.gx-name b { font-weight: inherit; }
.gx-n { float: right; clear: right; margin-left: 6px; font: 500 0.65625rem/calc(1.15 * var(--nm)) var(--label); letter-spacing: 0; color: var(--soft); font-variant-numeric: tabular-nums; }
.gx-trim { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 550 0.75rem/calc(1.15 * var(--nm)) var(--body); letter-spacing: 0; color: var(--soft); }
/* A version a card (`versions=toutes`): its name on one line, its version under it. */
.gx-name:has(> .gx-trim)::before { display: none; }
.gx-name:has(> .gx-trim) > b { display: block; padding-right: 24px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The car, on its ground line, in a box as tall as the tallest picture. */
.gx-pic { display: flex; align-items: flex-end; justify-content: center; height: calc(2050 * var(--mm)); margin-top: 4px; border-bottom: 1px solid var(--line); }
/* A car without measures says so, in the box's width (a phone's card is narrow): its words wrap. */
.gx-pic .carfig.is-nothing { flex: 0 1 auto; min-width: 0; max-width: 100%; }
.gx-pic .carfig-none { margin-bottom: 8px; max-width: 100%; }
/* The price, per month under it, then its list price when a promotion applies: three lines of one height on every card.
   A card with room holds the list price and per month on one line, under the price. */
.gx-cost { --cost: 1.25rem; --under: 1rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: var(--cost) var(--under) var(--under); align-items: start; column-gap: 6px; margin-top: 5px; }
.gx-cost > .price { display: contents; }
.gx-cost .price > b { grid-area: 1 / 1; justify-self: start; font: 800 1.0625rem/var(--cost) var(--display); letter-spacing: -0.025em; }
.gx-cost .old-mark { grid-area: 1 / 2; align-self: center; }
/* Each line its own height, its words on it: per month stands where it stands, with or without a list price. */
.gx-cost .price-list { grid-area: 3 / 1; justify-self: start; font: 500 0.65625rem/var(--under) var(--label); font-variant-numeric: tabular-nums; }
.gx-cost .price-list s { font: inherit; }
.gx-mo { grid-area: 2 / 1 / 3 / 3; justify-self: start; font: 500 0.6875rem/var(--under) var(--body); color: var(--soft); white-space: nowrap; }
.gx-mo b { font: 700 0.75rem/1 var(--display); letter-spacing: -0.008em; color: var(--ink); }
/* Four figures, two by two, each its icon. */
.gx-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 6px; margin-top: 5px; padding-top: 4px; border-top: 1px solid var(--line); }
.gx-f { position: relative; display: flex; align-items: center; gap: 4px; min-width: 0; height: 22px; font: 700 0.75rem/1 var(--display); letter-spacing: -0.008em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gx-f .ic { flex: none; width: 13px; height: 13px; color: var(--soft); }
.gx-f > b { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: inherit; }
/* The unit smaller and lighter than its figure: the number is what is read. */
.gx-f > b > small { font: 550 0.84em/1 var(--body); letter-spacing: 0; color: var(--soft); }
.gx-f.is-best > b > small { color: inherit; }
.gx-f.is-word > b { font-weight: 650; }
.gx-f.is-none { color: var(--faint); font-weight: 500; }
/* The sort's own figure, when it is none of the four, leads: the first line whole, its figure at the end, its name in
   words where the card has room (for a screen reader only on a phone's card). */
.gx-f.is-lead { grid-column: 1 / -1; }
.gx-f.is-lead > :is(b, span[aria-hidden]) { flex: none; }
.gx-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* What the grid is sorted by, on every card, as the sorted column is in the table: tinted, in ink, heavier. The price
   sorted is a band across the card, at one height on every card of a row: the table's tinted column, through the grid.
   The best of the list glows, as in the table. Each box holds what it draws: nothing moves, the figures stay in line. */
.gx-cost.is-marked { margin-inline: calc(-1 * var(--in)); padding-inline: var(--in); background: color-mix(in srgb, var(--ink) 5%, var(--card)); }
.gx-f.is-marked, .gx-mo.is-marked { margin-inline: -5px; padding-inline: 5px; border-radius: 6px; background: color-mix(in srgb, var(--ink) 6%, var(--card)); }
.gx-f.is-marked { font-weight: 800; }
.gx-f.is-marked .ic { color: var(--ink); }
.gx-mo.is-marked { color: var(--ink); }
.gx-f.is-best > b, .gx-cost.is-best > .price > b, .gx-mo.is-best > b { margin: -1px -4px; padding: 1px 4px; border-radius: 6px; background: var(--good-soft); color: var(--good); }
/* The heart, beside the card's link: over its top right corner, 44 px to the thumb. */
.gx-c > .ex-keep { position: absolute; z-index: 1; top: 0; right: 0; }
.gx-c > .ex-keep .ic { width: 19px; height: 19px; }
@media (prefers-reduced-motion: no-preference) { .gx-c:has(> .gx-a:active) { scale: 0.985; } }
@media (hover: hover) { .gx-a:hover .gx-name b { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; } }
/* The narrowest cards (a 360 or 375 px phone): a size less. */
@container (max-width: 170px) {
  .gx-name { --nm: 0.875rem; }
  .gx-n { margin-left: 4px; font-size: 0.59375rem; }
  .gx-f .ic { width: 12px; height: 12px; }
  .gx-f { gap: 3px; font-size: 0.71875rem; }
}
/* A card with room: the larger type, the list price and per month on one line. */
@container (min-width: 200px) {
  .gx-a { --in: 12px; padding-bottom: 10px; }
  .gx-make { font-size: 0.71875rem; }
  .gx-name { --nm: 1.0625rem; }
  .gx-name::before { width: 28px; }
  .gx-n { font-size: 0.71875rem; }
  .gx-cost { --cost: 1.5rem; --under: 1.125rem; grid-template-rows: var(--cost) var(--under); }
  .gx-cost .price > b { font-size: 1.25rem; }
  .gx-cost .price-list { grid-area: 2 / 1; font-size: 0.71875rem; }
  .gx-mo { grid-area: 2 / 2; justify-self: end; font-size: 0.75rem; }
  .gx-mo b { font-size: 0.8125rem; }
  .gx-figs { gap: 0 10px; margin-top: 7px; padding-top: 5px; }
  .gx-f { gap: 6px; height: 24px; font-size: 0.8125rem; }
  .gx-f .ic { width: 15px; height: 15px; }
  .gx-l { position: static; flex: 0 1 auto; width: auto; height: auto; min-width: 0; overflow: hidden; clip-path: none; text-overflow: ellipsis; font: 550 0.75rem/1 var(--body); letter-spacing: 0; color: var(--soft); }
  .gx-f.is-marked .gx-l { color: var(--ink); }
  /* Its name said, the figure goes to the line's end, as on a sheet. */
  .gx-f.is-lead > :is(b, span[aria-hidden]) { margin-left: auto; }
  .gx-c > .ex-keep { top: 2px; right: 2px; }
  .gx-c > .ex-keep .ic { width: 20px; height: 20px; }
}

/* With room the grid's tools stay under the bar, as a phone's: the page scrolls (the table had its own box), and the
   grid has no heads: its sort is the pill. The pills slide sideways when they do not hold on one line, and fade at the
   edge only then (where the browser can follow the scroll: a row that does not scroll has no timeline, and keeps its
   end clear). */
@property --ex-end { syntax: "<length>"; inherits: false; initial-value: 0px; }
@media (min-width: 760px) {
  .ex-tools.is-grid { position: sticky; flex-wrap: nowrap; margin: -6px calc(var(--pad) * -1) 0; padding: 6px var(--pad); background: var(--paper); }
  .ex-tools.is-grid::after { display: block; }
  .ex-tools.is-grid .ex-sorter { display: flex; }
  .ex-tools.is-grid .ex-pills { flex-wrap: nowrap; overflow-x: auto; padding: 2px 0; }
  .ex-tools.is-grid .ex-clear { margin-right: 4px; }
  @supports (animation-timeline: scroll()) {
    .ex-tools.is-grid .ex-pills { mask-image: linear-gradient(90deg, transparent 0, var(--ink) var(--ex-fade), var(--ink) calc(100% - var(--ex-end)), transparent); animation: ex-slid linear both, ex-end linear both; animation-timeline: scroll(self inline), scroll(self inline); }
    @keyframes ex-end { from { --ex-end: 28px; } 96% { --ex-end: 28px; } to { --ex-end: 0px; } }
  }
}

/* Rows that change place when the sort changes travel there (the script asks for it; not under reduced motion). */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-group(*) { animation-duration: var(--calm); animation-timing-function: var(--ease); }
}
