/* The street: the app's home. One car is the subject: its make and its name on the wall, the cars parked at true
   scale in the order of their price with the one in the middle in focus and the others stepping back, under it its
   price, one row of figures and the way in; then the road: the ruler of the prices with the budget's flag on it, and
   one line of controls (docs/decisions/2026-11-19-app-bar-home-list.md, sections 2 and 3). Also here: the page of
   the makes.

   Built on public/app/app.css and src/app/DESIGN.md: it adds no token and writes no colour.

   The first screen is one block in the page's own flow (`.st-first`), one screen tall, on a page that scrolls: a
   short screen scrolls rather than squeezing, and nothing covers the page.

   Scale. `--mm` is how many pixels a millimetre takes on this street. A car is `--L` millimetres long and is
   drawn `--L × --mm` wide; the room between two cars (`--gap`) and the room of the cars that are not on the
   screen (`--n`) are written in millimetres too, so that the street has its whole length before any script.
   On a phone the car in the middle takes 58 % of the width and its neighbours show their ends; with room, three
   whole cars, as large as the width and the height allow. Two cars in one place always compare: the focus never
   changes a car's scale.

   Yellow says "this one": the car held (the paint under its wheels, its mark on the ruler, the way back to it),
   the budget, the street one is in. Blue is the other car of a pair: the mark of the car in the middle while
   another is held.

   Motion follows the finger or explains a change (the street coming into focus, a car pulling out, the others
   closing ranks), on transform and opacity, and on `filter` for the focus. Under prefers-reduced-motion nothing
   slides or springs: the focus itself stays. */

.st {
  --mm: calc(58vw / 4500);
  /* The tallest car there is, with a little air: what the row of cars takes. */
  --tall: calc(2080 * var(--mm));
  /* Under the cars, with room: each neighbour's name and what it asks. */
  --cap-h: 0px;
  /* The name on the wall: as large as the place takes, up to this; what the make takes above it (on a phone it stands in
     the top row: the name's margin only). */
  --wall-max: min(132px, 17svh);
  --make-h: 4px;
  --wall-room: calc(100vw - 2 * var(--pad));
  /* The street's two edges fade out over this much of its width. */
  --fade: 3%;
  /* How far below its place the street waits behind a first visit's welcome: its ground at about 85 % of a phone's
     height, 80 % with room; the welcome's words are centred in the room above the cars. */
  --cover-y: 28svh;
  position: relative;
}
@media (min-width: 900px) {
  .st { --mm: min(0.105px, calc(90vw / 15100), calc(21vh / 1700)); --cap-h: 68px; --wall-max: clamp(104px, 23vh, 224px); --make-h: 20px; --wall-room: min(1120px, 80vw); --fade: 8%; --cover-y: 23svh; }
}
.st-probe { position: absolute; left: 0; top: 0; width: calc(var(--mm) * 100000); height: 0; visibility: hidden; pointer-events: none; }

/* The first screen: one block, one screen tall under the top bar (and above the car held on a phone). */
.st-first {
  position: relative; display: flex; flex-direction: column; overflow-x: clip;
  min-height: calc(100vh - var(--bar-h) - var(--held-h));
  min-height: calc(100svh - var(--bar-h) - env(safe-area-inset-top, 0px) - var(--held-h));
}

/* ── Its top: the way back to the car held, a returning visitor's line, and the two views ─────────────── */

/* As tall with the way back to the car held as without it: stepping onto the car held moves nothing under it. */
.st-top { position: relative; z-index: 3; flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 44px; padding: 10px var(--pad) 0; transition: opacity 0.4s var(--ease); }
.st-back-slot { flex: 0 1 auto; min-width: 0; display: flex; }
.st-back-slot:empty { display: none; }
.st-top > .views { flex: none; margin-left: auto; }
/* On a phone the make, and whose picture stands in the middle, take the top row's room left of the two views (the
   way back to the car held before them): the wall is then the name alone. Two lines at most; what a long note loses
   to the eye a screen reader still reads. With room the make stands on the wall, above the name. */
.st-make-top { flex: 1 1 0; min-width: 0; height: 28px; margin: 0; display: flex; align-items: center; font-size: 0.6875rem; line-height: 14px; }
.st-make-top > span { min-width: 0; max-height: 28px; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.st-make-top .t-label { margin-right: 6px; line-height: inherit; }
.st-make-top .t-note { line-height: inherit; }
.st-wall .st-make { display: none; }
@media (min-width: 900px) {
  .st-make-top { display: none; }
  .st-wall .st-make { display: flex; }
}
.st-top > .views a { height: 32px; padding: 0 14px; font-size: 0.8125rem; }

/* The way back to the car held, when it is not the car in the middle: on the side it stands. */
.st-back { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 34px; max-width: min(220px, 100%); padding: 0 12px; border-radius: var(--r-pill); background: var(--card); color: var(--ink); box-shadow: 0 0 0 1.5px var(--ink); font: 700 0.8125rem/1 var(--display); letter-spacing: -0.008em; text-decoration: none; white-space: nowrap; transition: scale var(--quick); }
.st-back .dot { width: 9px; height: 9px; }
.st-back::after { content: ""; position: absolute; inset: -5px -4px; }
.st-back span { overflow: hidden; text-overflow: ellipsis; }
.st-back .ic { flex: none; width: 16px; height: 16px; margin: 0 -3px; }
.st-back.is-left { padding-left: 8px; }
.st-back.is-right { margin-left: auto; padding-right: 8px; }
.st-back:active { scale: 0.95; }

/* A visitor back with a car held or cars kept: what they had, and the next step, on a line of its own on a phone. */
.st-resume { order: 5; flex: 1 1 100%; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 5px 5px 5px 14px; border-radius: var(--r-m); background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.st-resume-say { flex: 1 1 auto; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; font: 500 0.8125rem/1.25 var(--body); color: var(--soft); }
.st-resume-say b { color: var(--ink); font-weight: 700; }
.st-resume-a { position: relative; flex: none; display: inline-flex; align-items: center; gap: 2px; height: 36px; padding: 0 8px 0 14px; border-radius: var(--r-pill); background: var(--ink); color: var(--paper); text-decoration: none; font: 650 0.8125rem/1 var(--body); }
.st-resume-a::after { content: ""; position: absolute; inset: -4px 0; }
.st-resume-a .ic { width: 16px; height: 16px; }
@media (min-width: 900px) {
  .st-resume { order: 0; flex: 0 1 auto; max-width: 560px; border-radius: var(--r-pill); }
  .st-resume-say { -webkit-line-clamp: 1; line-clamp: 1; }
}
/* What belongs to a list of cars kept that a link carried: keeping it. */
.st-own { display: flex; gap: 8px; }
.st-own:empty { display: none; }

/* ── The scene: the wall, the cars, what the car in the middle says ───────────────────────────────────── */

.st-scene { position: relative; flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; padding-top: clamp(4px, 1.2vh, 14px); }
.st-scene > * { flex: none; transition: opacity 0.4s var(--ease); }

/* The wall: the make, with whose picture stands in the middle (never cut: it takes a line of its own when the two do
   not fit on one), and the name, as large as the place takes (its width in ems rides in `--w`, measured once the
   typeface is there). The wall is one box per screen size, whatever the name: the largest name and two lines of
   the make fill it; a name set smaller has air above it, and its foot, where the car stands, never moves. Nothing
   under the wall moves when the car changes. */
.st-wall { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; width: 100%; height: calc(var(--wall-max) * 0.86 + var(--make-h)); }
/* The name that leaves when the car changes, for 90 ms, where it stood (app.ts, `swapName`). */
.st-name.is-leaving { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; pointer-events: none; }
.st-make { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 2px 10px; padding: 0 var(--pad); text-align: center; }
.st-make > * { white-space: nowrap; }
.st-name {
  --w: 3;
  max-width: 100%; margin: 4px 0 0; padding: 0 var(--pad); text-align: center; white-space: nowrap; color: var(--ink);
  font: 800 clamp(26px, min(calc(var(--wall-room) / var(--w)), var(--wall-max)), var(--wall-max))/0.86 var(--names); letter-spacing: -0.038em;
  /* One cut of the typeface at every size, the display one: a name is then as wide in ems on every screen. */
  font-variation-settings: "opsz" 96;
}
.st-name span { display: inline-block; }
@media (max-width: 899px) {
  /* A long name on a phone stands on two balanced lines, in the same box, where one line would set it a quarter
     smaller or more: `--w2` is the longer of its two lines (view.ts, app.ts). One line, or two, never more. */
  .st-name {
    --fs1: min(calc(var(--wall-room) / var(--w)), var(--wall-max));
    --fs2: min(calc(var(--wall-room) / var(--w2, var(--w))), calc(var(--wall-max) / 2));
    white-space: normal; text-wrap: balance;
    font-size: max(26px, var(--fs1), calc(var(--fs2) * max(0, sign(var(--fs2) - var(--fs1) * 1.25))));
  }
}

/* What it asks: its price (a promotion with its list price), or per month. */
.st-price { position: relative; align-self: stretch; display: flex; justify-content: center; align-items: center; height: 36px; max-width: 100%; margin-top: 10px; padding: 0 var(--pad); white-space: nowrap; }
.st-price .price { justify-content: center; gap: 0 10px; }
.st-price .price b { font: 800 2rem/1 var(--display); letter-spacing: -0.03em; }
.st-price .price small { font: 500 0.875rem/1 var(--body); letter-spacing: 0; color: var(--soft); }
.st-price .price-list s { font: 500 0.78125rem/1 var(--label); letter-spacing: 0; font-variant-numeric: tabular-nums; }

/* The cars: one street, at one scale. The car in the middle stands in a light, on the ground's hairline. The light lies
   under the wall's name, the cars stand in front of it: the view itself never makes a layer of its own (what a first
   visit does to the street is done to its parts). */
.st-view { position: relative; width: 100%; margin-top: clamp(10px, 2.4vh, 26px); }
.st-view::before { content: ""; position: absolute; z-index: -1; left: 50%; bottom: calc(var(--cap-h) - 10px); width: min(92%, calc(7400 * var(--mm))); height: calc(var(--tall) * 1.25); translate: -50% 0; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--card) 92%, transparent), transparent); pointer-events: none; transition: opacity 0.55s var(--ease), translate 0.6s var(--ease), scale 0.6s var(--ease); }
.st-view::after { content: ""; position: absolute; left: 0; right: 0; bottom: var(--cap-h); height: 1px; background: linear-gradient(90deg, transparent, var(--line) 18%, var(--line) 82%, transparent); pointer-events: none; transition: opacity 0.55s var(--ease), translate 0.6s var(--ease); }

/* The street itself: a row that scrolls sideways and stops on a car; its two edges fade out. A vertical stroke on it
   scrolls the page. */
.st-street {
  --gap: 520;
  position: relative; display: flex; align-items: flex-end; height: calc(var(--tall) + var(--cap-h)); padding-bottom: var(--cap-h);
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; touch-action: pan-x pan-y; outline: none;
  transition: filter 0.55s var(--ease), opacity 0.55s var(--ease), translate 0.6s var(--ease), scale 0.6s var(--ease);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
}
.st-street::-webkit-scrollbar { display: none; }
.st-street::before, .st-street::after { content: ""; flex: none; width: 50%; height: 1px; }
/* Before any script, the street opens on its car: everything before it is pulled out of the way. */
.st-street:not(.is-live)::before { margin-left: calc(var(--open, 0) * var(--mm) * -1); }
.st-street.is-scrubbed { scroll-snap-type: none; }
.st-street.is-held { cursor: grabbing; }
.st-gone { flex: none; width: calc(var(--n, 0) * var(--mm)); height: 1px; }
.st-slot { position: relative; flex: none; width: calc(var(--L) * var(--mm)); margin: 0 calc(var(--gap) * var(--mm) / 2); scroll-snap-align: center; transition: filter 0.3s var(--ease), opacity 0.3s var(--ease), translate var(--calm) var(--ease); }
.st-hit { display: flex; justify-content: center; align-items: flex-end; border-radius: 10px; outline-offset: 6px; text-decoration: none; -webkit-tap-highlight-color: transparent; }
/* A car the source gives no measures for: its place, marked out, and the words that say why it is not drawn. */
.st-slot .carfig.is-nothing { display: grid; place-items: center; width: 100%; height: calc(1380 * var(--mm)); padding: 0 8px; border: 1.5px dashed var(--edge); border-bottom-style: solid; border-radius: 16px 22px 6px 6px; overflow: hidden; }
.st-slot .carfig-none { padding: 0; border: 0; white-space: normal; text-wrap: balance; }
/* A car that is on its way: its place, at its length. */
.st-slot.is-waiting i { display: block; height: calc(1200 * var(--mm)); border-radius: 40% 46% 12% 12% / 70% 80% 20% 20%; background: color-mix(in srgb, var(--ink) 7%, transparent); }

/* The focus. The car in the middle is sharp; whatever is not whole on the screen steps out of it: on a phone its two
   neighbours, whose ends show; with room, the cars beyond them. The rest of the street is off the screen. */
.st-slot:not(.is-here) { opacity: 0.42; }
.st-slot.is-near { filter: blur(1.6px); opacity: 0.58; }
.st-slot.is-far { filter: blur(3.5px); }

/* The car held is "this one": a stroke of road paint under its wheels. */
.st-slot.is-held::after { content: ""; position: absolute; z-index: 1; left: 8%; right: 8%; top: calc(100% + 4px); height: 6px; border-radius: 2px; background: var(--paint); box-shadow: 0 0 0 1.5px var(--paint-edge); transform: skewX(-20deg); }

/* A car beyond the budget steps back; the one in the middle stays readable. What it lacks of the budget, with the
   bird that shouts it, does not: that is the fact. */
.st-slot.is-beyond { translate: 0 -5px; }
.st-slot.is-beyond > .st-hit, .st-slot.is-beyond > .st-cap > :not(.st-lacks) { opacity: 0.42; }
.st-slot.is-beyond .carfig { filter: saturate(0.15); }
.st-slot.is-beyond.is-here { translate: none; }
.st-slot.is-beyond.is-here > .st-hit { opacity: 0.8; }
.st-slot.is-beyond.is-here .carfig { filter: saturate(0.45); }

/* Under the wheels, with room: each neighbour's name and what it asks (or its gap to the car held). */
.st-cap { display: none; }

/* As the page arrives, the street rolls in and comes to rest: once. */
@media (prefers-reduced-motion: no-preference) {
  .st-street.is-arriving .st-slot { animation: st-arrive 0.7s cubic-bezier(0.16, 0.84, 0.3, 1) backwards; }
  .st-street.is-arriving .st-slot.is-here ~ .st-slot { animation-delay: 60ms; }
  .st-street.is-jumping { animation: st-jump 0.32s var(--ease); }
}
@keyframes st-arrive { from { transform: translateX(90px); } }
@media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
  .st-slot.is-near .st-cap { animation: st-cap-in 0.18s ease-out 0.16s both; }
}
@keyframes st-cap-in { from { opacity: 0; } }
@keyframes st-jump { from { opacity: 0.25; } }

/* The two neighbours, named at the edges of a phone's screen: their pictures are out of focus, their names are not.
   Against a car held each says its gap to it; the first car past the budget, what it lacks. */
.st-nears { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; width: 100%; min-height: 28px; margin-top: 6px; padding: 0 var(--pad); }
.st-near { position: relative; display: grid; gap: 6px; min-width: 0; max-width: 47%; padding: 4px 0; color: var(--soft); text-decoration: none; }
.st-near::after { content: ""; position: absolute; inset: -8px -6px; }
.st-near-next { margin-left: auto; justify-items: end; text-align: right; }
.st-near > b { display: flex; align-items: center; gap: 2px; min-width: 0; font: 650 0.8125rem/1.1 var(--display); letter-spacing: -0.008em; }
.st-near > b > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-near .ic { flex: none; width: 16px; height: 16px; }
.st-near-prev .ic { margin-left: -4px; }
.st-near-next .ic { margin-right: -4px; }
.st-near.is-end { padding-top: 6px; font: 500 0.75rem/1.25 var(--body); }
.st-near.is-end::after { content: none; }
.st-vs { display: block; font-variant-numeric: tabular-nums; }
.st-vs .gaps { gap: 4px; }
.st-near-next .st-vs .gaps { justify-content: flex-end; }

/* What the car in the middle says, and what can be done with it: one row of figures, one row of acts. */
.st-info { display: grid; justify-items: center; gap: 12px; width: 100%; max-width: 600px; margin-top: 4px; padding: 0 var(--pad); }
.st-said { width: 100%; min-height: 58px; display: grid; align-items: center; }
/* Per month, the price's cell says the list price of a promotion on its label's line, struck, at its right: the row
   keeps one height whatever the car (nothing under the wall moves when the car changes). */
.st-said .fact:has(.fact-f s) { min-width: 9.75rem; }
.st-said .fact-f s { position: absolute; top: 8px; right: 10px; margin: 0; font: 500 0.71875rem/1.2 var(--label); font-variant-numeric: tabular-nums; }
/* Against the car held, one line of chips, on a phone too: a chip that does not fit on it is left out (the sentence a
   screen reader is given says it all), and the row never grows. */
.st-said .gaps { justify-content: center; gap: 8px; max-height: 32px; overflow: hidden; }
.st-acts { display: flex; align-items: center; gap: 8px; width: 100%; }
.st-go { flex: 1 1 auto; min-width: 0; }
.st-go > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The way down into the story is a laptop's, with scripts (public/app/street-stage.css): elsewhere it is the way in. */
.st-go > .st-go-dive, .st-go > .ic:last-child { display: none; }
.st-hold { display: none; flex: none; }
.st-hold[aria-pressed="true"] { background: var(--paint); color: var(--on-paint); border-color: var(--paint-edge); }
.st-keep { width: 48px; height: 48px; box-shadow: inset 0 0 0 1.5px var(--edge); }
.st-keep[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--ink); }
.st-keep[aria-pressed="true"] .ic { color: var(--ink); }
@media (max-width: 899px) {
  /* Three figures on a phone, two on the smallest; each takes the room its words need, so that no label breaks. */
  .st-said .st-facts.facts > .fact { flex: 1 1 auto; }
  .st-said .st-facts > .fact:nth-child(4) { display: none; }
}
@media (max-width: 379px) {
  /* Two figures, or two chips against the car held: one line, always. */
  .st-said .st-facts > .fact:nth-child(3), .st-said .gaps > .gap ~ .gap ~ .gap { display: none; }
}

/* ── With room: three whole cars, each neighbour named under its wheels, the price on their line ───────── */

@media (min-width: 900px) {
  .st-scene { justify-content: center; padding-bottom: 2vh; }
  .st-name { margin-top: 6px; }
  /* The cars' row is pulled up: the car in the middle stands in front of the foot of its name. */
  .st-view { order: 2; margin-top: calc(var(--wall-max) * -0.2); }
  .st-price { order: 3; margin-top: calc(var(--cap-h) * -1 + 12px); }
  .st-price { height: 38px; }
  .st-price .price b { font-size: 2.125rem; }
  .st-info { order: 4; gap: 14px; margin-top: 14px; }
  .st-acts { width: auto; justify-content: center; }
  .st-go { flex: none; }
  .st-hold { display: inline-flex; padding: 8px 18px; }
  .st-said .gap { min-height: 32px; padding: 3px 13px; font-size: 0.9375rem; }

  /* The neighbours stand sharp; what lies beyond them steps back. */
  .st-slot.is-near { filter: none; opacity: 0.9; }
  .st-cap { position: absolute; top: calc(100% + 12px); left: 50%; translate: -50% 0; display: grid; justify-items: center; align-content: start; gap: 4px; width: max-content; max-width: calc(100% + var(--gap) * var(--mm) - 16px); text-align: center; white-space: nowrap; pointer-events: none; transition: opacity 0.1s; }
  .st-cap b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font: 700 0.9375rem/1.1 var(--display); letter-spacing: -0.013em; color: var(--ink); }
  .st-cap .num { font: 500 0.71875rem/1 var(--label); color: var(--soft); font-variant-numeric: tabular-nums; }
  .st-cap .st-vs { margin-top: 2px; }
  .st-cap .gaps { justify-content: center; }
  /* The car that comes to the middle stops saying its name at once; one that becomes a neighbour says it once it has
     moved away from the price (below): never two words in one place. */
  .st-slot:not(.is-near) .st-cap { opacity: 0; }
  .st-slot.is-held::after { top: calc(100% + 3px); }

  /* The neighbours, with room, are the street's two arrows, on each side of it at the height of the cars. */
  .st-nears { order: 2; position: relative; height: 0; min-height: 0; margin: 0; padding: 0; }
  .st-near { position: absolute; z-index: 2; bottom: calc(var(--cap-h) + 36px); display: grid; place-items: center; width: 44px; height: 44px; max-width: none; padding: 0; border-radius: 50%; background: var(--card); color: var(--ink); box-shadow: var(--lift-1); transition: scale var(--quick), opacity var(--quick); }
  .st-near::after { inset: -2px; }
  .st-near-prev { left: 18px; }
  .st-near-next { right: 18px; }
  .st-near > b > span, .st-near .st-vs { display: none; }
  .st-near .ic { width: 22px; height: 22px; margin: 0; }
  .st-near:active { scale: 0.92; }
  .st-near.is-end { visibility: hidden; }
}
@media (hover: hover) and (min-width: 900px) {
  .st-slot.is-far:hover { filter: blur(0.6px); opacity: 0.85; }
}
@media (hover: hover) {
  .st-hit { cursor: pointer; }
  .st-near:hover > b > span { text-decoration: underline; text-underline-offset: 3px; }
  .st-back:hover span { text-decoration: underline; text-underline-offset: 3px; }
}

/* ── The road: the ruler of the prices, then one line of controls ─────────────────────────────────────── */

.st-road { flex: none; display: grid; gap: 8px; width: 100%; max-width: 1240px; margin: 0 auto; padding: 14px var(--pad) calc(10px + env(safe-area-inset-bottom, 0px)); transition: opacity 0.4s var(--ease); }

/* The ruler: the skyline of the prices (as many bars as its width takes), its baseline and its amounts, the car in
   the middle, the car held, and the budget's flag. A finger anywhere on it travels along the street. */
.st-ruler { --bx: 100%; position: relative; height: 58px; touch-action: none; cursor: ew-resize; -webkit-user-select: none; user-select: none; container: ruler / inline-size; }
.st-ruler::before { content: ""; position: absolute; left: 0; right: 0; bottom: 17px; height: 1.5px; border-radius: 1px; background: color-mix(in srgb, var(--ink) 42%, transparent); }
.st-bars { position: absolute; left: 0; right: 0; bottom: 18px; height: 28px; display: flex; align-items: flex-end; gap: 2px; }
.st-bars i { flex: 1 1 0; min-width: 0; height: max(2px, calc(var(--h) * 100%)); border-radius: 2px 2px 0 0; background: color-mix(in srgb, var(--ink) 30%, transparent); transition: background-color 0.2s; }
/* What is beyond the budget steps back. */
.st-bars i.is-over { background: color-mix(in srgb, var(--ink) 11%, transparent); }
.st-bars.is-wide { display: none; }
@container ruler (min-width: 600px) {
  .st-bars.is-wide { display: flex; }
  .st-bars.is-narrow { display: none; }
}
.st-nums { position: absolute; left: 0; right: 0; bottom: 0; height: 12px; font: 500 0.625rem/1 var(--label); color: var(--soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-nums span { position: absolute; left: var(--x); bottom: 0; translate: -50% 0; display: none; }
/* Each amount is written only where the ruler is wide enough for it to keep its air (view.ts, `thinned`): two
   amounts never touch, "800 000" and "1 200 000" included. */
@container ruler (max-width: 339.98px) { .st-nums span.is-xs { display: block; } }
@container ruler (min-width: 340px) and (max-width: 469.98px) { .st-nums span.is-s { display: block; } }
@container ruler (min-width: 470px) and (max-width: 759.98px) { .st-nums span.is-m { display: block; } }
@container ruler (min-width: 760px) { .st-nums span.is-l { display: block; } }
.st-nums em { position: absolute; right: 0; bottom: 0; font-style: normal; }
.st-mark { position: absolute; left: var(--x); bottom: 11px; width: 7px; height: 42px; margin-left: -3.5px; border-radius: 4px; background: var(--ink); box-shadow: 0 0 0 2.5px var(--paper); transition: left 0.28s var(--ease); pointer-events: none; }
.st-mark-held { bottom: 17px; width: 5px; height: 28px; margin-left: -2.5px; border-radius: 3px; background: var(--paint); box-shadow: 0 0 0 1.5px var(--paint-edge); }
/* While a car is held it is "this one": the car in the middle is then the other car of a pair. */
:root[data-held] .st-mark-here { background: var(--other); }

/* The budget: a real slider laid over the ruler, for the keyboard and a screen reader. A finger takes the flag by its
   tag (app.ts); everywhere else the ruler is the finger's, to travel along the street. */
.st-budget { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; appearance: none; -webkit-appearance: none; background: none; border: 0; opacity: 0; pointer-events: none; }
.st-budget:focus-visible { outline: none; }
.st-budget:focus-visible + .st-flag .st-flag-b { outline: 2.5px solid var(--ink); outline-offset: 3px; }
/* The flag: a pole on the ruler and, at its top, a tag that says the amount. Unset it waits at the dear end, quiet;
   set it is road paint. Its tag stands on the side of the pole where the ruler has room. */
.st-flag { position: absolute; left: var(--bx); bottom: 17px; width: 0; height: 41px; pointer-events: none; }
.st-flag::before { content: ""; position: absolute; left: -0.75px; bottom: 0; width: 1.5px; height: 100%; border-radius: 1px; background: var(--edge); }
.st-flag-b {
  position: absolute; right: 0; top: -4px; display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border: 0; border-radius: 12px 12px 2px 12px;
  background: var(--card); color: var(--ink); box-shadow: 0 0 0 1.5px var(--edge); white-space: nowrap; font: 650 0.75rem/1 var(--body); font-variant-numeric: tabular-nums;
  pointer-events: auto; touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none; transition: background-color var(--quick), box-shadow var(--quick), scale var(--quick);
}
/* The tag is 24 px tall to the eye and 44 to the thumb. */
.st-flag-b::after { content: ""; position: absolute; inset: -10px -8px; }
.st-flag.is-set::before { left: -1.25px; width: 2.5px; background: var(--paint); box-shadow: 0 0 0 1.5px var(--paint-edge); }
.st-flag.is-set .st-flag-b { background: var(--paint); color: var(--on-paint); box-shadow: 0 0 0 1.5px var(--paint-edge); font-weight: 700; }
.st-flag.is-left .st-flag-b { right: auto; left: 0; border-radius: 12px 12px 12px 2px; }
.st-flag-b.is-dragged { scale: 1.06; cursor: grabbing; }

/* The line of controls: the kinds of car, the filters, the count once something narrows the street, the unit. */
.st-ctl { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.st-grow { flex: 1 1 0; }
.st-ctl .switch { flex: none; }
/* The kinds' pill gives way before anything else does: a long name is cut, never the line. */
.st-ctl .pick[popovertarget="st-kinds"] { flex: 0 1 auto; min-width: 0; }
.st-ctl .pick[popovertarget="st-kinds"] > b { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.st-count { font: 500 0.71875rem/1.3 var(--label); color: var(--soft); text-align: right; font-variant-numeric: tabular-nums; }
.st-count:empty { display: none; }
@media (max-width: 899px) {
  /* On a phone the filters' pill is its sign (and the count of the wishes on); the count of the street is said to a screen reader. */
  .st-ctl .pick[popovertarget="st-filters"] { min-width: 40px; justify-content: center; padding: 0 11px; }
  .st-ctl .pick[popovertarget="st-filters"] > :is(b, .ic:last-child) { display: none; }
  .st-count { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* The panels the two pills open: the streets with their counts, the wishes as chips; at their foot, the way further. */
.st-chips.chips { margin: 4px 0 6px; padding: 0; }
.st-more { display: flex; align-items: center; gap: 10px; min-height: 50px; margin-top: 4px; padding: 0 2px; border-top: 1px solid var(--line); color: var(--soft); text-decoration: none; font: 600 1rem/1.2 var(--body); }
.st-more b { flex: 1 1 auto; font-weight: 650; }
.st-more small { font: 500 0.78125rem/1 var(--label); font-variant-numeric: tabular-nums; }
.st-more .ic { flex: none; width: 18px; height: 18px; }
@media (min-width: 760px) { .st-more { min-height: 44px; font-size: 0.9375rem; } }
@media (hover: hover) { .st-more:hover b { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; } }

/* The story under the street (src/app/street/story.ts) is a laptop's, with scripts: public/app/street-stage.css lays it
   out. Anywhere else it takes no room. */
.pl { display: none; }

/* ── A first visit: the welcome, and the street behind it, out of focus ───────────────────────────────── */

/* Without scripts it stands above the street, plainly; its second act is a link down to it. */
.st-welcome { display: grid; justify-items: center; gap: 14px; padding: 28px var(--pad) 12px; text-align: center; }
.st-welcome-h { max-width: 16ch; font: 400 2.125rem/1.02 var(--voice); letter-spacing: -0.005em; text-wrap: balance; }
.st-welcome-h em { font-style: normal; font-weight: 600; }
.st-welcome-f { font: 500 0.78125rem/1.3 var(--label); color: var(--soft); font-variant-numeric: tabular-nums; }
.st-welcome-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
@media (min-width: 900px) {
  .st-welcome { gap: 18px; }
  .st-welcome-h { max-width: none; font-size: clamp(2.5rem, 4.12vw, 4rem); }
  .st-welcome-f { font-size: 0.84375rem; }
}
/* With scripts it stands over the street, which waits behind it out of focus, lower; the first gesture brings the
   street into focus: the cars rise to their place, the name and the figures come in (app.ts). A device that entered
   the street before never sees it: decided before the first paint (page.ts, `welcomeFirst`). */
:root[data-welcome] .st-welcome { position: absolute; z-index: 5; left: 0; right: 0; top: 0; padding-top: max(16px, calc(36svh - 176px)); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.3s var(--ease), visibility 0s 0.3s, translate 0.4s var(--ease); }
:root[data-welcome="cover"] .st-welcome { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.3s var(--ease); }
:root[data-welcome="cover"] :is(.st-top, .st-wall, .st-price, .st-nears, .st-info, .st-road) { opacity: 0; visibility: hidden; pointer-events: none; }
:root[data-welcome="cover"] .st-street { filter: blur(7px); opacity: 0.6; scale: 1.035; translate: 0 var(--cover-y); }
:root[data-welcome="cover"] .st-view::before { opacity: 0.6; scale: 1.035; translate: -50% var(--cover-y); }
:root[data-welcome="cover"] .st-view::after { opacity: 0.6; translate: 0 var(--cover-y); }
:root[data-welcome="cover"] .st-street.is-arriving .st-slot { animation: none; }
/* Entering the street is one movement, of 650 ms at most: the welcome leaves first, lifting a little (120 ms); the
   street comes into focus and rises to its place (420 ms, setting off gently, so that nothing of the welcome is over
   it); what stands above the cars comes in once the welcome has left, what stands under them as they arrive, a few
   tens of milliseconds apart. Never two words in one place, nor a car under words; under prefers-reduced-motion, all
   at once (below). */
@media (prefers-reduced-motion: no-preference) {
  :root[data-welcome="cover"] :is(.st-top, .st-wall, .st-price, .st-nears, .st-info, .st-road) { translate: 0 8px; }
  :root[data-welcome="gone"] .st-welcome { translate: 0 -14px; transition: opacity 120ms ease-in, translate 120ms ease-in, visibility 0s 120ms; }
  :root[data-welcome="gone"] :is(.st-street, .st-view::before, .st-view::after) { transition-duration: 420ms; transition-delay: 80ms; transition-timing-function: cubic-bezier(0.3, 0, 0.15, 1); }
  :root[data-welcome="gone"] :is(.st-top, .st-wall, .st-price, .st-nears, .st-info, .st-road) { transition: opacity 200ms var(--ease) var(--in), translate 220ms var(--ease) var(--in); }
  :root[data-welcome="gone"] :is(.st-top, .st-wall) { --in: 140ms; }
  :root[data-welcome="gone"] .st-price { --in: 180ms; }
  :root[data-welcome="gone"] .st-nears { --in: 380ms; }
  :root[data-welcome="gone"] .st-info { --in: 400ms; }
  :root[data-welcome="gone"] .st-road { --in: 420ms; }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
  /* With room the price stands under the cars: it comes once they have risen past it. */
  :root[data-welcome="gone"] .st-price { --in: 370ms; }
}
@media (min-width: 900px) {
  :root[data-welcome] .st-welcome { padding-top: max(28px, calc(40svh - 210px)); }
}

/* ── A short screen: less air, nothing lost that matters; the page scrolls rather than squeezing ──────── */

@media (max-width: 899px) and (max-height: 700px) {
  /* With a car held, its strip takes the foot of the screen: the neighbours keep their names, the car in the middle
     its chips, and the controls stay above the strip. */
  :root[data-held] .st-near .st-vs { display: none; }
  .st-top { min-height: 34px; padding-top: 4px; }
  .st-top > .views a { height: 28px; }
  .st-back { height: 30px; }
  .st-scene { padding-top: 0; }
  .st-info { gap: 8px; }
  .st-road { gap: 2px; padding-top: 6px; padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)); }
  .st-ctl { min-height: 40px; }
  .st-nears { margin-top: 0; }
  .st-near { gap: 4px; padding: 2px 0; }
  .st-price { margin-top: 6px; }
  .st-price { height: 32px; }
  .st-price .price b { font-size: 1.75rem; }
  .st-view { margin-top: 6px; }
  .st-ruler { height: 50px; }
  .st-bars { height: 22px; }
  .st-mark-here { height: 34px; }
  .st-flag { height: 33px; }
}
@media (max-width: 899px) and (max-height: 610px) {
  /* The smallest phones: the name a little smaller, the row of figures and the acts a little tighter, so that with a
     car held the controls stay above its strip. */
  .st { --wall-max: min(132px, 15svh); }
  .st-said { min-height: 46px; }
  .st-said .fact { gap: 2px; padding-block: 5px 6px; }
  .st-said .fact-f s { top: 5px; }
  .st-acts .btn { min-height: 44px; }
  .st-keep { width: 44px; height: 44px; }
  .st-ruler { height: 46px; }
  .st-info { gap: 6px; }
  .st-view { margin-top: 2px; }
}


/* ── Nobody is parked: what to drop, and what it brings back ──────────────────────────────────────────── */

.st[data-empty] :is(.st-wall, .st-make-top, .st-price, .st-nears, .st-info) { display: none; }
.st[data-empty] .st-scene { justify-content: flex-start; }
.st[data-empty] .st-view { margin-top: 0; }
.st[data-empty] .st-view::before, .st[data-empty] .st-view::after { content: none; }
.st[data-empty] .st-street { display: block; height: auto; padding: 18px var(--pad) 24px; overflow: visible; scroll-snap-type: none; -webkit-mask-image: none; mask-image: none; }
.st[data-empty] .st-street::before, .st[data-empty] .st-street::after { content: none; }
/* With nothing kept there is nothing to budget or wish for either. */
.st[data-empty][data-lane="gardees"] .st-road { display: none; }
.st-nobody { display: grid; gap: 12px; justify-items: start; max-width: 32em; }
.st-nobody-bird { margin: 0 0 -6px -10px; }
.st-nobody p { color: var(--soft); }
.st-ways { display: flex; flex-wrap: wrap; gap: 8px; }
/* A visitor who kept cars is not told "aucun favori" while they are on their way. */
.st[data-filling] .st-nobody { visibility: hidden; }
@media (min-width: 900px) {
  .st[data-empty] .st-street { padding-inline: max(var(--pad), calc(50% - 360px)); padding-top: 40px; }
}
/* The bird shouts at the first car past the visitor's own budget, beside what it lacks (src/app/voice/cries.ts, `beyond`). */
.st-lacks { display: inline-flex; align-items: center; gap: 4px; font: 600 0.75rem/1.25 var(--body); color: var(--ink); }
.st-lacks .bird { width: 24px; height: 24px; margin: -6px 0 -4px -2px; }

.st-ghosts { position: absolute; inset: 0; pointer-events: none; }
.st-ghost { position: absolute; }

/* What the frame says briefly (a car held, a car kept) is said at the top of the street: the bottom of this screen is
   where the thumb works and where the answer to its gesture shows. */
.app:has(#st-first) > .toast { top: calc(var(--bar-h) + env(safe-area-inset-top, 0px) + 58px); bottom: auto; translate: -50% -10px; }
.app:has(#st-first) > .toast.is-on { translate: -50% 0; }

@media (prefers-reduced-motion: reduce) {
  .st-top, .st-scene > *, .st-view::before, .st-view::after, .st-street, .st-slot, .st-mark, .st-road, .st-welcome, .st-flag-b, .st-cap, .st-near { transition: none; }
  .st-back:active, .st-near:active { scale: 1; }
}

/* The budget, typed: what a tap on the flag opens. */
.ba { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 22px var(--pad) calc(20px + env(safe-area-inset-bottom, 0px)); }
.ba .switch { justify-self: start; }
.ba-field { display: flex; align-items: baseline; gap: 8px; padding: 6px 14px; border: 1.5px solid var(--edge); border-radius: var(--r-m); background: var(--paper); }
.ba-field:focus-within { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.ba-field input { flex: 1; min-width: 0; height: 52px; padding: 0; border: 0; outline: none; background: none; font: 800 1.75rem/1 var(--display); letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.ba-field input::placeholder { color: var(--faint); opacity: 1; }
.ba-field > span[aria-hidden] { font: 700 1.0625rem/1 var(--display); color: var(--soft); }
.ba-error { padding-left: 12px; border-left: 3px solid var(--bad); font: 600 0.8125rem/1.4 var(--body); color: var(--bad); }
.ba-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.ba-acts .btn-ink { flex: 1 1 auto; }

/* "Voir …": the car and its name are carried to its page (a cross-document view transition; the names are given at
   the moment of leaving, src/app/street/app.ts, and taken by the car's page, public/app/car.css). Coming back, the
   same, the other way. */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-group(car-pic), ::view-transition-group(car-name), ::view-transition-group(car-price) { animation-duration: var(--settle); animation-timing-function: var(--ease); }
}

/* ── The makes ───────────────────────────────────────────────────────────────────────────────────────── */

.mks { max-width: 1080px; margin: 0 auto; padding: 18px var(--pad) 0; }
.mks-head { display: grid; gap: 12px; padding-bottom: 6px; }
.mks-lede { max-width: 38em; color: var(--soft); }
.mks-index { display: flex; gap: 0 2px; margin: 0 calc(var(--pad) * -1); padding: 0 calc(var(--pad) - 10px); overflow-x: auto; scrollbar-width: none; }
.mks-index::-webkit-scrollbar { display: none; }
.mks-index a { flex: none; display: grid; place-items: center; min-width: 44px; height: 44px; border-radius: var(--r-s); font: 650 0.9375rem/1 var(--display); text-decoration: none; }
.mks-group { padding-top: 18px; }
.mks-group > h2 { padding-bottom: 8px; border-bottom: 1.5px solid var(--ink); }
.mks-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 12px; }
.mk { --mm: 0.0165px; display: grid; gap: 3px; align-content: end; min-height: 104px; padding: 14px 0 12px; border-bottom: 1px solid var(--line); text-decoration: none; }
.mk-pic { display: flex; align-items: flex-end; min-height: 34px; margin-bottom: 7px; }
.mk b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 1.0625rem/1.2 var(--display); letter-spacing: -0.013em; }
.mk small { font: 500 0.75rem/1.3 var(--body); color: var(--soft); font-variant-numeric: tabular-nums; }
.mk:active { background: var(--road); }
.mks-note { max-width: 44em; padding: 22px 0 8px; }
@media (hover: hover) {
  .mk:hover b, .mks-index a:hover { text-decoration: underline; text-decoration-thickness: 4px; text-decoration-color: var(--paint); text-underline-offset: 4px; }
}
