/* "Budget", a page of its own (src/app/budget/page.ts): the simulator with room, then the twelve cars nearest the budget
   as cards, a category to narrow them, and the list that holds them all. Never redefines a token (app.css). Phone first. */

.bu { max-width: 1360px; margin: 0 auto; padding: 20px var(--pad) 48px; }
.bu-head { max-width: 46rem; margin-bottom: 20px; }
.bu-lede { margin: 8px 0 0; color: var(--soft); font: 500 1rem/1.5 var(--body); }
/* A phone with Safari's bars (664 px): the head is shorter, so that the three cars the budget reaches stand whole in the
   first screen (the audit of 25 November 2026, #25: cut by the fold). */
@media (max-width: 559px) {
  .bu { padding-top: 12px; }
  .bu-head { margin-bottom: 12px; }
  .bu-lede { margin-top: 4px; font-size: 0.9375rem; line-height: 1.4; }
}

/* The categories: one line that scrolls sideways on a phone, each 44 px tall; the one in force in ink. */
.bu-kinds { display: flex; gap: 8px; margin: 24px 0 16px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: none; }
.bu-kind { flex: none; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: var(--r-pill); background: var(--card); color: var(--ink); font: 600 0.9375rem/1 var(--body); cursor: pointer; white-space: nowrap; }
.bu-kind[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
@media (hover: hover) { .bu-kind[aria-pressed="false"]:hover { border-color: var(--edge); } }
.bu-kind:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* The cars: two columns on a phone, up to five with room; each card a link to the car's page. */
.bu-cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.bu-car a { display: grid; gap: 2px; height: 100%; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--card); color: var(--ink); text-decoration: none; transition: border-color var(--quick), box-shadow var(--quick); }
@media (hover: hover) { .bu-car a:hover { border-color: var(--edge); box-shadow: var(--lift-1); } }
.bu-car a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* Every car at one scale, the card's width standing for 5.6 m (the longest cars on sale): a city car looks small beside
   a large SUV, as on the street. */
.bu-car-pic { display: grid; place-items: end center; height: 72px; margin-bottom: 6px; padding-bottom: 6px; container-type: inline-size; }
.bu-car-pic .carfig { --mm: calc(100cqi / 5600); }
.bu-car-pic .carfig.is-nothing { width: 100%; }
.bu-car-make { font: 600 0.75rem/1.2 var(--label); color: var(--soft); }
.bu-car-name { overflow: hidden; font: 700 1rem/1.25 var(--display); text-overflow: ellipsis; white-space: nowrap; }
.bu-car-fig { display: grid; gap: 2px; margin-top: 4px; }
.bu-car-fig b { font: 750 1rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.bu-car-fig small { font: 500 0.8125rem/1.2 var(--body); color: var(--soft); }
/* After the twelve cards: the list with the same budget and category, which holds them all. */
.bu-more { margin: 16px 0 0; }
.bu-more:empty { display: none; }
.bu-more-go { width: 100%; max-width: 420px; }
.bu-none { margin: 24px 0; color: var(--soft); font: 550 1rem/1.4 var(--body); }

@media (min-width: 900px) {
  .bu { padding-top: 32px; }
  .bu-cars { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
  .bu-car-pic { height: 92px; }
}
