/* Kigali Parts Finder: one stylesheet for the customer, shop and admin pages.
   Fonts are self-hosted (no requests to other sites) so pages stay light on mobile data. */

@font-face {
  font-family: 'Barlow Condensed';
  src: url('/fonts/barlow-condensed-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('/fonts/barlow-condensed-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #F3F6F7;
  --surface: #FFFFFF;
  --ink: #10283B;
  --ink-2: #4A5B68;
  --line: #D5DDE2;
  --blue: #0F4C81;
  --yellow: #F5B700;
  --yellow-press: #DDA400;
  --green: #14804A;
  --green-bg: #E4F4EB;
  --amber: #A4470F;
  --amber-bg: #FCEBDD;
  --danger: #B3261E;
  --radius: 8px;
  --font-display: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--font-body);
}
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--blue); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.wrap-wide { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
main { padding-bottom: 56px; }

/* ---------- header, banner, footer ---------- */

.demo-banner {
  background: #FFF3C4;
  border-bottom: 2px dashed #B98A00;
  padding: 8px 16px;
  font-size: 14px;
  text-align: center;
}
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px;
  padding-top: 18px; padding-bottom: 18px;
}
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(20px, 6vw, 24px);
  white-space: nowrap; color: var(--ink); text-decoration: none; letter-spacing: 0.01em;
}
/* The circular car badge that sits before the "Vinzuu" wordmark in every nav/header: navy fill,
   yellow ring, white car silhouette. It carries its own background, so it reads the same self-
   contained "seal" on the dark marketing nav and the light console header alike -- the same mark
   as the favicon, just larger. */
.brand-mark { width: 42px; height: 42px; flex: none; }
.nav-link { font-size: 15px; }
.site-footer { color: var(--ink-2); font-size: 14px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }

/* ---------- type ---------- */

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(36px, 9.5vw, 52px); margin: 18px 0 20px; }
h2 { font-size: 30px; margin-bottom: 8px; }
h3 { font-size: 22px; }
p { margin: 0 0 12px; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }

/* ---------- the plate: the interface's signature element ---------- */

.plate {
  display: flex; align-items: stretch; min-width: 0;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 0 var(--ink);
}
.plate-strip {
  background: var(--blue); color: #fff;
  display: flex; align-items: flex-end; justify-content: center;
  width: 42px; padding-bottom: 6px;
  font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: 0.06em;
}
/* Selector is deliberately more specific than the generic input[type='text'] rule below. */
.plate .plate-input {
  flex: 1; min-width: 0; width: auto; min-height: 0;
  border: 0; border-radius: 0; background: transparent;
  padding: 8px 14px;
  font: 700 clamp(38px, 12vw, 60px)/1.1 var(--font-display);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink);
}
.plate .plate-input::placeholder { color: #B7C3CB; }
.plate .plate-input:focus, .plate .plate-input:focus-visible { outline: none; }
.plate:focus-within { outline: 3px solid var(--yellow); outline-offset: 3px; }
.plate-sm { border-width: 2px; border-radius: 7px; box-shadow: 0 2px 0 var(--ink); display: inline-flex; flex: none; }
.plate-sm .plate-strip { width: 26px; font-size: 11px; padding-bottom: 3px; }
.plate-sm .plate-text {
  font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1;
  letter-spacing: 0.08em; padding: 6px 10px 5px;
}

.plate-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }

/* ---------- the VIN box: the only thing that finds a car. Same signature treatment as
   .plate above (same border/shadow/focus language), but labelled VIN and sized for 17
   characters instead of a short plate. ---------- */

.vinbox {
  display: flex; align-items: stretch; min-width: 0;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 0 var(--ink);
}
.vinbox-tag {
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  width: 54px; flex: none;
  font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.06em;
}
/* Selector is deliberately more specific than the generic input[type='text'] rule below. */
.vinbox .vinbox-input {
  flex: 1; min-width: 0; width: auto; min-height: 0;
  border: 0; border-radius: 0; background: transparent;
  padding: 10px 12px;
  font: 700 clamp(18px, 5.6vw, 28px)/1.2 var(--font-display);
  letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink);
}
.vinbox .vinbox-input::placeholder { color: #B7C3CB; }
.vinbox .vinbox-input:focus, .vinbox .vinbox-input:focus-visible { outline: none; }
.vinbox:focus-within { outline: 3px solid var(--yellow); outline-offset: 3px; }
.vinbox-sm { border-width: 2px; border-radius: 7px; box-shadow: 0 2px 0 var(--ink); display: inline-flex; flex: none; }
.vinbox-sm .vinbox-tag { width: 34px; font-size: 10px; }
.vinbox-sm .vinbox-text {
  font-family: var(--font-display); font-weight: 700; font-size: 14px; line-height: 1;
  letter-spacing: 0.03em; padding: 6px 8px 5px;
}
.vinbox-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
/* The VIN as shown back on the registration form: already typed and matched, so it is
   presented as a fact, not an editable field. */
.vin-locked {
  margin: 0; padding: 8px 12px;
  background: #F3F6F8; border-radius: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: 0.04em;
  color: var(--ink);
}

/* ---------- buttons and form controls ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  font: 600 16px/1 var(--font-body);
  border-radius: var(--radius); border: 2px solid var(--ink);
  cursor: pointer; text-decoration: none; color: var(--ink); background: #fff;
}
.btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--yellow); }
.btn-primary:hover:not([disabled]) { background: var(--yellow-press); }
.btn-secondary:hover:not([disabled]) { background: #EEF3F5; }
/* A button that reads as an inline text link, for small optional actions inside a sentence. */
.btn-link {
  border: 0; background: none; padding: 0; font: inherit; color: var(--blue);
  text-decoration: underline; cursor: pointer;
}
.btn-link:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.btn-quiet {
  border-color: transparent; background: transparent; color: var(--blue);
  text-decoration: underline; padding: 0 8px; min-height: 44px;
}
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-quiet.flush { padding-left: 0; }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn-block { width: 100%; }

fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
legend { font-weight: 600; font-size: 15px; padding: 0; margin-bottom: 6px; }
label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.field .hint { color: var(--ink-2); font-size: 14px; margin: 4px 0 0; }
input[type='text'], input[type='email'], input[type='tel'], input[type='number'], input[type='password'],
input[type='search'], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  font: 16px/1.3 var(--font-body); color: var(--ink);
  background: #fff; border: 1.5px solid #7C8B96; border-radius: var(--radius);
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; }
textarea { min-height: 84px; }
.row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 480px) { .row.stack-sm { grid-template-columns: 1fr; } }

.status { min-height: 1.5em; margin: 10px 0 0; color: var(--ink-2); }
.status.error { color: var(--danger); font-weight: 600; }
.status.ok { color: var(--green); font-weight: 600; }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px; margin-top: 18px;
}

/* ---------- vehicle bar ---------- */

.vehicle-bar {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 12px;
  padding: 14px 0; margin-top: 8px;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line);
  animation: settle 0.22s ease-out;
}
.vehicle-bar .plate-sm { grid-column: 1; grid-row: 1; }
.vehicle-bar .btn-quiet { grid-column: 2; grid-row: 1; justify-self: end; }
.vehicle-text { grid-column: 1 / -1; grid-row: 2; min-width: 0; }
.vehicle-text strong { display: block; font-size: 20px; line-height: 1.25; }
.vehicle-text span { color: var(--ink-2); font-size: 15px; }
@keyframes settle { from { transform: translateY(-6px); opacity: 0.4; } to { transform: none; opacity: 1; } }

/* ---------- part picker ---------- */

.picker { margin-top: 22px; }
.part-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
@media (max-width: 380px) { .part-list { grid-template-columns: 1fr; } }
.part-btn {
  width: 100%; min-height: 52px; padding: 8px 12px; text-align: left;
  font: 600 16px/1.2 var(--font-body); color: var(--ink);
  background: #fff; border: 1.5px solid var(--ink-2); border-radius: var(--radius); cursor: pointer;
}
.part-btn:hover { background: #EEF3F5; }
.part-btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.part-btn[aria-pressed='true'] { background: var(--ink); color: #fff; border-color: var(--ink); }
.part-btn { display: flex; align-items: center; gap: 10px; }
.part-thumb { width: 44px; height: 44px; flex: none; object-fit: cover; border-radius: 6px; background: #E4EAEE; }

/* ---------- make logos and what the VIN told us ---------- */

.make-logo { width: 28px; height: 28px; vertical-align: -6px; margin-right: 8px; }
.make-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 420px) { .make-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.make-tile {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 72px; margin: 0; padding: 10px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer;
}
.make-tile:hover { border-color: var(--ink-2); }
.make-tile img { width: 44px; height: 44px; object-fit: contain; }
.make-tile .make-name { font-size: 14px; font-weight: 600; text-align: center; }
.make-radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
.make-tile:has(.make-radio:checked) { border: 2.5px solid var(--ink); background: #F3F6F8; box-shadow: inset 0 -4px 0 var(--yellow); }
.make-tile:has(.make-radio:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
.make-tiles + select + input { margin-top: 10px; }
.vin-decoded .hint { margin: 8px 0 4px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; }
.fact {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 10px;
  background: #EAF0F5; color: var(--ink); border-radius: 999px; font-size: 14px; font-weight: 600;
}
.fact-logo { width: 22px; height: 22px; }

/* ---------- results ---------- */

#results { margin-top: 32px; }
.controls { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 14px 0 6px; }
.seg { display: inline-flex; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.seg button {
  min-height: 42px; padding: 0 14px; border: 0; background: #fff; color: var(--ink);
  font: 600 15px/1 var(--font-body); cursor: pointer;
}
.seg button + button { border-left: 2px solid var(--ink); }
.seg button[aria-pressed='true'] { background: var(--ink); color: #fff; }
.seg button:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.controls select { width: auto; min-height: 42px; }

.note-box {
  border-left: 5px solid var(--amber); background: var(--amber-bg);
  padding: 10px 14px; margin: 12px 0; border-radius: 0 var(--radius) var(--radius) 0; font-size: 15px;
}
.how-badges { margin: 8px 0 0; font-size: 15px; }
.how-badges summary { cursor: pointer; color: var(--blue); min-height: 32px; }
.how-badges div { margin: 8px 0; }

.results { list-style: none; margin: 14px 0 0; padding: 0; border-top: 2px solid var(--ink); }
.result {
  display: grid; grid-template-columns: 88px 1fr auto; gap: 2px 14px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.result .photo { grid-row: 1 / span 3; width: 88px; height: 88px; object-fit: cover; border-radius: 6px; background: #E4EAEE; }
.result .shop { font-weight: 700; font-size: 17px; line-height: 1.25; }
.result .price { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1; text-align: right; white-space: nowrap; }
.result .price small { font-family: var(--font-body); font-weight: 600; font-size: 13px; color: var(--ink-2); }
.result .meta { grid-column: 2 / span 2; color: var(--ink-2); font-size: 14px; }
.result .badge-row { grid-column: 2 / span 2; margin-top: 4px; }
.result .actions { grid-column: 1 / span 3; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px; border-radius: 999px; font-weight: 600; font-size: 14px; line-height: 1.3;
}
.badge svg { width: 18px; height: 18px; flex: none; }
.badge-verified_genuine { background: var(--green); color: #fff; border: 1.5px solid var(--green); }
.badge-verified_compatible { background: var(--green-bg); color: var(--green); border: 1.5px solid var(--green); }
.badge-unverified { background: var(--amber-bg); color: var(--amber); border: 1.5px dashed var(--amber); }
.badge-universal { background: #EAF0F5; color: var(--blue); border: 1.5px solid var(--blue); }

.empty { padding: 20px 0; }

/* ---------- dialog ---------- */

dialog {
  border: 0; border-radius: 14px; padding: 0; color: var(--ink);
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px);
}
dialog::backdrop { background: rgba(16, 40, 59, 0.6); }
.dialog-body { padding: 20px; overflow: auto; max-height: calc(100vh - 24px); }
.garage-option {
  display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start;
  padding: 12px; border: 1.5px solid #7C8B96; border-radius: var(--radius); margin-bottom: 8px; cursor: pointer;
}
.garage-option:has(input:checked) { border-color: var(--ink); background: #F1F6FA; box-shadow: inset 0 0 0 1px var(--ink); }
.garage-option input { width: 20px; height: 20px; margin-top: 2px; }
.garage-option { font-weight: 400; }
.garage-option strong { display: block; font-weight: 700; }
.garage-option .sub { display: block; font-weight: 400; }
.dialog-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- shop and admin consoles ---------- */

.console-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 18px; border-bottom: 2px solid var(--ink); }
.tabs button {
  min-height: 44px; padding: 0 16px; border: 2px solid var(--ink); border-bottom: 0;
  border-radius: 8px 8px 0 0; background: #fff; font: 600 15px/1 var(--font-body); cursor: pointer; color: var(--ink);
}
.tabs button[aria-selected='true'] { background: var(--ink); color: #fff; }
.tabs button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.data { border-collapse: collapse; width: 100%; font-size: 14px; }
table.data th, table.data td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: #EAF0F5; font-weight: 700; white-space: nowrap; }
table.data td.num { text-align: right; }
table.data input, table.data select { min-height: 38px; padding: 6px 8px; font-size: 14px; }
.stat-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 20px; }
.stat { border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 10px 14px; background: #fff; }
.stat b { display: block; font-family: var(--font-display); font-size: 34px; line-height: 1; }
.stat span { color: var(--ink-2); font-size: 14px; }
.thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; background: #E4EAEE; }
.photo-preview { width: 140px; height: 140px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); margin-top: 8px; background: #E4EAEE; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1.5px solid var(--ink-2); }
.tag-HIGH { border-color: var(--green); color: var(--green); }
.tag-MEDIUM { border-color: var(--blue); color: var(--blue); }
.tag-LOW { border-color: var(--amber); color: var(--amber); border-style: dashed; }

.auth-body { position: relative; padding: 28px 28px 20px; }
.auth-card { width: 100%; }
.auth-title { font: 800 28px/1.15 var(--font-body); letter-spacing: -0.01em; margin: 0 0 6px; }
.auth-title:focus { outline: none; }
.auth-sub { color: var(--ink-2); margin: 0 0 22px; }
.auth-x {
  position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink-2); cursor: pointer; display: grid; place-items: center;
}
.auth-x:hover { background: #EEF3F5; color: var(--ink); }
.auth-x:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; }
.auth-x svg { width: 20px; height: 20px; }

#oauth-buttons { display: grid; gap: 12px; }
.google-slot { display: flex; justify-content: center; min-height: 48px; }
.btn-oauth { min-height: 50px; border-radius: 10px; font-weight: 600; gap: 10px; }
.btn-oauth svg { width: 20px; height: 20px; flex: none; }
.btn-google { border: 1px solid var(--line); background: #fff; color: #1F1F1F; }
.btn-google:hover { background: #F7F9FA; }
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 18px; color: var(--ink-2); font-size: 13px; letter-spacing: 0.02em; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.divider[hidden] { display: none; }

.input-icon { position: relative; }
.input-icon > svg { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: #6B7B87; pointer-events: none; }
.input-icon input { padding-left: 44px; border: 1px solid var(--line); border-radius: 10px; min-height: 50px; }
.input-icon input::placeholder { color: #8695A0; }
.input-icon.has-eye input { padding-right: 48px; }
.eye {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px;
  border: 0; border-radius: 8px; background: transparent; color: #6B7B87; cursor: pointer; display: grid; place-items: center;
}
.eye:hover { color: var(--ink); }
.eye:focus-visible { outline: 3px solid var(--blue); outline-offset: 0; }
.eye svg { width: 20px; height: 20px; }
#auth-dialog .btn-primary { min-height: 50px; border-radius: 10px; margin-top: 6px; }

label .optional { font-weight: 400; color: var(--ink-2); }
.auth-switch { text-align: center; color: var(--ink-2); margin: 6px 0 0; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--blue); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
.auth-skip { text-align: center; font-size: 14px; margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 480px) { .auth-body { padding: 24px 18px 16px; } .auth-title { font-size: 24px; } }

.my-cars { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.my-cars .hint { flex-basis: 100%; margin: 0; }
.my-car { display: inline-flex; align-items: center; gap: 8px; }
.my-car .make-logo { width: 22px; height: 22px; margin: 0; vertical-align: 0; }
/* Author styles always beat the browser's own button chrome, so this only needs to clear the
   parts a <button> adds that <span> (the plate pill's original element) did not have. The
   border, radius and shadow still come from .plate / .plate-sm below, unchanged. */
button.plate-sm { background: none; padding: 0; font: inherit; cursor: pointer; }
.header-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.header-actions .nav-link { white-space: nowrap; }

/* ---------- marketing nav (welcome / about / contact) ---------- */

.site-nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(16, 40, 59, 0.97); backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 16px; max-width: 1040px; margin: 0 auto; }
.nav-logo {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: 0.01em;
  color: #fff; text-decoration: none; white-space: nowrap;
}
.nav-links { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: #D7E2EA; text-decoration: none; font-size: 15px; font-weight: 600; }
.nav-links a:hover, .nav-links a:focus-visible { color: #fff; }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-cta .btn { min-height: 40px; padding: 0 18px; border-radius: 999px; }
.nav-cta .btn-ghost { border-color: rgba(255,255,255,0.4); color: #fff; background: transparent; }
.nav-cta .btn-ghost:hover { background: rgba(255,255,255,0.08); }
.nav-cta .btn-primary { border-color: var(--yellow); font-weight: 700; }
.nav-user { display: inline-flex; align-items: center; gap: 9px; color: #fff; padding: 0 4px; min-width: 0; }
.nav-avatar { position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--yellow); color: var(--ink); display: flex; align-items: center; justify-content: center; font: 700 17px/1 var(--font-display); }
.nav-online { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: #22C55E; border: 2px solid var(--ink); }
.nav-user-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.nav-user-name { font-weight: 700; font-size: 14.5px; max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user-status { font-size: 12px; color: #86EFAC; font-weight: 600; }
.nav-avatar-mini { display: none; }
@media (max-width: 760px) { .nav-avatar-mini { display: flex; margin-left: auto; margin-right: 10px; } }
.nav-toggle {
  display: none; border: 1.5px solid rgba(255,255,255,0.4); background: transparent; color: #fff;
  border-radius: 7px; width: 42px; height: 40px; cursor: pointer; font-size: 20px; line-height: 1;
}
.nav-links-wrap { display: flex; align-items: center; gap: 28px; }

@media (max-width: 760px) {
  .nav-links-wrap {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #10283B; border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-direction: column; align-items: stretch; gap: 0; padding: 6px 16px 14px;
  }
  .nav-links-wrap.open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links a { display: block; padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .nav-cta { flex-direction: column; align-items: stretch; padding-top: 10px; }
  .nav-cta .btn { width: 100%; }
  .nav-user { padding: 4px 0 6px; }
  .nav-toggle { display: block; }
}

/* ---------- homepage: photo hero, VIN finder card, parts marquee, garages ---------- */

.home-hero {
  position: relative; color: #fff; text-align: center;
  background:
    linear-gradient(180deg, rgba(8,18,28,0.72) 0%, rgba(8,18,28,0.62) 55%, rgba(8,18,28,0.88) 100%),
    url('/img/home/hero-engine.jpg') center 55% / cover no-repeat,
    var(--ink);
  padding: 96px 16px 150px;
}
.home-hero-inner { max-width: 960px; margin: 0 auto; }
.home-kicker {
  display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: clamp(15px, 2vw, 19px);
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--yellow);
}
.home-hero h1 {
  color: #fff; font-size: clamp(42px, 8.4vw, 88px); line-height: 0.98; margin: 18px auto 22px;
  letter-spacing: -0.01em; text-shadow: 0 4px 24px rgba(0,0,0,0.45); text-wrap: balance;
}
.home-lead { color: #E3EBF0; font-size: clamp(16px, 2.2vw, 19px); line-height: 1.6; max-width: 56ch; margin: 0 auto 30px; }
.home-hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.home-hero-ctas .btn, .partner-ctas .btn { min-height: 52px; padding: 0 28px; border-radius: 999px; font-weight: 700; }
.home-hero-ctas .btn-primary, .partner-ctas .btn-primary { border-color: var(--yellow); }
.btn-onphoto { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.55); }
.btn-onphoto:hover { background: rgba(255,255,255,0.16); }
.home-facts { list-style: none; margin: 44px auto 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 40px; }
.home-facts li { font-size: 14px; color: #B9C9D3; max-width: 22ch; line-height: 1.4; }
.home-facts strong { display: block; color: #fff; font-family: var(--font-display); font-size: 19px; letter-spacing: 0.01em; }

/* The finder card overlaps the bottom of the photo, so the search is the first thing below the fold. */
.finder { position: relative; z-index: 2; padding: 0 16px; margin-top: -88px; }
.finder-card {
  max-width: 1040px; margin: 0 auto; background: #fff; border-radius: 18px;
  box-shadow: 0 18px 50px rgba(16,40,59,0.18), 0 2px 0 rgba(16,40,59,0.06);
  display: grid; grid-template-columns: 1.25fr 1fr; overflow: hidden;
}
.finder-main { padding: 34px 34px 28px; }
.finder-main h2 { font-size: clamp(28px, 4.6vw, 38px); margin: 0 0 8px; }
.finder-sub { color: var(--ink-2); margin: 0 0 20px; }
.hero-search-row { display: flex; gap: 10px; }
.hero-search-row .vinbox { flex: 1; }
.hero-search-go { flex: none; padding: 0 22px; border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); font-weight: 700; }
.finder-status { color: var(--danger); font-weight: 600; font-size: 14.5px; margin: 10px 0 0; }
.finder-hint { color: var(--ink-2); font-size: 13.5px; margin: 10px 0 0; }
#hs-count { font-variant-numeric: tabular-nums; }
.hero-search .vinbox-input::placeholder { text-transform: none; }
/* The nav is sticky, so in-page links would otherwise land with the heading under it. */
#find, #parts, #how-it-works, #garages { scroll-margin-top: 76px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
#hs-count.done { color: var(--green); font-weight: 700; }

.vin-guide { background: #EEF3F6; padding: 30px 28px; border-left: 1px solid var(--line); }
.vin-guide h3, .vin-howto h3 { font-size: 20px; margin: 0 0 14px; }
.vin-howto { margin: 0 0 22px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.vin-anatomy { display: flex; gap: 4px; margin-bottom: 16px; }
.vin-seg { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vin-seg b {
  font: 700 clamp(17px, 2.3vw, 22px)/1 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  letter-spacing: 0.06em; padding: 9px 7px; border-radius: 6px; background: #fff; color: var(--ink);
  border-bottom: 4px solid; white-space: nowrap;
}
.vin-seg small { font-size: 11.5px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.04em; padding-left: 2px; }
.seg-maker b { border-color: var(--blue); }
.seg-model b { border-color: var(--yellow); }
.seg-serial b { border-color: var(--green); }
.vin-tips { margin: 0 0 12px; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.vin-tips b { color: var(--ink); }
.vin-try { font-weight: 700; font-size: 14.5px; }
.vin-where-pic { margin: 4px 0 14px; }
.vin-where-pic img { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid var(--line); }
.vin-where-pic figcaption { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; }
.vin-steps { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 5px; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.vin-steps b { color: var(--ink); }
.vin-steps li::marker { font-weight: 700; color: var(--ink); }
.vin-where-pic .credit { display: block; font-size: 11.5px; margin-top: 4px; }
.vin-where-pic .credit a { color: inherit; }

@media (max-width: 820px) {
  .finder-card { grid-template-columns: 1fr; }
  .vin-guide { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .home-hero { padding: 56px 16px 120px; }
  .finder-main { padding: 24px 18px 20px; }
  .vin-guide { padding: 22px 18px; }
  .hero-search-row { flex-direction: column; }
  .hero-search-go { min-height: 50px; }
  .home-facts { display: none; } /* keeps the VIN box close to the first screen on phones */
}

/* ---------- shared head for the parts strip and garages ---------- */

.strip-head {
  max-width: 1040px; margin: 0 auto 22px; padding: 0 16px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap;
}
.strip-head h2 { font-size: clamp(26px, 5vw, 34px); margin: 0 0 6px; }
.strip-head p { color: var(--ink-2); margin: 0; max-width: 52ch; }
.strip-all { font-weight: 700; text-decoration: none; white-space: nowrap; }
.strip-all:hover { text-decoration: underline; }

/* ---------- popular parts marquee ---------- */
/* The track holds the cards twice; shifting it by exactly -50% loops seamlessly. Hover or keyboard
   focus pauses it so a "Shop now" button never slides out from under the pointer. */

.parts-strip { padding: 64px 0 40px; }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.marquee-track {
  list-style: none; margin: 0; padding: 6px 0 14px; display: flex; gap: 18px; width: max-content;
  animation: parts-scroll 46s linear infinite;
}
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track, .marquee.paused .marquee-track { animation-play-state: paused; }
@keyframes parts-scroll { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 9px)); } }

.part-card {
  width: 220px; flex: none; background: #fff; border: 1.5px solid var(--line); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.part-card:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: 0 10px 22px rgba(16,40,59,0.12); }
.part-card .pc-photo { aspect-ratio: 10 / 7; background: #fff; overflow: hidden; }
.part-card .pc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.part-card .pc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.part-card h3 { font-size: 20px; margin: 0; }
.part-card .btn { margin-top: auto; min-height: 42px; border-radius: 999px; font-size: 15px; font-weight: 700; }

/* ---------- how it works (kept) ---------- */

.section { padding: 44px 16px; max-width: 1040px; margin: 0 auto; }
.section-head { text-align: center; max-width: 560px; margin: 0 auto 28px; }
.section-head h2 { font-size: clamp(26px, 6vw, 34px); margin: 0 0 8px; }
.section-head p { color: var(--ink-2); margin: 0; }

.steps-row { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.step-item { position: relative; padding-left: 50px; }
.step-item::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--ink); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
}
.step-item h3 { font-size: 19px; margin: 2px 0 6px; }
.step-item p { color: var(--ink-2); font-size: 14.5px; margin: 0; line-height: 1.5; }

/* ---------- garages near you ---------- */

.garages { padding: 48px 0 64px; background: #fff; border-top: 1px solid var(--line); }
.btn-ghost-dark { gap: 8px; border-radius: 999px; border-width: 1.5px; }
.btn-ghost-dark svg { width: 18px; height: 18px; }
.garage-grid {
  max-width: 1040px; margin: 0 auto; padding: 0 16px;
  display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.garage-card { display: flex; flex-direction: column; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; }
.garage-card .gc-photo { position: relative; aspect-ratio: 16 / 10; background: #DCE5EB; }
.garage-card .gc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gc-distance {
  position: absolute; left: 12px; bottom: 12px; background: var(--ink); color: #fff;
  font: 700 14px/1 var(--font-display); letter-spacing: 0.03em; padding: 7px 10px; border-radius: 999px;
}
.garage-card .gc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.garage-card h3 { font-size: 21px; margin: 0; }
.gc-address { color: var(--ink-2); font-size: 14.5px; margin: 0; display: flex; align-items: center; gap: 6px; }
.gc-address svg { width: 16px; height: 16px; flex: none; color: var(--blue); }
.gc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 14px; padding: 0; list-style: none; }
.gc-tags li { font-size: 12.5px; font-weight: 600; background: #EEF3F6; color: var(--ink); padding: 4px 9px; border-radius: 999px; }
.gc-actions { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gc-actions .btn { min-height: 44px; border-radius: 999px; font-size: 15px; font-weight: 700; padding: 0 12px; gap: 6px; }
.gc-actions svg { width: 17px; height: 17px; flex: none; }

/* ---------- partner band ---------- */

.partner-band { background: var(--ink); color: #fff; padding: 52px 16px; }
.partner-inner { max-width: 1040px; margin: 0 auto; text-align: center; }
.partner-band h2 { color: #fff; font-size: clamp(26px, 5vw, 34px); margin: 0 0 8px; }
.partner-band p { color: #C9D6DE; max-width: 52ch; margin: 0 auto 22px; }
.partner-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

@media (prefers-reduced-motion: reduce) {
  /* No auto-scroll: the strip becomes a swipeable row instead. */
  .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .marquee-track { padding-left: 16px; padding-right: 16px; }
  .marquee-track [aria-hidden='true'] { display: none; }
}

/* ---------- marketing footer ---------- */

.site-footer-marketing { background: var(--ink); color: #C9D6DE; padding: 36px 16px 22px; }
.footer-grid { max-width: 1040px; margin: 0 auto; display: grid; gap: 28px; grid-template-columns: 1.3fr 1fr 1fr; }
.footer-grid h4 { color: #fff; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; margin: 0 0 12px; }
.footer-grid p { font-size: 14px; line-height: 1.6; margin: 0; color: #AEC0CB; max-width: 32ch; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-links a { color: #C9D6DE; text-decoration: none; font-size: 14.5px; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  max-width: 1040px; margin: 28px auto 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 13px; color: #8CA0AD; display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between;
}
@media (max-width: 680px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- simple content pages (About, Contact) ---------- */

.content-hero { background: var(--ink); color: #fff; padding: 46px 16px 38px; text-align: center; }
.content-hero h1 { color: #fff; margin: 0 0 8px; font-size: clamp(30px, 7vw, 42px); }
.content-hero p { color: #C9D6DE; max-width: 46ch; margin: 0 auto; }
.content-section { max-width: 760px; margin: 0 auto; padding: 36px 16px; }
.content-section h2 { font-size: 24px; margin: 28px 0 10px; }
.content-section h2:first-child { margin-top: 0; }
.content-section p { line-height: 1.65; margin: 0 0 14px; }
.contact-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 18px; }
.contact-card {
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 20px;
  text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 6px;
}
.contact-card:hover { border-color: var(--blue); }
.contact-card .cc-icon { width: 38px; height: 38px; border-radius: 9px; background: #EAF0F5; color: var(--blue); display: flex; align-items: center; justify-content: center; }
.contact-card .cc-icon svg { width: 20px; height: 20px; }
.contact-card strong { font-size: 16px; }
.contact-card span { color: var(--ink-2); font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- customer "my garage" flow ---------- */

/* 1. Vehicle inquiry */
.inquiry { text-align: left; }
.inquiry h1 { text-align: center; margin: 32px 0 6px; }
.inquiry-sub { text-align: center; color: var(--ink-2); margin: 0 auto 26px; max-width: 46ch; }
.field-label { font-size: 15px; color: var(--ink-2); }
.vin-help { margin-top: 34px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px 20px; }
.vin-help h2 { font-size: 22px; margin: 0 0 8px; }
.vin-help h2 + p { color: var(--ink-2); margin: 0 0 14px; font-size: 15px; }
.vin-help h2:not(:first-child) { margin-top: 26px; }
.vin-anatomy { background: var(--ink); border-radius: 10px; padding: 16px 12px; text-align: center; overflow-x: auto; }
.vin-chars { display: inline-flex; font: 700 clamp(19px, 5.4vw, 28px)/1 var(--font-display); letter-spacing: 0.12em; color: #fff; }
.vin-chars .seg { padding: 6px 1px 10px; }
.vin-chars .seg-wmi { box-shadow: inset 0 -4px 0 var(--yellow); }
.vin-chars .seg-vds { box-shadow: inset 0 -4px 0 #6FB1E8; }
.vin-chars .seg-year { box-shadow: inset 0 -4px 0 #7DDBA3; }
.swatch.seg-wmi { background: var(--yellow); }
.swatch.seg-vds { background: #6FB1E8; }
.swatch.seg-year { background: #7DDBA3; }
.vin-legend { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; font-size: 14.5px; }
.vin-legend li { display: flex; align-items: baseline; gap: 8px; }
.vin-legend strong { white-space: nowrap; }
.swatch { flex: none; width: 14px; height: 4px; border-radius: 2px; transform: translateY(-3px); }
.vin-where { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 560px) { .vin-where { grid-template-columns: 220px 1fr; } }
.vin-where-car { width: 100%; max-width: 280px; height: auto; margin: 0 auto; display: block; }
.vin-places { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 14.5px; }
.vin-places li::marker { font-weight: 700; }
.my-cars { margin-bottom: 18px; justify-content: center; }

/* New car: steps 2 to 4 */
.stepper { list-style: none; display: flex; gap: 6px; margin: 26px 0 18px; padding: 0; counter-reset: none; }
.stepper li { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.stepper li::before { content: ''; height: 4px; border-radius: 2px; background: var(--line); }
.stepper li.done::before { background: var(--blue); }
.stepper li.now::before { background: var(--yellow); }
.stepper li.now { color: var(--ink); }
.st-dot { display: none; }
.step-title { font-size: clamp(28px, 6vw, 36px); margin: 0 0 4px; }

.verify-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px 20px; }
.vv-kicker { margin: 0 0 4px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
.vv-title { font-size: clamp(28px, 6.5vw, 38px); margin: 0 0 16px; }
.vv-vin { margin: 0 0 18px; padding: 12px 14px; background: #F3F6F8; border-radius: 10px; font: 700 clamp(17px, 4.6vw, 22px)/1.2 var(--font-display); letter-spacing: 0.12em; overflow-wrap: anywhere; }
.vv-vin mark { background: none; color: inherit; border-radius: 4px; padding: 1px 0; }
.vv-vin .vv-wmi { box-shadow: inset 0 -4px 0 var(--yellow); }
.vv-vin .vv-year { box-shadow: inset 0 -4px 0 #6FA8DC; }
.vv-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 16px; }
.vv-facts > div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.vv-facts dt { font-size: 13px; color: var(--ink-2); }
.vv-facts dd { margin: 4px 0 0; font: 700 22px/1.15 var(--font-display); }
.vv-from { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-2); }
.vv-maker { display: inline-flex; align-items: center; gap: 8px; }
.vv-logo { width: 30px; height: 22px; object-fit: contain; }
.vv-help { color: var(--ink-2); font-size: 14.5px; margin: 0 0 18px; }
.vv-actions { display: grid; gap: 10px; }
.vv-actions .btn { min-height: 52px; }
@media (min-width: 560px) { .vv-actions { grid-template-columns: 1fr 1fr; } }

.details-form { display: block; }
.from-vin { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--yellow); border-radius: 12px; padding: 14px 16px; margin: 18px 0; }
.fv-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.fv-tag { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.fv-vin { font: 700 16px/1 var(--font-display); letter-spacing: 0.06em; overflow-wrap: anywhere; }
.fv-list { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 12px 0 0; }
.fv-list dt { font-size: 13px; color: var(--ink-2); }
.fv-list dd { margin: 2px 0 0; font-weight: 700; font-size: 17px; }
.group { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 6px 16px 4px; margin: 0 0 16px; min-width: 0; }
.group legend { font: 700 20px/1 var(--font-display); padding: 0 6px; margin-left: -6px; }
.group .field:first-of-type { margin-top: 10px; }
.need { margin-left: 8px; font-size: 12px; font-weight: 600; color: var(--ink-2); background: #EEF2F4; border-radius: 999px; padding: 2px 8px; vertical-align: 2px; }
.need.req { color: var(--blue); background: #E6EEF6; }
.field.invalid select, .field.invalid input { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.field.invalid .make-tiles { outline: 2px solid var(--danger); outline-offset: 4px; border-radius: 10px; }
.form-actions { display: grid; gap: 10px; margin-top: 8px; }
.form-actions .btn { min-height: 52px; }
@media (min-width: 560px) { .form-actions { grid-template-columns: 2fr 1fr; } }

.review-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 14px; }
.rv-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: center; margin-bottom: 8px; }
.rv-title { font-size: clamp(28px, 6.5vw, 38px); margin: 0; }
.review-card .spec-grid { border: 0; padding: 0; margin: 0; }
@media (max-width: 480px) { .rv-top { grid-template-columns: 1fr; } .rv-top .car-figure { order: -1; } }
.cc-logo { width: 54px; height: 40px; object-fit: contain; display: block; margin-bottom: 10px; }
.cc-sub { color: var(--ink-2); margin: 6px 0 0; font-size: 16px; }
.car-art { width: 100%; height: auto; display: block; }

.saved-dialog { max-width: 400px; }
.saved-body { text-align: center; padding: 28px 22px 22px; }
.saved-body h2 { font-size: 30px; margin: 8px 0 6px; }
.saved-body p { color: var(--ink-2); margin: 0 0 20px; }
.saved-icon { display: inline-flex; width: 64px; height: 64px; border-radius: 50%; background: var(--green-bg); color: var(--green); align-items: center; justify-content: center; }
.saved-icon svg { width: 40px; height: 40px; }
.saved-icon svg circle { display: none; }

.spec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 24px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px 18px; margin: 10px 0 24px; }
.spec-grid > div { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #EDF1F3; font-size: 15px; }
.spec-grid dt { color: var(--ink-2); min-width: 104px; }
.spec-grid dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.unit-input { position: relative; }
.unit-input input { padding-right: 48px; }
.unit-input span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-2); font-weight: 600; }

/* 5. My garage: a dark "car passport" band, then the parts that fit, the schedule and shops */
.garage-hero { background: var(--ink); color: #fff; }
.gh-inner { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 28px; align-items: center; padding-top: 30px; padding-bottom: 30px; }
.gh-art { min-width: 0; }
.gh-art .car-figure { max-width: 440px; }
.gh-art .car-art { background: #fff; border-radius: 14px; padding: 18px; }
.gh-art .car-photo { aspect-ratio: 16 / 10; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35); }
.gh-art figcaption { color: #B9C7D2; }
.gh-text { min-width: 0; }
.gh-kicker { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--yellow); }
.gh-title { display: flex; align-items: center; gap: 14px; }
.gh-badge { flex: none; width: 56px; height: 56px; border-radius: 12px; background: #fff; display: flex; align-items: center; justify-content: center; }
.gh-logo { width: 42px; height: 32px; object-fit: contain; }
.gh-title h1 { margin: 0; color: #fff; font-size: clamp(32px, 7vw, 50px); line-height: 1; }
.gh-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 18px; padding: 0; }
.gh-chips li { font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18); }
.gh-stats { display: flex; flex-wrap: wrap; gap: 14px 26px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.gh-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.gh-stat-label { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; color: #B9C7D2; font-weight: 600; }
.gh-stat-value { font: 700 20px/1 var(--font-display); }
.garage-hero .vinbox-text { color: var(--ink); }
.gh-stat .btn-link { color: var(--yellow); font-size: 14px; }
.gh-mileage-form { display: inline-flex; align-items: center; gap: 8px; }
.gh-mileage-form input { width: 130px; min-height: 40px; }
.gh-change { margin-top: 20px; background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.5); }
.gh-change:hover { background: rgba(255, 255, 255, 0.08); }
@media (max-width: 720px) {
  .gh-inner { grid-template-columns: 1fr; gap: 18px; padding-top: 20px; padding-bottom: 24px; }
  .gh-art .car-figure { max-width: none; }
}
.garage-body { padding-top: 8px; }
#results, #picker, #inspection, #shops-near { scroll-margin-top: 84px; }
.g-section { margin-top: 38px; }
.g-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 16px; }
.g-title { font-size: 28px; margin: 0; }
.g-sub { color: var(--ink-2); font-size: 15px; margin: 4px 0 0; }
.g-search { flex: 1 1 260px; max-width: 380px; }
.g-search input { margin: 0; }
.g-more { display: flex; justify-content: center; margin-top: 18px; }
.g-more .btn { min-width: min(320px, 100%); }
.fit-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.fit-card { width: 100%; display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; align-items: center; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; cursor: pointer; color: var(--ink); font: inherit; }
.fit-card:hover { border-color: var(--ink-2); }
.fit-card:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.fit-card[aria-pressed='true'] { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--yellow); }
.fit-card.out .fc-photo { opacity: 0.6; }
.fc-photo { width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: #EEF2F4; display: flex; align-items: center; justify-content: center; }
.fc-photo img { width: 100%; height: 100%; object-fit: cover; }
.fc-photo .pt-initial { font: 700 34px/1 var(--font-display); color: #9FB3C2; }
.fc-body { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.fc-name { font-weight: 700; font-size: 16px; }
.fc-stock { font-size: 14px; color: var(--ink-2); }
.fit-card.out .fc-stock { color: var(--amber); }
.fc-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.fc-tag svg { width: 15px; height: 15px; }
.fc-tag svg circle { display: none; }
.fc-tag.fits { color: var(--green); background: var(--green-bg); }
.fc-tag.close { color: var(--amber); background: var(--amber-bg); }
.fc-tag.std { color: var(--blue); background: #E6EEF6; }
.fc-go { font-size: 26px; color: var(--ink-2); line-height: 1; }
.fit-empty { padding: 14px 0; }
.unlisted { margin-top: 16px; background: #fff; border: 1px dashed var(--line); border-radius: 12px; padding: 12px 16px; }
.unlisted summary { cursor: pointer; font-weight: 600; }
.unlisted-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { font: 600 14px/1 var(--font-body); padding: 9px 12px; border-radius: 999px; border: 1px solid var(--line); background: #F7F9FA; color: var(--ink); cursor: pointer; min-height: 40px; }
.chip-btn[aria-pressed='true'] { border-color: var(--ink); }
#results { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.sched { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.sched-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) 72px; gap: 16px; align-items: center; padding: 14px 16px; border-top: 1px solid #EDF1F3; }
.sched-row:first-child { border-top: 0; }
.sched-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sched-name strong { font-size: 16px; }
.sched-name span { font-size: 14px; color: var(--ink-2); }
.sched-meter { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sched-bar { height: 8px; border-radius: 4px; background: #E6ECF0; overflow: hidden; }
.sched-bar span { display: block; height: 100%; background: var(--blue); border-radius: 4px; }
.sched-meter.due .sched-bar span { background: var(--amber); }
.sched-next { font-size: 13.5px; font-weight: 600; color: var(--blue); }
.sched-meter.due .sched-next { color: var(--amber); }
.sched-next.muted { color: var(--ink-2); font-weight: 500; }
@media (max-width: 560px) {
  .sched-row { grid-template-columns: minmax(0, 1fr) 72px; }
  .sched-row > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
}
.garage-grid.flush { padding: 0; max-width: none; }
.car-figure { margin: 0; width: 100%; }
.car-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; border-radius: 14px; box-shadow: 0 6px 18px rgba(16, 40, 59, 0.18); background: #DCE5EB; }
.car-figure figcaption { font-size: 11.5px; color: var(--ink-2); margin-top: 6px; text-align: right; overflow-wrap: anywhere; }
.car-figure figcaption a { color: inherit; }
.car-figure .car-art { margin: 0 auto; }

/* ---------- ratings and reviews (customer pages, dashboard, admin) ---------- */

.stars { position: relative; display: inline-block; font-size: 15px; line-height: 1; letter-spacing: 1px; vertical-align: -1px; }
.stars-bg { color: #CBD5DC; }
.stars-fg { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; color: #E0A100; }
.rating { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 0; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
.rating:hover .rating-n { text-decoration: underline; }
.rating-n { color: var(--ink-2); }
.rating-none { font-size: 13px; color: var(--ink-2); }
.rating-summary { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.gc-rating { margin: 0 0 6px; }
.shop-rating { margin-top: 3px; }
.review-list { list-style: none; margin: 10px 0 0; padding: 0; }
.review { border-top: 1px solid var(--line); padding: 12px 0; }
.review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-text { margin: 6px 0 0; line-height: 1.5; }
.review-reply { margin: 8px 0 0; padding: 8px 12px; background: #F1F5F8; border-left: 3px solid var(--ink); border-radius: 0 6px 6px 0; font-size: 14px; }
.review-actions { margin-top: 6px; }
.review-summary { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.rs-score { display: grid; justify-items: center; gap: 4px; min-width: 110px; }
.rs-score b { font: 700 46px/1 var(--font-display); }
.rs-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.rs-bars li { display: grid; grid-template-columns: 34px 1fr 26px; gap: 8px; align-items: center; font-size: 14px; }
.rs-bar { height: 8px; background: #E4EAEE; border-radius: 4px; overflow: hidden; }
.rs-bar span { display: block; height: 100%; background: #E0A100; }
.star-pick { display: flex; gap: 6px; margin: 4px 0 14px; }
.star-pick button { width: 48px; height: 48px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-size: 28px; color: #CBD5DC; cursor: pointer; }
.star-pick button.on { color: #E0A100; border-color: #E0A100; background: #FFF8E1; }

/* status pills shared by the dashboard and the admin console */
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; border: 1.5px solid currentColor; }
.pill-new { color: var(--blue); background: #E8F0F8; }
.pill-ok { color: var(--green); background: var(--green-bg); }
.pill-done { color: var(--ink-2); background: #EEF2F4; }
.pill-warn { color: var(--amber); background: var(--amber-bg); }
.pill-off { color: var(--danger); background: #FBE9E7; }

/* ---------- Sell on vinzuu ---------- */

.sell-hero h1 { max-width: 20ch; margin-left: auto; margin-right: auto; }
.sell-hero p { max-width: 56ch; }
.sell-kicker { color: var(--yellow) !important; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 13px; margin-bottom: 8px !important; }
.sell-main { max-width: 860px; }
.sell-steps { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
.sell-steps li { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.sell-steps b { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--yellow); display: grid; place-items: center; font: 700 19px/1 var(--font-display); }
.sell-steps strong { display: block; margin-bottom: 2px; }
.sell-steps span { color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.sell-sides { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; margin-bottom: 18px; }
.sell-side { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--yellow); border-radius: 12px; padding: 16px 18px; }
.sell-side h2 { font-size: 24px !important; margin: 0 0 8px !important; }
.sell-side ul { margin: 0; padding-left: 18px; line-height: 1.55; }
.sell-side li + li { margin-top: 4px; }
.sell-signin { text-align: center; margin: 6px 0 20px !important; }
.apply-form h2 { margin-top: 0 !important; }
.kind-cards { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); margin: 10px 0 12px; }
.kind-card { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; background: #fff; font-weight: 400; margin: 0; }
.kind-card:has(input:checked) { border: 2.5px solid var(--ink); background: #F3F6F8; box-shadow: inset 0 -4px 0 var(--yellow); }
.kind-card input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; }
.kind-card strong { display: block; }
.kind-card small { color: var(--ink-2); font-size: 13px; }
.label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.loc-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.loc-manual { margin-top: 8px; }
.loc-manual summary { cursor: pointer; color: var(--blue); font-weight: 600; font-size: 14px; }
.loc-manual .row { margin-top: 8px; }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 6px 0 14px; }
.check-line input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; }
.apply-done { text-align: center; }
.apply-done:focus { outline: none; }
.auth-business { font-size: 14px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
@media (max-width: 720px) {
  .sell-steps, .sell-sides, .kind-cards { grid-template-columns: 1fr; }
}

/* ---------- Vinzuu Sellers & Garages ---------- */

.biz-header { border-bottom: 1px solid var(--line); }
.biz-brand-sub { font-family: var(--font-body); font-weight: 600; font-size: 15px; color: var(--ink-2); letter-spacing: 0; }
.biz-header-right { display: flex; align-items: center; gap: 14px; }
.biz-user { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.biz-user .nav-avatar { width: 30px; height: 30px; font-size: 15px; }
.biz-user .nav-online { border-color: #fff; }
.biz-login { padding-top: 8px; }
.biz-apply { text-align: center; margin-top: 16px; }
.biz-choose { text-align: center; }
.side-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.side-card { display: grid; justify-items: center; gap: 8px; padding: 26px 18px; background: #fff; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; font: inherit; color: var(--ink); text-align: center; }
.side-card:hover, .side-card:focus-visible { border-color: var(--ink); box-shadow: inset 0 -5px 0 var(--yellow); }
.side-card strong { font: 700 28px/1 var(--font-display); }
.side-card span:last-child { color: var(--ink-2); font-size: 15px; }
.side-icon { width: 58px; height: 58px; border-radius: 50%; background: var(--ink); color: var(--yellow); display: grid; place-items: center; }
.side-icon svg { width: 30px; height: 30px; }
.biz-head { align-items: flex-end; }
.biz-head h1 { margin: 0 0 6px; font-size: clamp(30px, 7vw, 42px); }
.biz-side-label { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.biz-sub { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin: 0; font-size: 14px; }
.biz-verified { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-weight: 700; }
.biz-verified svg { width: 18px; height: 18px; }
.biz-unverified { color: var(--amber); font-weight: 700; }
.biz-head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.seg-wrap { flex-wrap: wrap; margin-bottom: 14px; }
.stat-new { border-color: var(--blue); box-shadow: inset 0 -4px 0 var(--blue); }
.stat-warn { border-color: var(--amber); box-shadow: inset 0 -4px 0 var(--amber); }
.parts-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 4px; }
.parts-tools input[type=search] { flex: 1 1 240px; }
.thumb-btn { border: 0; padding: 0; background: none; cursor: pointer; display: grid; justify-items: center; gap: 4px; font: inherit; color: var(--ink-2); font-size: 13px; }
.part-cell { display: grid; gap: 2px; min-width: 150px; }
.part-desc { color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 34ch; }
.part-cell .link-btn { justify-self: start; }
.price-stock { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; min-width: 210px; }
.ps-field { display: grid; gap: 2px; margin: 0; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.ps-field input { width: 100%; }
.ps-actions { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.detail-photo { display: block; width: 100%; max-height: 300px; object-fit: contain; background: #EEF2F4; border-radius: 10px; margin-bottom: 12px; }
.detail-photo-lg { max-height: 70vh; }
.detail-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 10px; font-size: 15px; }
.detail-list dt { color: var(--ink-2); }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
.detail-desc { line-height: 1.55; white-space: pre-line; }
.fits-list { margin: 6px 0 12px; padding-left: 18px; line-height: 1.5; }
.locked-box { background: #F7F9FA; }
.locked-box h3 { margin-bottom: 4px; }
.job-list { display: grid; gap: 12px; }
.job-card { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.job-requested { border-left-color: var(--blue); }
.job-accepted { border-left-color: var(--green); }
.job-declined { opacity: 0.8; }
.job-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.job-when { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0; font-weight: 700; color: var(--green); }
.job-when svg { width: 18px; height: 18px; }
.job-card h3 { margin: 8px 0 8px; }
.job-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 12px; font-size: 15px; }
.job-facts dt { color: var(--ink-2); }
.job-facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .side-cards { grid-template-columns: 1fr; }
  .review-summary { grid-template-columns: 1fr; gap: 12px; }
  .biz-user-name { display: none; }
  .biz-brand-sub { display: none; }
}

/* ---------- admin: applications, part requests ---------- */

.admin-head-right { display: inline-flex; gap: 12px; align-items: center; }
.todo-box p { margin: 0; }
.todo-box p + p { margin-top: 6px; }
.app-list { display: grid; gap: 14px; margin-bottom: 20px; }
.app-card { display: grid; grid-template-columns: 180px 1fr; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.app-photos { display: grid; gap: 10px; align-content: start; }
.app-photos img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #EEF2F4; }
.app-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.app-body h3 { margin: 8px 0 10px; }
.app-actions { border-top: 1px solid var(--line); padding-top: 12px; }
.decided { margin: 0 0 20px; }
.decided summary { cursor: pointer; font-weight: 700; margin-bottom: 8px; }
.filter-field { max-width: 320px; }
@media (max-width: 640px) { .app-card { grid-template-columns: 1fr; } .app-photos { grid-template-columns: 1fr 1fr; } }

/* ---------- customer: part details, labour prices, my bookings ---------- */

.result .result-desc { grid-column: 2 / span 2; margin: 4px 0 0; font-size: 14px; line-height: 1.45; }
.garage-option .go-rating { font-size: 14px; margin-top: 2px; }
.garage-option .go-price { font-weight: 700; margin-top: 4px; font-size: 14px; }
.booking-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.booking-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.bk-head { display: grid; gap: 2px; margin-bottom: 10px; }
.bk-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bk-side { display: grid; gap: 3px; align-content: start; justify-items: start; background: #F7F9FA; border-radius: 10px; padding: 10px 12px; }
.bk-who { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.bk-side .btn { margin-top: 6px; }
.bk-rated { font-size: 13px; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; margin-top: 4px; }
@media (max-width: 560px) { .bk-sides { grid-template-columns: 1fr; } }
.apply-form .group .row > .field { margin-top: 10px; }
.rating-summary .rs-from { flex-basis: 100%; font-size: 14px; }

/* ---------- account menu (shops, garages and admins switch between places) ---------- */
.acct { position: relative; display: inline-flex; }
.acct-btn {
  display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 4px 8px 4px 4px;
  border: 1.5px solid transparent; border-radius: 999px; background: none; color: inherit; font: inherit; cursor: pointer;
}
.acct-btn:hover, .acct-btn[aria-expanded='true'] { border-color: currentColor; }
.acct-btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.acct-btn .nav-avatar { width: 34px; height: 34px; font-size: 16px; }
.acct-btn-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.acct-btn-name { font-weight: 700; font-size: 14.5px; max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-btn-role { font-size: 12px; opacity: 0.8; font-weight: 600; }
.acct-chev { font-size: 12px; opacity: 0.8; }
.site-nav .acct-btn { color: #fff; }
.site-nav .acct-btn .acct-btn-role { color: #86EFAC; opacity: 1; }
.biz-user .acct-btn .nav-online, .admin-page .acct-btn .nav-online { border-color: #fff; }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: min(320px, calc(100vw - 32px));
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 14px 40px rgba(16, 40, 59, 0.22); padding: 8px; text-align: left;
}
.acct-menu[hidden] { display: none; }
.acct-label { margin: 8px 10px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-2); }
.acct-who { display: flex; align-items: center; gap: 10px; padding: 4px 10px 10px; border-bottom: 1px solid var(--line); }
.acct-who .nav-avatar { width: 38px; height: 38px; }
.acct-who-text { display: flex; flex-direction: column; min-width: 0; }
.acct-who-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.acct-who-text span { font-size: 13px; color: var(--ink-2); }
.acct-portals { list-style: none; margin: 0; padding: 0 0 8px; border-bottom: 1px solid var(--line); }
.acct-portal { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.acct-portal:hover { background: #F1F5F8; }
.acct-portal:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.acct-portal.is-current { background: #EAF0F5; }
.acct-portal-icon { flex: none; width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; }
.acct-portal-icon svg { width: 22px; height: 22px; }
.acct-admin { background: var(--ink); }
.acct-seller { background: var(--yellow); color: var(--ink); }
.acct-customer { background: var(--blue); }
.acct-portal-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.acct-portal-text strong { font-size: 15px; }
.acct-portal-text span { font-size: 13px; color: var(--ink-2); }
.acct-tick { color: var(--green); font-weight: 800; font-size: 18px; }
.acct-signout {
  display: block; width: 100%; margin-top: 6px; padding: 10px; border: 0; border-radius: 10px; background: none;
  color: var(--danger); font: 700 15px/1.2 var(--font-body); text-align: left; cursor: pointer;
}
.acct-signout:hover { background: #FBEDEC; }
@media (max-width: 760px) {
  .site-nav .acct { padding: 4px 0 6px; }
  .site-nav .acct-menu { left: 0; right: auto; }
  .biz-header .acct-btn-text { display: none; }
}
.admin-tag { font-weight: 600; }

/* ---------- admin viewing a business dashboard ---------- */
.view-banner {
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between;
  margin: 12px 0 4px; padding: 12px 14px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 600;
}
.view-banner .btn-secondary { background: #fff; }
.view-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.biz-alert { margin: 10px 0 0; border-color: var(--danger); color: var(--danger); font-weight: 600; }
.biz-pick { padding-top: 8px; }
.pick-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.pick-item {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; width: 100%; padding: 12px 14px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 10px; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
}
.pick-item:hover { border-color: var(--ink); }
.pick-item:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.pick-item .small { grid-column: 2; }

/* ---------- admin: charts, scorecards, filters ---------- */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 14px; }
.chart-card { margin: 0; padding: 14px; }
.chart-card figcaption { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.week-chart { display: block; width: 100%; height: auto; overflow: visible; }
.week-chart .grid { stroke: var(--line); stroke-width: 1; }
.week-chart .axis { stroke: var(--ink-2); stroke-width: 1; }
.week-chart .tick { font: 11px var(--font-body); fill: var(--ink-2); }
.week-chart .bar { fill: var(--blue); }
.week-chart .is-now .bar { fill: #5C8FBF; }
.week-chart .hit { fill: transparent; }
.week-chart .bar-g:hover .hit, .week-chart .bar-g:focus .hit { fill: rgba(15, 76, 129, 0.08); }
.week-chart .bar-g:focus { outline: none; }
.chart-table { margin-top: 6px; font-size: 14px; }
.chart-table summary { cursor: pointer; color: var(--blue); font-weight: 600; }
.bar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.bar-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'label n' 'track track'; gap: 3px 8px; font-size: 14px; }
.bl-label { grid-area: label; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-n { grid-area: n; font-weight: 700; font-variant-numeric: tabular-nums; }
.bl-track { grid-area: track; height: 8px; border-radius: 4px; background: #EAF0F5; }
.bl-bar { display: block; height: 100%; border-radius: 4px; background: var(--blue); }
.downloads { margin: 6px 0 18px; }
.downloads h2 { margin-top: 0; }
.flag-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.flag-row .pill, .inline-pill { font-size: 12px; }
.inline-pill { margin-left: 6px; }
.nowrap { white-space: nowrap; }
.text-warn { color: var(--amber); }
.h2-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.filter-bar input[type=search] { flex: 1 1 220px; }
.filter-bar select { flex: 1 1 170px; max-width: 260px; }
.date-range { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); }
.date-range input { width: auto; }
.report-card.is-closed { opacity: 0.85; }

/* ---------- customer: report a problem ---------- */
.bk-report, .result-report { margin-top: 4px; font-size: 14px; }
.bk-reported { margin-top: 4px; }
.result .actions .result-report { align-self: center; }
.plain-fieldset { border: 0; padding: 0; margin: 0 0 12px; }
.plain-fieldset legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.report-reasons { display: grid; gap: 6px; }
.report-reason { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; }
.report-reason:has(input:checked) { border-color: var(--ink); background: #F3F6F8; }
.report-reason input { width: auto; margin: 0; }
.app-card > .app-body:only-child { grid-column: 1 / -1; }
.report-card .btn-row { margin-top: 10px; }
.part-cell .pill { justify-self: start; }
/* On a phone the account menu already offers the customer site, so the header link steps aside. */
@media (max-width: 760px) { .biz-header-right:has(.acct:not([hidden])) > .nav-link { display: none; } }

/* "Go to" buttons beside Sign out for admins, shops and garages. */
.portal-switch { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.portal-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 12px 4px 4px;
  border: 2px solid var(--ink); border-radius: var(--radius); background: #fff; color: var(--ink);
  font-weight: 700; font-size: 14.5px; text-decoration: none;
}
.portal-link .acct-portal-icon { width: 30px; height: 30px; border-radius: 6px; }
.portal-link .acct-portal-icon svg { width: 18px; height: 18px; }
.portal-link:hover { background: #F1F5F8; }
.portal-link.is-current { background: var(--ink); color: #fff; }
.portal-link:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.admin-head-right, .biz-head-actions { flex-wrap: wrap; justify-content: flex-end; }
#pick-switch .portal-switch { justify-content: center; }

/* Car picker on the post-a-part forms: make, model and generation side by side, stacked on phones. */
.car-selects { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.car-selects select:disabled { opacity: 0.6; }
.import-panel summary { cursor: pointer; }
.import-panel code { font-size: 13px; overflow-wrap: anywhere; }
.import-errors { color: var(--danger, #b42318); margin: 8px 0 0; padding-left: 20px; max-height: 240px; overflow: auto; }
.unlisted-group { margin: 10px 0 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.import-panel { margin-bottom: 24px; }
