/* A topic's page (src/app/topics/page.ts: /voitures-hybrides, /voitures-chinoises…). The rows of links that lead to a topic from
   other pages are app.css's (`.tp-nav`). Its cards are the list's own (explorer.css, `.gx`). After
   app.css; it never redefines a token. */
/* The page: the container of a car's page (car.css `.car`: 1560 px, the same gutters), and its rhythm: a head, then
   sections each under a hairline. With room a section's name stands in a column of its own on the left, as on a car's
   page (`.cs`), and what it holds takes the rest. */
.tp { gap: 0; max-width: 1560px; padding: 10px var(--pad) var(--sp-6); }
.tp > :is(section, nav) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; min-width: 0; max-width: none; padding: 22px 0 24px; border-top: 1px solid var(--line); }
.tp > :is(section, nav) > * + * { margin-top: 12px; }
.tp > .tp-line { margin: 0; padding: 14px 0; border-top: 1px solid var(--line); }
@media (min-width: 1000px) {
  .tp { padding-inline: 32px; }
  .tp > :is(section, nav) { grid-template-columns: 240px minmax(0, 1fr); column-gap: 40px; padding: 26px 0 28px; }
  .tp > :is(section, nav) > * { grid-column: 2; }
  .tp > :is(section, nav) > h2:first-child { grid-column: 1; grid-row: 1 / span 12; align-self: start; position: sticky; top: calc(var(--bar-h) + 20px); }
  .tp > :is(section, nav) > h2:first-child + * { margin-top: 0; }
  .tp > .tp-line { padding-inline-start: 280px; }
  /* The cards of the list stand in the section's column, narrower than the list's own page. */
  .tp .gx { --cols: 4; }
}
@media (min-width: 1500px) { .tp .gx { --cols: 5; } }

/* The head (src/app/ui/read.ts): where the page stands, its title, its figures as one facts row, the day they were
   read; the cars it speaks of on one ground. On a phone the stage stands under the title and the figures under the
   stage; with room the two stand side by side as one block, each in the middle of the other's height. */
.tp-head { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 4px 0 22px; }
.tp-head-in { display: contents; }
.tp-head > .scene { order: 1; }
.tp-head-in > :is(.tp-facts, .tp-note, .gaps) { order: 2; }
.tp-h1 { font: 800 clamp(1.625rem, 1.3rem + 1.6vw, 2.375rem)/1.05 var(--display); letter-spacing: -0.03em; text-wrap: balance; }
/* A head's facts row (a page's, and two models' verdict: versus.css) is a grid: the labels share a row and the figures
   the next, so that a label on two lines never pushes its figure under its neighbours'. Two cells a row on a phone, all
   in one row with room. */
:is(.tp-facts, .vs-facts) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 0; }
:is(.tp-facts, .vs-facts) > .fact { grid-row: span 2; grid-template-rows: subgrid; gap: 4px; min-width: 0; padding: 10px 12px 11px; }
:is(.tp-facts, .vs-facts) .fact-l { align-items: start; }
:is(.tp-facts, .vs-facts) .fact-l .ic { flex: none; width: 16px; height: 16px; }
@media (min-width: 1000px) { :is(.tp-facts, .vs-facts) { grid-template-columns: none; grid-template-rows: auto auto; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); } }
.tp-facts .fact-l { font-size: 0.8125rem; }
.tp-facts .fact-f { font-size: 1.1875rem; }
.tp-facts .fact-f small { font-size: 0.8125rem; font-weight: 500; text-wrap: pretty; }
.tp-note { margin: 0; color: var(--soft); }
@media (min-width: 1000px) {
  .tp-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); column-gap: 48px; align-items: center; padding: 14px 0 30px; }
  .tp-head-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: center; min-width: 0; }
  .tp-facts .fact-f { font-size: 1.375rem; }
}
.tp-h { font: 800 clamp(1.25rem, 1.05rem + 0.9vw, 1.5rem)/1.12 var(--display); letter-spacing: -0.025em; text-wrap: balance; }

/* A hub's few cards: two by two, four in a row with room (the list's own columns would leave a hole after four). */
.tp-cars.is-few .gx { --cols: 2; }
@media (min-width: 900px) { .tp-cars.is-few .gx { --cols: 4; } }
.tp-see { display: flex; }
.tp-see .ic { width: 16px; height: 16px; }

/* A hub's parts: a tile each, two by two on a phone, four in a row with room. */
/* The way up, in the line over a title: the list of comparisons, the guides. */
.tp-up { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tp-parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.tp-parts > li { min-width: 0; }
.tp-part { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 6px; height: 100%; padding: 16px; border: 1.5px solid var(--line); border-radius: var(--r-m); background: var(--card); color: inherit; text-decoration: none; transition: border-color var(--quick); }
.tp-part-n { display: flex; align-items: center; justify-content: space-between; gap: 8px; font: 800 1.125rem/1.15 var(--display); letter-spacing: -0.015em; }
.tp-part-n .ic { flex: none; width: 18px; height: 18px; }
.tp-part-w { font: 500 0.875rem/1.4 var(--body); color: var(--soft); }
.tp-part-f { font: 500 0.875rem/1.4 var(--body); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tp-part-f small { color: var(--soft); font-size: 0.8125rem; }
@media (hover: hover) { .tp-part:hover { border-color: var(--ink); } }
.tp-part:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 3px; }

/* The questions, each over its answer: always open, a figure the page counted. */
.tp-qa { max-width: 78ch; margin: 0; }
.tp-qa > div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.tp-qa dt { font: 700 1rem/1.3 var(--body); }
.tp-qa dd { margin: 4px 0 0; font: 500 0.9375rem/1.5 var(--body); color: var(--soft); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* An engine's page (src/app/engines/page.ts): how many models at a power, beside the power; its two quiet notes. */
.en-n { margin-inline-start: 6px; font: 600 var(--fs-label)/1 var(--label); color: var(--soft); vertical-align: middle; }
.en-note, .en-real { max-width: 46em; text-wrap: pretty; line-height: 1.45; }
