/* The comparison (/comparer, src/app/compare/), the page of "Ma sélection": two to eight cars on one ground at one scale, then one line per
   question and one column per car, the best figure of each line ticked. Every colour, space and typeface is a token
   of app.css: nothing is redefined here.

   Nothing moves when what is shown changes: the columns are one width per count of cars (`--n`), every line is one
   height (`--row-h`), a name stands in a box of one height (set smaller, on two lines at most, when it is long), and
   the scale of the cars follows the screen, never the cars (a car longer than 4.8 m alone makes it smaller). With
   room the cars and the six lines are in view together, eight included (the columns narrower, the type a step smaller
   from six); a phone shows two cars and the six lines in one screen, three hold, four to eight slide sideways under
   their names. */

.cp {
  --gap: 8px;
  /* What a line holds, its question and its figures, for laying it in the middle of its height. */
  --row-in: 50px;
  /* Room kept between two cars that stand nose to nose, and around a car in its column. */
  --nose: 6px;
  /* The lines: one height each. */
  --row-h: 64px;
  /* What the screen must also hold under the cars: their names, the six lines, the space between. */
  --ids-h: 84px;
  --rest: calc(10px + var(--self-h) + var(--ids-h) + var(--make-h) - 16px + var(--kin-h) + 12px + 6 * var(--row-h) + 14px);
  /* What the page says of itself over the cars: "Ma sélection" and its count, only on the selection's own page. */
  --self-h: 0px;
  /* The make's line, where the column's heart stands at its right. */
  --make-h: 30px;
  /* Under the names, what each car shares with the first (`.cp-kin`): its room, beside two cars or more. */
  --kin-h: 0px;
  --name: 1.3125rem;
  --cp-w: 100%;
  max-width: var(--cp-w);
  margin: 0 auto;
  padding: 10px var(--pad) var(--sp-7);
}
.cp :is(button, a) { -webkit-tap-highlight-color: transparent; }
.cp[data-n="3"] { --ids-h: 72px; --name: 1.0625rem; }
.cp:is([data-n="6"], [data-n="7"], [data-n="8"]) { --name: 1rem; }
.cp:is([data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) { --ids-h: 48px; --name: 1.0625rem; }

/* ── The cars, on one ground, at one scale ────────────────────────────────────────────────────────────── */

.cp-cars {
  /* The scale: the longest car fills its column, the cars and the six lines stand together on the screen, and a car
     is never drawn larger than a car should be. The same for every car: two cars in one place always compare. Its
     `100cqi` is this block's width wherever a car is drawn in it. */
  --col: calc((100cqi - (var(--n) - 1) * var(--gap)) / var(--n));
  --mm: max(0.012px, min(0.14px, calc((var(--col) - 2 * var(--nose)) / var(--long)), var(--tall-room, 1px)));
  position: relative;
  container: cars / inline-size;
}
.cp-cols {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  gap: 0 var(--gap);
}
/* The ground, and the light the cars stand in. */
/* The room over the cars: the phone's band of hearts; on the selection's page in 3D, the room the 3D takes (below). */
.cp-cols { --cols-top: var(--heart-room, 0px); padding-top: var(--cols-top); }
.cp-cols::before { content: ""; position: absolute; z-index: -1; left: 2%; right: 2%; top: var(--cols-top); height: calc(2000 * var(--mm) * 1.12); border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--card) 88%, transparent), transparent); pointer-events: none; }
.cp-cols::after { content: ""; position: absolute; left: 0; right: 0; top: calc(var(--cols-top) + 2000 * var(--mm)); height: 1px; background: linear-gradient(90deg, transparent, var(--line) 8%, var(--line) 92%, transparent); pointer-events: none; }

.cp-col { position: relative; display: grid; grid-template-rows: auto auto; min-width: 0; }
/* The car: bottom on the ground, at the room every car has. A tap opens what can take its place. */
.cp-stand { display: flex; align-items: flex-end; justify-content: center; height: calc(2000 * var(--mm)); margin: 0; padding: 0 var(--nose); border: 0; border-radius: var(--r-m); background: none; line-height: 0; cursor: pointer; touch-action: pan-y; -webkit-touch-callout: none; user-select: none; }
.cp-stand .carfig { flex: none; }
/* Two cars stand nose to nose. */
.cp[data-n="2"] .cp-col:first-child .cp-stand { justify-content: flex-end; }
.cp[data-n="2"] .cp-col:nth-child(2) .cp-stand { justify-content: flex-start; }
/* A car without measures says so where it would stand. */
.cp-stand .carfig.is-nothing { align-self: center; }

/* An open place: where a car will stand. */
.cp-place span { display: grid; place-items: center; width: min(100%, calc(4300 * var(--mm))); height: min(100%, max(46px, calc(1380 * var(--mm)))); border: 1.5px dashed var(--edge); border-radius: var(--r-m); color: var(--soft); }
.cp-place .ic { width: 26px; height: 26px; }

/* Who it is: the make, the name, its version in a few facts. Each in a box of one height. */
/* A block: its lines are as wide as it, whatever they hold, and none ever shifts sideways. */
.cp-id { container: id / inline-size; display: block; height: var(--ids-h); margin-top: 8px; text-align: center; }
.cp-make { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; height: var(--make-h); padding: 0 30px; overflow: hidden; white-space: nowrap; font-size: 0.71875rem; }
.cp-make > span { overflow: hidden; text-overflow: ellipsis; }
.cp-make .dot { flex: none; }
/* Whose picture it is: beside the make where the column has room, else once under the lines (`.cp-shownline`). */
.cp-shown { display: none; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0; text-transform: none; font-size: 0.65625rem; color: var(--soft); }
.cp-nameline {
  /* The arrows stand at the two ends of a line of one width, whatever the name: a step after a step finds its arrow
     where it was. The name, centred between them. */
  --near-w: 0px; --line-w: 100cqi;
  display: grid; grid-template-columns: 1fr var(--near-w) minmax(0, calc(min(100cqi, var(--line-w)) - 2 * var(--near-w))) var(--near-w) 1fr; align-items: center;
  width: 100%; min-width: 0; height: calc(var(--name) * 1.22);
}
.cp-name { position: relative; grid-column: 3; justify-self: center; display: inline-flex; align-items: center; gap: 2px; min-width: 0; max-width: 100%; height: 100%; padding: 0 2px; border: 0; border-radius: 8px; background: none; color: var(--ink); cursor: pointer; }
/* A short name in small type is still a target a finger finds: its tap area reaches past its letters. */
.cp-name::after { content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 32px); translate: -50% -50%; }
/* The name: as large as its box, set smaller by its count of letters when it is long, and on two lines when it must. */
.cp-name b {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  max-height: calc(var(--name) * 1.22);
  font: 800 clamp(calc(var(--name) * 0.6), calc((min(100cqi, var(--line-w)) - 2 * var(--near-w) - 24px) / (var(--chars) * 0.7)), var(--name)) / 1 var(--display);
  letter-spacing: -0.025em; text-align: center; text-wrap: balance; overflow-wrap: anywhere;
}
.cp-name .ic { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--faint); }
.cp-name.is-open { color: var(--soft); }
.cp-trim { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 4px; width: 100%; max-height: 2.6em; margin: 2px 0 0; overflow: hidden; font: 500 0.75rem/1.3 var(--body); color: var(--soft); }
.cp-trim span { white-space: nowrap; }
.cp[data-n="3"] .cp-trim { font-size: 0.6875rem; }
.cp:is([data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) .cp-trim { display: none; }
.cp:is([data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) .cp-name .ic { display: none; }
.cp:is([data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) .cp-make { font-size: 0.59375rem; letter-spacing: 0.06em; }

/* The column's heart, the one act of "Ma sélection" (app.css `.hrt`): at the right of the make's line, its tap area a
   thumb's, the name kept clear of it by the line's room. Filled yellow while its car is in the selection. */
.cp-heart { position: absolute; z-index: 1; right: -6px; top: calc(2000 * var(--mm) + var(--id-top, 8px) + (var(--make-h) - 40px) / 2); width: 40px; height: 40px; }
.cp-heart .ic { width: 20px; height: 20px; }
/* An open place has no car, so no heart: its words take the whole line. */
.cp-col.is-open .cp-make { padding-inline: 0; }

/* What the page says of itself over the cars: on the selection's own page "Ma sélection" and its count (shown from the
   first paint by the root's mark, page.ts); on the open page, that the selection is empty and how a heart fills it. */
.cp-self { display: none; }
:root[data-cp-mine] .cp { --self-h: 34px; }
:root[data-cp-mine] .cp-self, .cp[data-n="0"] .cp-self { display: block; }
.cp-mine { display: flex; align-items: center; justify-content: center; gap: 8px; height: calc(var(--self-h) - 6px); margin: 0 0 6px; font: 700 0.9375rem/1 var(--body); letter-spacing: -0.005em; }
.cp-mine .ic { width: 20px; height: 20px; --ic-in: var(--paint); }
.cp-mine .num { font-weight: 550; color: var(--soft); }
.cp-mine .num::before { content: "·"; margin-right: 8px; color: var(--faint); }
.cp-empty { display: flex; align-items: flex-start; justify-content: center; gap: 10px; max-width: 34em; margin: 4px auto 18px; font: 400 0.9375rem/1.4 var(--body); color: var(--soft); text-wrap: balance; }
:root[data-cp-new] .cp-empty { display: none; }
.cp-empty .ic { flex: none; width: 22px; height: 22px; margin-top: -1px; color: var(--ink); }
.cp-empty b { display: block; font-weight: 700; color: var(--ink); }
/* A car's panel says "Retirer … de ma sélection" on the selection's own page, "… de la comparaison" elsewhere. */
.cp-if-mine, :root[data-cp-mine] .cp-if-other { display: none; }
:root[data-cp-mine] .cp-if-mine { display: inline; }

/* ── "Ma sélection" in 3D (src/app/compare/three.ts; the owner: "B but + the 3d") ──────────────────────────────
   On the selection's own page, two to eight measured cars (`data-three`, the server's) where the device draws it
   (`data-cp-3d`, the page's first line): the cars stand in 3D in the place of their flat row, which is the picture
   until the 3D's first frame. The room is given before the first paint: the row of cars is as tall as the 3D needs
   (`--three-h`), the cars standing at its foot; the 3D covers it, from the top of the cars to their ground. */
.cp-3d { display: none; }
:root[data-cp-3d] .cp[data-three] { --three-h: 230px; }
:root[data-cp-3d] .cp[data-three] .cp-cols { --cols-top: max(var(--heart-room, 0px), calc(var(--three-h) - 2000 * var(--mm))); }
:root[data-cp-3d] .cp[data-three] .cp-3d { position: relative; z-index: 2; display: block; height: 0; }
.cp-3d-view {
  position: absolute; left: calc(var(--pad) * -1); right: calc(var(--pad) * -1); top: 0; height: var(--three-at, 0px);
  overflow: hidden; isolation: isolate; container: three / inline-size; pointer-events: none;
}
.cp[data-three-state="live"] .cp-3d-view { pointer-events: auto; }
.cp-3d-canvas {
  position: absolute; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 0.4s ease-out;
  touch-action: pan-y; cursor: grab; outline: none; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}
.cp-3d-canvas.is-held { cursor: grabbing; }
.cp-3d-canvas:focus-visible { outline: 2.5px solid var(--ink); outline-offset: -4px; }
.cp[data-three-state="live"] .cp-3d-canvas { opacity: 1; }
/* Once the 3D has its first frame, the flat row steps aside (its names and lines stay). */
.cp[data-three-state="live"] .cp-cols .cp-stand, .cp[data-three-state="live"] .cp-cols::before { opacity: 0; transition: opacity 0.3s ease-out 0.25s; }
/* What a tap does: said at its top, until a car is chosen or the scene turned. */
.cp-3d-hint {
  position: absolute; z-index: 2; left: 50%; top: 8px; translate: -50% 0; max-width: calc(100% - 24px); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none;
  padding: 3px 12px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--card) 88%, transparent); box-shadow: 0 0 0 1px var(--line);
  font: 550 0.75rem/1.4 var(--body); color: var(--ink); opacity: 0; transition: opacity 0.4s ease-out;
}
.cp[data-three-state="live"] .cp-3d-hint:not(.is-gone):not(:empty) { opacity: 1; }
.cp-3d-wake { position: absolute; z-index: 3; right: var(--pad); top: 8px; pointer-events: auto; }
/* Whose pictures, the generic models and their credit: a quiet line at its foot, the whole one tap away. */
.cp-3d-said { position: absolute; z-index: 2; left: var(--pad); bottom: 4px; max-width: calc(100% - 2 * var(--pad)); opacity: 0; transition: opacity 0.4s ease-out; }
.cp[data-three-state="live"] .cp-3d-said { opacity: 1; }
.cp-3d-said > summary { display: inline-flex; list-style: none; cursor: pointer; color: var(--soft); text-decoration: underline dotted; text-underline-offset: 3px; }
.cp-3d-said > summary::-webkit-details-marker { display: none; }
.cp-3d-said[open] { left: 8px; right: 8px; padding: 8px 10px; border-radius: var(--r-m); background: var(--card); box-shadow: var(--lift-1); }
.cp-3d-said > p { margin: 6px 0 0; }
/* The signs over the cars: each a link to its car's page. */
.cp-3d-signs { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.cp-3d-sign {
  position: absolute; left: 0; top: 0; display: inline-block; max-width: 46vw; padding: 3px 10px 4px; border: 1px solid var(--line); border-radius: 12px;
  background: color-mix(in srgb, var(--card) 90%, transparent); box-shadow: var(--lift-1); font: 700 0.78rem/1.15 var(--display); letter-spacing: -0.008em;
  color: var(--ink); text-decoration: none; white-space: nowrap; pointer-events: auto; will-change: transform; touch-action: pan-y;
  transition: opacity 0.2s ease-out, visibility 0s;
}
.cp-3d-sign b { font-weight: inherit; }
.cp-3d-sign::after { content: ""; position: absolute; inset: -9px -4px; }
.cp-3d-sign.is-off, .cp:not([data-three-state="live"]) .cp-3d-sign { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.2s ease-out, visibility 0s 0.2s; }
@container three (max-width: 600px) {
  .cp-3d-sign { max-width: 104px; white-space: normal; text-align: center; text-wrap: balance; font-size: 0.75rem; padding: 3px 8px 4px; }
}
/* A phone: a heart belongs to its column, never to the picture. Under the 3D it stands in a band of its own between the
   ground and the column's names, in the middle of its column (it slides with the columns from four cars); the band over
   the cars is not needed there. A make is still never cut. */
@media (max-width: 899px) {
  :root[data-cp-3d] .cp[data-three] { --heart-room: 0px; --heart-band: 26px; }
  :root[data-cp-3d] .cp[data-three] .cp-heart { top: calc(2000 * var(--mm) + 6px); right: auto; left: calc(50% - 20px); width: 40px; height: 32px; }
  :root[data-cp-3d] .cp[data-three] .cp-id { margin-top: calc(8px + var(--heart-band)); }
}
@media (min-width: 900px) {
  :root[data-cp-3d] .cp[data-three] { --three-h: clamp(280px, 34svh, 380px); }
  .cp-3d-view { left: 0; right: 0; border-radius: var(--r-l); }
}
@media (hover: hover) { .cp-3d-sign:hover { background: var(--card); border-color: var(--edge); } }
@media (prefers-reduced-motion: reduce) { .cp-3d-canvas, .cp-3d-hint, .cp-3d-sign, .cp-3d-said, .cp[data-three-state="live"] .cp-cols .cp-stand { transition: none; } }

/* What a car shares with the first car compared ("La même mécanique"), under its version: ink on a shade of ink, never
   a colour (yellow is the car held, blue the other car of a pair). Its room is kept in every column of two cars or more,
   said or not, so that a change of car moves nothing; a narrow column shows its first words alone (a screen reader hears
   the whole). Beside three cars or more, the first column says once what the others' words are said against. */
.cp:is([data-n="2"], [data-n="3"], [data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) { --kin-h: calc(2 * 1.25 * 0.6875rem + 4px); }
.cp[data-n="2"] { --kin-h: calc(1.25 * 0.6875rem + 8px); }
.cp-id { height: calc(var(--ids-h) + var(--kin-h) + var(--make-h) - 16px); }
/* One line of room beside two cars, two beside more; one line more, when the words need it, takes the air kept over the
   lines (scripts/review: every phrase, every size). */
.cp-kin { display: flex; justify-content: center; align-items: flex-start; height: calc(var(--kin-h) - 4px); margin: 4px 0 0; }
.cp-kin-w { max-width: 100%; padding: 0 6px 1px; border-radius: 6px; background: color-mix(in srgb, var(--ink) 7%, transparent); font: 650 0.6875rem/1.25 var(--body); color: var(--ink); text-wrap: balance; }
.cp-kin-to { font: 500 0.6875rem/1.25 var(--body); color: var(--soft); text-wrap: balance; }
.cp-kin.is-late > * { animation: cp-in var(--calm) var(--ease) both; }
/* A phone: the longest words by their first ones; beside three to five cars, the longer too. */
@container id (max-width: 185px) {
  .cp-kin-w.is-longest .cp-kin-more { display: none; }
}
@container id (max-width: 150px) {
  .cp-kin-w, .cp-kin-to { font-size: 0.65625rem; }
  .cp-kin-w { padding-inline: 4px; }
  .cp-kin-w.is-long .cp-kin-more { display: none; }
}

/* One step along the street, on each side of the name: with room (a finger slides on the car). */
.cp-near { display: none; }

/* One more car: its place beside the cars where the screen has a margin for it, under the sentence otherwise. */
.cp-add { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 18px 0 14px; border: 1.5px dashed var(--edge); border-radius: var(--r-pill); background: none; color: var(--ink); font: 650 0.875rem/1.15 var(--body); cursor: pointer; }
.cp-add .ic { width: 18px; height: 18px; }
.cp-add b { font-weight: inherit; }
.cp-add.is-side { display: none; }
.cp-addline { margin: 16px 0 0; text-align: center; }

/* ── The lines: one per question, one column per car ──────────────────────────────────────────────────── */

.cp-t { container: lines / inline-size; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); column-gap: var(--gap); width: 100%; margin-top: 12px; border-collapse: collapse; border-top: 1px solid var(--line); }
.cp-t > :is(caption, thead) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cp-line { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; border-bottom: 1px solid var(--line); }
.cp-line > tr { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; }
/* A line's question stands at one height whatever its figures say: the line is laid from its top. */
.cp-row { height: var(--row-h); align-content: start; row-gap: 3px; padding-top: calc((var(--row-h) - var(--row-in)) / 2); }
.cp-label { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 0; font: 600 0.71875rem/1.2 var(--label); letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cp-label .ic { flex: none; width: 13px; height: 13px; color: var(--faint); transition: rotate var(--quick); }
.cp-line:has(> .cp-more [open]) .cp-label { color: var(--ink); }
.cp-line:has(> .cp-more [open]) .cp-label .ic { rotate: 180deg; color: var(--ink); }

/* A cell: its figure, the best ticked, what separates the others from it. A narrow column says it in two lines,
   a wide one in one; both keep the line's height. */
.cp-v { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; min-width: 0; padding: 0; text-align: center; white-space: nowrap; }
.cp-fig { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font: 650 0.9375rem/1.25 var(--display); letter-spacing: -0.017em; }
.cp-v.is-best .cp-fig { font-weight: 800; }
.cp-v:is(.is-words, .is-empty) .cp-fig { font: 500 0.75rem/1.65 var(--body); letter-spacing: 0; color: var(--soft); }
.cp-v.is-range .cp-fig { font-size: 0.75rem; line-height: 1.6; color: var(--soft); white-space: normal; text-wrap: balance; }
.cp-tick { display: none; }
.cp-far { font: 600 0.6875rem/1.3 var(--body); letter-spacing: 0; color: var(--soft); }
/* In two lines, the tick sits on the figure's line, beside it. */
.cp-v.is-best { flex-flow: row wrap; justify-content: center; align-content: flex-start; align-items: center; gap: 0 4px; }
.cp-v.is-best .cp-tick { display: inline-grid; }
.cp-tick { place-items: center; flex: none; width: 15px; height: 15px; border-radius: 50%; background: var(--good-soft); color: var(--good); }
.cp-tick .ic { width: 10px; height: 10px; }
/* A promotion: its mark beside the figure; with room, the list price struck. */
.cp-promo { display: none; }
.cp-list { display: none; font: 500 0.6875rem/1.3 var(--body); color: var(--soft); text-decoration-thickness: 1px; }
.cp-v.is-promo:not(.is-far) .cp-list { display: inline; }
.cp-v.is-promo.is-far .cp-promo { display: inline-grid; }
.cp-promo { place-items: center; width: 14px; height: 14px; margin-top: -1px; color: var(--soft); }
.cp-promo .ic { width: 12px; height: 12px; }
.cp-v.is-promo.is-far { flex-flow: row wrap; justify-content: center; align-content: flex-start; align-items: center; gap: 0 3px; }
.cp-v.is-promo.is-far .cp-far { flex-basis: 100%; }
.cp-v.is-promo.is-best .cp-list { flex-basis: 100%; }

/* One line for the figure and its gap where every column has the room (about 240 px); its struck list price beside
   them where it has more (about 380 px). */
@container lines (min-width: 500px) {
  .cp:is([data-n="1"], [data-n="2"]) :is(.cp-v, .cp-v.is-best, .cp-v.is-promo.is-far) { flex-flow: row nowrap; align-items: baseline; justify-content: center; gap: 0 8px; }
  .cp:is([data-n="1"], [data-n="2"]) .cp-v :is(.cp-far, .cp-list) { flex-basis: auto; }
  .cp:is([data-n="1"], [data-n="2"]) .cp-tick { align-self: center; }
}
@container lines (min-width: 780px) {
  .cp:is([data-n="1"], [data-n="2"]) .cp-v.is-promo .cp-list { display: inline; }
  .cp:is([data-n="1"], [data-n="2"]) .cp-v.is-promo .cp-promo { display: none; }
}
@container lines (min-width: 760px) {
  .cp[data-n="3"] :is(.cp-v, .cp-v.is-best, .cp-v.is-promo.is-far) { flex-flow: row nowrap; align-items: baseline; justify-content: center; gap: 0 8px; }
  .cp[data-n="3"] .cp-v :is(.cp-far, .cp-list) { flex-basis: auto; }
  .cp[data-n="3"] .cp-tick { align-self: center; }
}
@container lines (min-width: 1160px) {
  .cp[data-n="3"] .cp-v.is-promo .cp-list { display: inline; }
  .cp[data-n="3"] .cp-v.is-promo .cp-promo { display: none; }
}
@container lines (min-width: 1020px) {
  .cp[data-n="4"] :is(.cp-v, .cp-v.is-best, .cp-v.is-promo.is-far) { flex-flow: row nowrap; align-items: baseline; justify-content: center; gap: 0 8px; }
  .cp[data-n="4"] .cp-v :is(.cp-far, .cp-list) { flex-basis: auto; }
  .cp[data-n="4"] .cp-tick { align-self: center; }
}
@container lines (min-width: 1280px) {
  .cp[data-n="5"] :is(.cp-v, .cp-v.is-best, .cp-v.is-promo.is-far) { flex-flow: row nowrap; align-items: baseline; justify-content: center; gap: 0 8px; }
  .cp[data-n="5"] .cp-v :is(.cp-far, .cp-list) { flex-basis: auto; }
  .cp[data-n="5"] .cp-tick { align-self: center; }
}

/* A line, opened: its whole line is the summary of its detail, laid over it (it opens with no script). */
.cp-more > td { grid-column: 1 / -1; padding: 0; }
.cp-d { position: relative; }
.cp-open { position: absolute; z-index: 1; left: 0; right: 0; top: calc(var(--row-h) * -1); height: var(--row-h); list-style: none; cursor: pointer; border-radius: 6px; }
.cp-open::-webkit-details-marker { display: none; }
.cp-open:focus-visible { outline-offset: -2px; }
.cp-d-body { padding: 4px 0 18px; }

/* The detail's small table: a row per fact, a column per car, its own figure in ink. */
.cp-dt-wrap { overflow-x: auto; overscroll-behavior-x: contain; }
.cp-dt { width: 100%; max-width: 760px; margin: 0 auto; border-collapse: collapse; table-layout: fixed; font: 500 0.8125rem/1.3 var(--body); }
.cp:is([data-n="3"], [data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) .cp-dt { max-width: none; }
.cp-dt :is(th, td) { padding: 7px 4px; border-top: 1px solid var(--line); text-align: center; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cp-dt thead :is(th, td) { border-top: 0; font: 650 0.75rem/1.2 var(--body); color: var(--soft); }
.cp-dt thead .dot { margin-right: 5px; vertical-align: baseline; }
.cp-dt th[scope="row"] { width: 32%; padding-left: 0; text-align: left; font-weight: 500; color: var(--soft); }
.cp-dt tr.is-sum > * { border-top: 1.5px solid var(--ink); font-weight: 750; color: var(--ink); }
.cp-dt.is-marks th[scope="row"] { color: var(--ink); }
.cp-yes { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--good-soft); color: var(--good); vertical-align: middle; }
.cp-yes .ic { width: 12px; height: 12px; }
.cp-no { color: var(--faint); }
.cp-note { max-width: 760px; margin: 10px auto 0; font: 400 0.75rem/1.45 var(--body); color: var(--soft); text-align: left; }
.cp-none { margin: 8px 0; font: 500 0.8125rem/1.4 var(--body); color: var(--soft); }

/* The settings a line's figures follow: the app's switch, its words beside it. */
.cp-set { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin: 2px 0 12px; }
.cp-seg { display: inline-flex; align-items: center; gap: 8px; }
.cp-seg-l { font: 600 0.75rem/1 var(--body); color: var(--soft); }
.cp-seg .switch span { font-variant-numeric: tabular-nums; }
/* The switch with four and five choices (app.css moves its thumb for two and three). */
.cp-seg .switch:has(label:nth-of-type(4) input:checked) { --i: 3; }
.cp-seg .switch:has(label:nth-of-type(5) input:checked) { --i: 4; }
.cp-seg .switch:has(label:nth-of-type(6) input:checked) { --i: 5; }

/* What the sheets list. */
.cp-eq { display: grid; gap: 14px; max-width: 760px; margin: 0 auto; text-align: left; }
.cp:is([data-n="3"], [data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) .cp-eq { max-width: none; }
.cp-eq-h { display: flex; align-items: center; gap: 7px; margin: 0 0 7px; font: 650 0.8125rem/1.2 var(--body); }
.cp-eq-h small, .cp-same summary small { font: 600 0.71875rem/1 var(--label); color: var(--soft); font-variant-numeric: tabular-nums; }
.cp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-tags li { padding: 5px 10px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--ink) 7%, transparent); font: 550 0.75rem/1.2 var(--body); }
.cp-same summary { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font: 600 0.8125rem/1.2 var(--body); color: var(--soft); cursor: pointer; list-style: none; }
.cp-same summary::-webkit-details-marker { display: none; }
.cp-same summary span { text-decoration: underline dotted; text-underline-offset: 4px; }
.cp-same[open] summary { color: var(--ink); margin-bottom: 4px; }

/* Yellow is the first car of the comparison: the first column wears it once the page has cars (`data-cp-first`, set
   before the first paint). Otherwise the first column is plain: no dot, the drawing in the plain car's colours. */
:root:not([data-cp-first]) .cp .dot-a { display: none; }
:root:not([data-cp-first]) .cp .carfig .car-body.car-a { fill: var(--car); }
:root:not([data-cp-first]) .cp .carfig .car-pillar.car-a { stroke: var(--car); }

/* ── Leurs profils (src/app/compare/radar.ts): two or three cars on one radar, under the lines ────────────────
   The card's radar drawn again here (its drawing is src/app/card/view.ts; public/app/card.css is not loaded on this
   page, so the few rules it needs stand in this block). Each axis: its word, then each car's figure in the page's
   columns with its car's dot, the best in ink. Shapes: the first column yellow, the second blue, the third ink, each
   lighter than a card's one shape so that every outline reads through the others. How wide the radar is comes from
   the server (`--w`): as wide as its labels let it be on the screen, at most 400 px. */

.cr { container-type: inline-size; display: grid; justify-items: center; min-width: 0; margin-top: 22px; }
.cr-h { margin: 0; color: var(--soft); }
.cr-radar { position: relative; aspect-ratio: 1; width: var(--w, min(92cqw, 400px)); min-width: 0; margin: 30px 0 8px; padding: 0; border: 0; }
/* The top label stands over the ring with a figure per car: a third car's needs a line more of room. */
.cr.is-3 .cr-radar { margin-top: 50px; }
/* Drawn for other cars while the server's radar for these is on its way (app.ts). */
.cr.is-stale { opacity: 0.35; transition: opacity var(--calm) var(--ease); }
.cr .pc-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cr .pc-band { fill: var(--paper); }
.cr .pc-band.is-shaded { fill: color-mix(in srgb, var(--line) 42%, var(--paper)); }
.cr .pc-grid .pc-band:first-child { stroke: var(--line); stroke-width: 1; }
.cr .pc-axis { stroke: color-mix(in srgb, var(--edge) 34%, transparent); stroke-width: 1; }
.cr .pc-axis.is-missing { stroke-dasharray: 2 3; }
.cr .pc-shape polygon { stroke-linejoin: round; stroke-width: 1.5; }
.cr .pc-dot { stroke: var(--paper); stroke-width: 1.3; }
.cr .pc-shape.is-me polygon { fill: color-mix(in srgb, var(--paint) 44%, transparent); stroke: color-mix(in srgb, var(--paint) 55%, var(--ink)); }
.cr .pc-shape.is-me .pc-dot { fill: color-mix(in srgb, var(--paint) 45%, var(--ink)); }
.cr .pc-shape.is-other polygon { fill: color-mix(in srgb, var(--other) 24%, transparent); stroke: var(--other); }
.cr .pc-shape.is-other .pc-dot { fill: var(--other); }
.cr .pc-shape.is-third polygon { fill: color-mix(in srgb, var(--ink) 7%, transparent); stroke: var(--ink); stroke-width: 1.25; }
.cr .pc-shape.is-third .pc-dot { fill: var(--ink); }

/* An axis's label: its word, then the figures. A radio's label: tapping it gives its scale below. */
.cr .pc-ax { position: absolute; left: var(--x); top: var(--y); translate: var(--tx, -50%) var(--ty, -50%); display: grid; justify-items: var(--j, center); gap: 3px;
  width: max-content; padding: 4px 6px 5px; border-radius: 10px; cursor: pointer; transition: background-color var(--quick), color var(--quick); -webkit-user-select: none; user-select: none; }
.cr .pc-ax::after { content: ""; position: absolute; inset: -6px -3px; }
.cr .pc-ax-code { margin-bottom: 1px; font: 700 0.59375rem/1.1 var(--label); letter-spacing: 0.1em; color: var(--ink); text-decoration: none; text-align: center; font-variant-numeric: tabular-nums; }
.cr-fig { display: inline-flex; align-items: center; gap: 4px; font: 500 0.71875rem/1.1 var(--body); font-variant-numeric: tabular-nums; letter-spacing: 0.005em; color: var(--soft); white-space: nowrap; }
.cr-fig .dot { width: 7px; height: 7px; box-shadow: 0 0 0 1px var(--paint-edge); }
.cr-fig .dot-b, .cr-fig .dot-c { box-shadow: none; }
.cr-fig.is-best { color: var(--ink); font-weight: 700; }
.cr .pc-pick:checked + .pc-ax { background: var(--ink); color: var(--paper); }
.cr .pc-pick:checked + .pc-ax .pc-ax-code, .cr .pc-pick:checked + .pc-ax .cr-fig { color: inherit; }
/* The third car's dot is ink: on the ink pill it turns to the paper. */
.cr .pc-pick:checked + .pc-ax .dot-c { background: var(--paper); }
.cr .pc-pick:focus-visible + .pc-ax { outline: 2.5px solid var(--ink); outline-offset: 2px; }
@media (hover: hover) { .cr .pc-ax:hover { background: var(--sunk); } .cr .pc-pick:checked + .pc-ax:hover { background: var(--ink); } }

/* The foot: the names and the scale's span, or the line of the axis tapped (its scale, every car on it). */
.cr-foot { display: grid; align-content: center; width: min(100%, 440px); min-height: 52px; }
.cr-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 0; font: 600 0.6875rem/1.3 var(--label); color: var(--ink); font-variant-numeric: tabular-nums; }
.cr-key > span { display: inline-flex; align-items: center; gap: 6px; }
.cr-key .dot { width: 8px; height: 8px; }
.cr-key .dot-b, .cr-key .dot-c { box-shadow: none; }
.cr-key .cr-among { flex-basis: 100%; justify-content: center; font-weight: 500; color: var(--soft); }
/* The names are the header's, each with its dot, kept in view by the page's script: here only without it. */
@media (scripting: enabled) { .cr-key .cr-name { display: none; } }
.cr-line { display: none; gap: 4px; margin: 0; }
.cr-line-h { display: flex; justify-content: space-between; gap: 10px; font: 700 0.75rem/1.2 var(--body); }
.cr-line-h small { font: 500 0.6875rem/1.2 var(--label); color: var(--soft); }
/* An axis whose scale is made of their families' cars says so under it (radar.ts). */
.cr-line-of { justify-self: end; font: 500 0.6875rem/1.2 var(--label); color: var(--soft); }
.cr .pc-scale { display: grid; grid-template-columns: auto minmax(48px, 1fr) auto; align-items: center; column-gap: 8px; font: 600 0.65625rem/1.2 var(--label); color: var(--soft); font-variant-numeric: tabular-nums; }
.cr .pc-scale-bar { position: relative; height: 12px; }
.cr .pc-scale-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 5.5px; height: 1px; background: linear-gradient(90deg, color-mix(in srgb, var(--ink) 22%, transparent), var(--ink)); }
.cr .pc-scale-me { position: absolute; left: var(--at); top: 50%; width: 9px; height: 9px; translate: -50% -50%; border-radius: 50%; background: var(--paint); box-shadow: 0 0 0 1.5px var(--paint-edge), 0 0 0 3px var(--paper); }
.cr .pc-scale-me.is-other { background: var(--other); box-shadow: 0 0 0 3px var(--paper); }
.cr .pc-scale-me.is-third { background: var(--ink); box-shadow: 0 0 0 3px var(--paper); }
.cr:has(.pc-pick:checked) .cr-key { display: none; }
/* The axis touched: its line in the foot, its axis in ink (an SVG line ignores `display`, a paragraph `stroke`). */
.cr:has([value=prix]:checked) :is(.cr-line,.pc-axis)[data-for=prix],
.cr:has([value=mois]:checked) :is(.cr-line,.pc-axis)[data-for=mois],
.cr:has([value=budget]:checked) :is(.cr-line,.pc-axis)[data-for=budget],
.cr:has([value=vignette]:checked) :is(.cr-line,.pc-axis)[data-for=vignette],
.cr:has([value=carburant]:checked) :is(.cr-line,.pc-axis)[data-for=carburant],
.cr:has([value=parking]:checked) :is(.cr-line,.pc-axis)[data-for=parking],
.cr:has([value=coffre]:checked) :is(.cr-line,.pc-axis)[data-for=coffre],
.cr:has([value=places]:checked) :is(.cr-line,.pc-axis)[data-for=places],
.cr:has([value=puissance]:checked) :is(.cr-line,.pc-axis)[data-for=puissance],
.cr:has([value=couple]:checked) :is(.cr-line,.pc-axis)[data-for=couple],
.cr:has([value=acceleration]:checked) :is(.cr-line,.pc-axis)[data-for=acceleration],
.cr:has([value=conso]:checked) :is(.cr-line,.pc-axis)[data-for=conso],
.cr:has([value=electrique]:checked) :is(.cr-line,.pc-axis)[data-for=electrique],
.cr:has([value=autonomie]:checked) :is(.cr-line,.pc-axis)[data-for=autonomie],
.cr:has([value=co2]:checked) :is(.cr-line,.pc-axis)[data-for=co2],
.cr:has([value=equipements]:checked) :is(.cr-line,.pc-axis)[data-for=equipements] { display: grid; stroke: var(--ink); stroke-width: 1.6; stroke-dasharray: none; }

@media (min-width: 900px) {
  .cr { --cr-most: 480px; margin-top: 30px; }
  .cr-fig { font-size: 0.875rem; }
  .cr .pc-ax-code { font-size: 0.6875rem; }
  .cr-key { font-size: 0.75rem; }
}

/* ── In a sentence, who is first, the choice ──────────────────────────────────────────────────────────── */

.cp-shownline { margin: 8px 0 0; text-align: center; color: var(--soft); }
.cp-said { max-width: min(100%, 880px); margin: 20px auto 0; text-align: center; text-wrap: balance; }
/* Its place is two lines tall whatever it says (a longer sentence takes two): what follows the lines never moves
   when a car changes. One line stands at the top of it, the air after. */
.cp-said { min-height: 2lh; }
/* The figures of the sentence stand apart as on every page that weighs two cars (public/app/journey-duel.css): what
   is paid on a shade of ink, what is gained underlined. Neither is the yellow of a car: here it is the first car's. */
.cp-said b { font-weight: 400; background: linear-gradient(transparent 62%, color-mix(in srgb, var(--ink) 14%, transparent) 62%); }
.cp-said mark { padding: 0; margin: 0; border-radius: 0; background: none; color: inherit; text-decoration: underline; text-decoration-thickness: 0.07em; text-underline-offset: 0.16em; text-decoration-skip-ink: none; }
.cp-firsts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin: 20px 0 0; }
.cp-firsts div { display: grid; gap: 3px; text-align: center; }
.cp-firsts dt { font-size: 0.65625rem; color: var(--soft); }
.cp-firsts dd { font: 800 1.0625rem/1.1 var(--display); letter-spacing: -0.017em; }
.cp-which { margin-top: 24px; text-align: center; }
.cp-which-h { margin: 0; }
.cp-take { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 12px; }
.cp-take .btn { width: 100%; padding-inline: 10px; }
.cp-take .btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-send { margin-top: 10px; }

/* ── Tout comparer: every line of the sheets, what differs first ──────────────────────────────────────── */

.cp-all { margin-top: 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cp-all-s { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; cursor: pointer; list-style: none; }
.cp-all-s::-webkit-details-marker { display: none; }
.cp-all-t { font: 700 1rem/1.2 var(--display); letter-spacing: -0.008em; }
.cp-all-s small { font: 500 0.71875rem/1 var(--label); color: var(--soft); font-variant-numeric: tabular-nums; }
.cp-all-s .ic { width: 16px; height: 16px; color: var(--soft); transition: rotate var(--quick); }
.cp-all[open] > .cp-all-s .ic { rotate: 180deg; }
.cp-all-body { padding: 0 0 20px; }
.cp-s-group + .cp-s-group { margin-top: 18px; }
/* A line of a sheet: its words, then a figure under each car, in the columns of the cars above. */
.cp-st { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); column-gap: var(--gap); width: 100%; border-collapse: collapse; }
.cp-st > caption { display: flex; align-items: baseline; gap: 10px; grid-column: 1 / -1; padding: 6px 0; text-align: left; font: 700 0.875rem/1.2 var(--display); }
.cp-st > caption small { font: 500 0.71875rem/1 var(--label); color: var(--soft); font-variant-numeric: tabular-nums; }
.cp-st > caption.vh, .cp-st > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cp-st > tbody, .cp-st tr { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; }
.cp-st tr { padding: 6px 0 7px; border-top: 1px solid var(--line); }
.cp-st th[scope="row"] { grid-column: 1 / -1; padding: 0 0 2px; text-align: left; font: 500 0.6875rem/1.3 var(--body); color: var(--soft); }
.cp-st td { min-width: 0; padding: 0; text-align: center; font: 550 0.8125rem/1.35 var(--body); overflow-wrap: anywhere; }
.cp-st tr:not(.is-differ) td { color: var(--soft); }
.cp-s-same > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font: 600 0.75rem/1.2 var(--body); color: var(--soft); cursor: pointer; list-style: none; }
.cp-s-same > summary::-webkit-details-marker { display: none; }
.cp-s-same > summary span { text-decoration: underline dotted; text-underline-offset: 4px; }
.cp-s-same > summary .ic { width: 14px; height: 14px; transition: rotate var(--quick); }
.cp-s-same[open] > summary .ic { rotate: 180deg; }

.cp-foot { margin-top: 16px; }
/* Where what the cars share comes from: each car's parts, as the map names them, and the pages that say them. */
.cp-parts { display: grid; gap: 10px; margin-top: 8px; }
.cp-parts dt { font: 700 0.8125rem/1.3 var(--display); letter-spacing: -0.008em; color: var(--ink); }
.cp-parts dd { margin-top: 3px; overflow-wrap: anywhere; }
/* On the selection's own page a car no longer on sale leaves the selection, said in a message (selection.machine.ts). */
:root[data-cp-mine] .cp-gone { display: none; }
.cp-gone { margin: 0 0 8px; font: 500 0.8125rem/1.4 var(--body); color: var(--soft); text-align: center; text-wrap: balance; }

/* ── The names kept in view, once the cars have left the screen ───────────────────────────────────────── */

.cp-slim { position: fixed; z-index: 9; left: 0; right: 0; top: calc(var(--bar-h) + env(safe-area-inset-top, 0px)); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 90%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); overflow: hidden; translate: 0 -130%; visibility: hidden; transition: translate var(--calm) var(--ease), visibility 0s var(--calm); }
.cp-slim.is-on { translate: 0 0; visibility: visible; transition: translate var(--calm) var(--ease); }
.cp-slim-in { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 0 var(--gap); max-width: var(--cp-w); margin: 0 auto; padding: 5px var(--pad) 6px; }
.cp-slim-car { display: grid; justify-items: center; gap: 1px; min-width: 0; }
.cp-slim-car b { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; font: 800 0.875rem/1.15 var(--display); letter-spacing: -0.017em; }
.cp-slim-car b span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-slim-car > span { font: 600 0.6875rem/1.1 var(--body); font-variant-numeric: tabular-nums; color: var(--soft); }
.cp-slim-car.is-open b { color: var(--soft); font-weight: 650; }

/* ── The panels that change a car ────────────────────────────────────────────────────────────────────── */

.cp-pop { display: flex; flex-direction: column; }
.pop:has(> .cp-pop) { padding-bottom: 6px; }
.cp-find { display: flex; align-items: center; gap: 8px; width: 100%; height: 44px; margin: 4px 0 6px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--r-pill); background: var(--paper); color: var(--soft); font: 500 0.9375rem/1 var(--body); text-align: left; cursor: text; }
.cp-find .ic { flex: none; width: 18px; height: 18px; }
.cp-find span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-pop-h { margin: 12px 0 2px; }
.cp-opts { margin: 0 calc(var(--pad) * -1); }
.cp-opts .row { grid-template-columns: 74px minmax(0, 1fr) auto; gap: 10px; min-height: 56px; padding: 7px var(--pad); }
.cp-opts .row-pic { --mm: 0.0158px; min-height: 30px; }
.cp-opt-n { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 0.9375rem/1.2 var(--display); letter-spacing: -0.013em; }
.cp-opts .row-sub { font-size: 0.75rem; color: var(--soft); }
/* What a car the industry map sets beside the first one shares with it ("La même mécanique"): said whole, in ink. */
.cp-opts .row-sub.cp-opt-why { white-space: normal; overflow: visible; color: var(--ink); font-weight: 600; }
.cp-opt-p { display: grid; justify-items: end; text-align: right; font: 750 0.875rem/1.2 var(--display); letter-spacing: -0.013em; }
.cp-opt-p small { font: 600 0.75rem/1.3 var(--body); letter-spacing: 0; color: var(--soft); }
.cp-pop-move { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; border-top: 1px solid var(--line); padding-top: 4px; }
.cp-pop-move .btn { text-decoration: none; }
.cp-pop-move .btn:only-child:last-child { margin-left: auto; }
.cp-pop-foot { margin-top: 2px; text-align: center; }
/* A car already compared: offered, but it would come twice. */
.cp-opts .row[aria-disabled="true"] { opacity: 0.45; }

/* ── With no car yet: two places, and a few pairs to start from ───────────────────────────────────────── */

.cp-ideas { margin-top: 4px; }
.cp-ideas-h { margin-bottom: 8px; text-align: center; }
.cp-ideas-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.cp-ideas-list > li { display: grid; }
/* The cars stand at the top and the gap at the foot, so that every pair of a row stands on one ground and says its gap
   on one line, whatever the length of its names. */
.cp-idea { container: idea / inline-size; display: grid; grid-template-rows: auto auto auto 1fr; justify-items: center; gap: 4px; padding: 12px 12px 12px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--card); color: var(--ink); text-decoration: none; }
/* Every pair at one scale, the longest car of the catalogue's kinds filling half a card. */
.cp-idea-cars { --mm: calc((50cqi - 12px) / 5600); display: flex; align-items: flex-end; justify-content: center; gap: 8px; height: calc(2000 * var(--mm)); }
/* Each car whole on its line: two long names stand on two lines, never cut. */
.cp-idea-names { font: 800 1rem/1.2 var(--display); letter-spacing: -0.017em; text-align: center; text-wrap: balance; }
.cp-idea-names b { white-space: nowrap; }
.cp-idea-make { font-weight: 550; color: var(--soft); letter-spacing: -0.005em; }
.cp-idea-or { font: 500 0.84375rem/1 var(--voice); color: var(--soft); letter-spacing: -0.01em; }
.cp-idea-prices { font: 600 0.75rem/1.2 var(--body); color: var(--soft); }
/* A pair of the industry map: the dearer car's gap, then why, as a relative's line on a car's card says it. */
.cp-idea-why { display: flex; flex-wrap: wrap; align-self: end; align-items: center; justify-content: center; gap: 4px 8px; margin-top: 4px; font: 600 0.8125rem/1.35 var(--body); color: var(--ink); }
.cp-idea-why .gap { min-height: 22px; padding: 1px 8px; font-size: 0.75rem; }

/* ── A change of car is one change: the old goes at once, the new comes in from its side ─────────────── */

@keyframes cp-in { from { opacity: 0; translate: calc(var(--from, 0) * 14px) 0; } }
.cp-col.is-in .carfig, .cp-col.is-in .cp-id > * { animation: cp-in 0.18s var(--ease) both; }
.cp-col.is-in .cp-id > * { animation-duration: 0.14s; }

/* ── A phone with four and five cars: the cars and their lines slide sideways together, as a table does ── */

@media (max-width: 899px) {
  /* A phone: the heart stands over its car's top corner, in a band kept above the cars, so that it costs the make and
     the name nothing (a make is never cut); its target is a thumb's, over the band and the car's corner. */
  .cp { --heart-room: 26px; --make-h: 16px; }
  .cp-make { padding-inline: 0; }
  .cp-heart { top: calc(-1 * var(--heart-room) - 7px); right: -4px; }
  /* The words kept for a screen reader inside it (`.vh`, positioned) take it as their block: its scroller clips them,
     and the page never grows wider than the screen (a phone would lay it out wider, and a page's transition abort). */
  .cp:is([data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) .cp-wide { position: relative; margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .cp:is([data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) .cp-wide::-webkit-scrollbar { display: none; }
  /* Three cars and the nose of the next are in view, whatever the phone: the car that peeks in at the edge says there
     are more, and which way. */
  .cp:is([data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) { --slid: max(104px, calc((100vw - var(--pad)) / 3.35)); }
  .cp:is([data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) :is(.cp-cars, .cp-t) { width: calc(var(--slid) * var(--n)); }
  .cp:is([data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) .cp-stand { touch-action: auto; }
  /* The question stays at the left of the screen while its figures slide under it. */
  .cp:is([data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) .cp-label { position: sticky; left: 0; justify-self: start; justify-content: flex-start; padding-right: 8px; }
  .cp:is([data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) .cp-slim-in { width: calc(var(--slid) * var(--n)); max-width: none; margin: 0; box-sizing: content-box; translate: calc(var(--slide, 0) * -1px) 0; }
  .cp:is([data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) .cp-dt { min-width: 520px; }
}

/* ── With room ─────────────────────────────────────────────────────────────────────────────────────────── */

@media (min-width: 900px) {
  /* The columns take the screen: wider as the screen is, never a narrow column in wide margins. */
  .cp { --gap: 20px; --nose: 14px; --row-h: 70px; --row-in: 46px; --ids-h: 88px; --name: 2.375rem; --cp-w: clamp(1280px, 1280px + (100vw - 1440px) * 0.5, 1440px); padding-top: 16px; }
  /* With room the cars and the six lines stand together on the screen: the cars take what the screen's height leaves.
     A phone gives them its width, and a short screen a short scroll. */
  .cp-cars { --tall-room: calc((100svh - var(--bar-h) - var(--rest)) / 2000); }
  .cp[data-n="3"] { --cp-w: clamp(1400px, 1400px + (100vw - 1440px) * 0.5, 1600px); --ids-h: 78px; --name: 1.875rem; }
  .cp[data-n="4"] { --cp-w: clamp(1480px, 1480px + (100vw - 1440px) * 0.5, 1680px); --ids-h: 82px; --name: 1.5rem; }
  .cp[data-n="5"] { --cp-w: clamp(1540px, 1540px + (100vw - 1440px) * 0.5, 1760px); --gap: 16px; --ids-h: 78px; --name: 1.3125rem; }
  /* Six to eight: every car in sight, the whole width of the screen, the columns narrower and the type a step smaller. */
  .cp:is([data-n="6"], [data-n="7"], [data-n="8"]) { --cp-w: 100vw; --gap: 12px; --ids-h: 74px; --name: 1.125rem; }
  .cp { --make-h: 32px; --id-top: 10px; }
  /* In a wide column the heart stands at the right end of the name's line (its arrow under it), not far from the make. */
  .cp-heart { right: calc((100% - min(100%, var(--heart-line, 100%))) / 2 - 3px); }
  .cp:is([data-n="1"], [data-n="2"]) { --heart-line: 460px; }
  .cp[data-n="3"] { --heart-line: 400px; }
  .cp-id { margin-top: 10px; }
  .cp-make { font-size: 0.71875rem; }
  .cp:is([data-n="1"], [data-n="2"], [data-n="3"]) .cp-shown { display: inline; }
  .cp:is([data-n="1"], [data-n="2"], [data-n="3"]) .cp-shownline { display: none; }
  .cp-nameline { --near-w: 34px; --line-w: 460px; }
  .cp[data-n="3"] .cp-nameline { --line-w: 400px; }
  .cp:is([data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) .cp-nameline { --near-w: 26px; --line-w: 100cqi; }
  .cp-name .ic { width: 20px; height: 20px; margin-top: 4px; }
  .cp:is([data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) .cp-name .ic { display: block; width: 16px; height: 16px; }
  .cp-near { display: grid; place-items: center; justify-self: center; width: 34px; height: 34px; padding: 0; border-radius: 50%; color: var(--faint); }
  .cp-near.is-prev { grid-column: 2; }
  .cp-near.is-next { grid-column: 4; }
  .cp:is([data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) .cp-near { width: 26px; height: 26px; }
  .cp-near .ic { width: 18px; height: 18px; }
  .cp-near.is-none { visibility: hidden; }
  /* On the selection's own page a step would replace a chosen car at each touch: a name's panel changes it. */
  /* No quick steps on the selection's own page (mine.machine.ts, `quickSteps`): each would replace a chosen car. */
  :root[data-cp-still] .cp-near { visibility: hidden; }
  .cp-trim { font-size: 0.8125rem; max-height: 1.3em; }
  .cp:is([data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) .cp-trim { display: flex; font-size: 0.75rem; max-height: 2.6em; }
  .cp:is([data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) .cp-make { font-size: 0.65625rem; letter-spacing: 0.06em; }
  /* With room, what a car shares stands on one line: whole where its column has the room (the widths measured in this
     type, view.ts), its first words otherwise; in the narrowest columns (five cars in a small window), set smaller. */
  .cp:is([data-n="2"], [data-n="3"], [data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) { --kin-h: calc(1.3 * 0.8125rem + 9px); }
  .cp-kin-w { overflow: hidden; padding: 1px 9px 2px; font-size: 0.8125rem; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }
  .cp-kin-to { font-size: 0.8125rem; line-height: 1.3; }
  @container id (max-width: 379px) {
    .cp-kin-w.is-longer .cp-kin-more { display: none; }
  }
  @container id (max-width: 327px) {
    .cp-kin-w.is-long .cp-kin-more { display: none; }
  }
  @container id (max-width: 249px) {
    .cp-kin-more { display: none; }
    .cp-kin-w { padding-inline: 6px; font-size: clamp(0.625rem, calc((100cqi - 12px) / (var(--lead) * 0.56)), 0.8125rem); }
    .cp-kin-to { font-size: 0.6875rem; }
  }
  .cp-t { margin-top: 14px; }
  .cp-row { row-gap: 5px; }
  .cp-label { font-size: 0.75rem; }
  .cp-fig { font-size: 1.4375rem; letter-spacing: -0.021em; }
  .cp:is([data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) .cp-fig { font-size: 1.25rem; }
  .cp:is([data-n="6"], [data-n="7"], [data-n="8"]) .cp-fig { font-size: 1.0625rem; }
  .cp:is([data-n="6"], [data-n="7"], [data-n="8"]) .cp-far { font-size: 0.75rem; }
  /* "Laquelle ?" in two even rows: three and three, four and three, four and four. */
  .cp[data-n="6"] .cp-take { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cp:is([data-n="7"], [data-n="8"]) .cp-take { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cp-v:is(.is-words, .is-empty) .cp-fig { font-size: 0.875rem; line-height: 1.9; }
  .cp-v.is-range .cp-fig { font-size: 0.9375rem; line-height: 1.6; white-space: nowrap; }
  .cp-far { font-size: 0.8125rem; }
  .cp-list { font-size: 0.75rem; }
  .cp-tick { width: 19px; height: 19px; }
  .cp-tick .ic { width: 13px; height: 13px; }
  .cp-promo { width: 16px; height: 16px; }
  .cp-promo .ic { width: 14px; height: 14px; }
  .cp-dt { font-size: 0.875rem; }
  .cp-said { margin-top: 24px; font-size: 1.1875rem; }
  .cp-take { grid-template-columns: repeat(var(--n), minmax(0, 1fr)); max-width: 760px; margin-inline: auto; }
  .cp:is([data-n="3"], [data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) .cp-take { max-width: none; }
  .cp-st th[scope="row"] { font-size: 0.75rem; }
  .cp-st td { font-size: 0.875rem; }
  .cp-ideas-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cp-pop-h { margin-top: 10px; }
  .cp-opts { margin: 0 -16px; }
  .cp-opts .row { padding: 7px 16px; }
  .pop:has(> .cp-pop) { width: 360px; }
}
@media (min-width: 900px) and (hover: hover) {
  .cp-open:hover { background: color-mix(in srgb, var(--ink) 3.5%, transparent); }
  .cp-name:hover, .cp-near:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
  .cp-near:hover, .cp-name:hover .ic { color: var(--ink); }
  .cp-add:hover, .cp-place:hover span { border-color: var(--ink); border-style: solid; }
  .cp-idea:hover { border-color: var(--edge); }
  .cp-find:hover { border-color: var(--edge); }
}
/* One more car's place beside the two cars, where the screen has a margin for it (190 px beside the columns). */
@media (min-width: 1820px) {
  .cp[data-n="2"] .cp-add.is-side { display: grid; }
  .cp[data-n="2"] .cp-addline { display: none; }
}
.cp-add.is-side { position: absolute; left: calc(100% + 26px); top: calc(2000 * var(--mm) - min(104px, 2000 * var(--mm) * 0.62) - 4px); justify-items: center; align-content: center; gap: 4px; width: 138px; height: min(104px, calc(2000 * var(--mm) * 0.62)); padding: 0 10px; border-radius: var(--r-m); color: var(--soft); text-align: center; }
.cp-add.is-side .ic { width: 22px; height: 22px; }

/* A laptop that is not tall: the whole comparison still stands on its first screen. */
@media (min-width: 900px) and (max-height: 820px) {
  .cp { --row-h: 58px; --row-in: 42px; --ids-h: 80px; padding-top: 10px; }
  .cp[data-n="2"] { --name: 2.125rem; }
  .cp[data-n="3"] { --ids-h: 72px; }
  .cp:is([data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) { --ids-h: 74px; }
  .cp-t { margin-top: 10px; }
  .cp-row { row-gap: 3px; }
  .cp-fig { font-size: 1.3125rem; }
  .cp:is([data-n="4"], [data-n="5"], [data-n="6"], [data-n="7"], [data-n="8"]) .cp-fig { font-size: 1.1875rem; }
  .cp-said { margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .cp-slim { transition: none; }
  .cp-col.is-in .carfig, .cp-col.is-in .cp-id > *, .cp-kin.is-late > * { animation: none; }
  .cp-label .ic, .cp-all-s .ic { transition: none; }
}
/* Without scripts, what needs them is not offered: the search of the panels, moving a car. From six cars (a page
   served light), a line's detail is a link to the page with it open, and the sheets are each car's own, on its page;
   with scripts both are drawn in place, and the links are not shown. */
@media (scripting: none) {
  .cp-find, .cp-pop-move { display: none; }
  .cp-s-links ~ *, .cp-all-body > .cp-none:has(+ .cp-s-links) { display: none; }
}
@media (scripting: enabled) { .cp-lazy, .cp-s-links { display: none; } }
.cp-s-links { display: grid; gap: 2px; margin: 4px 0 0; }
.cp-s-links a { display: inline-flex; align-items: center; min-height: 40px; font: 600 0.875rem/1.2 var(--body); color: var(--ink); }
