:root {
  --bg: #f4f3ef;
  --surface: #ffffff;
  --surface-2: #ecebe6;
  --text: #16181c;
  --muted: #62656c;
  --line: #dcdad3;
  --accent: #e8590c;
  --accent-text: #ffffff;
  --accent-soft: #fdebdf;
  --danger: #c92a2a;
  --ok: #2b8a3e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.04);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --surface: #1a1d22;
    --surface-2: #23272e;
    --text: #eceae4;
    --muted: #9a9ea6;
    --line: #2e333b;
    --accent: #ff7a2e;
    --accent-text: #16181c;
    --accent-soft: #3a2416;
    --danger: #ff6b6b;
    --ok: #69db7c;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
  min-height: 100vh;
}
h1 { font-size: 1.6rem; line-height: 1.2; margin: 8px 0 6px; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; margin: 0 0 8px; }
h3 { font-size: 1.05rem; margin: 0; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .85rem; margin: 8px 0 0; }
.error { color: var(--danger); font-size: .9rem; margin: 8px 0 0; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .85rem;
  max-width: 55vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}

main { max-width: 640px; margin: 0 auto; padding: 16px; }
.tab { display: none; }
.tab.active { display: block; }

/* cards & forms */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin: 0 0 14px; box-shadow: var(--shadow);
}
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 12px 0 6px; }
label:first-child { margin-top: 0; }
input, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
textarea { resize: vertical; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; min-width: 0; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.span2 { grid-column: span 2; }
details summary { cursor: pointer; font-weight: 600; }

.btn {
  font: inherit; font-weight: 600; border-radius: 10px; padding: 11px 16px; cursor: pointer;
  border: 1px solid transparent; white-space: nowrap;
}
.btn.primary { background: var(--accent); color: var(--accent-text); }
.btn.primary:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.small { padding: 6px 10px; font-size: .85rem; }
.btn.block { width: 100%; margin-top: 16px; }
.link { background: none; border: 0; color: var(--muted); font: inherit; font-size: .85rem; text-decoration: underline; cursor: pointer; display: block; margin: 10px auto 0; }

/* vehicle */
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 700; color: var(--accent); }
.vehicle-card h2 { font-size: 1.4rem; margin: 2px 0 10px; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0 0 6px; font-size: .9rem; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }

.recall { border-top: 1px solid var(--line); padding: 10px 0; }
.recall:first-child { border-top: 0; padding-top: 0; }
.recall strong { display: block; color: var(--text); }
.recall p { margin: 4px 0 0; font-size: .9rem; color: var(--muted); }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
.badge.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.badge.warn { background: var(--accent-soft); color: var(--accent); }

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  text-align: left; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; box-shadow: var(--shadow);
}
.tile strong { display: block; }
.tile span { color: var(--muted); font-size: .85rem; }

/* chat */
.chat { display: flex; flex-direction: column; gap: 10px; min-height: 40vh; }
.empty { text-align: center; padding: 24px 0; }
.suggestions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.suggestions button {
  font: inherit; font-size: .92rem; text-align: left; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer;
}
.msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-text); border-bottom-right-radius: 4px; white-space: pre-wrap; }
.msg.assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.error { align-self: center; color: var(--danger); background: transparent; font-size: .9rem; }
.typing { color: var(--muted); font-style: italic; }
.composer {
  position: sticky; bottom: calc(68px + env(safe-area-inset-bottom));
  display: flex; gap: 8px; align-items: flex-end; margin-top: 14px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.composer textarea { border: 0; background: transparent; resize: none; max-height: 140px; padding: 8px; }
.composer textarea:focus { outline: none; }

/* rendered markdown */
.md h2, .md h3, .md h4 { font-size: 1rem; margin: 14px 0 4px; }
.md h2:first-child, .md h3:first-child { margin-top: 0; }
.md p { margin: 0 0 8px; }
.md ul, .md ol { margin: 0 0 8px; padding-left: 20px; }
.md li { margin: 2px 0; }
.md code { background: var(--surface-2); border-radius: 4px; padding: 1px 5px; font-size: .9em; }
.md > :last-child { margin-bottom: 0; }

/* quote */
.upload-box {
  display: block; text-align: center; padding: 22px; border: 2px dashed var(--line); border-radius: 12px;
  color: var(--accent); font-weight: 600; cursor: pointer;
}
.upload-box small { display: block; color: var(--muted); font-weight: 400; }
.upload { margin: 0; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.thumb { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button {
  position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 14px; line-height: 22px; cursor: pointer; padding: 0;
}
.result h2 { font-size: 1.05rem; border-top: 1px solid var(--line); padding-top: 12px; }
.result h2:first-child { border-top: 0; padding-top: 0; }

/* tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
.tabbar button {
  font: inherit; font-size: .85rem; font-weight: 600; color: var(--muted); background: none; border: 0;
  padding: 12px 4px; border-radius: 10px; cursor: pointer;
}
.tabbar button.active { color: var(--accent); background: var(--accent-soft); }

.gate { position: fixed; inset: 0; z-index: 10; background: var(--bg); display: grid; place-items: center; padding: 16px; }
.gate .card { width: 100%; max-width: 380px; }

/* VIN scan buttons */
.scan-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn.scan {
  display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0;
  padding: 14px 8px; background: var(--accent-soft); color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  font-size: .9rem; white-space: normal; text-align: center; line-height: 1.2;
}
.btn.scan svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; margin: 14px 0 10px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.status { color: var(--muted); font-size: .9rem; margin: 8px 0 0; }
.status.warn { color: var(--accent); }

/* scanner overlay */
.scanner { position: fixed; inset: 0; z-index: 20; background: #000; color: #fff; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-frame {
  position: absolute; left: 6%; right: 6%; top: 50%; height: 34%; transform: translateY(-55%);
  border-radius: 16px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.55);
  border: 2px solid rgba(255,255,255,.85); overflow: hidden;
}
.scan-line {
  position: absolute; left: 6%; right: 6%; height: 2px; top: 50%;
  background: #ff7a2e; box-shadow: 0 0 12px #ff7a2e; animation: sweep 1.8s ease-in-out infinite;
}
@keyframes sweep { 0%, 100% { top: 12%; } 50% { top: 88%; } }
@media (prefers-reduced-motion: reduce) { .scan-line { animation: none; } }
.scan-top {
  position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) 16px 0;
}
.round {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0,0,0,.55); color: #fff; font-size: 18px; display: grid; place-items: center;
}
.round svg { width: 22px; height: 22px; fill: currentColor; }
.round.on { background: #ff7a2e; color: #16181c; }
.scan-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; text-align: center;
  padding: 0 24px calc(28px + env(safe-area-inset-bottom));
}
.scan-bottom p { margin: 0 0 14px; font-size: .95rem; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.btn.ghost-light { display: inline-block; background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.35); }

/* maintenance */
.badge.bad { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.maint-list { list-style: none; margin: 0; padding: 0; }
.maint-item { border-top: 1px solid var(--line); }
.maint-item:first-child { border-top: 0; }
.maint-tip { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; margin: 0 0 6px; font-size: .85rem; }
#maintSummary.badge:not(.ok):not(.warn) { background: var(--surface-2); color: var(--muted); }
.maint-item summary {
  font-weight: 400;
  list-style: none; cursor: pointer; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 10px 0;
}
.maint-item summary::-webkit-details-marker { display: none; }
.maint-item.overdue summary strong { color: var(--danger); }
.mi-main { display: flex; flex-direction: column; min-width: 0; }
.mi-main strong { color: var(--text); font-weight: 600; }
.mi-sub { color: var(--muted); font-size: .84rem; }
.mi-done { color: var(--ok); font-size: .84rem; }
.maint-item summary .badge { flex-shrink: 0; margin-top: 2px; }
.mi-body { padding: 0 0 12px; font-size: .92rem; }
.mi-body p { margin: 0 0 8px; color: var(--text); }
.mi-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted) !important; font-size: .85rem; }
.mi-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.link.inline { display: inline; margin: 0; padding: 0; font-size: inherit; }

/* feedback */
.fb { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin: -4px 0 4px 4px; }
.result .fb { margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.fb-q { margin-right: 2px; }
.fb-btn {
  font-size: 1rem; line-height: 1; padding: 6px 9px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line);
}
.fb-btn:hover { border-color: var(--accent); }
.fb-thanks { font-size: .82rem; }
.fb-form { width: 100%; max-width: 88%; }
.result .fb-form { max-width: none; }
.fb-form label { font-weight: 500; font-size: .85rem; margin: 2px 0 6px; color: var(--text); }
.fb-form textarea { font-size: .92rem; margin-bottom: 8px; }
.sheet { background: color-mix(in srgb, #000 45%, transparent); align-items: end; padding: 0; }
.sheet .card { max-width: 520px; margin: 0 auto; border-radius: var(--radius) var(--radius) 0 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
@media (min-width: 600px) { .sheet { align-items: center; padding: 16px; } .sheet .card { border-radius: var(--radius); } }
.round.small-x { width: 34px; height: 34px; font-size: 14px; background: var(--surface-2); color: var(--text); }

/* saved quotes */
.result-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.result-head .hint { margin: 0; }
.quote-note { color: var(--muted); font-size: .9rem; font-style: italic; }
.saved-list { list-style: none; margin: 8px 0 0; padding: 0; }
.saved-list li { display: flex; align-items: stretch; border-top: 1px solid var(--line); }
.saved-list li:first-child { border-top: 0; }
.saved-open {
  flex: 1; min-width: 0; text-align: left; background: none; border: 0; font: inherit; color: var(--text);
  padding: 10px 0; cursor: pointer; display: flex; flex-direction: column;
}
.saved-open strong { font-weight: 600; font-size: .95rem; }
.saved-open span { color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved-del { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 4px 0 12px; font-size: 14px; }

.disclaimer { text-align: center; font-size: .75rem; color: var(--muted); padding: 0 16px 12px; margin: 0; }
[hidden] { display: none !important; }

/* Phone held sideways: ask to turn it upright. Web pages can't fully lock rotation (iPhone Safari
   has no orientation lock at all), so this note covers the app, including the scanner, in landscape. */
.rotate-note { display: none; }
@media (orientation: landscape) and (max-height: 600px) and (pointer: coarse), (orientation: landscape) and (max-height: 600px) and (hover: none) {
  .rotate-note {
    display: grid; position: fixed; inset: 0; z-index: 50; place-items: center; text-align: center;
    background: var(--bg); color: var(--text); padding: 16px;
  }
  .rotate-note svg { width: 48px; height: 48px; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 10px; }
  .rotate-note p { margin: 4px 0; }
  .rotate-note .sub { color: var(--muted); font-size: .9rem; }
}

/* accounts */
.top-actions { display: flex; gap: 6px; min-width: 0; }
.top-actions .chip { max-width: 42vw; }
.chip.acct { flex-shrink: 0; }
.chip.acct.member { border-color: var(--accent); color: var(--accent); }
.plan-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; min-height: 30px; }
.plan-line { color: var(--muted); font-size: .82rem; }
.plan-line button { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.expert-toggle {
  display: inline-flex; align-items: center; gap: 6px; margin: 0; flex-shrink: 0;
  font-size: .82rem; font-weight: 600; padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer;
}
.expert-toggle input { width: auto; margin: 0; accent-color: var(--accent); }
.expert-toggle:has(input:checked) { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.composer { margin-top: 6px; }
.hint.center { text-align: center; }
.plans { list-style: none; padding: 0; margin: 0 0 4px; display: grid; gap: 8px; }
.plans li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: .9rem; }
.plans li strong { display: block; }
.plans li span { color: var(--muted); }
.plans li.pick { border-color: var(--accent); background: var(--accent-soft); }
.plans li.pick span { color: var(--text); }
.usage { display: grid; gap: 10px; margin: 6px 0 4px; }
.meter { font-size: .88rem; }
.meter .top { display: flex; justify-content: space-between; gap: 8px; }
.meter .top span { color: var(--muted); }
.meter .bar { height: 6px; border-radius: 999px; background: var(--surface-2); margin-top: 4px; overflow: hidden; }
.meter .bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.limit-cta { align-self: center; }
.sheet .card { max-height: 92vh; overflow-y: auto; }
/* plan line + Expert switch stay pinned above the tab bar together with the typing box */
.composer-wrap {
  position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 2;
  margin-top: 14px; padding-top: 6px; background: var(--bg);
}
.composer-wrap .plan-bar { margin-top: 0; padding: 0 2px 6px; }
.composer-wrap .composer { position: static; margin-top: 0; }

/* ---------- garage dashboard ---------- */
.hero {
  --hero-text: #f4f3ef; --hero-muted: #a9adb5;
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--accent) 22%, transparent) 0%, transparent 55%), linear-gradient(160deg, #23272e 0%, #15171b 100%);
  color: var(--hero-text); border-color: #2e333b; padding: 18px 16px 12px;
}
.hero .eyebrow { color: #ff8a45; }
.hero h2 { font-size: 1.45rem; line-height: 1.15; margin: 2px 0 4px; letter-spacing: -.01em; }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.hero-name { min-width: 0; }
.hero-sub { color: var(--hero-muted); font-size: .85rem; margin: 0; }
.car-art { flex-shrink: 0; width: 112px; margin: 4px -4px 0 0; color: #ff7a2e; }
.car-art svg { display: block; width: 100%; height: auto; overflow: visible; }
.car-art .body { fill: color-mix(in srgb, currentColor 18%, transparent); stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.car-art .glass { fill: rgba(255,255,255,.14); stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.car-art .wheel { fill: #101216; stroke: #c4c8cf; stroke-width: 2.4; }
.car-art .hub { fill: #c4c8cf; }
.odo { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 0; font-weight: 600; font-size: .85rem; color: var(--hero-muted); }
.odo-box { display: flex; align-items: center; gap: 6px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 0 10px; }
.odo-box input {
  width: 9ch; background: transparent; border: 0; color: #fff; padding: 8px 0; text-align: right;
  font: 700 1.15rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em;
}
.odo-box input::placeholder { color: #7d828b; font: 600 .9rem var(--font); letter-spacing: 0; }
.odo-box input:focus { outline: none; }
.odo-box:focus-within { border-color: #ff7a2e; }
.odo-box i { font-style: normal; color: var(--hero-muted); font-size: .8rem; }
.status-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stat-tile {
  position: relative; font: inherit; color: var(--hero-text); text-align: left; cursor: pointer;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 10px 10px 9px;
}
.stat-tile b { display: block; font-size: 1.2rem; line-height: 1.2; }
.stat-tile small { display: block; color: var(--hero-muted); font-size: .72rem; line-height: 1.25; }
.stat-tile .dot { position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: #5c616a; }
.stat-tile.ok .dot { background: #51cf66; box-shadow: 0 0 8px #51cf66; }
.stat-tile.warn .dot { background: #ff922b; box-shadow: 0 0 8px #ff922b; }
.stat-tile.bad .dot { background: #ff6b6b; box-shadow: 0 0 8px #ff6b6b; }
.stat-tile.bad b { color: #ff8787; }
.stat-tile.ask { background: color-mix(in srgb, #ff7a2e 20%, transparent); border-color: color-mix(in srgb, #ff7a2e 45%, transparent); }
.stat-tile.ask .dot { display: none; }
.stat-tile.ask b { color: #ffa36b; }
.stat-tile:active { transform: scale(.97); }
.hero-more { margin-top: 10px; font-size: .88rem; }
.hero-more summary { color: var(--hero-muted); font-weight: 600; padding: 4px 0; }
.hero-more .specs { margin-top: 8px; }
.hero-more .specs dt { color: var(--hero-muted); }
.hero-more .specs dd { overflow-wrap: anywhere; }
.hero-more .btn.ghost { color: var(--hero-text); border-color: rgba(255,255,255,.2); margin: 6px 0 4px; }

/* recalls */
.recall-intro { font-size: .88rem; color: var(--muted); margin: 0 0 10px; }

.recall-list { list-style: none; margin: 4px 0 0; padding: 0; }
.recall-list .recall { padding: 0; }
.recall-list .recall:first-child { border-top: 1px solid var(--line); }
.recall summary { list-style: none; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 10px 0; font-weight: 400; }
.recall summary::-webkit-details-marker { display: none; }
.rc-main { display: flex; flex-direction: column; min-width: 0; }
.rc-main strong { font-weight: 600; }
.rc-line { color: var(--muted); font-size: .86rem; line-height: 1.4; }
.recall summary .badge { flex-shrink: 0; margin-top: 2px; }
.rc-body { padding: 0 0 12px; }
.rc-body p { margin: 0 0 8px; font-size: .88rem; color: var(--text); }

/* welcome (no vehicle yet) */
.welcome { text-align: center; padding: 8px 8px 16px; }
.welcome .car-art { width: 150px; margin: 4px auto 6px; color: var(--accent); }
.welcome .car-art .wheel { fill: var(--surface); stroke: var(--text); }
.welcome .car-art .hub { fill: var(--text); }
.welcome .car-art .glass { fill: var(--surface); }
.welcome p { color: var(--muted); margin: 0 auto; max-width: 34ch; }
.perks { list-style: none; padding: 0; margin: 18px 0 8px; display: grid; gap: 12px; }
.perks li { display: flex; gap: 12px; align-items: flex-start; }
.perk-ic { flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); font-size: 1.1rem; }
.perks strong { display: block; font-size: .95rem; }
.perks span { color: var(--muted); font-size: .86rem; }

/* ask: empty state */
.ask-badge { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.ask-badge svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#askSub { max-width: 34ch; margin: 0 auto 6px; font-size: .92rem; }
.suggestions button { display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow); }
.suggestions button:active { border-color: var(--accent); }
.sg-ic { flex-shrink: 0; font-size: 1.05rem; }
.sg-q { flex: 1; min-width: 0; }

/* tab bar icons */
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 4px 6px; font-size: .75rem; }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar circle { fill: currentColor; }

/* small motion */
.tab.active { animation: tabIn .18s ease-out; }
@keyframes tabIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tab.active { animation: none; } }

/* recall matching */
.vin-check-box { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin: 0 0 8px; }
.vin-check-box .hint { margin: 6px 0 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .03em; font-weight: 600; color: var(--text); }
.rc-risk { color: var(--danger) !important; }
.rc-group { border-top: 1px solid var(--line); margin-top: 4px; }
.rc-group > summary { color: var(--muted); font-size: .9rem; padding: 12px 0; }
.rc-group .recall-list .recall:first-child { border-top: 1px solid var(--line); }
.rc-group .recall { opacity: .85; }
.built-box { border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; }
.built-box p { margin: 0 0 8px; font-size: .9rem; }
.built-box input { background: var(--surface); }
.built-box .error { margin: 6px 0 0; }
.built-set { margin: -4px 0 10px; }
.vc-title { font-weight: 700; font-size: .9rem; margin: 0 0 6px; }
.vc-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: .88rem; }
.vc-steps li::marker { color: var(--accent); font-weight: 700; }
.vc-steps .hint { margin: 4px 0 0; }
.vc-steps label.btn { display: inline-block; margin: 0; font-weight: 600; }
.warn-text { color: var(--accent); }

/* paint code */
.paint-row { width: 100%; font: inherit; font-weight: 600; font-size: .85rem; color: var(--hero-muted); background: none; border: 0; padding: 0; margin-top: 10px; cursor: pointer; text-align: left; }
.paint-val { color: #ff8a45; font-weight: 600; }
.paint-val.set { color: #fff; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .03em; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62%; }
.paint-where { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin: 4px 0 12px; font-size: .92rem; }
.paint-where p { margin: 0; }
.paint-where .pw-title { font-weight: 700; margin-bottom: 4px; }
.paint-where .hint { margin-top: 6px; }
.btn.scan.paint-photo { flex-direction: row; justify-content: center; width: 100%; }
.btn.scan.paint-photo svg { width: 22px; height: 22px; }

/* build sheet */
.build-saved { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin: 4px 0 12px; font-size: .9rem; }
.build-saved .pw-title { font-weight: 700; margin: 0 0 6px; }
.build-saved .specs { margin: 0; }
#buildDialog .vin-check-box { margin-top: 4px; }

/* garage: car switcher */
.car-strip { display: flex; gap: 8px; overflow-x: auto; margin: -4px -16px 12px; padding: 4px 16px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.car-strip::-webkit-scrollbar { display: none; }
.car-pill {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px; max-width: 220px;
  font: inherit; text-align: left; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px 8px 8px; cursor: pointer; box-shadow: var(--shadow);
}
.car-pill.on { border-color: var(--accent); background: var(--accent-soft); }
.cp-art { width: 44px; flex-shrink: 0; color: var(--accent); }
.cp-art svg { display: block; width: 100%; height: auto; }
.cp-art .body { fill: color-mix(in srgb, currentColor 18%, transparent); stroke: currentColor; stroke-width: 3; stroke-linejoin: round; }
.cp-art .glass { fill: var(--surface); stroke: currentColor; stroke-width: 2; }
.cp-art .wheel { fill: var(--surface); stroke: var(--text); stroke-width: 3.5; }
.cp-art .hub { fill: var(--text); }
.cp-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.cp-name b { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-name small { color: var(--muted); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car-pill.add { border-style: dashed; box-shadow: none; background: transparent; }
.car-pill.add.on { background: var(--accent-soft); }
.cp-plus { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 1.1rem; flex-shrink: 0; }
.car-pill.locked .cp-plus { background: var(--surface-2); font-size: .9rem; }
.back-link { margin: 0 0 4px; display: inline-block; text-decoration: none; color: var(--accent); font-weight: 600; font-size: .9rem; }

.rpo-all { margin-top: 8px; font-size: .88rem; }
.rpo-all summary { color: var(--muted); font-weight: 600; }
.rpo-all p { margin: 6px 0 0; line-height: 1.6; word-spacing: .2em; }
