/* Brand tokens: an ink-blue primary on the shadcn neutral base. */
:root {
  --wordmark-muted: color-mix(in oklab, var(--muted-foreground), var(--foreground) 25%);
  --primary: oklch(0.27 0.035 255);
  --primary-foreground: oklch(0.985 0 0);
  --ring: oklch(0.5 0.06 255);
  --hero-scrim: oklch(0.16 0.02 255 / 0.82);
  --hero-scrim-end: oklch(0.16 0.02 255 / 0.15);
  --hero-foreground: oklch(0.985 0 0);
  --hero-bg: oklch(0.2 0.02 255);
  --hero-muted: oklch(0.88 0.01 255);
  --hero-border: transparent;
  /* X-ray lens: blueprint grid and ring (the hero is dark in both themes). */
  --xray-grid: oklch(0.85 0.08 230 / 0.16);
  --xray-ring: oklch(0.9 0.06 230 / 0.7);
  /* Inquiry progress: the bar of the current step, a light tint of the primary. */
  --step-current: color-mix(in oklab, var(--primary) 25%, var(--muted));
}
/* Photos are dimmed a little in dark mode so they do not glare. */
[data-theme="dark"] img { filter: brightness(0.75); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) img { filter: brightness(0.75); } }
[data-theme="dark"] {
  --primary: oklch(0.8 0.1 250);
  --primary-foreground: oklch(0.2 0.03 255);
  --ring: oklch(0.7 0.06 255);
  --hero-border: var(--border);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: oklch(0.8 0.1 250);
    --primary-foreground: oklch(0.2 0.03 255);
    --ring: oklch(0.7 0.06 255);
    --hero-border: var(--border);
  }
}

body { background: var(--background); }
[data-slot="page"] { width: 100%; max-width: 80rem; margin-inline: auto; }

/* Wordmark */
.brand-name { font-weight: 600; letter-spacing: -0.015em; white-space: nowrap; }
.brand-name span { font-weight: 400; letter-spacing: 0; color: var(--wordmark-muted); }

/* Hero */
/* z-index 2: the live results overlay the sections below the hero (whose own layers stay local, see .brand-list). */
.hero {
  position: relative;
  z-index: 2;
  isolation: isolate;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hero-border);
  display: flex;
  align-items: flex-end;
  color: var(--hero-foreground);
  background: var(--hero-bg);
}
.hero-img, .xray-clip { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; border-radius: calc(var(--radius-lg) - 1px); }
/* Slightly desaturated, so the photo's red cast does not fight the navy palette (not the X-ray copy). */
.hero-img { object-fit: cover; filter: saturate(0.55); }
[data-theme="dark"] .hero .hero-img { filter: saturate(0.55) brightness(0.75); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero .hero-img { filter: saturate(0.55) brightness(0.75); } }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--hero-scrim);
  /* Not a hit target: leaving the pseudo-element would count as leaving the hero (X-ray lens). */
  pointer-events: none;
}
.hero-content {
  display: grid;
  gap: calc(var(--spacing) * 4);
  padding: calc(var(--spacing) * 6) calc(var(--spacing) * 4);
}
.hero-content > * { max-width: 42rem; }
.hero h1 { font-size: 1.875rem; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
/* Landing display size (the one place above the kit type scale). */
@media (min-width: 48rem) { .hero h1 { font-size: 2.5rem; } }
.hero-lead { margin: 0; color: var(--hero-muted); text-wrap: pretty; }
.eyebrow { margin: 0; font-size: var(--text-sm); font-weight: 500; color: var(--hero-muted); }
.hero-search { display: flex; gap: calc(var(--spacing) * 2); }
.hero-search [data-slot="input-group"] { flex: 1; background: var(--background); color: var(--foreground); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: calc(var(--spacing) * 2) calc(var(--spacing) * 6); }
/* Touch-size hero controls; the primary is inverted so it stands out on the dark photo. */
.hero [data-slot="button"], .hero [data-slot="input-group"] { height: calc(var(--spacing) * 10); }
.hero [data-slot="button"]:not([data-variant]) { background: var(--hero-foreground); color: var(--hero-bg); padding-inline: calc(var(--spacing) * 4); }
.hero [data-slot="button"]:not([data-variant]):hover { background: var(--hero-muted); }
.hero [data-variant="outline"] { background: transparent; color: var(--hero-foreground); border-color: var(--hero-muted); }
.hero [data-variant="outline"]:hover { background: var(--hero-scrim-end); }
.hero-link { display: inline-flex; align-items: center; gap: calc(var(--spacing) * 2); font-size: var(--text-sm); font-weight: 500; color: var(--hero-foreground); text-decoration: underline; text-underline-offset: 4px; }
.hero-link svg { width: calc(var(--spacing) * 4); height: calc(var(--spacing) * 4); }
/* The terms (B2B only, prices on request) sit right under the lead: 2×2 on phones, one row on wide screens. */
.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(var(--spacing) * 2) calc(var(--spacing) * 4);
  font-size: var(--text-sm);
  font-weight: 500;
}
.facts li { display: flex; align-items: center; gap: calc(var(--spacing) * 2); }
.facts svg { width: calc(var(--spacing) * 4); height: calc(var(--spacing) * 4); flex: none; color: var(--hero-muted); }
@media (min-width: 48rem) {
  .hero { min-height: 30rem; }
  .hero::before { background: linear-gradient(100deg, var(--hero-scrim) 35%, var(--hero-scrim-end)); }
  .hero-content { padding: calc(var(--spacing) * 12); }
}
/* Phone (G6, G16): headline, terms, search with quick chips, call and WhatsApp, then the catalogue; the lead and the
   "part not listed" link are left out (the terms, Kontakt and the catalogue say it). */
@media (width < 40rem) {
  .hero-lead, .hero-link { display: none; }
  .hero :is([data-slot="button"], [data-slot="input-group"]) { height: calc(var(--spacing) * 11); }
  .hero-contact { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: calc(var(--spacing) * 2); }
  .hero-contact [data-slot="button"] { padding-inline: calc(var(--spacing) * 2); gap: calc(var(--spacing) * 1.5); }
  .hero-actions > [data-slot="button"] { width: 100%; }
  /* G17: four example searches under the field, one tap each. G13: quiet 32 px text pills in one row; the transparent
     top and bottom borders keep the 44 px hit area outside the drawn pill. */
  .hero-quick { display: flex; flex-wrap: wrap; gap: calc(var(--spacing) * 2); margin-block: calc(var(--spacing) * -2.5); }
  .hero .hero-quick [data-slot="button"] { padding-inline: calc(var(--spacing) * 3.5); border: calc(var(--spacing) * 1.5) solid transparent; border-inline-width: 0; border-radius: 999px; background-color: oklch(1 0 0 / 0.14); background-clip: padding-box; font-weight: 400; }
  /* G13: catalogue, call and WhatsApp as filled secondary buttons under the white search button (no thin outlines in sun). */
  .hero :is(.hero-contact, .hero-actions) [data-variant="outline"] { background-color: oklch(1 0 0 / 0.16); border-color: transparent; }
  /* G2: the field is light on the dark hero in both themes (the kit field is dark-on-dark in dark mode). */
  .hero-search [data-slot="input-group"] { color-scheme: light; --background: var(--hero-foreground); --foreground: var(--hero-bg); --muted-foreground: oklch(0.45 0.02 255); --input: transparent; }
}
@media (min-width: 64rem) { .facts { grid-template-columns: repeat(4, max-content); gap: calc(var(--spacing) * 6); max-width: none; } }
/* G16: on a 360 px phone the terms take one column, so none wraps on its own. */
@media (width < 24rem) { .facts { grid-template-columns: none; } }

/* Sections */
.section { display: grid; gap: calc(var(--spacing) * 4); padding-top: calc(var(--spacing) * 6); scroll-margin-top: calc(var(--spacing) * 16); }
.section-head { display: grid; gap: calc(var(--spacing) * 1); }
.section-head h2 { margin: 0; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.section-head p { margin: 0; color: var(--muted-foreground); }

/* Whole-card links */
.cat-card { position: relative; }
.stretched { color: inherit; text-decoration: none; }
.stretched::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.stretched:focus-visible { outline: none; }
.cat-card:has(.stretched:focus-visible) { outline: 2px solid var(--ring); outline-offset: 2px; }
.cat-card:hover, .brand-list [data-slot="item"]:hover { border-color: var(--ring); }
.brand-list [data-slot="item"] { position: relative; }
.brand-list [data-slot="item"]:has(.stretched:focus-visible) { outline: 2px solid var(--ring); outline-offset: 2px; }
/* Model names on the brand cards: quiet links above the whole-card link. */
.model-link { position: relative; z-index: 1; color: inherit; text-decoration: none; text-underline-offset: 3px; }
.model-link:focus-visible { text-decoration: underline; }
.model-link:hover { color: var(--foreground); text-decoration-color: currentColor; }

/* Brands: one compact row each on phones, three across from 48rem. */
/* isolation: the model links' z-index stays inside the list, so it never paints over the hero results. */
.brand-list { gap: calc(var(--spacing) * 2); isolation: isolate; }
@media (min-width: 48rem) { .brand-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(var(--spacing) * 4); } }
.brand-list [data-slot="item-title"] { font-size: var(--text-base); font-weight: 600; }
.brand-count { white-space: nowrap; }
.brand-count::before { content: " · " / ""; }
/* G20 (phones): the part count on its own line, so the three brand rows are even. */
@media (width < 40rem) { .brand-count { display: block; } .brand-count::before { content: none; } }
.brand-list [data-slot="item-actions"] svg { width: calc(var(--spacing) * 4); height: calc(var(--spacing) * 4); color: var(--muted-foreground); transition: translate 150ms; }
.brand-list [data-slot="item"]:hover [data-slot="item-actions"] svg { translate: calc(var(--spacing) * 1) 0; }

.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: calc(var(--spacing) * 3); }
@media (min-width: 48rem) { .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(var(--spacing) * 4); } }
@media (min-width: 64rem) { .cat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.cat-card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; height: auto; }
/* Phones (G14): a compact 2-column list of even tiles – a 48 px photo beside the name and the count. */
@media (width < 40rem) {
  .cat-grid { gap: calc(var(--spacing) * 2); }
  .cat-card { display: grid; grid-template-columns: calc(var(--spacing) * 12) minmax(0, 1fr); align-items: center; gap: calc(var(--spacing) * 2.5); padding: calc(var(--spacing) * 2); }
  .cat-card img { width: calc(var(--spacing) * 12); height: calc(var(--spacing) * 12); aspect-ratio: 1; margin: 0; border-radius: var(--radius-md); }
  .cat-card [data-slot="card-header"] { padding: 0; gap: 0; }
  .cat-card [data-slot="card-title"] { font-size: var(--text-sm); line-height: 1.3; }
  .cat-card [data-slot="card-description"] { font-size: var(--text-sm); color: var(--wordmark-muted); }
}

/* Steps: an unboxed numbered row. */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: calc(var(--spacing) * 6); }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.steps li { display: flex; gap: calc(var(--spacing) * 3); }
.steps h3 { margin: 0 0 calc(var(--spacing) * 1); font-size: var(--text-base); font-weight: 500; }
.steps p { margin: 0; font-size: var(--text-sm); color: var(--muted-foreground); }
.step-no {
  display: inline-grid;
  place-items: center;
  width: calc(var(--spacing) * 8);
  height: calc(var(--spacing) * 8);
  border-radius: 50%;
  background: var(--muted);
  font-size: var(--text-sm);
  font-weight: 600;
  flex: none;
}

/* Contact */
.contact [data-slot="item-title"] a { color: inherit; }
.contact-list [data-slot="item"] { padding-inline: 0; }
@media (min-width: 48rem) { .contact-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.contact-actions { flex-wrap: wrap; gap: calc(var(--spacing) * 2); }
/* Phones (G8): the inquiry full width, then call, chat and e-mail in an even 2-column grid. */
@media (width < 40rem) {
  .contact-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-actions > :first-child { grid-column: 1 / -1; }
  /* G7: the turbo anatomy follows the contact card, so contact comes a screen and a half sooner. G15: folded into one
     button (home.js) that opens it in place; the one linked part looks like a link. */
  #anatomija { order: 1; }
  .anat-fold > [data-collapsible-trigger] { width: 100%; justify-content: space-between; }
  .anat-more:not([hidden]) { display: grid; gap: calc(var(--spacing) * 4); margin-top: calc(var(--spacing) * 4); }
  .anat-part h3 a { text-decoration: underline; }
  /* G16: every call to action full width. */
  .anat-cta, [aria-labelledby="order-title"] [data-slot="card-action"], [aria-labelledby="order-title"] [data-slot="card-action"] > a { width: 100%; justify-self: stretch; }
}

/* Catalogue */
/* The OEM number is how buyers tell identical names apart: full contrast, medium weight. */
.oem { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 500; color: var(--foreground); letter-spacing: 0.01em; white-space: nowrap; }
.part-cell { display: flex; align-items: flex-start; gap: calc(var(--spacing) * 3); min-width: 0; }
/* Row thumbnail: opens the preview; a zoom mark shows on row hover or name focus (pointer devices). */
.thumb-cue { position: relative; flex: none; display: flex; }
.thumb-cue > svg { position: absolute; right: calc(var(--spacing) * 0.5); bottom: calc(var(--spacing) * 0.5); width: calc(var(--spacing) * 5); height: calc(var(--spacing) * 5); padding: calc(var(--spacing) * 1); border-radius: var(--radius-sm); background: color-mix(in oklab, var(--background) 85%, transparent); color: var(--foreground); pointer-events: none; opacity: 0; }
tr:is(:hover, :has(.part-name:focus-visible)) .thumb-cue > svg { opacity: 1; }
@media (hover: none) { .thumb-cue > svg { display: none; } }
.part-thumb { cursor: zoom-in; width: calc(var(--spacing) * 12); height: calc(var(--spacing) * 12); flex: none; object-fit: cover; border-radius: var(--radius-md); background: var(--muted); }
/* Fixed layout: column widths come from the header, so filtering never shifts them and long text wraps. */
#parts [data-slot="table"] { table-layout: fixed; }
#parts [data-slot="table-container"] { --table-header-top: var(--header-height, calc(var(--spacing) * 14)); }
@media (min-width: 64rem) { .col-part { width: 22%; } }
.col-oem { width: calc(var(--spacing) * 40); }
.col-brand { width: calc(var(--spacing) * 32); }
.col-action { width: calc(var(--spacing) * 34); }
.part-text { display: grid; gap: calc(var(--spacing) * 0.5); min-width: 0; white-space: normal; font-size: var(--text-xs); color: var(--muted-foreground); }
.part-name { font-size: var(--text-sm); font-weight: 500; color: var(--foreground); }
.fits { white-space: normal; }
/* The stepper fills the action column like the Add button, so the right edge stays straight. */
.add-btn, .col-action [data-slot="button-group"] { width: 100%; }
.col-action .qty { flex: 1; }
mark { background: color-mix(in oklch, var(--warning-fill) 30%, transparent); color: inherit; border-radius: var(--radius-sm); }
:is(#q, #model-search)::-webkit-search-cancel-button { appearance: none; }
.result-count { font-size: var(--text-sm); color: var(--muted-foreground); }
.end-actions { display: flex; flex-wrap: wrap; gap: calc(var(--spacing) * 2); }
@media (width < 40rem) { .end-actions > * { flex: 1 1 auto; } }
@media (min-width: 40rem) { .pager { display: flex; align-items: center; gap: calc(var(--spacing) * 2); } }
/* Phone cards (G7, G8): the thumbnail beside the OEM number (strongest) and the name, a 44 px "+" on their right, then
   brand and fitment across the card. The whole card opens the preview (a chevron at the end of the name row says so; the
   name's 44 px hit area reaches over the text around it, which opens the preview too). Once added (G9), a row of its own
   with "✓ In inquiry" and the stepper, and an accent edge: one height change, at the moment of adding. */
@media (width < 40rem) {
  [data-page="catalog"] [data-slot="page-title"] { font-size: 1.375rem; }
  #rows > tr { display: grid; grid-template-columns: calc(var(--spacing) * 12) minmax(0, 1fr) calc(var(--spacing) * 11); align-items: center; gap: calc(var(--spacing) * 1) calc(var(--spacing) * 2.5); padding: calc(var(--spacing) * 2.5) calc(var(--spacing) * 3); cursor: pointer; }
  #rows > tr:active:not(:has(.col-action:active)) { background: color-mix(in oklab, var(--foreground) 6%, var(--background)); }
  #rows > tr[data-state="selected"] { box-shadow: inset 3px 0 0 var(--primary); }
  #rows > tr > td { padding: 0; }
  #rows :is(td:first-child, .part-cell, .part-text, .phone-meta) { display: contents; }
  #rows .thumb-cue { grid-area: 1 / 1 / 3 / 2; align-self: start; }
  #rows .part-thumb { width: calc(var(--spacing) * 12); height: calc(var(--spacing) * 12); }
  #rows .phone-meta > .oem { grid-area: 1 / 2; align-self: end; font-weight: 600; }
  #rows button.part-name { grid-area: 2 / 2; align-self: start; display: flex; align-items: center; justify-content: space-between; gap: calc(var(--spacing) * 2); box-sizing: border-box; min-height: calc(var(--spacing) * 11); margin-block: calc(var(--spacing) * -3); padding-block: calc(var(--spacing) * 3); font-weight: 500; }
  #rows button.part-name svg { width: calc(var(--spacing) * 4); height: calc(var(--spacing) * 4); flex: none; color: var(--foreground); }
  #rows .col-action { grid-area: 1 / 3 / 3 / 4; width: auto; }
  #rows .add-btn { width: calc(var(--spacing) * 11); padding: 0; }
  #rows > tr[data-state="selected"] .col-action { grid-area: 4 / 2 / 5 / 4; display: flex; align-items: center; justify-content: space-between; gap: calc(var(--spacing) * 3); }
  #rows .col-action [data-slot="button-group"] { width: auto; }
  .in-inquiry { display: inline-flex; align-items: center; gap: calc(var(--spacing) * 1.5); font-size: var(--text-sm); font-weight: 600; color: var(--foreground); }
  .in-inquiry svg { width: calc(var(--spacing) * 4); height: calc(var(--spacing) * 4); color: var(--primary); }
  #rows .qty { min-width: calc(var(--spacing) * 11); width: calc(var(--spacing) * 11); }
  #rows .phone-meta > .fits { grid-area: 3 / 2 / 4 / 4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin-top: calc(var(--spacing) * 1); font-size: var(--text-sm); color: var(--wordmark-muted); }
  #rows .phone-meta [data-slot="badge"] { margin-inline-end: calc(var(--spacing) * 1.5); vertical-align: 1px; }
  #rows .phone-meta b { font-weight: 600; color: var(--foreground); }
}
/* A 360 px phone keeps the text column wide: no thumbnail (M6). */
@media (width < 24rem) {
  #rows > tr { grid-template-columns: 0 minmax(0, 1fr) calc(var(--spacing) * 11); column-gap: 0; }
  #rows .col-action { margin-inline-start: calc(var(--spacing) * 2.5); }
  #rows > tr[data-state="selected"] .col-action { margin-inline-start: 0; }
  #rows .thumb-cue { display: none; }
}
@media (width < 40rem) {
  /* Search and filters stay under the header while the list scrolls. */
  #parts > [data-slot="data-table-toolbar"] { position: sticky; top: var(--header-height, calc(var(--spacing) * 14)); z-index: 4; margin: calc(var(--spacing) * -2) calc(var(--page-gutter) * -1); padding: calc(var(--spacing) * 2) var(--page-gutter); }
  /* The toolbar's background is a layer of its own, so folding (G11) can slide it up behind the search row. */
  #parts > [data-slot="data-table-toolbar"]::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--background); }
  /* G11 folded (katalog.js, on scroll down): the header slides away, the toolbar takes its place, and only search and
     Filters stay; brand tabs, categories and the count fade out under them. Transforms and opacity only. */
  [data-toolbar="min"] #app-header { transform: translateY(-100%); }
  [data-toolbar="min"] #parts > [data-slot="data-table-toolbar"] { transform: translateY(calc(var(--header-height, calc(var(--spacing) * 14)) * -1)); pointer-events: none; }
  [data-toolbar="min"] #parts > [data-slot="data-table-toolbar"]::before { transform: translateY(calc(var(--keep, 100%) - 100%)); box-shadow: 0 1px 0 var(--border); }
  [data-toolbar="min"] #parts > [data-slot="data-table-toolbar"] :is(#q, #filters-btn, #paste-btn, [data-slot="input-group"]) { pointer-events: auto; }
  [data-toolbar="min"] :is(#brand-toggle, #cat-chips, #count) { opacity: 0; visibility: hidden; transform: translateY(calc(var(--spacing) * -3)); }
  /* G12: categories as a scrollable chip row under the brand tabs, in step with the category filter. */
  #cat-chips { order: 1; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--page-gutter) * -1); padding-inline: var(--page-gutter); scroll-padding-inline: var(--page-gutter); }
  #cat-chips > * { flex: none; border-radius: 999px; }
  /* G10: the row fades at the screen edge (more to scroll), and a chosen chip or brand is filled, readable in sunlight. */
  #cat-chips { padding-inline-end: calc(var(--spacing) * 8); mask-image: linear-gradient(to right, #000 calc(100% - var(--spacing) * 8), transparent); }
  :is(#cat-chips, #brand-toggle) > [data-state="on"] { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
  html:has(#parts) { scroll-padding-top: calc(var(--spacing) * 40); }
  /* G15: the range in plain sight, "show more" as wide as the buttons under it, then back to the top. */
  #pagination { flex-wrap: wrap; padding-inline: 0; }
  #range { flex-basis: 100%; color: var(--foreground); }
  .more-actions { flex-basis: 100%; display: grid; gap: calc(var(--spacing) * 2); }
}
/* Phone touch targets (G1): every control, link row and close button at least 44 px; the whole search field is the hit area. */
@media (width < 40rem) {
  :is([data-slot="button"], [data-slot="input"], [data-slot="input-group"], [data-slot="select-trigger"], [data-slot="toggle-group-item"], [data-slot="accordion-trigger"], [data-slot="brand"], [data-slot$="-close"]),
  :is(.hero-link, .hero-all, .footer-contact a, .footer-links a, .legal .to-top a, [data-toc] > [data-slot="button"]) { min-height: calc(var(--spacing) * 11); }
  :is([data-slot="button"][data-size^="icon"], [data-slot$="-close"], .qty) { min-width: calc(var(--spacing) * 11); }
  /* The field fills the group over its 1 px borders, so the whole 44 px box takes the tap. */
  [data-slot="input-group-control"]:where(input) { align-self: stretch; height: auto; margin-block: -1px; }
  :is([data-slot="checkbox"], [data-slot="radio-group-item"])::after { inset: calc(var(--spacing) * -3.5); }
  /* Heading links keep their line height; padding makes the tap area. */
  .anat-part h3 a { padding-block: calc(var(--spacing) * 3); margin-block: calc(var(--spacing) * -3); }
}
@media (min-width: 40rem) {
  /* A small basis keeps search, brands and the four filter buttons on one row at 1280; the search then grows into the rest. */
  [data-slot="data-table-toolbar"] > * > [data-slot="input-group"] { flex: 1 1 calc(var(--spacing) * 48); max-width: calc(var(--spacing) * 96); }
}
/* Facet filters: checkbox menus in the toolbar, removable chips under it, and a bottom sheet on phones. */
.facet-menu { min-width: calc(var(--spacing) * 56); }
.facet-menu [data-slot="dropdown-menu-shortcut"], .facet-count { font-variant-numeric: tabular-nums; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: calc(var(--spacing) * 2); }
.active-filters[hidden], #model-search-group[hidden] { display: none; }
.chip { font-weight: 500; }
.filter-sheet { max-height: 85dvh; }
/* G20: "Clear all" is a quiet text action in the footer, left of "Show n parts" (away from the × at the top). */
.filter-sheet [data-slot="sheet-footer"] { flex-direction: row-reverse; }
#sheet-show { flex: 1; }
.sort-field { align-items: center; justify-content: space-between; }
.filter-sheet [data-slot="sheet-body"] { min-height: 0; }
/* G25: the list fades at its foot, so it reads as "more below"; the padding lets the last option scroll clear of the fade. */
@media (width < 40rem) {
  .filter-sheet [data-slot="sheet-body"] { padding-bottom: calc(var(--spacing) * 8); mask-image: linear-gradient(to bottom, #000 calc(100% - var(--spacing) * 8), transparent); }
}
.facet-list { display: grid; gap: 0; }
.facet-option { align-items: center; gap: calc(var(--spacing) * 3); }
.facet-option [data-slot="field-label"] { flex: 1; min-height: calc(var(--spacing) * 11); font-weight: 400; }
.facet-option:has([aria-disabled="true"]) :is([data-slot="field-label"], .facet-count) { opacity: 0.5; }
.facet-count { font-size: var(--text-sm); color: var(--muted-foreground); }
.facet-group { margin: calc(var(--spacing) * 3) 0 calc(var(--spacing) * 1); font-size: var(--text-xs); font-weight: 500; color: var(--muted-foreground); }
.facet-list > .facet-group:first-child { margin-top: 0; }
#sheet-facets [data-slot="accordion-trigger"] [data-slot="badge"] { margin-inline-start: auto; margin-inline-end: calc(var(--spacing) * 2); }
#model-search-group { margin-bottom: calc(var(--spacing) * 2); }
@media (width < 40rem) {
  /* Phone toolbar: search and the Filters button in one row, the count under them. */
  #parts > [data-slot="data-table-toolbar"] > :first-child > [data-slot="input-group"] { flex: 1 1 0; min-width: 0; }
  #parts > [data-slot="data-table-toolbar"] > :last-child { flex-basis: 100%; order: 2; }
  /* One-tap brand switch (G12): the toolbar's brand toggle as a scrollable row under the search. */
  #brand-toggle { order: 1; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; }
  #brand-toggle > * { flex: 1 0 auto; }
}
@media (40rem <= width < 48rem) { #brand-toggle { display: none; } }
/* --bar-space: the bar's measured height (common.js); plus its 1rem offset and a little air. */
html:has(.sticky-bar:not([hidden])) { scroll-padding-bottom: calc(var(--bar-space, calc(var(--spacing) * 14)) + var(--spacing) * 6); }
.sticky-bar {
  position: sticky;
  bottom: calc(var(--spacing) * 4);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--spacing) * 3);
  padding: calc(var(--spacing) * 2) calc(var(--spacing) * 2) calc(var(--spacing) * 2) calc(var(--spacing) * 4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  font-weight: 500;
}
/* Phones (G3): the bar is a full-width strip flush with the bottom edge (above the home indicator), the page keeps
   room for it under the footer, and it steps aside while the on-screen keyboard is up (a text field has focus). */
@media (width < 40rem) {
  .sticky-bar { position: fixed; inset: auto 0 0; border-width: 1px 0 0; border-radius: 0; box-shadow: none; padding: calc(var(--spacing) * 2) var(--page-gutter, calc(var(--spacing) * 4)) calc(var(--spacing) * 2 + env(safe-area-inset-bottom)); }
  body:has(.sticky-bar) { padding-bottom: var(--bar-space, calc(var(--spacing) * 15)); }
}
@media (pointer: coarse) {
  html:has(:is(input:not([type="checkbox"], [type="radio"], [type="button"], [type="submit"]), textarea):focus) .sticky-bar { display: none; }
}

/* Inquiry */
.lines { display: grid; gap: calc(var(--spacing) * 2); }
.lines img { width: 100%; height: 100%; object-fit: cover; }
.qty { width: calc(var(--spacing) * 12); text-align: center; font-size: var(--text-sm); appearance: textfield; }
.qty::-webkit-inner-spin-button, .qty::-webkit-outer-spin-button { appearance: none; margin: 0; }
.line-meta { display: flex; flex-wrap: wrap; align-items: center; gap: calc(var(--spacing) * 2); }
.line-fits { margin: 0; font-size: var(--text-xs); color: var(--muted-foreground); }
/* Phone lines (G2), the same for every brand: OEM and brand (remove in the top corner), the name beside the stepper,
   then one line of fitment across the card. */
@media (width < 40rem) {
  .lines [data-slot="item"] { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: calc(var(--spacing) * 1) calc(var(--spacing) * 3); padding-block: calc(var(--spacing) * 2.5); }
  .lines :is([data-slot="item-content"], [data-slot="item-actions"]) { display: contents; }
  .lines .line-meta { grid-area: 1 / 1 / 2 / 3; padding-inline-end: calc(var(--spacing) * 9); }
  .lines .line-meta .oem { order: -1; font-weight: 600; }
  .lines [data-slot="item-title"] { grid-area: 2 / 1; }
  .lines .qty-field { grid-area: 2 / 2; }
  .lines .line-fits { grid-area: 3 / 1 / 4 / 3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lines .unit { display: none; }
  .line-remove { position: absolute; top: calc(var(--spacing) * 0.5); right: calc(var(--spacing) * 0.5); color: var(--muted-foreground); }
  .vehicle-toggle { width: 100%; justify-content: flex-start; text-align: start; white-space: normal; height: auto; padding-block: calc(var(--spacing) * 2); }
}
.company-saved { display: flex; align-items: center; justify-content: space-between; gap: calc(var(--spacing) * 3); padding: calc(var(--spacing) * 3); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.company-saved > div { min-width: 0; }
.company-saved p { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
/* G5: contact, phone and the email the offer goes to, one per line. */
.company-saved .company-saved-detail { margin-top: calc(var(--spacing) * 0.5); font-weight: 400; }
.company-saved-detail span { display: block; }
/* G6: says where the details come from (they are kept only in this browser). */
.company-saved .company-saved-note { display: flex; align-items: center; gap: calc(var(--spacing) * 1.5); margin-top: calc(var(--spacing) * 1); font-size: var(--text-sm); font-weight: 400; color: var(--muted-foreground); }
.company-saved-note svg { width: calc(var(--spacing) * 4); height: calc(var(--spacing) * 4); flex: none; }
.qty-field { display: flex; align-items: center; gap: calc(var(--spacing) * 2); font-size: var(--text-sm); }
.unit { color: var(--muted-foreground); }
/* Focused fields stay clear of the sticky header and of the phone send bar (and the error under the field). */
[data-slot="form"] :is(input, textarea, button, fieldset, .form-actions) { scroll-margin-top: calc(var(--spacing) * 24); scroll-margin-bottom: calc(var(--spacing) * 16); }
/* The kit spans only in 3-column groups; a full-row field in the 2-column company group. */
[data-slot="field-group"][data-columns="2"] > [data-span="2"] { grid-column: 1 / -1; }
.form-alert { scroll-margin-top: calc(var(--spacing) * 20); }
#inquiry [data-slot="field-legend"] { font-weight: 600; }
.form-alert[data-variant="destructive"] { background: var(--error-bg); border-color: var(--error-border); }
/* Title in foreground on the tinted background: the kit red measured 4.31:1 there. */
.form-alert[data-variant="destructive"] [data-slot="alert-title"] { color: var(--foreground); }
.error-links { margin: 0; padding-left: calc(var(--spacing) * 4); }
.error-links a { color: var(--foreground); }
.sent-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: calc(var(--spacing) * 2); margin-top: calc(var(--spacing) * 2); }
.sent-actions [data-slot="button"][data-variant] { color: var(--foreground); }
/* After a real send only the result stays (upit.js clears the basket); the summary card shows just its "sent" line. */
#inquiry[data-sent="server"] > [data-slot="field-group"] > :not(#sent), .aside-body:has(#aside-sent:not([hidden])) > :not(#aside-sent) { display: none; }
@media (min-width: 40rem) { .sent-new { margin-inline-start: auto; } }
.nowrap { white-space: nowrap; }
.sum-missing { margin: 0; font-size: var(--text-sm); color: var(--muted-foreground); }
.preview-text { margin-top: calc(var(--spacing) * 2); padding: calc(var(--spacing) * 3); border-radius: var(--radius-md); background: var(--muted); font-family: var(--font-mono); font-size: var(--text-xs); overflow-wrap: anywhere; }
.preview-text pre { margin: 0; font: inherit; white-space: pre-wrap; }
.preview-subject { margin: 0 0 calc(var(--spacing) * 3); font-weight: 600; }
.summary { margin: 0; display: grid; gap: calc(var(--spacing) * 2); font-size: var(--text-sm); }
.summary > div { display: flex; justify-content: space-between; gap: calc(var(--spacing) * 4); }
.summary dt { color: var(--muted-foreground); }
.summary dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.aside-body { display: grid; gap: calc(var(--spacing) * 4); }
.aside-actions { flex-direction: column; align-items: stretch; gap: calc(var(--spacing) * 2); }
.lines-actions, .empty-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: calc(var(--spacing) * 2); }
@media (width >= 40rem) { .lines-actions > [data-show-from] { display: flex; flex-wrap: wrap; gap: calc(var(--spacing) * 2); } }
.empty-actions { justify-content: center; }
/* G3 (phones): one "Add parts" menu and a quiet "Remove all" in one row under the parts. */
@media (width < 40rem) {
  .lines-actions { flex-wrap: nowrap; align-items: center; }
  /* G6: a readable destructive text action, not a disabled-looking grey. */
  #clear-lines { color: var(--destructive); }
  #add-menu [data-slot="dropdown-menu-content"] { min-width: calc(var(--spacing) * 72); }
  #add-menu [data-slot="dropdown-menu-item"] { min-height: calc(var(--spacing) * 11); align-items: flex-start; padding-block: calc(var(--spacing) * 2); }
  /* G6: each way to add parts says what it is for. */
  #add-menu .menu-text { display: grid; gap: calc(var(--spacing) * 0.5); white-space: normal; }
  #add-menu .menu-desc { font-size: var(--text-sm); color: var(--muted-foreground); }
  #add-menu [data-slot="dropdown-menu-item"] > svg { margin-top: calc(var(--spacing) * 0.5); }
}
@media (width >= 64rem) { .send-bar { display: none; } }
[data-slot="collapsible"][data-state="open"] [data-collapsible-trigger] svg { rotate: 180deg; }
/* The send hint sits right above the final actions; on phones the actions stack full width. */
.form-actions { display: flex; flex-wrap: wrap; gap: calc(var(--spacing) * 2); }
.send-hint { flex-basis: 100%; margin: 0; }
@media (width < 40rem) {
  .form-actions, .sent-actions { flex-direction: column; align-items: stretch; }
  /* G1: send right after the last field, then the one-line hint and the legal line; copy and the text preview follow
     as quiet text actions (upit.js makes them ghost buttons), their text in line with the fields. */
  #send-end { order: -1; }
  #copy-end { order: 1; }
  #inquiry [data-slot="field-group"] > .preview-box { order: 1; margin-top: calc(var(--spacing) * -4); }
  :is(#copy-end, .preview-box [data-collapsible-trigger]) { align-self: flex-start; margin-inline-start: calc(var(--spacing) * -2.5); }
  /* G4: after a real send, call and WhatsApp side by side under "Back to the catalogue". */
  .sent-contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(var(--spacing) * 2); }
}
.sent-recap { margin-top: calc(var(--spacing) * 2); font-weight: 600; color: var(--foreground); }
/* Phone menu (sheet): 48 px full-width rows, the current page marked, contact actions, language and theme. */
.nav-sheet [data-slot="sheet-body"] { gap: calc(var(--spacing) * 4); padding-bottom: calc(var(--spacing) * 4); }
.nav-group { display: grid; gap: calc(var(--spacing) * 0.5); }
.nav-label { margin: 0 0 calc(var(--spacing) * 1); padding-inline: calc(var(--spacing) * 3); font-size: var(--text-xs); font-weight: 500; color: var(--muted-foreground); }
.nav-row { justify-content: flex-start; min-height: calc(var(--spacing) * 12); padding-inline: calc(var(--spacing) * 3); font-size: var(--text-base); }
.nav-row[aria-current="page"] { background: var(--muted); font-weight: 600; }
.nav-row [data-slot="badge"] { margin-inline-start: auto; }
.nav-langs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(var(--spacing) * 1); }
.nav-langs [data-slot="button"] { min-height: calc(var(--spacing) * 12); }
.inq-icon { display: none; }
@media (width >= 40rem) { .inq-icon { display: block; } }
/* G18: on a 360 px phone the wordmark drops "Trade", so the call button and the labelled inquiry button fit in every language. */
@media (width < 24rem) {
  #app-header .brand-name > span { display: none; }
  #app-header { padding-inline: calc(var(--spacing) * 3); }
  #app-header [data-slot="site-header-actions"] { gap: calc(var(--spacing) * 1); }
  .inq-btn { padding-inline: calc(var(--spacing) * 2.5); }
  /* Slovenian "Povpraševanje" is the longest label: there the mark alone stands for the brand (the name stays for screen readers). */
  html:lang(sl) #app-header .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

/* Footer: brand and contact links, then one legal line with the company details. */
.site-footer { border-top: 1px solid var(--border); margin-top: calc(var(--spacing) * 6); font-size: var(--text-sm); color: var(--muted-foreground); }
.footer-inner, .footer-legal { max-width: 80rem; margin-inline: auto; padding: calc(var(--spacing) * 6) calc(var(--spacing) * 4); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: calc(var(--spacing) * 4) calc(var(--spacing) * 8); }
.footer-inner p { margin: calc(var(--spacing) * 2) 0 0; }
.site-footer [data-slot="brand"] { color: var(--foreground); }
.footer-contact { display: flex; flex-wrap: wrap; gap: calc(var(--spacing) * 2) calc(var(--spacing) * 6); align-items: flex-start; }
.footer-contact a { display: inline-flex; align-items: center; gap: calc(var(--spacing) * 2); color: var(--foreground); text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }
.footer-contact svg { width: calc(var(--spacing) * 4); height: calc(var(--spacing) * 4); flex: none; }
.footer-legal { display: grid; gap: calc(var(--spacing) * 1); padding-block: calc(var(--spacing) * 4); border-top: 1px solid var(--border); font-size: var(--text-xs); }
.footer-legal p { margin: 0; }
@media (min-width: 64rem) {
  .footer-inner, .footer-legal { padding-inline: calc(var(--spacing) * 6); }
}

/* Part preview: the name is a button that looks like the name; the dialog shows the large illustrative image. */
button.part-name { all: unset; cursor: pointer; font-size: var(--text-sm); font-weight: 500; color: var(--foreground); text-align: start; }
button.part-name:hover { text-decoration: underline; text-underline-offset: calc(var(--spacing) * 0.5); }
button.part-name:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: var(--radius-sm); }
.part-dialog { max-width: 36rem; }
.pd-img { margin-top: calc(var(--spacing) * 6); width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-lg); background: var(--muted); }
.pd-facts { display: grid; grid-template-columns: auto 1fr; gap: calc(var(--spacing) * 2) calc(var(--spacing) * 4); margin: 0; font-size: var(--text-sm); }
.pd-facts dt { color: var(--muted-foreground); }
.pd-facts dd { margin: 0; }
.pd-note { margin: 0; font-size: var(--text-xs); color: var(--muted-foreground); }
.pd-qty:empty { display: none; }
.pd-qty .qty { flex: 1; }
/* Phones (G24): the preview is a bottom sheet, so Add, the quantity and Close sit in thumb reach. */
@media (width < 40rem) {
  /* G7: room above the home indicator; Close is the × (the full-width Close button is left out). */
  .part-dialog { inset: auto 0 0; translate: none; max-width: none; max-height: calc(100dvh - var(--spacing) * 6); overflow-y: auto; overscroll-behavior: contain; border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding-bottom: calc(var(--spacing) * 2 + env(safe-area-inset-bottom)); }
  .part-dialog .pd-img { margin-top: calc(var(--spacing) * 10); }
  .pd-qty [data-slot="button-group"] { width: 100%; }
}
.footer-links { display: flex; flex-wrap: wrap; gap: calc(var(--spacing) * 2) calc(var(--spacing) * 6); font-size: var(--text-sm); }
.footer-links a { color: var(--foreground); text-decoration: none; }
/* Phones: one link per line, so none is left alone on a second line. */
@media (width < 40rem) { .footer-links { flex-direction: column; } }
.footer-links a:hover, .footer-links a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }

/* Legal pages: running text at 16 px in the kit's 42rem column; the section nav sits in the page-aside from 64rem. */
/* Long section names (sl, en) wrap inside the 12rem nav instead of running past it; one line keeps the kit 32 px height. */
[data-toc] > [data-slot="button"] { justify-content: flex-start; height: auto; min-height: calc(var(--spacing) * 8); padding-block: calc(var(--spacing) * 1); white-space: normal; text-align: start; }
.legal h2 { margin: calc(var(--spacing) * 8) 0 0; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; scroll-margin-top: calc(var(--spacing) * 20); }
.legal [data-lang-block] > h2:first-child { margin-top: 0; }
.legal :is(p, ul) { margin: calc(var(--spacing) * 3) 0 0; line-height: 1.75; text-wrap: pretty; }
.legal ul { padding-left: calc(var(--spacing) * 6); list-style: disc; }
.legal li + li { margin-top: calc(var(--spacing) * 2); }
.legal a:not([data-slot]), .legal-note a { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; }
.legal code { padding: 0 calc(var(--spacing) * 1); border-radius: var(--radius-sm); background: var(--muted); font-family: var(--font-mono); font-size: var(--text-sm); }
.legal-note { flex-basis: 100%; margin: 0; }
/* Phones and tablets: a closed "Contents" list at the top of the text; a link back to the top at its end. */
.toc-phone [data-collapsible-trigger] { width: 100%; justify-content: space-between; }
.toc-list { display: grid; margin-top: calc(var(--spacing) * 2); }
.legal .to-top { display: flex; flex-wrap: wrap; gap: calc(var(--spacing) * 2) calc(var(--spacing) * 6); }
.legal .to-top a { display: inline-flex; align-items: center; gap: calc(var(--spacing) * 2); }
/* Phones: a floating "Contents" button after the first screen opens the sections in a bottom sheet (common.js). */
.toc-fab { position: fixed; right: var(--page-gutter, calc(var(--spacing) * 4)); bottom: calc(var(--spacing) * 4 + env(safe-area-inset-bottom)); z-index: 5; box-shadow: var(--shadow-lg); }
.toc-sheet { max-height: 85dvh; }
.toc-sheet [data-slot="sheet-body"] { min-height: 0; gap: calc(var(--spacing) * 3); padding-bottom: calc(var(--spacing) * 4 + env(safe-area-inset-bottom)); }
.toc-sheet .toc-list { margin: 0; }
/* The sheet sits inside .legal: its title keeps the kit sheet-title look, not the section heading style. */
.toc-sheet [data-slot="sheet-title"] { margin: 0; font-size: var(--text-base); letter-spacing: normal; }
.toc-list [aria-current="location"] { background: var(--muted); font-weight: 600; }
/* G7: the list scrolls inside the sheet and fades at its foot, so the last section is never cut off without a cue. */
.toc-sheet [data-slot="sheet-body"] { overflow-y: auto; overscroll-behavior: contain; padding-bottom: calc(var(--spacing) * 8 + env(safe-area-inset-bottom)); mask-image: linear-gradient(to bottom, #000 calc(100% - var(--spacing) * 8), transparent); }
/* Plain wrapping on phones: "pretty" pulls words down and leaves ragged two-word last lines in the narrow column. */
@media (width < 40rem) {
  .legal :is(p, ul) { text-wrap: wrap; }
  /* G17: the key points of the terms in a box at the top (phones). */
  .key-points { margin-bottom: calc(var(--spacing) * 4); }
  .legal .key-points ul { margin-top: calc(var(--spacing) * 1); padding-left: calc(var(--spacing) * 4.5); line-height: 1.5; color: var(--foreground); }
  .key-points li + li { margin-top: calc(var(--spacing) * 1.5); }
  /* G18: back to the top and back to the inquiry as two even 44 px buttons. */
  .legal .to-top { column-gap: calc(var(--spacing) * 2); }
  .legal .to-top a { flex: 1 1 0; justify-content: center; padding-inline: calc(var(--spacing) * 3); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--foreground); text-decoration: none; font-size: var(--text-sm); font-weight: 500; }
}
@media (width < 24rem) { .legal ul { padding-left: calc(var(--spacing) * 4.5); } }
.to-top svg { width: calc(var(--spacing) * 4); height: calc(var(--spacing) * 4); }
/* Impressum: label and value side by side from 40rem, stacked on phones. */
.reg { margin: 0; display: grid; gap: calc(var(--spacing) * 3); }
.reg > div { display: grid; gap: calc(var(--spacing) * 1); }
.reg dt { font-size: var(--text-sm); color: var(--muted-foreground); }
.reg dd { margin: 0; overflow-wrap: anywhere; }
.reg a { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; }
/* The label/value list is short: the cards keep a readable width instead of spanning the page. */
[data-page="impressum"] [data-slot="card"] { max-width: 48rem; }
@media (min-width: 40rem) { .reg > div { grid-template-columns: calc(var(--spacing) * 48) minmax(0, 1fr); gap: calc(var(--spacing) * 4); } }
.nf-actions { flex-direction: row; max-width: none; }


/* Home: live results under the hero search. */
.hero-find { position: relative; }
.hero-results { position: absolute; top: calc(100% + var(--spacing) * 2); inset-inline: 0; z-index: 2; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: calc(var(--spacing) * 1); padding: calc(var(--spacing) * 2); border-radius: var(--radius-lg); background: var(--background); color: var(--foreground); box-shadow: var(--shadow-lg); }
.hero-results [data-slot="item-group"] { gap: 0; }
.hero-results [data-slot="item"] { flex-wrap: nowrap; padding: calc(var(--spacing) * 2); }
.hero-results [data-slot="item-content"] { min-width: 0; }
/* Keep Add / the stepper beside the name (the kit moves labelled actions to their own row). */
.hero-results [data-slot="item"] > [data-slot="item-actions"] { flex: none; }
.hero-results [data-slot="item-title"] { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-results .hit { color: inherit; text-decoration: none; }
.hero-results .hit:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero-results .hit:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: var(--radius-sm); }
.hero-results [data-slot="item-description"] .oem { font-size: var(--text-xs); }
.hit-fits { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-xs); color: var(--muted-foreground); }
/* OEM · brand on one line. */
.hit-brand::before { content: " · " / ""; }
/* Phones (G4): the panel ends above the keyboard (home.js sets --results-max) and scrolls inside; "show all" stays at its foot. */
@media (width < 40rem) {
  .hero-results:not([hidden]) { display: flex; flex-direction: column; max-height: var(--results-max, 70dvh); }
  .hero-results > [data-slot="item-group"] { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .hero-results > :last-child { flex: none; }
  /* G19: the OEM number leads in bold (with the brand), then the name, then one line of fitment. */
  .hero-results [data-slot="item-title"] { white-space: normal; font-weight: 400; }
  .hero-results [data-slot="item-description"] { order: -1; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: calc(var(--spacing) * 2); overflow: visible; }
  .hero-results [data-slot="item-description"] .oem { font-size: var(--text-sm); font-weight: 600; }
  .hero-results .hit-brand::before { content: none; }
  .hero-results [data-slot="item"] { gap: calc(var(--spacing) * 2); }
  .hero-results [data-slot="item-media"] { display: none; }
  .hero-results .hit-brand { white-space: nowrap; font-size: var(--text-xs); }
  /* "+" alone (it is labelled), so the OEM number and the brand fit on their line. */
  .hero-results [data-add] { min-width: calc(var(--spacing) * 11); padding-inline: 0; }
  .hero-search { scroll-margin-top: calc(var(--header-height, calc(var(--spacing) * 14)) + var(--spacing) * 2); }
}
/* Undo the inverted hero button styles inside the light results panel. */
.hero .hero-results [data-slot="button"] { height: calc(var(--spacing) * 8); }
.hero .hero-results [data-variant="outline"] { background: var(--background); color: var(--foreground); border-color: var(--border); }
.hero .hero-results [data-variant="outline"]:hover { background: var(--muted); }
@media (width < 40rem) { .hero .hero-results [data-slot="button"] { height: calc(var(--spacing) * 10); } }
.hero-all { display: inline-flex; align-items: center; gap: calc(var(--spacing) * 2); padding: calc(var(--spacing) * 2); font-size: var(--text-sm); font-weight: 500; }
.hero-all svg { width: calc(var(--spacing) * 4); height: calc(var(--spacing) * 4); }
.hero-none { margin: 0; padding: calc(var(--spacing) * 2); font-size: var(--text-sm); }

/* Home: category tiles show their three most common part types on hover or focus (pointer devices only). */
.cat-types { position: absolute; inset: 0 0 auto; aspect-ratio: 3 / 2; margin: 0; padding: calc(var(--spacing) * 3); list-style: none; display: flex; flex-direction: column; justify-content: flex-end; gap: calc(var(--spacing) * 0.5); background: linear-gradient(to top, oklch(0.16 0.02 255 / 0.85), oklch(0.16 0.02 255 / 0) 85%); color: var(--hero-foreground); font-size: var(--text-xs); font-weight: 500; pointer-events: none; opacity: 0; }
.cat-types li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: none) { .cat-types { display: none; } }
.cat-card:is(:hover, :focus-within) .cat-types { opacity: 1; }

/* Inquiry: three-step progress at the top of the form. */
.progress-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(var(--spacing) * 2); font-size: var(--text-sm); color: var(--muted-foreground); }
/* Each step links to its section (G19). */
.progress-steps a { display: grid; gap: calc(var(--spacing) * 1.5); min-height: calc(var(--spacing) * 11); align-content: start; padding-top: calc(var(--spacing) * 1); color: inherit; text-decoration: none; border-radius: var(--radius-sm); }
.progress-steps a:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
/* Done: check and full bar; current: bold with a tinted bar; upcoming: muted. */
.progress-steps li[data-done="true"] { color: var(--foreground); }
.progress-steps li[aria-current="step"] { color: var(--foreground); font-weight: 600; }
.step-label { display: flex; align-items: center; gap: calc(var(--spacing) * 1); }
.step-check { width: calc(var(--spacing) * 4); height: calc(var(--spacing) * 4); flex: none; color: var(--primary); }
li:not([data-done="true"]) .step-check { display: none; }
[aria-current="step"] .step-bar { background: var(--step-current); }
.step-bar { position: relative; height: calc(var(--spacing) * 1); border-radius: var(--radius-sm); background: var(--muted); overflow: hidden; }
.step-bar::after { content: ""; position: absolute; inset: 0; background: var(--primary); transform: scaleX(0); transform-origin: left; }
[data-done="true"] .step-bar::after { transform: none; }

/* Fly-to-inquiry copy: a small thumbnail (a manual popover, so it is drawn above an open dialog). */
.fly { position: fixed; inset: 0 auto auto 0; width: calc(var(--spacing) * 11); height: calc(var(--spacing) * 11); margin: 0; padding: 0; border: 0; border-radius: var(--radius-md); object-fit: cover; background: var(--muted); box-shadow: var(--shadow-lg); pointer-events: none; overflow: hidden; z-index: 60; }

/* Motion (D20). Everything here is off under reduced motion: states change instantly. */
:root { --ease-spring: cubic-bezier(0.3, 1.2, 0.5, 1); }
@supports (transition-timing-function: linear(0, 1)) {
  :root { --ease-spring: linear(0, 0.036, 0.115, 0.219, 0.34, 0.455, 0.563, 0.666, 0.75, 0.821, 0.882, 0.927, 0.961, 0.988, 1.005, 1.016, 1.023, 1.026, 1.027, 1.026, 1.023, 1.02, 1.017, 1.014, 1.011, 1.008, 1.006, 1.004, 1.003, 1.002, 1); }
}
#app-header { view-transition-name: site-header; }
#app-footer { view-transition-name: site-footer; }
@media (prefers-reduced-motion: no-preference) and (width < 40rem) {
  [data-page="catalog"] #app-header, #parts > [data-slot="data-table-toolbar"], #parts > [data-slot="data-table-toolbar"]::before { transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1); }
  /* Hidden parts leave the tab order only after they have faded out; they come back at once. */
  #parts > [data-slot="data-table-toolbar"] :is(#brand-toggle, #cat-chips, #count) { transition: opacity 180ms ease-out, transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1); }
  [data-toolbar="min"] #parts > [data-slot="data-table-toolbar"] :is(#brand-toggle, #cat-chips, #count) { transition: opacity 180ms ease-out, transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s 260ms; }
}
@media (prefers-reduced-motion: no-preference) {
  /* Page changes: header and footer stay put; the old content fades out, then the new content fades and rises a little. */
  @view-transition { navigation: auto; }
  ::view-transition-group(site-header), ::view-transition-group(site-footer), ::view-transition-new(site-header), ::view-transition-new(site-footer) { animation: none; }
  ::view-transition-old(site-header), ::view-transition-old(site-footer) { display: none; }
  ::view-transition-old(root) { animation: 120ms ease-in both vt-fade-out; }
  ::view-transition-new(root) { animation: 240ms cubic-bezier(0.2, 0.8, 0.2, 1) 120ms both vt-rise; }
  /* In-page transitions (catalogue rows, part preview): no page fade, only the named parts move. */
  html[data-vt]::view-transition-old(root) { display: none; }
  html[data-vt]::view-transition-new(root) { animation: none; }
  ::view-transition-group(*) { animation-duration: 320ms; }
  html[data-vt="rows"]::view-transition-group(*) { animation-timing-function: var(--ease-spring); animation-duration: 460ms; }
  html[data-vt="rows"]::view-transition-old(*) { animation-duration: 150ms; }
  /* Facet changes from an open filter menu: the menu stays on top of the moving rows and keeps taking clicks. */
  .facet-menu[data-open] { view-transition-name: facet-menu; }
  html[data-vt="rows"]::view-transition { pointer-events: none; }
  html[data-vt="rows"]::view-transition-group(facet-menu), html[data-vt="rows"]::view-transition-new(facet-menu) { animation: none; }
  html[data-vt="rows"]::view-transition-old(facet-menu) { display: none; }

  .cat-card img { transition: transform 450ms cubic-bezier(0.2, 0.8, 0.2, 1); }
  .thumb-cue > svg { transition: opacity 150ms ease-out; }
  .cat-card:is(:hover, :focus-within) img { transform: scale(1.05); }
  .cat-types { transition: opacity 200ms ease-out, transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1); transform: translateY(calc(var(--spacing) * 2)); }
  .cat-card:is(:hover, :focus-within) .cat-types { transform: none; }
  .step-bar::after { transition: transform 460ms var(--ease-spring); }

  /* Scroll reveals: scroll-driven where supported (else simply visible); home.js marks them revealed once, so they never hide again. */
  @supports (animation-timeline: view()) {
    .reveal:not(.is-revealed) { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry calc(120px + var(--i, 0) * 24px); }
    .cat-card.reveal:not(.is-revealed) { animation-range: entry calc(var(--i, 0) * 24px) entry calc(120px + var(--i, 0) * 24px); }
    .cat-card:nth-child(2n) { --i: 1; }
    @media (min-width: 48rem) { .cat-card:nth-child(3n + 1) { --i: 0; } .cat-card:nth-child(3n + 2) { --i: 1; } .cat-card:nth-child(3n) { --i: 2; } }
    @media (min-width: 64rem) { .cat-card:nth-child(6n + 1) { --i: 0; } .cat-card:nth-child(6n + 2) { --i: 1; } .cat-card:nth-child(6n + 3) { --i: 2; } .cat-card:nth-child(6n + 4) { --i: 3; } .cat-card:nth-child(6n + 5) { --i: 4; } .cat-card:nth-child(6n) { --i: 5; } }
  }
}
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-rise { from { opacity: 0; transform: translateY(calc(var(--spacing) * 2)); } }
@keyframes reveal { from { opacity: 0; transform: translateY(calc(var(--spacing) * 4)); } }

/* Home: X-ray hero. A lens under the pointer shows the same photo as a blueprint. It sits under the scrim,
   so the text column stays as dark as before; home.js moves it with transforms only. */
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.xray-clip { overflow: hidden; pointer-events: none; }
.xray { position: absolute; top: 0; left: 0; width: calc(var(--spacing) * 65); height: calc(var(--spacing) * 65); pointer-events: none; opacity: 0; will-change: transform, opacity; }
.xray.on { opacity: 1; }
.xray-lens { position: absolute; inset: 0; overflow: hidden; border-radius: 50%; mask-image: radial-gradient(closest-side, var(--hero-foreground) calc(100% - calc(var(--spacing) * 3)), transparent); }
.xray-sheet { position: absolute; top: 0; left: 0; will-change: transform; }
.hero .xray-sheet img { width: 100%; height: 100%; object-fit: cover; filter: url(#xray-filter); }
.xray-sheet::after { content: ""; position: absolute; inset: 0; background:
  repeating-linear-gradient(to right, var(--xray-grid) 0 1px, transparent 1px calc(var(--spacing) * 6)),
  repeating-linear-gradient(to bottom, var(--xray-grid) 0 1px, transparent 1px calc(var(--spacing) * 6)); }
.xray::after { content: ""; position: absolute; inset: calc(var(--spacing) * 2); border: 1px solid var(--xray-ring); border-radius: 50%; }

/* Home: turbocharger anatomy. Phones: the whole unit, then one compact row per part; tablets: a 3-column grid.
   From 64rem: an exploded diagram on a 2:1 stage (1 unit = 0.1cqw) around a faint "ghost" of the whole unit,
   scroll-driven when motion is allowed. Every part image sits in the same box (object-fit: contain). */
.anat-stage { display: grid; gap: calc(var(--spacing) * 4); }
.anat-fig { display: grid; gap: calc(var(--spacing) * 4); container-type: inline-size; }
.anat-whole { width: min(100%, 14rem); height: auto; justify-self: center; }
.anat-parts { list-style: none; margin: 0; padding: 0; display: grid; gap: calc(var(--spacing) * 3); }
.anat-part { display: grid; grid-template-columns: calc(var(--spacing) * 20) minmax(0, 1fr); gap: calc(var(--spacing) * 3); align-items: start; }
.anat-part img { width: 100%; height: calc(var(--spacing) * 16); object-fit: contain; padding: calc(var(--spacing) * 2); border-radius: var(--radius-lg); background: var(--muted); }
/* The compressor wheel is tall and narrow: no vertical padding, so it is not a sliver. */
.anat-part:nth-child(2) img { padding-block: 0; }
@media (min-width: 48rem) {
  .anat-whole { width: min(100%, 18rem); }
  .anat-fig { gap: calc(var(--spacing) * 6); }
  .anat-parts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(var(--spacing) * 6) calc(var(--spacing) * 4); }
  .anat-part { grid-template-columns: none; gap: calc(var(--spacing) * 2); align-content: start; }
  .anat-part img { height: calc(var(--spacing) * 24); padding: calc(var(--spacing) * 3); }
}
.anat-part h3 { margin: 0 0 calc(var(--spacing) * 1); font-size: var(--text-sm); font-weight: 600; }
/* The one linked label looks like the others; an arrow marks the link, the underline shows on hover and focus. */
.anat-part h3 a { display: inline-flex; align-items: center; gap: calc(var(--spacing) * 1); color: inherit; text-decoration: none; text-underline-offset: 4px; }
.anat-part h3 a:is(:hover, :focus-visible) { text-decoration: underline; }
.anat-part h3 a svg { width: calc(var(--spacing) * 3.5); height: calc(var(--spacing) * 3.5); flex: none; color: var(--muted-foreground); }
.anat-part p { margin: 0; font-size: var(--text-sm); color: var(--muted-foreground); text-wrap: pretty; }
.anat-cta { justify-self: start; }
@media (min-width: 64rem) {
  /* As wide as the viewport height allows (so the sticky stage fits), but never so narrow that the labels crowd. */
  .anat-fig { display: block; position: relative; width: clamp(min(100%, 56rem), calc((100svh - var(--header-height, calc(var(--spacing) * 14)) - 11rem) * 2), 100%); aspect-ratio: 2 / 1; margin-inline: auto; }
  .anat-cta { justify-self: center; }
  .anat-whole { position: absolute; left: 36cqw; top: 16.5cqw; width: 28cqw; opacity: 0.18; }
  .anat-parts { display: contents; }
  .anat-part { position: absolute; width: 32cqw; translate: 0 -50%; grid-template-columns: minmax(0, 1fr) 12.5cqw; grid-template-areas: "text img"; align-items: center; gap: calc(var(--spacing) * 4); text-align: end; left: 0; }
  .anat-part > div { grid-area: text; }
  .anat-part img, .anat-part:nth-child(n) img { grid-area: img; justify-self: end; height: auto; padding: 0; border-radius: 0; background: none; }
  .anat-part:nth-child(n + 4) { left: auto; right: 0; grid-template-columns: 12.5cqw minmax(0, 1fr); grid-template-areas: "img text"; text-align: start; }
  .anat-part:nth-child(n + 4) img { justify-self: start; }
  .anat-part:is(:nth-child(1), :nth-child(4)) { top: 9.5cqw; }
  .anat-part:is(:nth-child(2), :nth-child(5)) { top: 26cqw; }
  .anat-part:is(:nth-child(3), :nth-child(6)) { top: 42.5cqw; }
  /* Plausible relative sizes: housings largest, the compressor wheel smallest. --dx/--dy: from the slot to where the part sits in the whole unit. */
  .anat-part:nth-child(1) img { width: 12cqw; --dx: 14.7cqw; --dy: 17.95cqw; }
  .anat-part:nth-child(2) img { width: 3.6cqw; --dx: 2.69cqw; --dy: -0.58cqw; }
  .anat-part:nth-child(3) img { width: 10cqw; --dx: 21.84cqw; --dy: -14.18cqw; }
  .anat-part:nth-child(4) img { width: 11.5cqw; --dx: -23.75cqw; --dy: 7.37cqw; }
  .anat-part:nth-child(5) img { width: 11cqw; --dx: -15.38cqw; --dy: -1.31cqw; }
  .anat-part:nth-child(6) img { width: 12.5cqw; --dx: -10.91cqw; --dy: -17.09cqw; }
}

/* Motion for the X-ray lens and the anatomy (D20); none of it under reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .xray { transition: opacity 250ms ease-out; }
  @supports (animation-timeline: view()) {
    .anat-part.reveal:not(.is-revealed) { animation-range: entry calc(var(--i, 0) * 24px) entry calc(120px + var(--i, 0) * 24px); }
    @media (min-width: 48rem) { .anat-part:nth-child(3n + 1) { --i: 0; } .anat-part:nth-child(3n + 2) { --i: 1; } .anat-part:nth-child(3n) { --i: 2; } }
    /* Teardown: the stage sticks while the section scrolls by; the large whole unit shrinks and fades to a ghost
       while the parts fly out of it one by one (left and right in turn), each label appearing as its part lands.
       Short screens, where the stage would not fit, keep the static diagram. */
    @media (min-width: 64rem) and (min-height: 40rem) {
      .anatomy { min-height: 180svh; align-content: start; view-timeline: --anat block; /* Progress 0 = the moment the stage sticks under the header (the section has 24 px padding above it). */
      view-timeline-inset: calc(var(--header-height, calc(var(--spacing) * 14)) - var(--spacing) * 6) 0; }
      .anat-stage { position: sticky; top: var(--header-height, calc(var(--spacing) * 14)); min-height: calc(100svh - var(--header-height, calc(var(--spacing) * 14))); align-content: center; }
      .anat-fig .anat-part.reveal { animation: none; }
      .anat-part:nth-child(1) { --i: 0; } .anat-part:nth-child(4) { --i: 1; } .anat-part:nth-child(2) { --i: 2; }
      .anat-part:nth-child(5) { --i: 3; } .anat-part:nth-child(3) { --i: 4; } .anat-part:nth-child(6) { --i: 5; }
      .anat-whole { animation: anat-whole linear both; animation-timeline: --anat; animation-range: contain 0% contain 60%; animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
      .anat-part img { animation: anat-fly linear both; animation-timeline: --anat; animation-range: contain calc(4% + var(--i) * 9%) contain calc(24% + var(--i) * 9%); animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1); }
      .anat-part > div { animation: anat-label linear both; animation-timeline: --anat; animation-range: contain calc(24% + var(--i) * 9%) contain calc(32% + var(--i) * 9%); animation-timing-function: ease-out; }
      /* Keyboard focus inside the section shows the finished diagram, so a focused link is never invisible. */
      .anatomy:focus-within :is(.anat-whole, .anat-part img, .anat-part > div) { animation: none; }
    }
  }
}
@keyframes anat-whole { from { transform: scale(1.7); opacity: 1; } }
@keyframes anat-fly { from { transform: translate(var(--dx), var(--dy)) scale(0.5); opacity: 0; } 30% { opacity: 1; } }
@keyframes anat-label { from { opacity: 0; transform: translateY(calc(var(--spacing) * 2)); } }

/* Brand cards: the makers' marks in greyscale (identify fitment, not a partnership; trademark note in the footer). */
.brand-logo { width: calc(var(--spacing) * 12); height: calc(var(--spacing) * 12); display: grid; place-items: center; flex: none; }
.brand-logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; filter: grayscale(1) invert(0.22); }
.brand-logo img[data-brand="audi"] { width: 100%; }
/* Flat dark marks: inverted on the dark theme (overrides the general photo dimming). */
[data-theme="dark"] .brand-logo img { filter: grayscale(1) invert(0.85); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-logo img { filter: grayscale(1) invert(0.85); } }

/* Part preview: a plain dim overlay instead of the kit's full-page backdrop blur (blur over a long table is expensive). */
#part-dialog [data-slot="dialog-content"]::backdrop { backdrop-filter: none; background: oklch(0 0 0 / 0.45); }
/* Honeypot for bots (worker/src/validate.js drops inquiries that fill it): off screen, out of the tab order. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* Bulk paste dialog: wider than the default so part names and quantities fit on one row. */
.bulk-dialog { width: min(40rem, calc(100vw - 2rem)); max-width: none; }
.bulk-body { display: grid; gap: calc(var(--spacing) * 3); }
.bulk-status { margin: 0; font-size: var(--text-sm); font-weight: 500; }
.bulk-preview { display: grid; gap: calc(var(--spacing) * 3); }
.bulk-preview:empty { display: none; }
.bulk-preview .qty { width: calc(var(--spacing) * 16); }
.bulk-unmatched { font-size: var(--text-sm); color: var(--muted-foreground); }
.bulk-unmatched p { margin: 0 0 calc(var(--spacing) * 1); }
.bulk-unmatched ul { margin: 0; padding-left: calc(var(--spacing) * 5); color: var(--foreground); }
/* WhatsApp / Viber under the inquiry summary. */
.chat-line { margin: 0; padding-inline: calc(var(--spacing) * 4); font-size: var(--text-sm); color: var(--muted-foreground); }
.chat-links { display: inline-flex; flex-wrap: wrap; gap: calc(var(--spacing) * 1) calc(var(--spacing) * 3); }
.chat-links a { display: inline-flex; align-items: center; gap: calc(var(--spacing) * 1.5); color: var(--foreground); font-weight: 500; }
.chat-links svg { width: calc(var(--spacing) * 4); height: calc(var(--spacing) * 4); }

/* Phones, after the base rules they override. */
@media (width < 40rem) {
  /* G20: small grey text in sunlight: 14 px and a stronger grey. */
  :is(.line-fits, .hit-fits, .section-head p, #inquiry [data-slot="field-description"], .steps p, .anat-part p, [data-slot="card-description"]) { font-size: var(--text-sm); color: var(--wordmark-muted); }
  /* G21: contact links in an even 2-column grid; legal links look like links. */
  .footer-contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; gap: 0 calc(var(--spacing) * 4); }
  .footer-contact > :is([href^="tel"], [href^="mailto"]) { grid-column: 1 / -1; }
  .footer-links a { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--border); display: inline-flex; align-items: center; }
  /* G5: the send bar names the next step, so the three-step progress is left out; the list starts sooner. */
  #progress { display: none; }
  /* G9: the quantity box joins its group (no darker inner frame); checkboxes show a 24 px box (the hit area stays 44 px). */
  [data-slot="button-group"] > .qty { border-color: var(--border); }
  [data-slot="checkbox"] { width: calc(var(--spacing) * 6); height: calc(var(--spacing) * 6); }
  [data-slot="checkbox"] svg { width: calc(var(--spacing) * 4); height: calc(var(--spacing) * 4); }
  [data-slot="checkbox"]::after { inset: calc(var(--spacing) * -2.5); }
  /* G23: the error summary as 44 px rows. G3: the count, one button to the first field, the list folded under it. */
  .error-links { padding-left: 0; list-style: none; }
  .error-links a { display: flex; align-items: center; min-height: calc(var(--spacing) * 11); text-underline-offset: 4px; }
  #errors-first { width: 100%; margin-top: calc(var(--spacing) * 2); }
  .errors-more > summary { display: flex; align-items: center; gap: calc(var(--spacing) * 1.5); min-height: calc(var(--spacing) * 11); list-style: none; cursor: pointer; font-weight: 500; color: var(--foreground); }
  .errors-more > summary::-webkit-details-marker { display: none; }
  .errors-more > summary svg { width: calc(var(--spacing) * 4); height: calc(var(--spacing) * 4); }
  .errors-more[open] > summary svg { rotate: 180deg; }
}
