/* Virtual Mechanic design system: iOS-like grouped surfaces, green accent from the logo,
   light + dark themes (system default, or forced with <html data-theme="light|dark">). */
:root {
  --bg: #f2f4f3; --bg-outer: #e4e9e6; --surface: #ffffff; --surface-2: #f5f7f6; --surface-3: #eceff0;
  --text: #0f1513; --text-2: #5a6661; --text-3: #8d9893; --line: #e2e7e4;
  --accent: #10a057; --accent-strong: #0a8a4a; --accent-soft: #e2f5ea; --on-accent: #ffffff;
  --blue: #2b78f0; --blue-soft: #e5efff; --amber: #c97c00; --amber-soft: #fff1d6; --red: #e0444a; --red-soft: #ffe7e7;
  --violet: #7356f0; --violet-soft: #eeeaff; --grey-soft: #eef1f0;
  --glass: rgba(255, 255, 255, .78); --shadow: 0 1px 2px rgba(16, 24, 20, .05), 0 8px 24px rgba(16, 24, 20, .06);
  --shadow-lg: 0 30px 80px rgba(16, 40, 28, .18); --scrim: rgba(10, 16, 13, .38);
  --radius: 18px; --radius-sm: 12px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0d0c; --bg-outer: #050706; --surface: #151a18; --surface-2: #1b211f; --surface-3: #232a27;
    --text: #edf2ef; --text-2: #a2ada8; --text-3: #6d7873; --line: #252e2a;
    --accent: #2fcf78; --accent-strong: #52e090; --accent-soft: #13301f; --on-accent: #04170c;
    --blue: #5b9bff; --blue-soft: #14233d; --amber: #f2b13c; --amber-soft: #33270f; --red: #ff6b70; --red-soft: #3a1618;
    --violet: #a08cff; --violet-soft: #221c3d; --grey-soft: #1f2523;
    --glass: rgba(21, 26, 24, .78); --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, .55); --scrim: rgba(0, 0, 0, .55); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0d0c; --bg-outer: #050706; --surface: #151a18; --surface-2: #1b211f; --surface-3: #232a27;
  --text: #edf2ef; --text-2: #a2ada8; --text-3: #6d7873; --line: #252e2a;
  --accent: #2fcf78; --accent-strong: #52e090; --accent-soft: #13301f; --on-accent: #04170c;
  --blue: #5b9bff; --blue-soft: #14233d; --amber: #f2b13c; --amber-soft: #33270f; --red: #ff6b70; --red-soft: #3a1618;
  --violet: #a08cff; --violet-soft: #221c3d; --grey-soft: #1f2523;
  --glass: rgba(21, 26, 24, .78); --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .25);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .55); --scrim: rgba(0, 0, 0, .55); color-scheme: dark;
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg-outer); color: var(--text); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: default; opacity: .45; }
img { max-width: 100%; display: block; }
a { color: var(--accent-strong); text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.num { font-variant-numeric: tabular-nums; }

/* ---- app shell ---- */
.stage { min-height: 100%; display: grid; place-items: center; }
.phone { position: relative; width: 100%; max-width: 440px; height: 100dvh; background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }
@media (min-width: 640px) {
  body { background: radial-gradient(1200px 700px at 50% -10%, var(--accent-soft), transparent 60%), var(--bg-outer); }
  .stage { padding: 24px; }
  .phone { height: min(900px, calc(100dvh - 48px)); border-radius: 38px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
}
.content { flex: 1; overflow-y: auto; overflow-x: hidden; padding: max(18px, env(safe-area-inset-top)) 16px calc(96px + env(safe-area-inset-bottom)); scroll-behavior: smooth; overscroll-behavior: contain; }
.content.noTabs { padding-bottom: 40px; }

/* tab bar */
.tabbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--line); }
.tabbar button { display: grid; justify-items: center; gap: 2px; padding: 6px 0; color: var(--text-3); font-size: 10.5px; font-weight: 600; letter-spacing: .1px; min-width: 0; }
.tabbar button span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
@media (max-width: 380px) { .tabbar { padding-left: 2px; padding-right: 2px; } .tabbar button { font-size: 9.8px; letter-spacing: 0; } }
.tabbar button.on { color: var(--accent); }
.tabbar button svg { transition: transform .2s; }
.tabbar button.on svg { transform: translateY(-1px); }

/* ---- headers ---- */
.screenHead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 6px 2px 16px; }
.screenHead small { display: block; color: var(--text-3); font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.screenHead h1 { font: 700 30px/1.1 var(--font-display); letter-spacing: -.6px; text-wrap: balance; }
.headActions { display: flex; gap: 8px; }
.iconBtn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--text); box-shadow: var(--shadow); flex: none; }
.iconBtn.accent { background: var(--accent); color: var(--on-accent); }
.topBar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.topBar .title { font-weight: 650; font-size: 15px; }

/* ---- generic surfaces ---- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.section { margin-top: 22px; }
.section > h3, .sectionTitle { display: flex; align-items: center; justify-content: space-between; font: 650 13px/1 var(--font); color: var(--text-2); text-transform: uppercase; letter-spacing: .5px; margin: 0 4px 9px; }
.sectionTitle a, .sectionTitle button { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--accent-strong); font-weight: 600; }
.muted { color: var(--text-2); }
.fine { font-size: 12px; color: var(--text-3); line-height: 1.4; }

/* tiles */
.tile { display: grid; place-items: center; border-radius: 30%; flex: none; }
.tile-accent { background: var(--accent-soft); color: var(--accent-strong); }
.tile-blue { background: var(--blue-soft); color: var(--blue); }
.tile-amber { background: var(--amber-soft); color: var(--amber); }
.tile-violet { background: var(--violet-soft); color: var(--violet); }
.tile-red { background: var(--red-soft); color: var(--red); }
.tile-grey { background: var(--grey-soft); color: var(--text-2); }

/* grouped list */
.list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; text-align: left; position: relative; }
.row + .row::before { content: ""; position: absolute; top: 0; right: 0; left: 62px; border-top: 1px solid var(--line); }
.row .rowText { flex: 1; min-width: 0; }
.row .rowText b { display: block; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .rowText small { display: block; color: var(--text-2); font-size: 12.5px; margin-top: 1px; }
.row .rowValue { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14.5px; text-align: right; }
.row .rowValue small { display: block; font-weight: 500; color: var(--text-3); font-size: 11.5px; }
.row .chev { color: var(--text-3); flex: none; }
button.row:active { background: var(--surface-2); }
.row > button { text-align: left; }
.rowDelete { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--text-3); }
.rowDelete:hover { background: var(--red-soft); color: var(--red); }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 3px 9px; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.pill.ok { background: var(--accent-soft); color: var(--accent-strong); }
.pill.soon { background: var(--amber-soft); color: var(--amber); }
.pill.overdue { background: var(--red-soft); color: var(--red); }
.pill.check { background: var(--grey-soft); color: var(--text-2); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 18px; border-radius: 14px; font-weight: 650; font-size: 15.5px; background: var(--accent); color: var(--on-accent); width: 100%; transition: transform .1s; }
.btn:active { transform: scale(.98); }
.btn.secondary { background: var(--surface-3); color: var(--text); }
.btn.ghost { background: transparent; color: var(--accent-strong); height: 40px; }
.btn.small { height: 36px; font-size: 14px; border-radius: 11px; width: auto; padding: 0 14px; }
.linkBtn { color: var(--accent-strong); font-weight: 600; font-size: 14px; position: relative; }
/* A bigger tap area than the words (about 40 px tall) without moving anything. */
.linkBtn::after { content: ""; position: absolute; inset: -10px 0; }

/* ---- garage ---- */
.carCards { display: grid; gap: 14px; }
.carCard { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10.5; border-radius: 22px; overflow: hidden; background: linear-gradient(140deg, var(--surface-3), var(--surface-2)); box-shadow: var(--shadow); text-align: left; color: #fff; }
.carCard img.photo, .hero img.photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.carCard .shade, .hero .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.72)); }
.carCard .noPhoto, .hero .noPhoto { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); }
.carCard .info, .hero .info { position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.carCard .info small, .hero .info small { display: block; font-size: 12.5px; opacity: .85; font-weight: 600; }
.carCard .info b, .hero .info h2 { display: block; font: 700 22px/1.15 var(--font-display); letter-spacing: -.3px; text-shadow: 0 1px 8px rgba(0,0,0,.3); }
.carCard .plate, .hero .plate { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.92); color: #111; font: 700 11.5px/1 var(--font); letter-spacing: .8px; padding: 5px 8px; border-radius: 6px; border-left: 6px solid #1f4fd6; }
.carCard .pill { box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.addCar { display: flex; align-items: center; justify-content: center; gap: 8px; height: 64px; border-radius: 18px; border: 1.5px dashed var(--line); color: var(--text-2); font-weight: 600; width: 100%; background: transparent; }

/* ---- car detail ---- */
.hero { position: relative; border-radius: 26px; overflow: hidden; aspect-ratio: 16 / 11; background: linear-gradient(140deg, var(--surface-3), var(--surface-2)); color: #fff; box-shadow: var(--shadow); }
.dots { display: flex; justify-content: center; gap: 6px; margin: 10px 0 0; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: width .2s, background .2s; }
.dots i.on { width: 18px; border-radius: 3px; background: var(--accent); }
.swipeHint { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--text-3); margin-top: 6px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stat { background: var(--surface); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); min-width: 0; }
.stat small { display: block; font-size: 11.5px; color: var(--text-2); font-weight: 600; }
.stat b { display: block; font: 700 19px/1.2 var(--font-display); margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat b em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--text-3); margin-left: 2px; }
.actions3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.action { display: grid; justify-items: center; gap: 7px; padding: 13px 6px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); font-size: 12.5px; font-weight: 600; }

/* swipe animation */
.slideL { animation: slideL .28s cubic-bezier(.2,.8,.2,1); }
.slideR { animation: slideR .28s cubic-bezier(.2,.8,.2,1); }
@keyframes slideL { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes slideR { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }

/* car chips (tabs) */
.carChips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 2px 16px 4px; }
.carChips::-webkit-scrollbar { display: none; }
.carChip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-weight: 600; font-size: 13.5px; white-space: nowrap; color: var(--text-2); flex: none; }
.carChip .thumb { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; background: var(--surface-3); display: grid; place-items: center; color: var(--text-3); }
.carChip .thumb img { width: 100%; height: 100%; object-fit: cover; }
.carChip.on { background: var(--text); color: var(--bg); }

/* plan */
.planRow .rowText small { white-space: normal; }
.planDetail { padding: 0 14px 14px 62px; font-size: 13px; color: var(--text-2); }
.planDetail p + p { margin-top: 6px; }
.researchCard { display: flex; gap: 12px; align-items: center; }
.researchCard .rowText { flex: 1; }
.researchCard b { display: block; font-size: 14.5px; }
.researchCard small { display: block; font-size: 12.5px; color: var(--text-2); }

/* fuel chart */
.chart { display: flex; align-items: flex-end; gap: 8px; height: 110px; padding-top: 8px; }
.chart .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; min-width: 0; }
.chart .bar i { width: 100%; max-width: 30px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, var(--accent), var(--accent-strong)); opacity: .9; }
.chart .bar.last i { opacity: 1; box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 40%, transparent); }
.chart .bar em { font-style: normal; font-size: 11px; font-weight: 650; color: var(--text-2); font-variant-numeric: tabular-nums; }
.chart .bar small { font-size: 10px; color: var(--text-3); }

/* ---- sheets / forms ---- */
.sheetScrim { position: absolute; inset: 0; z-index: 30; background: var(--scrim); display: flex; align-items: flex-end; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-height: 92%; overflow-y: auto; background: var(--bg); border-radius: 26px 26px 0 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); animation: up .28s cubic-bezier(.2,.8,.2,1); }
@keyframes up { from { transform: translateY(40%); opacity: .4; } }
.grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--line); margin: 2px auto 10px; }
.sheetHead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheetHead h2 { font: 700 21px/1.2 var(--font-display); letter-spacing: -.3px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .wide { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; font-size: 12.5px; font-weight: 650; color: var(--text-2); position: relative; min-width: 0; }
.field input, .field select, .field textarea { width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); padding: 0 13px; font-size: 16px; font-weight: 500; color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field .hint { font-weight: 500; color: var(--text-3); font-size: 12px; }
.field .unit { position: absolute; right: 13px; bottom: 15px; color: var(--text-3); font-weight: 600; font-size: 14px; pointer-events: none; }
.suggestions { position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; right: 0; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; max-height: 260px; overflow-y: auto; }
.suggestions button { display: block; width: 100%; text-align: left; padding: 11px 13px; font-size: 15px; font-weight: 500; color: var(--text); }
.suggestions button + button { border-top: 1px solid var(--line); }
.suggestions button:hover, .suggestions button:focus { background: var(--surface-2); }
.chipGrid { display: flex; flex-wrap: wrap; gap: 7px; }
.chipBtn { padding: 7px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text); }
.chipBtn.due { background: var(--amber-soft); border-color: transparent; color: var(--amber); }
.chipBtn.on { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.groupLabel { font-size: 11.5px; color: var(--text-3); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin: 10px 0 6px; }
.suggestCard { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; background: var(--accent-soft); color: var(--text); border-radius: 15px; padding: 12px 14px; }
.suggestCard .rowText { flex: 1; min-width: 0; }
.suggestCard b { font-size: 14.5px; }
.suggestCard small { display: block; font-size: 12px; color: var(--text-2); margin-top: 2px; }
.range { grid-column: 1 / -1; display: grid; gap: 8px; }
.range input[type=range] { width: 100%; accent-color: var(--accent); height: 28px; }
.range .rangeLabels { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.stepper { display: flex; gap: 6px; }
.stepper button { flex: 1; height: 34px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-weight: 650; font-size: 13px; }
.photoPick { grid-column: 1 / -1; display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: center; }
.photoPick .preview { aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--surface-3); display: grid; place-items: center; color: var(--text-3); }
.photoPick .preview img { width: 100%; height: 100%; object-fit: cover; }
.photoPick .buttons { display: grid; gap: 8px; }
.photoPick label.btn input { display: none; }
.photoSearch { min-width: 0; display: grid; gap: 10px; background: var(--surface); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); }
.photoSearchBar { display: flex; gap: 8px; min-width: 0; }
.photoSearchBar .btn { flex: none; }
.photoSearchBar input { flex: 1; min-width: 0; height: 40px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); padding: 0 12px; font-size: 16px; outline: none; }
.photoSearchBar input:focus { border-color: var(--accent); }
.photoGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-height: 300px; overflow-y: auto; }
.photoGrid button { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--surface-3); outline: 3px solid transparent; outline-offset: -3px; }
.photoGrid button.on { outline-color: var(--accent); }
.photoGrid img { width: 100%; height: 100%; object-fit: cover; }
.suggestions .tag { float: right; font-size: 11.5px; color: var(--text-3); font-weight: 600; margin-left: 8px; }
.aboutCard { display: grid; gap: 12px; }
.aboutSummary { font-size: 14.5px; line-height: 1.5; }
.specGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 0; }
.specGrid div { min-width: 0; }
.specGrid dt { font-size: 11.5px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .4px; }
.specGrid dd { margin: 2px 0 0; font-size: 14px; font-weight: 550; overflow-wrap: anywhere; }
.aboutList { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 4px; }
.aboutCard .groupLabel { margin: 4px 0 -4px; }
.studying { display: flex; gap: 12px; align-items: center; }
.studying > span:not(.spinner):not(.tile) { flex: 1; min-width: 0; display: grid; gap: 2px; }
.studying b { font-size: 14.5px; }
.studying small { font-size: 12.5px; color: var(--text-2); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.autoTag { position: absolute; right: 0; top: 0; font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--accent-strong); background: var(--accent-soft); border-radius: 6px; padding: 1px 6px; text-transform: uppercase; letter-spacing: .4px; }
.estTag { display: inline-block; margin-left: 5px; font-style: normal; font-size: 10px; font-weight: 700; color: var(--amber); background: var(--amber-soft); border-radius: 5px; padding: 1px 5px; vertical-align: 2px; text-transform: uppercase; }
.priceShow { height: 48px; display: flex; align-items: center; font-size: 16px; font-weight: 600; color: var(--text); }
.formError { grid-column: 1 / -1; color: var(--red); font-size: 13px; font-weight: 600; }

/* ---- banners / toast ---- */
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 15px; background: var(--amber-soft); color: var(--text); margin-bottom: 14px; }
.banner svg { color: var(--amber); flex: none; margin-top: 1px; }
.banner b { display: block; font-size: 14px; }
.banner small { display: block; font-size: 12.5px; color: var(--text-2); }
.toast { position: absolute; z-index: 40; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 7px; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); animation: fade .2s; white-space: nowrap; }

/* ---- segmented control ---- */
.seg { display: inline-grid; grid-auto-flow: column; background: var(--surface-3); border-radius: 11px; padding: 2px; }
.seg button { padding: 6px 11px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--text-2); display: inline-flex; align-items: center; gap: 5px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---- login ---- */
.loginScreen { flex: 1; display: grid; align-content: center; gap: 18px; padding: 32px 26px calc(32px + env(safe-area-inset-bottom)); background: radial-gradient(600px 380px at 50% 0%, var(--accent-soft), transparent 70%), var(--bg); }
.loginScreen .appLogo { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 16px 40px color-mix(in srgb, var(--accent) 35%, transparent); }
.loginScreen h1 { font: 800 40px/1.02 var(--font-display); letter-spacing: -1.4px; }
.loginScreen p { color: var(--text-2); font-size: 16px; }
.loginScreen .field input { height: 52px; }
.authError { color: var(--red); font-size: 14px; font-weight: 600; }

/* ---- chat ---- */
.chat { display: flex; flex-direction: column; height: 100%; }
.chatContext { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.chatContext .rowText { flex: 1; min-width: 0; }
.chatContext b { display: block; font-size: 14.5px; }
.chatContext small { display: block; font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.statusDot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: var(--text-2); }
.statusDot i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.statusDot.live i { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.statusDot.off i { background: var(--amber); }
.messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 0 12px; min-height: 180px; }
.bubble { max-width: 88%; padding: 10px 13px; border-radius: 20px; font-size: 15px; line-height: 1.45; word-wrap: break-word; }
.bubble.mine { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; }
.bubble.ai { align-self: flex-start; background: var(--surface); box-shadow: var(--shadow); border-bottom-left-radius: 6px; }
.bubble.ai.failed { background: var(--amber-soft); box-shadow: none; }
.bubble p + p, .bubble p + ul, .bubble ul + p, .bubble p + ol, .bubble ol + p { margin-top: 7px; }
.bubble ul, .bubble ol { margin: 3px 0; padding-left: 19px; }
.bubble li + li { margin-top: 3px; }
.bubble h4 { font-size: 15px; margin: 8px 0 3px; }
.bubble code { font-size: 13px; background: var(--surface-3); border-radius: 5px; padding: 1px 5px; }
.bubble .cite { display: inline-grid; place-items: center; min-width: 17px; height: 17px; margin: 0 1px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-strong); font-size: 10.5px; font-weight: 700; vertical-align: 2px; }
.bubble .tableWrap { overflow-x: auto; margin: 6px -4px; }
.bubble table { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.bubble th, .bubble td { text-align: left; vertical-align: top; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.bubble th { font-weight: 650; color: var(--text-2); font-size: 12px; white-space: nowrap; }
.bubble td:first-child { font-weight: 600; }
.bubble th:first-child, .bubble td:first-child { width: 1%; }
.bubble .inlinePic { display: inline-block; vertical-align: middle; }
.bubble .inlinePic img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; background: var(--surface-3); display: block; }
.bubble .mdAuxInline { font-size: 12px; color: var(--text-3); text-decoration: none; white-space: nowrap; }
.bubble .summary { font-weight: 550; }
.bubble .details { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.moreBtn { display: block; margin-top: 6px; color: var(--accent-strong); font-weight: 650; font-size: 13.5px; }
.bubble .mdFigure { margin: 8px 0; }
.bubble .mdFigure img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 12px; background: var(--surface-3); }
.bubble .mdFigure figcaption { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.bubble .mdLink { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 2px; }
.bubble .mdAux { display: block; margin: 2px 0 8px 20px; font-size: 12.5px; color: var(--text-3); text-decoration: none; }
.bubble .mdAux:hover { color: var(--text-2); text-decoration: underline; }
.bubble .stepPic { margin: 4px 0 10px 20px; }
.bubble .stepPic img { width: 100%; max-width: 280px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--surface-3); display: block; }
.bubble .stepPic figcaption { display: flex; justify-content: space-between; gap: 8px; max-width: 280px; margin-top: 4px; font-size: 11.5px; color: var(--text-3); }
.bubble .stepPic figcaption span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble .stepPic figcaption a { flex: none; color: var(--accent-strong); font-weight: 600; text-decoration: none; }
.aiNotice { display: block; margin-bottom: 7px; font-size: 12.5px; color: var(--amber); font-weight: 600; }
.deepTag { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 7px; font-size: 12px; font-weight: 650; color: var(--accent-strong); }
.searchOffer { align-self: flex-start; margin: -2px 0 4px; }
.searchOffer button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 650; font-size: 14px; border: 0; cursor: pointer; }
.searchLink { align-self: flex-start; margin: -2px 0 4px 4px; background: none; border: 0; padding: 2px 0; font-size: 12.5px; color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.searchLink:hover { color: var(--accent-strong); }
.typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 13px 15px; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.starters { display: grid; gap: 8px; }
.starters button { text-align: left; padding: 12px 14px; border-radius: 15px; background: var(--surface); box-shadow: var(--shadow); font-size: 14.5px; font-weight: 550; display: flex; gap: 10px; align-items: center; }
.starters button svg { color: var(--accent); flex: none; }
.sources { align-self: flex-start; max-width: 88%; font-size: 12.5px; }
.sources summary { cursor: pointer; color: var(--text-2); font-weight: 600; padding: 2px 4px; }
.sources a { display: block; margin-top: 6px; padding: 9px 11px; border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.sources a small { display: block; color: var(--text-2); margin-top: 2px; }
.compose { display: flex; gap: 8px; align-items: center; padding: 6px 6px 6px 14px; background: var(--surface); border-radius: 24px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.compose input { flex: 1; min-width: 0; height: 38px; border: 0; outline: 0; background: none; font-size: 16px; }
.compose { padding-left: 6px; gap: 4px; }
.compose .sendBtn { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; flex: none; }
.compose .composeIcon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--text-3); flex: none; }
.compose .composeIcon:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.compose .clearBtn { width: 26px; height: 26px; background: var(--surface-3); color: var(--text-2); }
.pastQuestions { display: grid; margin-bottom: 8px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; max-height: 280px; overflow-y: auto; animation: fade .15s; }
.pastHead { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 6px 14px; font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; position: sticky; top: 0; background: var(--surface); }
.pastHead button { color: var(--text-3); }
.pastQuestions > button { text-align: left; padding: 10px 14px; font-size: 14.5px; border-top: 1px solid var(--line); }
.pastQuestions > button:hover, .pastQuestions > button[aria-selected=true] { background: var(--surface-2); }

.empty { text-align: center; padding: 26px 16px; color: var(--text-2); }
.empty b { display: block; color: var(--text); font-size: 16px; margin: 10px 0 4px; }
.empty .tile { margin: 0 auto; }

.preview-hidden-input { display: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---- sources for a car ---- */
.srcBtn { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: 12.5px; font-weight: 650; flex-shrink: 0; cursor: pointer; }
.srcBtn span { color: var(--text-2); font-weight: 600; }
.srcIntro { font-size: 14.5px; color: var(--text-2); margin: -4px 0 16px; line-height: 1.45; }
.srcHead { font: 700 16px/1.3 var(--font-display); margin: 18px 0 2px; }
.srcNote { font-size: 12.5px; color: var(--text-3); margin: 0 0 10px; line-height: 1.4; }
.srcAdd { display: flex; gap: 8px; }
.srcAdd input { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0 12px; font-size: 16px; color: var(--text); outline: none; }
.srcAdd input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.srcAdd .btn { width: auto; height: 44px; }
.srcSuggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.srcSuggest button { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 999px; border: 1px dashed var(--line); background: none; color: var(--accent-strong); font-size: 13px; font-weight: 650; cursor: pointer; }
.srcSuggest small { color: var(--text-3); font-weight: 500; }
.srcList { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.srcList li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); }
.srcList li > a, .srcList li > span { flex: 1; min-width: 0; color: var(--text); font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.srcList li > span b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srcList li > span small { display: block; font-size: 12px; color: var(--text-3); font-weight: 500; }
.srcList li button { background: none; border: 0; color: var(--text-3); padding: 4px; cursor: pointer; }
.srcList li button:hover { color: var(--red); }
.srcError { margin-top: 10px; font-size: 13px; color: var(--red); font-weight: 600; }
.ownMark { color: var(--accent-strong); font-weight: 700; }
.docSource { display: block; margin-top: 6px; padding: 9px 11px; border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.docSource small { color: var(--text-2); margin-top: 2px; }
.docSource b, .docSource small { display: block; }
span.cite { cursor: default; }

/* ---- plan review after a refresh ---- */
.reviewCard { margin: 0 0 10px; padding: 13px 14px; border-radius: 16px; background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); }
.reviewCard b { display: block; font-size: 14.5px; }
.reviewCard small { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.reviewCard ul { margin: 8px 0 10px; padding-left: 18px; font-size: 13.5px; line-height: 1.45; }
.reviewActions { display: flex; gap: 8px; }
.reviewActions .btn { width: auto; }

/* ---- answer confidence ---- */
.confTag { display: inline-flex; align-items: center; gap: 5px; margin: 0 8px 7px 0; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .1px; }
.confTag.likely { background: var(--amber-soft); color: var(--amber); }
.confTag.confirmed { background: var(--accent-soft); color: var(--accent-strong); }

.backupNote { display: block; margin-bottom: 7px; font-size: 12px; color: var(--text-3); }
.confTag.neutral { background: var(--surface-3); color: var(--text-2); }

/* ---- Premium ---- */

/* ---- Workshop mode ---- */
.workshopBtn { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; margin: -2px 0 4px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 650; cursor: pointer; }
.workshop { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: var(--bg); color: var(--text); padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.wsHead { display: flex; align-items: center; gap: 8px; padding: 12px 16px 6px; }
.wsTools { display: flex; gap: 6px; padding: 0 16px 12px; flex-wrap: nowrap; align-items: center; min-width: 0; }
.wsTools > * { min-width: 0; flex: 0 0 auto; }
.wsTools > .wsVoice { flex: 1 1 0; max-width: 220px; }
.wsTools .wsIcon { max-width: 100%; }
.wsTools .wsIcon span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.wsTools .wsIcon svg { flex-shrink: 0; }
.wsIcon.live svg { color: var(--red); animation: pulse 1.6s ease-in-out infinite; border-radius: 50%; }
@media (max-width: 380px) { .wsTools .wsIcon { padding: 0 9px; font-size: 12px; } }
.workshop .stepPic figcaption { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.wsHead .rowText { flex: 1; min-width: 0; }
.wsHead small { display: block; font-size: 12px; font-weight: 700; color: var(--accent-strong); text-transform: uppercase; letter-spacing: .6px; }
.wsHead b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wsIcon { display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 12.5px; font-weight: 650; cursor: pointer; }
.wsIcon.on { background: var(--accent-soft); color: var(--accent-strong); border-color: transparent; }
.wsClose { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.wsProgress { height: 5px; margin: 0 16px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.wsProgress i { display: block; height: 100%; background: var(--accent); transition: width .25s; }
.wsBody { flex: 1; overflow-y: auto; padding: 22px 20px; }
.wsBody h2 { font: 700 24px/1.2 var(--font-display); margin: 0 0 14px; }
.wsCount { display: block; font-size: 14px; font-weight: 700; color: var(--text-2); margin-bottom: 10px; }
.wsText { font-size: clamp(22px, 5.6vw, 30px); line-height: 1.35; font-weight: 550; margin: 0 0 18px; }
.wsChecklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.wsChecklist label, .wsValues label { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 14px; background: var(--surface); font-size: 17px; cursor: pointer; }
.wsChecklist input, .wsValues input { width: 24px; height: 24px; accent-color: var(--accent); flex-shrink: 0; }
.wsValues { display: grid; gap: 8px; margin-bottom: 16px; }
.wsTimer { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.wsTimer b { font: 700 40px/1 var(--font-display); font-variant-numeric: tabular-nums; min-width: 120px; }
.wsTimer b.done { color: var(--red); }
.wsTimer button { height: 44px; padding: 0 16px; border-radius: 12px; border: 0; background: var(--surface-3); color: var(--text); font-weight: 650; font-size: 15px; cursor: pointer; }
.wsTimer .wsTimerStart { display: inline-flex; align-items: center; gap: 8px; background: var(--accent-soft); color: var(--accent-strong); }
.wsBody .stepPic img { max-height: 42vh; object-fit: contain; }
.wsDone { text-align: center; padding-top: 10vh; }
.wsDoneIcon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); margin-bottom: 14px; }
.wsDone p { color: var(--text-2); font-size: 16px; }
.wsNav { display: flex; gap: 10px; padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.wsNav button { height: 60px; border-radius: 16px; border: 0; font-size: 18px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; background: var(--surface-3); color: var(--text); padding: 0 18px; }
.wsNav button:disabled { opacity: .4; }
.wsNav .primary { flex: 1; background: var(--accent); color: var(--on-accent); }
.wsNav .wsRepeat { width: 60px; padding: 0; }

/* ---- Papers & deadlines ---- */
.paperLinks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.paperLinks a { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--accent); font-size: 12.5px; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.paperLinks a:hover { text-decoration: underline; }
.paperLinks em { font-style: normal; font-size: 12px; color: var(--text-3); }
.papersForm { display: grid; gap: 12px; padding: 14px; margin-bottom: 10px; border-radius: 16px; background: var(--surface); }
.checkRow { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.4; cursor: pointer; }
.checkRow input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--accent); flex-shrink: 0; }
.ipoChecks { display: grid; gap: 11px; padding: 6px 16px 14px 62px; }
.ipoChecks .linkBtn { justify-self: start; font-size: 13px; }
.rowText small .due { font-weight: 700; color: var(--text); }
.rowText small .due.overdue { color: var(--red); }
.rowText small .due.soon { color: var(--amber); }
.turned { transform: rotate(90deg); transition: transform .15s; }

/* ---- Receipts ---- */
.receiptRow { display: flex; gap: 8px; flex-wrap: wrap; }
.receiptThumb { position: relative; width: 68px; height: 68px; border-radius: 12px; overflow: hidden; background: var(--surface-3); }
.receiptThumb img, .receiptThumb .imgPlaceholder { width: 100%; height: 100%; object-fit: cover; display: block; }
.receiptThumb button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.receiptAdd { width: 68px; height: 68px; border-radius: 12px; border: 1px dashed var(--line); background: var(--surface); color: var(--text-2); display: grid; place-items: center; align-content: center; gap: 2px; font-size: 11.5px; font-weight: 650; cursor: pointer; }
.passportRow { border-radius: 16px; background: var(--surface); margin: 0 0 10px; width: 100%; }

/* ---- Car passport ---- */
.passportScreen { position: fixed; inset: 0; z-index: 60; overflow-y: auto; background: var(--bg-outer); }
.ppBar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); }
.ppBar b { flex: 1; font-size: 16px; }
.ppBar .btn { width: auto; }
.passport { max-width: 760px; margin: 12px auto 40px; background: var(--surface); color: var(--text); border-radius: 20px; padding: 22px 20px; box-shadow: var(--shadow); }
.ppHero { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.ppHero img, .ppNoPhoto { width: 132px; height: 96px; border-radius: 14px; object-fit: cover; flex-shrink: 0; background: var(--surface-3); display: grid; place-items: center; color: var(--text-3); }
.ppHero small { font-size: 11.5px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--accent-strong); }
.ppHero h1 { font: 700 23px/1.15 var(--font-display); margin: 3px 0 4px; }
.ppHero p { margin: 0; color: var(--text-2); font-size: 14px; }
.ppFacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0 0 20px; }
.ppFacts div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.ppFacts dt, .ppSpecs dt { font-size: 11.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .4px; }
.ppFacts dd, .ppSpecs dd { margin: 3px 0 0; font-size: 14.5px; font-weight: 600; }
.passport section { margin-top: 20px; }
.passport h2 { display: flex; justify-content: space-between; align-items: baseline; font: 700 17px/1.3 var(--font-display); margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.passport h3 { font-size: 14px; margin: 12px 0 4px; }
.ppText { white-space: pre-wrap; margin: 0; font-size: 14.5px; line-height: 1.5; }
.ppMuted { color: var(--text-3); font-size: 14px; margin: 0; }
.ppEdit { display: grid; gap: 12px; }
.ppEdit textarea { height: auto !important; padding: 10px 13px !important; font: inherit; line-height: 1.45; resize: vertical; }
.ppEdit .btn { width: auto; justify-self: start; }
.ppSpecs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 16px; margin: 0; }
.ppHistory { list-style: none; padding: 0; margin: 0; }
.ppHistory li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.ppHistory b { display: block; font-size: 14px; }
.ppHistory small { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.ppReceipts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.ppReceipts button { padding: 0; border: 0; background: none; cursor: zoom-in; }
.ppReceipts img, .ppReceipts .imgPlaceholder { display: block; width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--surface-3); }
.ppFoot { margin-top: 24px; font-size: 11.5px; color: var(--text-3); text-align: center; }
.ppZoom { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.85); display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.ppZoom img { max-width: 100%; max-height: 100%; border-radius: 8px; }
@media print {
  @page { margin: 14mm; }
  body * { visibility: hidden !important; }
  .passportScreen, .passportScreen .passport, .passportScreen .passport * { visibility: visible !important; }
  .passportScreen { position: absolute; inset: 0; overflow: visible; background: #fff; }
  .passport { box-shadow: none; margin: 0; max-width: none; padding: 0; color: #000; background: #fff; }
  .passport .noPrint, .ppBar, .ppZoom { display: none !important; }
  .ppFacts div { background: #f3f5f4; }
}
.storedToggle { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 10px; border-radius: 16px; background: var(--surface); cursor: pointer; }
.storedToggle input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }
.storedToggle b { font-size: 14px; } .storedToggle small { display: block; font-size: 12.5px; color: var(--text-2); }

/* ---- Photo questions ---- */
.msgPhoto { display: block; width: 100%; max-width: 220px; border-radius: 12px; margin-bottom: 6px; }
.photoPreview { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 8px; border-radius: 14px; background: var(--surface); font-size: 13px; color: var(--text-2); }
.photoPreview img { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; }
.photoPreview span { flex: 1; }
.photoPreview button { background: none; border: 0; color: var(--text-3); cursor: pointer; }
.photoLocked { display: grid; gap: 4px; margin-bottom: 8px; }
.photoLocked .linkBtn { justify-self: start; font-size: 13px; }
.manualTools { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 12px; }
.manualResults li > span a { color: var(--text); text-decoration: none; }
.manualResults .btn { width: auto; flex: none; padding-left: 14px; padding-right: 14px; }
.srcList.manualResults li button.btn { background: var(--accent); color: var(--on-accent); padding: 0 14px; }
.srcList.manualResults li button.btn:hover { color: var(--on-accent); }
.srcList.manualResults li button.btn:disabled { opacity: .5; }
.manualResults li > span b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.docKinds { margin: 10px 0 0; flex-wrap: wrap; }
.docKinds .chip em { font-style: normal; color: var(--text-3); font-weight: 600; margin-left: 2px; }
.docKind { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); margin-right: 4px; }
.docKind.k-workshop { background: var(--accent-soft); color: var(--accent-strong, var(--accent)); }
.docKind.k-wiring { background: var(--amber-soft); color: var(--text); }
.docKind.k-owner { background: var(--blue-soft, var(--surface-3)); }

/* ---- account, credits, wallet, invoices and projects ---- */
.accountBody { max-width: 560px; margin: 0 auto; padding: 4px 16px calc(40px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
/* R-8RUW4: nothing inside may push the screen wider than the phone (a long option in a select did). */
.accountBody > *, .accountBody .row, .accountBody .rowText { min-width: 0; }
.accountBody .rowSelect { min-width: 0; text-overflow: ellipsis; }
.accountBody .section { margin-top: 14px; }
.creditCard { display: grid; gap: 10px; padding: 18px; border-radius: 22px; background: radial-gradient(420px 220px at 100% 0%, var(--violet-soft), transparent 70%), var(--surface); box-shadow: var(--shadow); }
.creditCard > small { color: var(--text-2); font-size: 13px; font-weight: 600; }
.creditCard > b { font: 800 44px/1 var(--font-display); letter-spacing: -1.2px; }
.creditCard > span { color: var(--text-2); font-size: 14px; margin-top: -4px; }
.creditNote { font-size: 13.5px; color: var(--text-2); background: var(--surface-2); border-radius: 12px; padding: 9px 11px; }
.creditNote.warn { color: var(--red); background: var(--red-soft); }
.buyCredits { display: grid; gap: 10px; }
.paypalBox { min-height: 48px; }
.paypalBox .fakePaypal { width: 100%; height: 44px; border-radius: 10px; border: 0; background: #ffc439; font-weight: 700; }
.levelRow { cursor: pointer; align-items: flex-start; }
.levelRow input { margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; flex-shrink: 0; }
.recoveryCode { font: 700 19px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 1px; text-align: center; padding: 14px 10px; border-radius: 14px; background: var(--surface); border: 1px dashed var(--line); user-select: all; word-break: break-all; width: 100%; }
.loginScreen .btn.secondary, .loginScreen .btn.ghost { width: 100%; }
.loginScreen .linkBtn { justify-self: center; }
.loginScreen .checkRow { font-size: 14.5px; }
.aiNotice { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 9px 12px; border-radius: 14px; background: var(--amber-soft); color: var(--text); font-size: 13px; text-align: left; border: 0; cursor: pointer; width: 100%; }
.aiNotice svg { color: var(--amber); flex-shrink: 0; }
.aiNotice span { flex: 1; }
.aiNotice b { color: var(--accent); white-space: nowrap; }
.rowSelect { max-width: 52%; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; font-size: 14px; padding: 0 8px; }
.scanRow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.scanRow .btn { width: auto; }
.scanRow small { flex-basis: 100%; }
.stepActions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; align-self: flex-start; max-width: 100%; }
.stepActions .workshopBtn { margin: 0; }
.stepActions .fine { flex-basis: 100%; margin: -2px 0 2px 4px; }
.workshopBtn.listen { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.budgetBar { display: block; height: 5px; border-radius: 9px; background: var(--surface-3); margin-top: 6px; overflow: hidden; }
.budgetBar > i { display: block; height: 100%; background: var(--accent); border-radius: 9px; }
.thumbBtn { display: block; width: 100%; height: 100%; border: 0; padding: 0; background: none; cursor: zoom-in; }
.pdfThumb { display: grid; place-items: center; align-content: center; gap: 2px; width: 100%; height: 100%; color: var(--text-2); }
.pdfThumb small { font-size: 10.5px; font-weight: 700; }
.spinner.small { width: 14px; height: 14px; border-width: 2px; display: inline-block; vertical-align: -2px; }
.accountBody .carChips { margin: 0; }
.lookupRow { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.lookupRow .btn { width: auto; }
.lookupRow .vinField { flex: 1 1 200px; }
.lookupRow small { flex-basis: 100%; }
.composeIcon.listening { color: var(--on-accent); background: var(--red); border-radius: 50%; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 45%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }
.regionField { flex: 0 0 90px; }
.wsVoice { position: relative; min-width: 0; margin-left: auto; }
.wsVoiceBtn span { flex: 1; text-align: left; }
.wsVoiceBtn { width: 100%; color: var(--text); }
.wsVoiceList { position: absolute; right: 0; top: 42px; z-index: 5; list-style: none; margin: 0; padding: 6px; width: min(320px, calc(100vw - 32px)); max-height: 60vh; overflow-y: auto; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lg, var(--shadow)); border: 1px solid var(--line); }
.wsVoiceList button { display: block; width: 100%; text-align: left; padding: 9px 11px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; cursor: pointer; }
.wsVoiceList button:hover { background: var(--surface-2, var(--surface-3)); }
.wsVoiceList button.on { background: var(--accent-soft); }
.wsVoiceList b { display: block; font-size: 14.5px; font-weight: 650; }
.wsVoiceList small { display: block; font-size: 12px; color: var(--text-2); margin-top: 2px; line-height: 1.35; }
.wsHeard { margin: -4px 16px 8px; font-size: 13px; color: var(--text-2); font-style: italic; }
.wsVideo { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; margin-bottom: 16px; }
.wsVideo iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.wsQa { margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); display: grid; gap: 6px; font-size: 16px; }
.wsQa .linkBtn { justify-self: start; }
.wsAsk { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.wsAsk input { flex: 1; min-width: 0; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 0 12px; font: inherit; }
.wsAsk .btn { width: auto; }
.wsAsk small { flex-basis: 100%; }
.videoList { display: grid; gap: 10px; margin: 8px 0; }
.videoItem { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; align-items: center; padding: 10px; border-radius: 14px; background: var(--surface); }
.videoItem .btn { grid-column: 1 / -1; width: 100%; }
.videoThumb img { width: 120px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 9px; display: block; background: var(--surface-3); }
.videoItem .rowText b { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.partRow span small { color: var(--text-2); }
.partRow .partNote { display: block; font-size: 12.5px; }
.workshopBtn.videoBtn { margin-top: -2px; }

/* Data tools: export choices and spreadsheet import */
.subRows { display: grid; gap: 2px; padding: 0 0 6px 18px; }
.subRows .row { min-height: 0; }
.subRows .fine { margin: 6px 12px; }
.importTable { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 0 0 12px; display: grid; gap: 10px; }
.importHead { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; }
.importHead b { font-size: 15px; }
.importHead small { grid-row: 2; color: var(--text-3); font-size: 12.5px; }
.importHead select, .importMap select { height: 40px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--text); padding: 0 10px; font-size: 15px; min-width: 0; }
.importHead select { grid-row: 1 / 3; grid-column: 2; }
.importMap { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.importMap label { display: grid; gap: 4px; font-size: 12px; font-weight: 650; color: var(--text-2); }
.importSum { display: grid; gap: 4px; padding: 12px; border-radius: 14px; background: var(--accent-soft); margin: 4px 0 14px; }
.importSum small { color: var(--text-2); font-size: 12.5px; }
.sheetActions { display: flex; gap: 10px; }
.sheetActions .btn.ghost { width: auto; height: 48px; }
.field.wide + .fine, .btn.wide + .field { margin-top: 10px; }
.importCar { margin: -4px 0 12px; }
.importDates { display: grid; gap: 6px; padding: 12px; border-radius: 14px; border: 1px dashed var(--line); margin: 0 0 12px; }
.importDates small { color: var(--text-2); font-size: 12.5px; }
.importDates input { height: 40px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--text); padding: 0 10px; font-size: 15px; min-width: 0; width: 100%; }
.videoThumb { position: relative; display: block; }
.videoThumb em { position: absolute; right: 4px; bottom: 4px; font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: rgba(0,0,0,.72); padding: 1px 5px; border-radius: 5px; font-variant-numeric: tabular-nums; }
.videoItem .rowText small { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.videoWhy { color: var(--text-3) !important; font-size: 12px !important; }
.fitTag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); }
.fitTag.exact { background: var(--accent-soft); color: var(--accent); }
.fitTag.similar { background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue); }
.videoItem.watching { outline: 2px solid var(--accent); }
.videoStatus, .videoItem .srcError, .videoCheck { grid-column: 1 / -1; margin: 0; font-size: 13px; }
.videoStatus { color: var(--text-2); }
.videoCheck { display: grid; gap: 8px; padding: 10px; border-radius: 11px; background: color-mix(in srgb, var(--amber) 14%, transparent); }
.videoCheck p { margin: 0; }
.videoList > .linkBtn { justify-self: start; }
.wsVideoWrap { display: grid; gap: 8px; margin-bottom: 14px; }
.wsVideoWrap .wsVideo { margin: 0; }
.wsVideo > div, .wsVideo > iframe { width: 100%; height: 100%; }
.wsReplay { justify-self: start; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 99px; padding: 8px 14px; background: var(--accent-soft); color: var(--accent); font-weight: 650; font-size: 14px; }
.wsQa { border: 1.5px solid var(--accent); }
.wsQa .btn { margin-top: 10px; width: auto; }
.wsStepDim { opacity: .55; }

/* Projects tab */
.projectCards { display: grid; gap: 12px; }
.projectCard { display: grid; gap: 10px; text-align: left; border: 0; padding: 14px; border-radius: 18px; background: var(--surface); color: inherit; font: inherit; box-shadow: var(--shadow-sm, none); }
.pcTop { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.pcTop .rowText b { font-size: 16px; }
.pcBar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.pcBar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.pcStats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--text-2); }
.pvHead { margin: 4px 4px 14px; }
.pvHead small { color: var(--text-3); font-size: 13px; font-weight: 600; }
.pvHead h1 { margin: 2px 0 4px; font-size: 26px; line-height: 1.15; overflow-wrap: anywhere; }
.pvHead p { margin: 0; color: var(--text-2); font-size: 14px; }
.statSub { display: block; font-style: normal; font-size: 11.5px; color: var(--text-3); }
.planner { display: grid; gap: 10px; padding: 14px; border-radius: 18px; background: var(--surface); }
.plannerHead { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.planner > .btn { justify-self: start; }
.pq { display: grid; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line); }
.pq p { margin: 0; font-weight: 600; font-size: 14.5px; }
.pq input, .addRow input { height: 42px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); padding: 0 12px; font-size: 15px; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 99px; padding: 7px 12px; font: inherit; font-size: 13.5px; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pvTip { margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); font-size: 14px; }
.pvTip p { margin: 0 0 6px; }
.pvTip ul { margin: 4px 0 0; padding-left: 18px; }
.taskRow { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 8px; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.taskRow:last-child { border-bottom: 0; }
.taskMain { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; min-width: 0; }
.taskMain input, .partLine input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }
.taskRow .rowText b { font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.taskRow.done .rowText b, .partLine.done .rowText b { text-decoration: line-through; color: var(--text-3); }
.taskDetail { grid-column: 1 / -1; display: grid; gap: 8px; padding: 6px 0 4px 32px; font-size: 14px; }
.taskDetail p { margin: 0; white-space: pre-line; }
.taskDetail .headActions { flex-wrap: wrap; gap: 6px; }
.iconBtn.small { width: 32px; height: 32px; }
.addRow { display: grid !important; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.list > .addRow { padding: 10px 12px; }
.partLine { grid-template-columns: auto 1fr auto auto !important; gap: 12px; }
.askBox { display: grid; gap: 8px; width: 100%; }
.pChat { display: grid; gap: 10px; padding: 12px; border-radius: 18px; background: var(--surface); }
.pMsg { padding: 10px 12px; border-radius: 14px; font-size: 14.5px; max-width: 92%; }
.pMsg p { margin: 0 0 6px; } .pMsg p:last-child { margin: 0; }
.pMsg.user { justify-self: end; background: var(--accent); color: #fff; }
.pMsg.assistant { justify-self: start; background: var(--bg); }
.pOffer { padding: 12px; border-radius: 14px; border: 1.5px dashed var(--accent); font-size: 14px; }
.pOffer ul { margin: 6px 0 10px; padding-left: 18px; }
.sectionTitle .muted { font-weight: 600; color: var(--text-3); margin-left: auto; font-size: 13px; }
.refillCam { display: grid; gap: 8px; }
.refillCam .groupLabel { margin: 0; }
.camStep { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 14px; padding: 10px 12px; font: inherit; }
.camStep.done { border-color: var(--accent); background: var(--accent-soft); }
.camNum { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-weight: 700; font-size: 13px; }
.camStep.done .camNum { background: var(--accent); color: #fff; }
.camStep .rowText small { color: var(--text-2); }
/* Changing car: arrows beside the car chips and the pager, and a hint until the owner has swiped */
.carSwitch { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px; margin: 0 -8px 14px; }
.carSwitch .carChips { margin: 0; padding: 2px 4px 4px; }
.swArrow { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--surface); color: var(--text-2); display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.swArrow:disabled { opacity: .3; }
.pagerRow { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 10px 0 0; }
.pagerRow .dots { margin: 0; }
.swipeHint { display: flex; align-items: center; gap: 10px; margin: -6px 0 14px; padding: 9px 12px; border-radius: 14px; background: var(--accent-soft); color: var(--text); font-size: 13.5px; font-weight: 600; }
.pagerRow + .swipeHint { margin: 10px 0 0; }
.swipeHint span:nth-child(2) { flex: 1; }
.swipeHint button { border: 0; background: none; color: var(--text-2); padding: 4px; display: grid; }
.swipeHand { color: var(--accent); display: grid; animation: swipeHand 1.8s ease-in-out infinite; }
@keyframes swipeHand { 0%, 100% { transform: translateX(-6px); } 50% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .swipeHand { animation: none; } }

/* Title and subtitle stacked wherever .rowText is used (cards, planner, camera steps), not only in rows */
.rowText { min-width: 0; }
.rowText > b, .rowText > small { display: block; }
@media (max-width: 400px) {
  .stat { padding: 11px 10px; }
  .stat b { font-size: 17px; letter-spacing: -.5px; }
  .stat small { font-size: 11px; }
}
@media (max-width: 400px) {
  .row:has(> .rowSelect) { flex-wrap: wrap; }
  .row:has(> .rowSelect) .rowText { flex: 1 1 calc(100% - 60px); }
  .row > .rowSelect { flex: 1 1 100%; margin-left: 50px; max-width: none; }
  .row .rowValue small { white-space: nowrap; }
}
input.switch { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 99px; background: var(--surface-3); position: relative; flex: none; transition: background .2s; margin: 0; }
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
input.switch:checked { background: var(--accent); }
input.switch:checked::after { transform: translateX(18px); }
input.switch:disabled { opacity: .45; }
.remList .row .btn { flex: none; }
.shareBox { display: grid; gap: 6px; margin-top: 12px; padding: 12px; border-radius: 14px; background: var(--accent-soft); }
.shareBox a { color: var(--accent); font-weight: 650; overflow-wrap: anywhere; }
.partLine { grid-template-columns: auto 1fr auto auto auto !important; }
.toolChips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 8px; padding: 2px 16px; }
.toolChips::-webkit-scrollbar { display: none; }
.toolChips button { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 99px; padding: 7px 12px; font: inherit; font-size: 13px; font-weight: 600; }
.toolGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.toolGrid button { display: grid; justify-items: center; gap: 8px; padding: 14px 6px; border: 0; border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; text-align: center; box-shadow: var(--shadow); }
.segTabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--surface-3); border-radius: 12px; margin-bottom: 12px; }
.segTabs button { display: inline-flex; justify-content: center; align-items: center; gap: 6px; border: 0; background: none; color: var(--text-2); padding: 9px; border-radius: 9px; font: inherit; font-weight: 650; font-size: 14px; }
.segTabs button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.recBox { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface); margin: 6px 0 12px; min-height: 64px; }
.recBox .btn.wide { width: 100%; }
.recBox b { flex: none; font-variant-numeric: tabular-nums; }
.recDot { width: 12px; height: 12px; border-radius: 50%; background: var(--red); animation: recBlink 1s infinite; flex: none; }
@keyframes recBlink { 50% { opacity: .3; } }
.recLevel { flex: 1; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.recLevel i { display: block; height: 100%; background: var(--accent); transition: width .1s; }
.recBox.done { color: var(--accent); }
.recBox.done b { flex: 1; color: var(--text); }
.diag, .quote { display: grid; gap: 10px; }
.diag p, .quote p { margin: 0; }
.diagUrgency { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); }
.diagUrgency span { display: grid; gap: 2px; color: var(--text); }
.diagUrgency small { color: var(--text-2); font-size: 13px; }
.diagUrgency.stop { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.diagUrgency.soon, .diagUrgency.monitor { background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); }
.diagCauses { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.diagCauses li > b { margin-right: 6px; }
.diagCauses p { margin: 4px 0 0; font-size: 14px; }
.diagNext { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 4px; }
.verdict { display: block; font-style: normal; font-size: 11px; font-weight: 700; margin-top: 2px; text-align: right; color: var(--text-3); }
.verdict.fair { color: var(--accent); } .verdict.high { color: var(--red); } .verdict.low { color: var(--blue); } .verdict.check { color: var(--amber); }
.quoteLine .rowText b { white-space: normal; font-size: 14px; }
.recallRow .rowText small { white-space: normal; }
.knownIssues { display: block !important; }
.knownIssues summary { display: grid; cursor: pointer; }
.knownIssues ul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; }
.pill.ok { background: var(--accent-soft); color: var(--accent); }
.sheetActions .btn { white-space: nowrap; }
.ppBar { gap: 6px; }
.ppBar > b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ppBar .btn { white-space: nowrap; flex: none; }
@media (max-width: 420px) { .ppBar .ppTextShare { display: none; } .ppBar .btn.small { padding-left: 10px; padding-right: 10px; } }

/* Guided tour */
.tour { position: fixed; inset: 0; z-index: 3000; }
.tourShade { position: absolute; inset: 0; background: rgba(5, 10, 8, .62); transition: clip-path .3s ease; }
.tourRing { position: absolute; border-radius: 14px; box-shadow: 0 0 0 3px var(--accent), 0 0 0 9px color-mix(in srgb, var(--accent) 30%, transparent); pointer-events: none; transition: all .3s ease; animation: tourPulse 1.6s ease-in-out infinite; }
@keyframes tourPulse { 50% { box-shadow: 0 0 0 3px var(--accent), 0 0 0 14px color-mix(in srgb, var(--accent) 12%, transparent); } }
.tourBubble { position: absolute; width: min(340px, calc(100vw - 24px)); background: var(--surface); color: var(--text); border-radius: 18px; padding: 14px 16px 12px; box-shadow: 0 12px 40px rgba(0,0,0,.35); display: grid; gap: 6px; transition: top .3s ease, left .3s ease; }
.tourBubble small { color: var(--accent); font-weight: 700; font-size: 12px; }
.tourBubble b { font-size: 17px; line-height: 1.25; }
.tourBubble p { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.45; }
.tourNav { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.tourNav > span { display: flex; gap: 6px; }
.tourNav .btn { width: auto; }
@media (prefers-reduced-motion: reduce) { .tourRing { animation: none; } .tourShade, .tourBubble, .tourRing { transition: none; } }
.tourOffer { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 12px 12px 12px 14px; border-radius: 18px; background: var(--accent-soft); margin: -4px 0 16px; color: var(--accent); }
.tourOffer span { display: grid; color: var(--text); }
.tourOffer small { color: var(--text-2); font-size: 13px; }
.tourOffer .btn { width: auto; }
.tourX { border: 0; background: none; color: var(--text-3); padding: 4px; display: grid; }
.tourBtn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); border-radius: 99px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 650; margin: -6px 0 14px; }
@media (max-width: 380px) { .tourOffer { grid-template-columns: auto 1fr auto; } .tourOffer .btn { grid-column: 2 / 4; justify-self: start; } .tourX { grid-row: 1; grid-column: 3; } }

/* Selecting several items to delete */
.selToggle { margin-left: auto; border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; font-weight: 700; text-transform: none; letter-spacing: 0; padding: 2px 4px; }
.headActions .selToggle { margin: 0 4px; font-size: 15px; }
.selBox { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--text-3); display: grid; place-items: center; flex: none; color: #fff; margin: 0 8px 0 6px; }
.selBox.on { background: var(--accent); border-color: var(--accent); }
.row.picked, .taskRow.picked, .projectCard.picked { background: var(--accent-soft); }
.projectCard.picked { outline: 2px solid var(--accent); }
.selRow { border: 0; background: none; color: inherit; font: inherit; text-align: left; width: 100%; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; }
.list > .selRow.row { display: grid; background: var(--surface); }
.list > .selRow.row.picked { background: var(--accent-soft); }
.selBar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 40; width: min(560px, calc(100vw - 24px)); display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 18px; background: var(--surface); box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.selCount { flex: 1; text-align: center; font-weight: 650; font-size: 14px; color: var(--text-2); }
.selBar .linkBtn { white-space: nowrap; }
.btn.danger { background: var(--red); color: #fff; width: auto; }
.btn.danger:disabled { opacity: .45; }
.toast.withUndo { pointer-events: auto; }
.toast button { margin-left: 10px; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 800; padding: 2px 4px; }
.list.selecting { margin-bottom: 84px; }
body:has(.selBar) .toast { bottom: calc(150px + env(safe-area-inset-bottom)); }
/* traffic-light gauge */
.tlight { display: inline-flex; align-items: center; gap: 9px; padding: 8px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); max-width: 100%; }
.tlight.compact { padding: 3px 8px 3px 5px; gap: 5px; border-radius: 999px; font-size: 11.5px; vertical-align: middle; margin-right: 6px; }
.tlLamps { display: inline-flex; gap: 3px; padding: 3px 4px; border-radius: 999px; background: #1f2328; flex-shrink: 0; }
.tlLamps i { width: 10px; height: 10px; border-radius: 50%; background: #464c54; display: block; }
.tlight.compact .tlLamps i { width: 7px; height: 7px; }
.tlight.red .tlLamps .r { background: #ff4d4f; box-shadow: 0 0 6px #ff4d4f; }
.tlight.amber .tlLamps .a { background: #ffb020; box-shadow: 0 0 6px #ffb020; }
.tlight.green .tlLamps .g { background: #2ecc71; box-shadow: 0 0 6px #2ecc71; }
.tlText { min-width: 0; font-size: 13.5px; }
.tlText b { font-weight: 700; }
.tlText em { font-style: normal; color: var(--text-2); font-size: 12.5px; }
.tlText small { display: block; color: var(--text-2); font-size: 12px; line-height: 1.35; margin-top: 2px; }
.diag .tlight { margin: 8px 0 4px; }
.confTag .tlight.compact { padding: 0; margin: 0; border: 0; background: none; }
/* iPhone date fields have a built-in minimum width that spills into the next column: keep them in their box */
.field input[type="date"], .field input[type="time"], .field input[type="month"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; line-height: 46px; }
.field input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
.field input[type="date"]::-webkit-calendar-picker-indicator { margin-left: auto; }
/* refill photo wizard */
.camStart { width: 100%; }
.camNext { width: 100%; }
.liveCam { position: fixed; inset: 0; z-index: 80; background: #000; color: #fff; display: flex; flex-direction: column; }
.liveCam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.liveFlash { position: absolute; inset: 0; background: #fff; opacity: .7; pointer-events: none; }
.liveTop { position: relative; margin: calc(env(safe-area-inset-top) + 12px) 12px 0; padding: 12px 14px; border-radius: 14px; background: rgba(0,0,0,.55); display: grid; gap: 3px; }
.liveTop b { font-size: 17px; }
.liveTop small { font-size: 13px; opacity: .85; line-height: 1.35; }
.liveCount { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: #7ee2a8; }
.liveBar { position: relative; margin-top: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 18px 16px calc(env(safe-area-inset-bottom) + 22px); background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.liveSide { background: rgba(0,0,0,.45); color: #fff; border: 0; border-radius: 999px; padding: 10px 14px; font: inherit; font-weight: 650; font-size: 14px; justify-self: center; cursor: pointer; }
.liveShutter { width: 76px; height: 76px; border-radius: 50%; border: 4px solid #fff; background: transparent; padding: 5px; cursor: pointer; }
.liveShutter i { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; }
.liveShutter:disabled { opacity: .4; }
.liveShutter:active i { transform: scale(.9); }
/* owner's manual (About this car) and the in-app reader */
.ownerManual { margin: 14px 0 10px; display: grid; gap: 8px; }
.ownerManual .groupLabel { margin: 0; }
.omRow { display: flex; gap: 12px; align-items: center; }
.omRow .rowText { flex: 1; min-width: 0; }
.omRow .rowText b { display: block; font-size: 15px; }
.omRow .rowText small { display: block; color: var(--text-2); font-size: 12.5px; line-height: 1.4; }
.omActions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.omActions .btn { width: auto; text-decoration: none; }
.reader { display: grid; gap: 10px; }
.readerFind { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.readerFind input { flex: 1 1 180px; min-width: 0; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 0 12px; font: inherit; font-size: 16px; }
.readerPage { max-height: 58vh; overflow-y: auto; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 16px; line-height: 1.55; }
.readerPage p { margin: 0 0 8px; overflow-wrap: anywhere; }
.readerPage mark { background: #ffe58a; color: #111; border-radius: 3px; padding: 0 1px; }
.readerNav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.readerNav .btn { width: auto; }
.readerGo { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-2); }
.readerGo input { width: 64px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: center; font: inherit; }
/* new version available */
.updateBanner { display: flex; align-items: center; gap: 10px; margin: 10px 16px 0; padding: 10px 10px 10px 14px; border-radius: 14px; background: var(--accent-soft); color: var(--text); font-size: 14px; }
.updateBanner span { flex: 1; min-width: 0; }
.updateBanner .btn { width: auto; }
.versionRow .btn { width: auto; flex: none; }
/* choosing the AI that plans a project */
.levelPick { display: grid; gap: 8px; margin: 8px 0; }
.levelOpt { display: grid; gap: 2px; text-align: left; padding: 11px 13px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.levelOpt.on { border-color: var(--accent); background: var(--accent-soft); }
.levelOpt:disabled { opacity: .45; cursor: default; }
.levelOpt b { font-size: 15px; display: flex; gap: 8px; align-items: center; }
.levelOpt small { font-size: 12.5px; color: var(--text-2); line-height: 1.35; }
.levelOpt .levelCost { color: var(--text); font-weight: 650; }
.levelTag { font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 1px 7px; border-radius: 999px; }

/* ---- tablet and desktop layout --------------------------------------------------------------
   Phones (and narrow windows) keep the one-column app with the tab bar at the bottom. From 768px wide
   the app fills the screen: the tabs become a side bar, the content gets a comfortable reading width,
   the car page splits into two columns, car cards sit side by side and panels open as centred dialogs. */
.railBrand { display: none; }
.detailCols, .colMain, .colSide { display: contents; }
@media (min-width: 768px), (orientation: landscape) and (min-width: 560px) and (max-height: 520px) {
  body { background: var(--bg); }
  .stage { padding: 0; display: block; }
  .phone { max-width: none; height: 100dvh; border-radius: 0; box-shadow: none; border: 0; display: grid; grid-template-columns: 208px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .tabbar { position: relative; grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 4px; padding: max(22px, env(safe-area-inset-top)) 12px 20px; border-top: 0; border-right: 1px solid var(--line); background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .tabbar button { display: flex; align-items: center; justify-items: start; gap: 12px; padding: 11px 14px; border-radius: 12px; font-size: 15px; font-weight: 600; color: var(--text-2); text-align: left; }
  .tabbar button:hover { background: var(--surface-2, var(--bg)); }
  .tabbar button.on { background: var(--accent-soft); color: var(--accent-strong, var(--accent)); }
  .tabbar button.on svg { transform: none; }
  .railBrand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 20px; font: 700 16px/1.2 var(--font-display); letter-spacing: -.2px; color: var(--text); }
  .railBrand img { width: 32px; height: 32px; border-radius: 9px; flex: none; }
  .content { grid-column: 2; grid-row: 1; min-width: 0; padding: max(28px, env(safe-area-inset-top)) max(32px, calc((100% - 1080px) / 2)) 48px; }
  .content.chatContent { padding-left: max(32px, calc((100% - 820px) / 2)); padding-right: max(32px, calc((100% - 820px) / 2)); padding-bottom: 24px; }
  .screenHead h1 { font-size: 34px; }
  .carCards { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
  .swipeHint { display: none; }
  .toolGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sheetScrim { align-items: center; justify-content: center; padding: 32px; }
  .sheet { max-width: 640px; max-height: 88%; border-radius: 26px; padding-bottom: 22px; animation: fade .2s; }
  .toast { bottom: 28px; left: calc(50% + 104px); }
  .selBar { bottom: 24px; left: calc(50% + 104px); width: min(560px, calc(100vw - 260px)); }
  .workshop .wsHead, .workshop .wsTools, .workshop .wsBody, .workshop .wsNav { padding-left: max(32px, calc((100% - 900px) / 2)); padding-right: max(32px, calc((100% - 900px) / 2)); }
  .wsText { font-size: 30px; }
  .liveTop { max-width: 560px; margin-left: auto; margin-right: auto; }
}
/* Portrait tablets: a slim side bar (icons over labels) and one column of content. */
@media (min-width: 768px) and (max-width: 999px), (orientation: landscape) and (min-width: 560px) and (max-width: 999px) and (max-height: 520px) {
  .phone { grid-template-columns: 92px minmax(0, 1fr); }
  .tabbar { padding-left: 8px; padding-right: 8px; align-items: stretch; }
  .tabbar button { display: grid; justify-items: center; gap: 4px; padding: 10px 2px; font-size: 12px; text-align: center; }
  .railBrand { justify-content: center; padding: 2px 0 18px; font-size: 0; gap: 0; }
  .railBrand img { width: 40px; height: 40px; border-radius: 11px; }
  .content { padding-left: max(28px, calc((100% - 760px) / 2)); padding-right: max(28px, calc((100% - 760px) / 2)); }
  .toast, .selBar { left: calc(50% + 46px); }
  .hero { aspect-ratio: 16 / 8; }
  .selBar { width: min(560px, calc(100vw - 140px)); }
}
/* Wide screens: the car page in two columns. */
@media (min-width: 1000px) {
  .detailCols { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 0 28px; align-items: start; }
  .colMain, .colSide { display: block; min-width: 0; }
  .colSide > .section:first-child, .colSide > :first-child .section:first-child { margin-top: 0; }
  .colMain .stat b { font-size: clamp(16px, 1.45vw, 21px); }
  .colMain .stat { padding: 12px 10px; }
}
@media (min-width: 1200px) {
  .phone { grid-template-columns: 240px minmax(0, 1fr); }
  .toast, .selBar { left: calc(50% + 120px); }
}
@media (min-width: 768px), (orientation: landscape) and (min-width: 560px) and (max-height: 520px) {
  /* Screens without the tabs (sign-in, locked): one centred column. */
  .phone:not(:has(> .tabbar)) { display: flex; flex-direction: column; align-items: center; }
  .phone:not(:has(> .tabbar)) > * { width: 100%; max-width: 520px; }
}

/* report a problem */
.field textarea { height: auto; min-height: 110px; padding: 12px 13px; line-height: 1.45; resize: vertical; }
.reportPre { white-space: pre-wrap; word-break: break-word; font: 11.5px/1.45 ui-monospace, Menlo, monospace; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; max-height: 40vh; overflow: auto; margin: 8px 0; }
.reportAbout { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--amber-soft); font-size: 14px; margin: 0 0 12px; }
.reportAbout svg { color: var(--amber); flex: none; margin-top: 2px; }
.reportDone { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 12px 4px; }
.reportDone svg { color: var(--accent); }
.reportDone p { margin: 0; }
.reportDone .btn { margin-top: 10px; }
.reportLink { font-size: 13px; margin-left: 6px; }
.projectFollow { margin: 18px 0 0; }
/* Sources: what's added sits at the top, with a clear message after adding or removing */
.srcTop { scroll-margin-top: 12px; }
.srcOk { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 4px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--text); font-size: 14px; line-height: 1.4; }
.srcOk svg { color: var(--accent); flex: none; margin-top: 2px; }
.srcTop .srcError { margin: 10px 0 4px; padding: 10px 12px; border-radius: 12px; background: var(--red-soft, #fdecec); }
.srcCount { font-style: normal; font-size: 12px; font-weight: 700; color: var(--text-2); background: var(--surface-3); border-radius: 999px; padding: 1px 8px; margin-left: 4px; vertical-align: middle; }
.srcAdded { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 650; color: var(--accent); flex: none; }
/* Phones turned sideways (wide but short): a compact side bar that always fits. */
@media (min-width: 768px), (orientation: landscape) and (min-width: 560px) and (max-height: 520px) {
  .tabbar { overflow-y: auto; min-height: 0; }
}
@media (min-width: 768px) and (max-height: 520px), (orientation: landscape) and (min-width: 560px) and (max-height: 520px) {
  .railBrand { display: none; }
  .tabbar { padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: max(8px, env(safe-area-inset-bottom)); gap: 2px; justify-content: center; padding-left: max(8px, env(safe-area-inset-left)); }
  .tabbar button { padding: 6px 2px; gap: 2px; font-size: 11px; }
  .content { padding-top: max(14px, env(safe-area-inset-top)); padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
  .screenHead h1 { font-size: 26px; }
  .sheet { max-height: 94%; }
  .sheetScrim { padding: 12px; }
  .hero { aspect-ratio: auto; height: min(56vh, 230px); }
}
.suggHead { display: block; padding: 8px 13px; font-size: 12.5px; color: var(--text-2); background: var(--surface-2, var(--bg)); border-bottom: 1px solid var(--line); position: sticky; top: 0; }
.suggestions .suggHead .linkBtn { display: inline; width: auto; padding: 0; font-size: 12.5px; border: 0; }

/* Home: "Quick tour" and "Suggest a change" side by side under the title */
.homeChips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -6px 0 14px; }
.homeChips .tourBtn { margin: 0; }
.homeChips .tourOffer { flex: 1 1 100%; margin: 0; }
.suggestBtn { color: var(--blue, var(--text-2)); }

/* "Features you use" */
.features .fine { margin: 0 0 6px; }
.presetList { display: grid; gap: 8px; }
.preset { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text-2); font: inherit; }
.preset span { display: grid; gap: 2px; color: var(--text); }
.preset small { color: var(--text-2); font-size: 13px; line-height: 1.35; }
.preset.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.preset .tick { color: var(--accent); }
.customTag { font-style: normal; font-size: 12px; font-weight: 650; color: var(--accent); background: var(--accent-soft); border-radius: 99px; padding: 2px 8px; margin-left: 8px; }
.features .sheetActions { flex-direction: column; margin: 14px 0 calc(-20px - env(safe-area-inset-bottom)); position: sticky; bottom: calc(-20px - env(safe-area-inset-bottom)); background: var(--bg); padding: 10px 0 calc(20px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) { .features .sheetActions { margin-bottom: -22px; bottom: -22px; padding-bottom: 22px; } }
.features .sheetActions .btn.ghost { width: 100%; }
@media (min-width: 768px) { .presetList { grid-template-columns: 1fr 1fr; } }

/* "Check AI answers before following them" */
.aiCheck { display: flex; gap: 6px; align-items: flex-start; margin: 10px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--amber-soft, rgba(245,158,11,.12)); color: var(--text-2); font-size: 12.5px; line-height: 1.4; }
.aiCheck::before { content: "!"; flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--amber, #d97706); color: #fff; font: 700 11px/16px system-ui; text-align: center; margin-top: 1px; }
.aiCheck.compact { background: none; padding: 0; margin-top: 8px; font-size: 11.5px; opacity: .85; }
.aiCheck.compact::before { width: 13px; height: 13px; font-size: 9px; line-height: 13px; }
.workshop .aiCheck { background: rgba(255,255,255,.08); color: inherit; }

/* Swipe a row left for its actions (delete, edit, done…) */
.swipeRow { position: relative; transform: translateX(var(--sx, 0px)); transition: transform .22s ease; touch-action: pan-y; }
.swipeRow.dragging { transition: none; }
.swipeActs { position: absolute; top: 0; bottom: 0; left: 100%; display: flex; }
.swipeAct { width: 74px; display: grid; place-content: center; justify-items: center; gap: 3px; color: #fff; font-size: 11.5px; font-weight: 650; border: 0; }
.swipeAct.red { background: var(--red); }
.swipeAct.blue { background: var(--blue); }
.swipeAct.accent { background: var(--accent); }
.swipeRow:not(.swiped):not(.dragging) .swipeActs { visibility: hidden; }

/* Documents listed from a manuals page */
.manualResults li.withDocs { flex-wrap: wrap; }
.pageDocs { list-style: none; margin: 8px 0 2px; padding: 0; width: 100%; display: grid; gap: 6px; flex-basis: 100%; }
.pageDocs li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.pageDocs li span { display: grid; gap: 2px; min-width: 0; }
.pageDocs b { font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.pageDocs small { color: var(--text-3); font-size: 12px; }
.pageDocsNote { flex-basis: 100%; font-size: 13px; color: var(--text-2); margin: 8px 0 0; }
.ownerManual .pageDocs { margin-top: 10px; }

/* Four "Something wrong?" tools: 2 × 2 on phones */
.toolGrid { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .toolGrid { grid-template-columns: repeat(4, 1fr); } }
.toolGrid button { grid-template-columns: auto 1fr; justify-items: start; align-items: center; text-align: left; padding: 12px; }
@media (min-width: 768px) { .toolGrid button { grid-template-columns: none; justify-items: center; text-align: center; padding: 14px 6px; } }
.codeList { margin: 10px 0; }
.codeTag { font: 700 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 6px 8px; border-radius: 8px; background: var(--violet-soft, rgba(139,92,246,.14)); color: var(--violet, #7c3aed); }
.codeChips { margin: 4px 0 8px; }

/* What it's worth */
.valueCard .studying { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.valueRange { margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.valueRange b { font-size: 24px; font-weight: 750; letter-spacing: -.02em; }
.valueRange small { color: var(--text-2); font-size: 13px; }
.valueAds li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.valueAds li span { display: grid; gap: 2px; min-width: 0; }
.valuePrice { font-style: normal; font-weight: 700; white-space: nowrap; }

/* Bigger projects: next task, phases, hidden done tasks, best prices per supplier */
.nextUp { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 14px; background: var(--accent-soft); border-bottom: 1px solid var(--line); }
.nextUp span { display: grid; gap: 2px; min-width: 0; }
.nextUp small { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.nextUp b { font-size: 14.5px; font-weight: 650; overflow-wrap: anywhere; }
.phaseHead { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: baseline; padding: 14px 14px 8px; background: var(--bg); border-bottom: 1px solid var(--line); }
.phaseHead b { font-size: 13px; font-weight: 750; letter-spacing: .02em; }
.phaseHead small { color: var(--text-3); font-size: 12px; }
.phaseHead .pcBar { grid-column: 1 / -1; margin: 2px 0 0; }
.row.showDone { color: var(--text-2); font-size: 13.5px; gap: 8px; justify-content: center; }
.priceAll { display: grid; gap: 6px; margin: 10px 4px 0; justify-items: start; }
.supplierSum { width: 100%; background: var(--surface); border-radius: 14px; padding: 4px 12px 10px; box-shadow: var(--shadow); }
.supRow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.supRow span { color: var(--text-2); font-size: 12.5px; }
.supRow em { font-style: normal; font-weight: 700; }
.srcList .pageDocs li .btn { background: var(--accent); color: var(--on-accent); padding: 0 14px; }
.srcList .pageDocs li .btn:hover { color: var(--on-accent); }
.pageDocs li > span b, .valueAds li > span b { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
.segTabs:has(> :nth-child(3)) { grid-template-columns: repeat(3, 1fr); }
.segTabs:has(> :nth-child(3)) button { padding: 9px 4px; font-size: 13.5px; }
.pageDocs li > span small { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pageDocs .docKind { display: inline-block; width: auto; }
.pageDocs .srcAdded { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

/* Plus, bonus credits, free allowance */
.bonusTag { font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 99px; padding: 2px 7px; margin-left: 6px; }
.chipBtn.on .bonusTag { background: rgba(255,255,255,.22); color: inherit; }
.plusCard { background: var(--surface); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); margin-top: 14px; display: grid; gap: 10px; border: 1.5px solid var(--accent); }
.plusHead { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.plusHead b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--accent); }
.plusOn { font-size: 12.5px; font-weight: 650; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 99px; }
.plusCard ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.freeLeft { margin-top: 2px; }

/* Paid reports: pre-purchase check, sale ad */
.reportForm { display: grid; gap: 10px; }
.formGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.reportPrice { margin: 4px 0; font-size: 14px; } .reportPrice span, .reportPrice small { color: var(--text-2); }
.reportResult { display: grid; gap: 8px; }
.reportResult h3 { margin: 0; font-size: 18px; } .reportResult h4 { margin: 10px 0 0; font-size: 14px; letter-spacing: .01em; }
.reportList { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; line-height: 1.4; }
.reportList li > span, .reportList li > small { display: block; color: var(--text-2); font-size: 13px; }
.reportList.flags li::marker { color: var(--red); }
.reportList.checks { list-style: none; padding-left: 0; } .reportList.checks label { display: flex; gap: 8px; align-items: flex-start; }
.adText { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 14px; line-height: 1.5; margin: 0; }
/* Photos and files on the account */
.storageCard, .inviteCard { background: var(--surface); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); margin-top: 14px; display: grid; gap: 8px; }
.storageCard .fine, .inviteCard .fine { margin: 0; }
.storageCard .bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.storageCard .bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.storageCard .bar.warn i { background: var(--amber, #c97c00); }
.storageCard .bar.over i { background: var(--red, #e0444a); }
.storageCard .chipBtn { justify-self: start; }
/* Running costs */
.costCard { display: grid; gap: 12px; }
.costTotals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.costTotals > div { background: var(--surface-3); border-radius: 12px; padding: 8px 10px; }
.costTotals small { display: block; color: var(--text-2); font-size: 12px; }
.costTotals b { font-size: 17px; }
.costBars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.costBars li { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.costBars li > span { display: flex; gap: 6px; align-items: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.costBars li > i { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.costBars li > i > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.chipGrid.kinds .chipBtn { display: inline-flex; gap: 6px; align-items: center; }
/* Trip log */
.tripLive { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 8px 0; }
.tripLive b { font-size: 44px; line-height: 1; }
.tripLive b em { font-size: 18px; font-style: normal; color: var(--text-2); }
.tripDot { width: 12px; height: 12px; border-radius: 50%; background: var(--red); animation: tripPulse 1.4s infinite; }
@keyframes tripPulse { 50% { opacity: .3; } }
.tripStart { display: grid; gap: 10px; justify-items: stretch; }
.tripStart .linkBtn { justify-self: center; }
.tripDone { background: var(--accent-soft, #e2f5ea); border-radius: 14px; padding: 12px; display: grid; gap: 8px; margin-top: 10px; }
.tripDone p { margin: 0; }
/* Fuel prices nearby */
.stationMap { height: 260px; border-radius: 16px; overflow: hidden; margin: 10px 0; background: var(--line); }
.stationPrice { font-weight: 750; font-variant-numeric: tabular-nums; min-width: 72px; }
.stationPrice.best { color: var(--accent); }
.priceTag { background: #fff; color: #0f1513; border: 1.5px solid #2b78f0; border-radius: 8px; font: 700 12px/18px -apple-system, sans-serif; text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.priceTag.best { border-color: #10a057; background: #10a057; color: #fff; }
/* Car page tabs (phones and tablets); wide screens show everything in two columns. */
.ctabGroup { display: contents; }
.ctabGroup:not(.on) { display: none; }
.segTabs.carTabs { grid-template-columns: repeat(4, 1fr); margin: 14px 0 2px; }
.segTabs.carTabs button { padding: 9px 2px; font-size: 13px; gap: 4px; }
@media (max-width: 360px) { .segTabs.carTabs button svg { display: none; } }
@media (min-width: 1000px) { .segTabs.carTabs { display: none; } .ctabGroup, .ctabGroup:not(.on) { display: contents; } }
/* The example car a new app starts with */
.sampleTag { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; letter-spacing: .02em; backdrop-filter: blur(6px); }
.sampleNote { display: flex; gap: 12px; align-items: center; justify-content: space-between; background: var(--accent-soft); border-radius: 16px; padding: 12px 14px; margin: 0 0 12px; }
.sampleNote p { margin: 0; font-size: 13.5px; color: var(--text-2); }
.sampleNote p b { display: block; color: var(--text); font-size: 14.5px; }
.sampleNote .btn { width: auto; flex: none; }
/* Adding a car: quick ways first */
.addChoices { display: grid; gap: 10px; }
.addChoices > .fine { margin: 0 2px 2px; }
.choiceBig { display: flex; gap: 12px; align-items: flex-start; text-align: left; background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; padding: 14px; font: inherit; color: var(--text); cursor: pointer; width: 100%; }
.choiceBig:first-of-type { border-color: var(--accent); }
.choiceBig > span:not(.tile) { display: grid; gap: 3px; min-width: 0; flex: 1; }
.choiceBig > .tile { flex: none; }
.choiceBig b { font-size: 15.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.choiceBig small { color: var(--text-2); font-size: 13px; line-height: 1.35; }
.choiceBig.open { cursor: default; border-color: var(--blue); }
.choiceBig .platePick { display: grid; gap: 8px; }
.choiceBig .platePick .btn { justify-self: start; width: auto; }
.bestTag { font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 99px; }
.typeIt { justify-self: center; margin-top: 4px; }
.checkNote { display: flex; gap: 6px; align-items: center; color: var(--accent); margin: 0; }
details.advanced > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
details.advanced > summary::-webkit-details-marker { display: none; }
details.advanced > summary small { font-weight: 600; color: var(--text-2); text-transform: none; letter-spacing: 0; }
details.advanced > summary::after { content: "›"; font-size: 18px; color: var(--text-3); transform: rotate(90deg); margin-left: 8px; }
details.advanced[open] > summary::after { transform: rotate(-90deg); }
.freeCount { margin: 0 4px 6px; font-size: 12.5px; color: var(--text-2); display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.freeCount.low { color: var(--amber); font-weight: 600; }
.inviteLink code { display: block; background: var(--surface-3); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inviteCard .btn { justify-self: start; width: auto; }
.accountBody > .plusCard:first-child { margin-top: 0; margin-bottom: 14px; }
/* Introducer area */
.introRow { background: var(--surface); border-radius: 16px; margin-bottom: 14px; width: 100%; box-shadow: var(--shadow); }
.introHead b.num { font-size: 40px; }
.introStats { margin: 14px 0 0; }
.introMonths { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; padding: 12px 8px; }
.introMonth { display: grid; gap: 3px; justify-items: center; font-size: 10.5px; color: var(--text-2); }
.introMonth > i { height: 70px; width: 100%; display: flex; align-items: flex-end; }
.introMonth > i > i { display: block; width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; }
.introMonth b { font-size: 10px; color: var(--text); }
.introMonth em { font-style: normal; color: var(--blue); }
.introAdd { gap: 8px; margin-top: 8px; }
.introAdd input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); color: var(--text); font: inherit; }
.introAdd .btn { width: auto; }
.termsText { white-space: pre-wrap; }
.linkActions { display: flex; gap: 4px; align-items: center; flex: none; }

/* ---- 2026.11.08b: motorbikes, shortcuts, price list, diagnosis to project, projects folded ---- */
.kindPick { grid-column: 1 / -1; margin-bottom: 4px; }
.addChoices .kindPick { margin-bottom: 10px; }
.shortcuts .scGrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.scGrid button { display: grid; justify-items: center; gap: 6px; padding: 12px 4px; border: 0; border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; font-size: 12px; font-weight: 600; text-align: center; box-shadow: var(--shadow); line-height: 1.2; }
@media (max-width: 360px) { .shortcuts .scGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.scEdit { display: grid; gap: 10px; }
.scEdit .checkRow { display: flex; align-items: center; gap: 12px; }
.scFab { position: absolute; right: 16px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 12; width: 52px; height: 52px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 20px rgba(16, 120, 70, .35); transition: transform .2s; }
.scFab.on { transform: rotate(90deg); background: var(--text); color: var(--surface); }
.scScrim { position: absolute; inset: 0; z-index: 11; background: var(--scrim); display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 16px calc(140px + env(safe-area-inset-bottom)); }
.scMenu { display: grid; gap: 6px; min-width: 230px; max-width: calc(100% - 8px); max-height: 60vh; overflow: auto; padding: 10px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-lg); }
.scMenu > button:not(.linkBtn) { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border: 0; border-radius: 12px; background: none; color: var(--text); font: inherit; font-weight: 600; text-align: left; }
.scMenu > button:not(.linkBtn):hover { background: var(--surface-2); }
.scEditBtn { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 6px 8px; }
@media (min-width: 768px), (orientation: landscape) and (min-width: 560px) and (max-height: 520px) {
  .scFab { bottom: 24px; right: 24px; }
  .scScrim { padding-bottom: 90px; }
}
.priceTable { display: grid; gap: 2px; border-radius: 14px; overflow: hidden; background: var(--line); font-size: 13px; }
.ptHead, .ptRow { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 8px; padding: 8px 10px; background: var(--surface); align-items: center; }
.ptHead { font-weight: 700; color: var(--text-2); background: var(--surface-2); }
.ptRow span:not(:first-child) { font-variant-numeric: tabular-nums; }
.ptRow .ptFixed { grid-column: 2 / -1; }
.keepDiag { display: grid; gap: 10px; padding: 12px; margin-top: 12px; }
.keepDiagBtn { margin-top: 12px; }
.noteBox { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.plannerHead.compact { grid-template-columns: auto 1fr auto; }
details.pFold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
details.pFold > summary::-webkit-details-marker { display: none; }
details.pFold > summary::after { content: "›"; margin-left: auto; font-size: 20px; color: var(--text-3); transition: transform .2s; }
details.pFold[open] > summary::after { transform: rotate(90deg); }
.pMsg .moreBtn { margin-top: 4px; }
.pMsg.clipped p:last-of-type { -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent); }
.relNotes ul { margin: 4px 0 14px; padding-left: 20px; display: grid; gap: 6px; }
.syncMsg { display: block; color: var(--accent); }
.howBuy { margin-top: 8px; }
.whatsNew { color: var(--accent); }
.installOffer { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 14px; margin: 0 0 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.installOffer img { border-radius: 11px; }
.installOffer .headActions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.installSteps { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.installSteps svg { vertical-align: -3px; }
.deleteBox { display: grid; gap: 10px; padding: 14px; margin-top: 10px; }
.privacyLink { display: block; margin-top: 10px; font-size: 13px; color: var(--text-3); }
.quickTip { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 12px 12px 12px 14px; margin: 4px 0 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); transition: opacity .25s; }
.quickTip.fading { opacity: 0; }
.quickTip .tipLabel { display: block; font-weight: 700; letter-spacing: .02em; color: var(--text-3); text-transform: uppercase; font-size: 11px; }
.quickTip.paid .tipLabel { color: var(--violet, #7a5af5); }
.quickTip .tipText { display: block; font-size: 14px; line-height: 1.4; margin-top: 2px; }
.quickTip .tipGo { margin-top: 4px; font-weight: 700; }
.quickTip .tipBtns { display: flex; gap: 2px; }
.quickTip .tipBtns .iconBtn { width: 30px; height: 30px; }
@media (prefers-reduced-motion: reduce) { .quickTip { transition: none; } }
/* Compact car cards (S-COZG2): a row with a small photo instead of a big card. */
.carCards.compact { gap: 8px; }
.carCards.compact .carCard { aspect-ratio: auto; height: 76px; border-radius: 16px; background: var(--surface); color: var(--text); }
.carCards.compact .carCard img.photo, .carCards.compact .carCard .noPhoto { right: auto; width: 104px; }
.carCards.compact .carCard .noPhoto svg { width: 34px; height: 34px; }
.carCards.compact .carCard .shade { display: none; }
.carCards.compact .carCard .info { left: 118px; right: 12px; top: 0; bottom: 0; align-items: center; }
.carCards.compact .carCard .info b { font-size: 16.5px; text-shadow: none; }
.carCards.compact .carCard .info small { opacity: .7; font-size: 12px; }
.carCards.compact .carCard .plate { top: auto; bottom: 6px; left: 6px; transform: scale(.8); transform-origin: left bottom; }
.carCards.compact .carCard .sampleTag { display: none; }
.carCards.compact .addCar { height: 52px; }
.homeCustomise { text-align: center; margin: 4px 0 24px; }
.homeCustomise .linkBtn { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 13px; }
.homeLayout .headActions { display: flex; align-items: center; gap: 4px; }
.moodPick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.moodPick button { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: inherit; }
.moodPick button.on { border-color: var(--accent); background: var(--accent-soft, var(--surface-2)); }
.moodPick button small { color: var(--text-3); font-size: 12px; }
/* S-VEB3S: room under the shortcuts (their cards' shadow touched what came next); order in the editor. */
.section.shortcuts { margin-bottom: 22px; }
.section.shortcuts .scGrid { padding-bottom: 4px; }
.scEdit .scRow .headActions { margin-left: auto; display: inline-flex; gap: 4px; }
.scEdit .groupLabel { margin: 4px 0 0; }
/* S-T33LX: what to offer, after the issues found. */
.offerBox { display: grid; gap: 6px; margin: 12px 0; }
.offerBox h4 { margin: 0 0 2px; }
.offerRow { display: flex; justify-content: space-between; gap: 12px; margin: 0; font-size: 14px; }
.offerRow span { min-width: 0; }
.offerRow b { white-space: nowrap; }
.offerRow.minus b { color: var(--red, #d33); }
.offerRow.total { border-top: 1px solid var(--line); padding-top: 8px; font-size: 15px; }
.offerRow.total b { color: var(--accent); }
.idLine { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* Jobs that keep going when the owner leaves (R-UZISV, R-BH04G). */
.jobBox { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: center; background: var(--surface); border: 1px solid var(--accent); border-radius: 14px; padding: 10px 12px; }
.jobBox > span:nth-child(2) { display: grid; gap: 2px; font-size: 14px; }
.jobBox small { color: var(--text-2); font-size: 12.5px; }
.jobBar { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.jobBar i { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.pcJob { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--accent); font-weight: 600; padding: 2px 0 4px; }
/* Suggested basket (R-UZISV). */
.basket { width: 100%; background: var(--surface); border-radius: 14px; padding: 4px 12px 12px; box-shadow: var(--shadow); display: grid; gap: 4px; }
.basketShop ul { list-style: none; margin: 0 0 4px; padding: 0; }
.basketShop li { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 4px 0 4px 10px; border-bottom: 1px dashed var(--line); }
.basketShop li span { color: var(--text-2); white-space: nowrap; }
.basket .btn { justify-self: start; margin-top: 4px; }

/* S-VZKJC: Shortcuts is the last item of the tab bar: an accent circle (an action, not a page) the size of the other icons. */
.tabbar button.scTab { color: var(--text-2); }
.scTabIcon { display: grid; place-items: center; width: 30px; height: 30px; margin-top: -3px; border-radius: 50%; background: var(--accent); color: var(--on-accent); transition: transform .2s, background .2s; }
.scTabIcon svg { width: 20px; height: 20px; }
.tabbar button.scTab.on { color: var(--text); }
.tabbar button.scTab.on .scTabIcon { transform: rotate(90deg); background: var(--text); color: var(--surface); }
.scScrim.scFromTab { z-index: 30; justify-content: flex-end; padding: 0 12px calc(84px + env(safe-area-inset-bottom)); }
@media (min-width: 768px), (orientation: landscape) and (min-width: 560px) and (max-height: 520px) {
  .tabbar button.scTab { margin-top: auto; }
  .scTabIcon { width: 28px; height: 28px; margin: 0; }
  .scScrim.scFromTab { justify-content: flex-start; padding: 0 0 24px 24px; }
}

/* S-VFNFU: a conversation becomes a project. */
.toProjectLink { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 6px 4px; font-size: 13.5px; }
.card.toProject { display: grid; gap: 8px; margin: 4px 0 8px; padding: 12px; }
/* R-ZCKJ4: a page that shows the manual as pictures. */
.pageImages { display: grid; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); margin: 6px 0; }
.pageImages p { margin: 0; display: grid; gap: 2px; font-size: 14px; }
.pageImages small { color: var(--text-2); font-size: 12.5px; }
.pageImagesStrip { display: flex; gap: 6px; overflow: hidden; }
.pageImagesStrip img { width: 56px; height: 76px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); }
.pageImages .btn { justify-self: start; }
/* S-ET1FC: saved checks, the example. */
.savedChecks { margin: 4px 0 8px; }
.savedChecks summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent); padding: 6px 2px; }
.exampleNote { background: var(--surface-2, var(--bg)); border: 1px dashed var(--accent); border-radius: 12px; padding: 8px 12px; font-size: 13.5px; }
.savedNote { display: flex; align-items: center; gap: 6px; }
/* Clubs (white label). */
.clubHome { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 0 0 10px; border-radius: 16px; background: var(--accent-soft); flex-wrap: wrap; }
.clubHome > span:nth-of-type(1) { flex: 1 1 160px; display: grid; gap: 2px; min-width: 0; }
.clubHome b { font-size: 15px; }
.clubHome small { color: var(--text-2); font-size: 12.5px; }
.clubLogo { width: 44px; height: 44px; border-radius: 12px; object-fit: contain; background: var(--surface); flex: none; }
.clubLogo.small { width: 34px; height: 34px; border-radius: 9px; }
.clubJoin { display: flex; align-items: center; gap: 10px; }
.clubStats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.clubStats span { background: var(--surface); border-radius: 12px; padding: 8px 10px; display: grid; font-size: 12px; color: var(--text-2); }
.clubStats b { font-size: 18px; color: var(--text); }
.clubPreview { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: color-mix(in srgb, var(--c) 14%, var(--surface)); border: 2px solid var(--c); margin-bottom: 6px; }
.clubPreview img, .clubNoLogo { width: 48px; height: 48px; border-radius: 12px; object-fit: contain; background: var(--surface); }
.clubNoLogo { display: grid; place-items: center; font-weight: 800; background: var(--c); color: #fff; text-transform: uppercase; }
.clubPreview span { display: grid; } .clubPreview small { color: var(--text-2); }
.clubFund { display: flex; gap: 8px; align-items: center; margin: 4px 0 8px; }
.clubFund input { width: 120px; }
.clubForm .field input[type=color] { height: 40px; padding: 4px; }
.newClub { margin-top: 12px; padding: 12px; display: grid; gap: 8px; }
.clubAppLogo { border-radius: 24%; object-fit: contain; background: var(--surface); }
.loginScreen h1.clubTitle { font-size: 28px; line-height: 1.15; }
.clubBy { margin-top: -6px; }
/* S-DWCQJ: drag to reorder. */
.dragHandle { display: grid; place-items: center; width: 32px; height: 40px; margin-left: -6px; color: var(--text-3); cursor: grab; touch-action: none; flex: none; }
.dragHandle svg { stroke-width: 3.2; }
.dragging { position: relative; z-index: 5; background: var(--surface); box-shadow: 0 8px 24px rgba(0,0,0,.18); border-radius: 12px; cursor: grabbing; }
.dragShift { transition: transform .15s ease; }
@media (prefers-reduced-motion: reduce) { .dragShift { transition: none; } }
/* The look editor (app and clubs): live preview in light and dark. */
.lookPreview { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 6px; }
.lookPv { border-radius: 14px; padding: 10px; display: grid; gap: 8px; border: 1px solid var(--line); min-height: 120px; }
.lookPvHead { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #0f1513; }
.lookPv.dark .lookPvHead { color: #edf2ef; }
.lookPvHead img, .lookPvHead .clubNoLogo { width: 28px; height: 28px; border-radius: 8px; object-fit: contain; background: #fff; font-size: 11px; color: #fff; display: grid; place-items: center; font-weight: 800; }
.lookPvCard { background: #fff; color: #0f1513; border-radius: 10px; padding: 8px; font-size: 12px; }
.lookPv.dark .lookPvCard { background: #151a18; color: #edf2ef; }
.lookPvBtn { justify-self: start; color: #fff; border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 700; }
.lookBgs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lookBgs input[type=color], .clubForm input[type=color] { height: 40px; padding: 4px; width: 100%; }
.lookTabs { margin-bottom: 8px; }
/* Ready-made colours. */
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; margin-bottom: 8px; }
.presets button { display: grid; justify-items: center; gap: 4px; background: none; border: 0; padding: 4px 2px; border-radius: 12px; cursor: pointer; color: var(--text-2); }
.presets button.on { background: var(--accent-soft); color: var(--text); }
.presetSwatch { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); overflow: hidden; }
.presetSwatch i { position: absolute; inset: 12px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.presets small { font-size: 11px; text-align: center; line-height: 1.2; }
.whoSees { display: flex; gap: 6px; align-items: flex-start; background: var(--surface); border-radius: 12px; padding: 8px 10px; }
/* Logo shapes (S-OCKZJ): circle, rounded square and rounded rectangle (2:1), each filled edge to edge
   (the logo's empty margins are trimmed on upload). */
img.logoShape { background: transparent; object-fit: cover; }
img.logoShape.lsRound { border-radius: 50%; }
img.logoShape.lsSquare { border-radius: 22%; }
img.logoShape.lsWide { border-radius: 11% / 22%; aspect-ratio: 2 / 1; width: auto; max-width: none; }
img.clubAppLogo.lsWide { height: 72px; }
.lookPvHead img.lsWide { height: 28px; }
/* Search the app. */
.homeSearch { display: flex; align-items: center; gap: 10px; width: 100%; margin: 4px 0 10px; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text-3); font: inherit; font-size: 15px; cursor: text; text-align: left; }
.homeSearch span { flex: 1; }
.homeSearch kbd { font: 600 11px/1 ui-monospace, monospace; border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; color: var(--text-3); }
@media (pointer: coarse) { .homeSearch kbd { display: none; } }
.searchBar { gap: 8px; }
.searchField { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 10px; min-width: 0; }
.searchField:focus-within { border-color: var(--accent); }
.searchField input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 0; font: inherit; font-size: 16px; color: var(--text); outline: none; }
.searchField input::-webkit-search-cancel-button { display: none; }
.searchKinds { overflow-x: auto; scrollbar-width: none; margin: 4px 0 6px; max-width: 100%; }
.searchKinds small { opacity: .6; margin-left: 3px; }
.searchHit .rowText { display: grid; gap: 2px; min-width: 0; }
.searchHit .rowText b { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.searchSnip { color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.searchMeta { color: var(--text-3); font-size: 12px; }
.searchHit mark, .searchSnip mark { background: var(--accent-soft); color: var(--text); border-radius: 3px; padding: 0 1px; }
.searchRecent { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.searchRecent .chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13.5px; color: var(--text); cursor: pointer; }
.searchMore { margin: 4px 0 0 4px; }
.searchNone { margin-top: 16px; text-align: center; }
.msgAnchor { display: block; height: 0; }
.msgFlash { animation: msgFlash 2.4s ease; }
@keyframes msgFlash { 0%, 60% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .msgFlash { animation: none; outline: 3px solid var(--accent); } }

/* ---- Usability review (Nov 2026): small screens, tap areas, side bar extras ---- */
/* Headers: the title gives way, the buttons never leave the screen. */
.screenHead > div { min-width: 0; flex: 1 1 auto; }
.screenHead h1 { overflow-wrap: anywhere; }
@media (max-width: 340px) { .screenHead { flex-wrap: wrap; row-gap: 8px; } .screenHead > div:first-child { flex: 1 1 100%; } .screenHead .headActions { margin-left: auto; } }
.headActions { flex: none; }
@media (max-width: 360px) {
  .screenHead h1 { font-size: 25px; }
  .screenHead { gap: 8px; }
  .headActions { gap: 6px; }
  .stat { padding: 10px; }
  .stat b { font-size: 16px; }
  .stat b em { font-size: 11px; margin-left: 1px; }
}
/* Settings rows with a switch or button: on narrow screens the control moves under the title instead of cutting it. */
@media (max-width: 380px) {
  .row:has(> .seg), .row.syncRow { flex-wrap: wrap; }
  .row:has(> .seg) > .rowText, .row.syncRow > .rowText { flex: 1 1 calc(100% - 62px); }
  .row:has(> .seg) > .seg, .row.syncRow > .btn { margin-left: 50px; }
}
.inviteCard { grid-template-columns: minmax(0, 1fr); }
.inviteCard > * { min-width: 0; }
.localOnlyBtn { height: auto; min-height: 48px; padding: 8px 14px; }
.localOnlyBtn span { display: grid; gap: 1px; text-align: center; }
.localOnlyBtn small { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.features .sheetActions { box-shadow: 0 -12px 16px -12px rgba(0, 0, 0, .18); }

/* Tap areas of at least 40 px. Where the look should stay small, the button grows invisibly
   (padding with an equal negative margin), so nothing on screen moves. */
.sectionTitle a, .sectionTitle button, .selToggle { min-height: 40px; display: inline-flex; align-items: center; padding: 0 6px; margin: -12px -6px; }
.sectionTitle .selToggle { margin-left: auto; margin-right: -6px; }
.wide > .linkBtn, .row > .linkBtn, .rowText .tipGo, .searchField .linkBtn, .messages .toProjectLink, .scMenu .scEditBtn, .loginScreen .linkBtn, .moreBtn, .searchLink { min-height: 40px; display: inline-flex; align-items: center; margin-top: -10px; margin-bottom: -10px; }
.loginScreen .linkBtn { justify-self: center; padding: 0 10px; }
.searchField .linkBtn { min-width: 40px; justify-content: center; margin-right: -10px; }
.moreBtn { margin-top: -4px; }
.swArrow { width: 40px; height: 40px; }
.swipeHint button { padding: 11px; margin: -8px -8px -8px 0; }
.rowDelete { width: 40px; height: 40px; margin: -5px -5px -5px 0; }
.iconBtn.small { width: 40px; height: 40px; margin: -4px 0; }
.quickTip .tipBtns .iconBtn { width: 40px; height: 40px; }
.toolChips button { min-height: 40px; }
.tourBtn { min-height: 40px; }
.chipBtn { min-height: 40px; }
.srcBtn { height: 40px; }
.composeIcon { min-width: 40px; min-height: 40px; }
.seg button { min-height: 36px; }
/* Touch screens: the car is changed with the chips or a swipe, so the small arrows beside the chips go. */
@media (pointer: coarse) { .carSwitch { grid-template-columns: minmax(0, 1fr); margin: 0 0 14px; } .carSwitch .swArrow { display: none; } }

/* Tablets and computers: Search and Settings at the foot of the side bar. */
.tabbar button.railExtra { display: none; }
@media (min-width: 768px) and (min-height: 521px) {
  .tabbar button.railExtra { display: flex; }
  .tabbar button.railFirst { margin-top: auto; }
  .tabbar .railExtra ~ button.scTab { margin-top: 0; }
}
@media (min-width: 768px) and (max-width: 999px) and (min-height: 521px) { .tabbar button.railExtra { display: grid; } }
/* Tablets upright: two cars side by side, and a shorter picture on the car page. */
@media (min-width: 640px) and (max-width: 999px) { .carCards:not(.compact) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 768px) and (max-width: 999px) and (orientation: portrait) { .hero { aspect-ratio: auto; height: min(34vh, 320px); } }
/* Phones on their side: the car picture never takes the whole screen. */
@media (orientation: landscape) and (max-height: 520px) { .hero { height: min(45vh, 200px); } }
/* Shortcuts menu: Search and Settings at its foot, always there. */
.scFixed { display: flex; gap: 6px; border-top: 1px solid var(--line); padding-top: 6px; }
.scFixed:empty { display: none; }
.scFixed button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border: 0; border-radius: 12px; background: var(--surface-2, var(--bg)); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; }
.scFixed button:hover { background: var(--surface-3); }
/* Home: the credit balance as a chip; tap it for Account and credits. */
.creditChip { color: var(--text); font-variant-numeric: tabular-nums; }
.creditChip svg { color: var(--violet, var(--accent)); }
.creditChip.low { border-color: var(--red); color: var(--red); }
.creditChip.low svg { color: var(--red); }
/* Mechanic: on a new conversation its tools are tiles. */
.toolTiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 4px 0 12px; }
.toolTiles button { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; min-height: 64px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; text-align: left; }
.toolTiles button:hover { border-color: var(--accent); }
.toolTiles b { display: block; font-size: 14px; font-weight: 650; line-height: 1.25; }
.toolTiles small { display: block; font-size: 12px; color: var(--text-2); line-height: 1.3; margin-top: 2px; }
@media (max-width: 360px) { .toolTiles button { grid-template-columns: minmax(0, 1fr); } .toolTiles .tile { display: none; } }
@media (min-width: 1000px) { .toolTiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Tablets and computers: Settings, Search, Account and the other panels open beside the side bar, so the
   main navigation stays (tapping a tab closes the panel). */
@media (min-width: 768px) and (min-height: 521px) {
  .passportScreen.accountScreen { left: 208px; border-left: 1px solid var(--line); }
}
@media (min-width: 768px) and (max-width: 999px) and (min-height: 521px) {
  .passportScreen.accountScreen { left: 92px; }
}
/* Phones on their side: sheets use the width (four fields a row) and a slimmer header, so more of the form shows. */
@media (orientation: landscape) and (max-height: 520px) {
  .sheet { padding-top: 4px; }
  .sheetHead { margin-bottom: 8px; }
  .sheetHead h2 { font-size: 18px; }
  .form { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .form .wide { grid-column: span 2; }
  .form .full, .form .sheetActions, .form > .btn, .form > p, .form > .fine, .form > h3, .form > .formError { grid-column: 1 / -1; }
}
/* Actions in a section's title (Edit, Add a cost, All projects…) and in rows (Refresh) look like small buttons. */
.sectionTitle > a, .sectionTitle > button:not(.selToggle) { min-height: 34px; margin: -8px 0; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); }
.sectionTitle > a:hover, .sectionTitle > button:not(.selToggle):hover { border-color: var(--accent); }
.row > .linkBtn { min-height: 36px; margin: 0; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); flex: none; }
.stepCount { font-size: 12.5px; font-weight: 700; color: var(--accent-strong, var(--accent)); text-transform: uppercase; letter-spacing: .4px; margin: 2px 0 -2px; }
.reportForm .btn.wide .icon, .reportForm .btn.wide svg { flex: none; }
/* Wide screens: Service (plan | history) and Fuel (figures | refills) in two columns; project cards side by side. */
@media (min-width: 1000px) {
  .wideCols:has(> :nth-child(2)) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 28px; align-items: start; }
  .wideCols > * { min-width: 0; }
  .wideCols > .section:first-child, .wideCols > div > .section:first-child { margin-top: 0; }
  .projectCards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
/* Help text: one step larger and darker, so it can be read outdoors (it was below the contrast guidelines). */
.fine { font-size: 12.5px; color: var(--text-2); }
.row .rowText small { font-size: 13px; }
.stat small, .sectionTitle { color: var(--text-2); }
/* Tab bar: labels stay readable on the smallest phones, and inactive tabs a shade darker. */
.tabbar button { color: var(--text-2); }
@media (max-width: 380px) { .tabbar button { font-size: 10.5px; } .tabbar button svg { width: 22px; height: 22px; } }
@media (max-width: 340px) { .tabbar { padding-left: 0; padding-right: 0; } .tabbar button span { padding: 0; } .tabbar button { letter-spacing: -.1px; } }
/* Mechanic: the car's name opens the car chips again once a conversation has started (phones). */
.carNameBtn { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; margin: -8px 0; padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-weight: 650; font-size: 15px; text-align: left; }
.carNameBtn svg { color: var(--text-2); flex: none; }
.chatChips.collapsed { display: none; }
@media (min-width: 768px) and (min-height: 521px) { .chatChips.collapsed { display: block; } .carNameBtn { pointer-events: none; } .carNameBtn svg { display: none; } }
@media (max-width: 380px) { .carNameBtn .carYear { display: none; } .carNameBtn { font-size: 14.5px; } }
/* Live look with the camera (Mechanic). */
.toolTiles .liveTile { grid-column: 1 / -1; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.liveSafety { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-2); background: var(--surface-2, var(--bg)); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.liveSafety svg { color: var(--amber, #c98a1b); flex: none; margin-top: 2px; }
.liveAsk .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.liveAsk .chipBtn.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--text); }
.liveLook { display: grid; gap: 10px; }
.liveView { position: relative; border-radius: 18px; overflow: hidden; background: #111; aspect-ratio: 3 / 4; max-height: 58vh; width: 100%; justify-self: center; }
.liveView video { width: 100%; height: 100%; object-fit: cover; display: block; }
.liveNoCam { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; color: #ddd; text-align: center; font-size: 14px; }
.liveCue { position: absolute; left: 10px; right: 10px; bottom: 10px; display: grid; gap: 3px; padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, .62); color: #fff; backdrop-filter: blur(6px); }
.liveCue b { font-size: 16px; line-height: 1.25; }
.liveCue small { font-size: 13px; color: #e8e8e8; }
.liveCue .liveWarn { color: #ffd27a; display: flex; gap: 5px; align-items: flex-start; }
.liveBusy { position: absolute; top: 10px; left: 10px; display: inline-flex; gap: 6px; align-items: center; padding: 6px 10px; border-radius: 99px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 13px; }
.liveCount { position: absolute; top: 10px; right: 10px; padding: 4px 9px; border-radius: 99px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.liveSay { margin: 0; font-size: 15px; line-height: 1.4; }
.liveBar { display: flex; gap: 8px; align-items: center; }
.liveBar .btn { flex: 1; white-space: nowrap; min-width: 0; }
.liveBar .iconBtn[aria-pressed="true"] { color: var(--accent); }
.liveFound ul { margin: 4px 0 0; padding-left: 18px; font-size: 14px; }
@media (orientation: landscape) and (max-height: 520px) { .liveView { aspect-ratio: 16 / 9; max-height: 62vh; } }
@media (min-width: 1000px) { .toolTiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } .toolTiles .liveTile { grid-column: auto; } }
.liveSound { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1px solid var(--accent); font-size: 14px; }
.liveSound b { flex: 1; min-width: 150px; font-weight: 600; }
.liveSound .recLevel { flex: 1 1 100%; }
/* Siri and Google voice. */
.voiceCmds { display: grid; gap: 8px; margin-bottom: 8px; }
.voiceCmd { display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.voiceCmd b { font-size: 15px; }
.voiceCmd small { font-size: 13px; color: var(--text-2); }
.voiceKey { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px; }
.voiceKey b { display: block; } .voiceKey small { color: var(--text-2); font-size: 13px; }
.voiceSteps { margin: 4px 0 12px; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.copyRow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; margin: 6px 0; }
.copyRow code { overflow-wrap: anywhere; font-size: 12.5px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2, var(--bg)); border: 1px solid var(--line); }
.voiceScreen .segTabs { margin: 8px 0 4px; }
/* Mechanic: the car's name on one line (shortened with … when needed), the arrow right after it. */
.carNameBtn { max-width: 100%; min-width: 0; }
.carNameBtn .carNameText { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatContext .rowText > b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 430px) { .carNameBtn .carYear { display: none; } }
/* Tab bar: the Shortcuts circle takes the same height as the other icons, so all the names line up. */
.tabbar button.scTab .scTabIcon { margin: -3px 0; }
/* Diagnose a problem: four equal tabs, 2×2 on phones and one row on wider screens; labels on one line. */
.segTabs.diagTabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.segTabs.diagTabs button { padding: 10px 6px; font-size: 14px; white-space: nowrap; min-height: 42px; }
@media (min-width: 600px) { .segTabs.diagTabs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Live look: the problem choices in two even columns. */
.liveAsk .chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.liveAsk .chips .chipBtn { justify-content: center; text-align: center; min-height: 44px; padding: 8px 10px; white-space: normal; line-height: 1.2; }
.liveAsk .chips .chipBtn:last-child:nth-child(odd) { grid-column: 1 / -1; }
.toolTiles button:nth-child(4):last-child { grid-column: 1 / -1; }
@media (min-width: 1000px) { .toolTiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } .toolTiles button:nth-child(4):last-child { grid-column: auto; } }
/* Estimate a repair. */
.estForm .receiptRow { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.estTitle { margin: 0 0 10px; font-size: 18px; }
.estOptions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.estOption { display: grid; gap: 2px; padding: 12px; }
.estOption small { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.estOption b { font-size: 18px; font-variant-numeric: tabular-nums; }
.estPaid { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); font-size: 14px; }
.estPaid svg { flex: none; margin-top: 2px; color: var(--accent); }
.estTable { display: grid; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.estRow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 14px; }
.estRow:first-child { border-top: 0; }
.estRow small { display: block; font-size: 12.5px; color: var(--text-2); }
.estRow b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.estRow.sub { padding-left: 24px; background: var(--surface-2, var(--bg)); }
.estRight { display: grid; justify-items: end; gap: 0; }
.estRight .linkBtn { font-size: 12.5px; min-height: 30px; margin: -4px 0 -6px; }
.estSure { display: grid; gap: 2px; margin: 10px 0; }
.estSure small { color: var(--text-2); font-size: 13px; }
.estRisks { margin: 4px 0 10px; padding-left: 20px; font-size: 14px; display: grid; gap: 4px; }
.estShare { display: grid; gap: 6px; padding: 12px; margin: 10px 0; }
.estShare small { color: var(--text-2); font-size: 13px; }
.estResult .sheetActions { margin-top: 10px; }
/* Build sheet (projects): on screen a white page; printed, A4 black on white with big tick boxes. */
.bsOptions { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 10px 16px; max-width: 820px; margin: 0 auto; }
.bsOptions .checkRow { font-size: 14px; }
.buildSheet { background: #fff; color: #111; max-width: 820px; margin: 0 auto 24px; padding: 22px 22px 18px; border-radius: 16px; font-size: 13.5px; line-height: 1.4; }
.buildSheet h1 { font-size: 22px; margin: 2px 0 4px; color: #111; }
.buildSheet h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; margin: 18px 0 8px; padding-bottom: 4px; border-bottom: 2px solid #111; color: #111; }
.buildSheet h3 { font-size: 14px; margin: 12px 0 4px; color: #111; }
.buildSheet small { color: #555; }
.bsHead { display: grid; gap: 10px; }
.bsHead p { margin: 0; color: #333; }
.bsCar { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 14px; margin: 0; padding: 10px 12px; border: 1px solid #ccc; border-radius: 10px; }
.bsCar dt, .bsSpecs dt { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: #666; }
.bsCar dd, .bsSpecs dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.bsTable { width: 100%; border-collapse: collapse; font-size: 13px; }
.bsTable th { text-align: left; font-size: 11px; text-transform: uppercase; color: #555; border-bottom: 1px solid #999; padding: 4px 6px; }
.bsTable td { border-bottom: 1px solid #ddd; padding: 6px; vertical-align: top; }
.bsTable td small { display: block; }
.bsTable .n { text-align: right; white-space: nowrap; }
.bsTable tfoot td { font-weight: 700; border-bottom: 0; }
.bsTable .bsBox { width: 26px; }
.bsTick { display: inline-block; flex: none; width: 16px; height: 16px; border: 1.6px solid #111; border-radius: 3px; vertical-align: -3px; margin-right: 8px; position: relative; }
.bsTick.on::after { content: "✓"; position: absolute; inset: -4px 0 0 2px; font-size: 15px; font-weight: 700; }
.bsTools { list-style: none; padding: 0; margin: 0; columns: 2 220px; column-gap: 20px; }
.bsTools li { break-inside: avoid; padding: 3px 0; }
.bsSteps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.bsSteps li { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 0 6px; align-items: start; break-inside: avoid; }
.bsSteps li.done { color: #777; }
.bsNum { font-weight: 700; min-width: 20px; }
.bsStepTitle { display: block; }
.bsMeta { display: block; font-size: 12px; }
.bsSteps p { margin: 3px 0 0; }
.bsWarn { font-weight: 700; }
.bsLine { border-bottom: 1px dotted #aaa; height: 14px; }
.bsSpecs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 6px 14px; margin: 0; }
.bsSmall { font-size: 12px; color: #555; margin: 4px 0; }
.bsLines div { border-bottom: 1px solid #bbb; height: 26px; }
.bsFoot { margin-top: 16px; padding-top: 6px; border-top: 1px solid #ccc; font-size: 11px; color: #666; }
@media (max-width: 480px) { .buildSheet { border-radius: 0; padding: 16px 14px; } .bsTable thead th:nth-child(5), .bsTable tbody td:nth-child(5) { display: none; } .bsTable tfoot td:nth-child(2) { } }
@media print {
  .buildSheetScreen { background: #fff; }
  .buildSheet { padding: 0; border-radius: 0; font-size: 11.5pt; }
  .bsTable th:nth-child(5), .bsTable td:nth-child(5) { display: table-cell !important; }
  .bsSec { break-inside: auto; } .bsSteps li, .bsTable tr { break-inside: avoid; }
}
/* Layout review after the latest features. */
.bsPrintShort { display: none; }
@media (max-width: 480px) { .bsPrintLong { display: none; } .bsPrintShort { display: inline; } .bsTable thead th:nth-child(3), .bsTable tbody td:nth-child(3) { display: none; } .bsTable td small { display: none; } }
.bsOptions .checkRow { min-height: 36px; align-items: center; }
.estResult h4.sectionTitle { margin-top: 16px; }
.estOption small { line-height: 1.25; min-height: 2.5em; }
.estRight .linkBtn { min-height: 36px; margin: -8px 0 -8px; }
.sectionTitle > a, .sectionTitle > button:not(.selToggle) { min-height: 36px; }
@media print { .bsTable thead th:nth-child(3), .bsTable tbody td:nth-child(3) { display: table-cell !important; } .bsTable td small { display: block !important; } }

/* 12b: saved estimates, projects done by the owner or a shop */
.byChoice { margin: 0 0 14px; }
.field .byChoice { margin: 6px 0 0; }
.byBadge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; padding: 1px 6px; border-radius: 6px; margin-right: 6px; vertical-align: 1px; background: var(--surface-3); color: var(--text-2); }
.byBadge.shop { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.shopCard { padding: 14px; display: grid; gap: 12px; }
.shopCard .form { padding: 0; }
.shopCompare { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.shopCompare > div { background: var(--surface-3); border-radius: 10px; padding: 8px 10px; display: grid; gap: 2px; min-width: 0; }
.shopCompare small { color: var(--text-3); font-size: 12px; font-weight: 600; }
.shopCompare b { font-size: 15px; overflow-wrap: anywhere; }
.shopCompare em { font-style: normal; font-size: 12px; color: var(--text-2); }
.shopCompare .q.high { background: var(--amber-soft); }
.shopCompare .q.high em { color: var(--amber); }
.shopCompare .q.ok em, .shopCompare .q.low em { color: var(--accent); }
.shopCard > a.btn { justify-self: start; }
.pvEstimate { margin: -6px 4px 12px; }
.estKeep { padding: 12px 14px; display: grid; gap: 8px; margin: 14px 0 4px; }
.estKeepBtns { display: flex; flex-wrap: wrap; gap: 8px; }
.estKeepBtns .btn { flex: 1 1 140px; }
.estSavedOn { display: block; margin: -4px 0 10px; }
.estSavedRow { padding: 4px 6px 4px 0; }
.estSavedRow .rowMain { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 8px 0 8px 14px; border: 0; background: none; font: inherit; color: inherit; text-align: left; }
.estSavedRow .rowText { min-width: 0; }
.estSavedRow .rowText b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.keepDiagRow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.keepDiagRow .btn { flex: 1 1 150px; margin-top: 0; }
.shopSteps .shopStep { align-items: center; padding: 10px 6px 10px 14px; }
.shopSteps .shopStep .rowText { flex: 1; min-width: 0; }
.shopSteps .shopStep.done b { text-decoration: line-through; color: var(--text-3); font-weight: 500; }
.estOption .estBand { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.shopSteps .shopStep .rowText b { white-space: normal; overflow: visible; text-overflow: clip; display: block; font-weight: 600; }
/* 12d: promo codes and tips-and-news emails */
.newsOptIn { margin: 4px 2px 12px; font-size: 13.5px; color: var(--text-2); }
.promoRow { align-items: flex-start; }
.promoRow .rowText { flex: 1; min-width: 0; }
.promoIn { display: flex; gap: 8px; margin-top: 6px; }
.promoIn input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .04em; }
.promoRow .err { color: var(--red, #d33); }
/* 12d: the manual reader (whole screen, the PDF's own pages) and the manuals on the car page */
.manualReader { position: fixed; inset: 0; z-index: 80; background: var(--bg); display: flex; flex-direction: column; }
.mrBar { display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 8px) 12px 8px; border-bottom: 1px solid var(--line); background: var(--surface); }
.mrTitle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.mrTools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.mrTools .readerFind { flex: 1 1 240px; margin: 0; }
.mrMode { margin: 0; }
.mrNoText { flex: 1; }
.mrLoading { padding: 24px 16px; }
.mrScroll { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; background: color-mix(in srgb, var(--text) 8%, var(--bg)); }
.mrPages { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px; min-width: min-content; }
.mrPage { position: relative; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18); flex: none; }
.mrPage canvas { display: block; }
.mrNum { position: absolute; right: 6px; bottom: 4px; font-size: 11px; color: #888; }
.mrText { flex: 1; overflow: auto; padding: 16px; max-width: 760px; width: 100%; margin: 0 auto; }
.mrNav { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 12px calc(env(safe-area-inset-bottom) + 8px); border-top: 1px solid var(--line); background: var(--surface); }
.mrZoom { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; }
.mrZoom .iconBtn { font-size: 20px; font-weight: 700; }
.omMore { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.omMore li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.omMore li > span { flex: 1; min-width: 0; display: grid; }
.omMore li b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.omMore li small { color: var(--text-3); font-size: 12px; }
.ownerManual + .ownerManual { margin-top: 14px; }
.mrNav .readerGo { white-space: nowrap; }
.srcTextBtn { font: inherit; font-size: 12.5px; font-weight: 700; color: var(--accent); background: none; border: 0; padding: 6px 4px; white-space: nowrap; }
/* Ordering the possible causes of a diagnosis */
.causeOrder { margin: 0 0 8px; }
.diagCauses .pill.effort { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--text-2); margin-left: 6px; }
.diagCauses .pill.effort.easy { color: var(--accent); }
.diagCauses .pill.costLevel { margin-left: 6px; letter-spacing: .05em; }
.omSources { margin-top: 10px; }
.omSources summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--accent); }
/* Power run (virtual dyno) */
.dynoScreen { position: fixed; inset: 0; z-index: 80; background: var(--bg); display: flex; flex-direction: column; }
.dynoBody { flex: 1; overflow: auto; padding: 14px 16px calc(env(safe-area-inset-bottom) + 20px); max-width: 720px; width: 100%; margin: 0 auto; display: grid; gap: 12px; align-content: start; }
.dynoSpecs { padding: 12px 14px; display: grid; gap: 4px; }
.dynoSpecs small { color: var(--text-3); }
.dynoForm .field small { color: var(--text-3); font-weight: 500; font-size: 12px; }
.dynoSafety { display: flex; gap: 12px; padding: 14px; border-left: 4px solid var(--amber, #e8a33d); }
.dynoSafety span { display: grid; gap: 4px; }
.dynoChecklist { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14.5px; }
.dynoRun { display: grid; gap: 14px; justify-items: center; text-align: center; padding-top: 6vh; }
.dynoSpeed b { font-size: 96px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.dynoSpeed small { display: block; color: var(--text-3); font-size: 18px; }
.dynoTip { max-width: 420px; color: var(--text-2); }
.btn.big { min-height: 64px; font-size: 20px; }
.dynoPeaks { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
.dynoPeaks > div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 2px; }
.dynoPeaks small { color: var(--text-3); font-size: 12px; font-weight: 600; }
.dynoPeaks b { font-size: 22px; }
.dynoPeaks span { font-size: 12.5px; color: var(--text-2); }
.dynoPeaks em { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--accent); }
.dynoPeaks em.low { color: var(--amber, #b5701a); }
.dynoChart { width: 100%; height: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.dynoChart .grid { stroke: var(--line); stroke-width: 1; }
.dynoChart .ax { font-size: 10px; fill: var(--text-3); }
.dynoChart path { fill: none; stroke-width: 2.4; stroke-linejoin: round; }
.dynoChart path.kw { stroke: var(--accent); }
.dynoChart path.nm { stroke: #e0703a; }
.dynoChart .older path { stroke-dasharray: 4 4; opacity: .55; stroke-width: 1.6; }
.dynoChart .multi path { stroke-width: 2; } .dynoChart .multi path.multiNm { stroke-dasharray: 5 4; opacity: .75; stroke-width: 1.5; }
.labTable.cmpMany td.n, .labTable.cmpMany th.n { white-space: nowrap; }
.runSwatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.dynoChart .ax.kw { fill: var(--accent); } .dynoChart .ax.nm { fill: #e0703a; }
.dynoChart { cursor: crosshair; user-select: none; -webkit-user-select: none; }
.dynoChart .pick line { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 3 3; }
.dynoChart .pick circle.kw { fill: var(--accent); } .dynoChart .pick circle.nm { fill: #e0703a; }
.dynoChart .pick rect { fill: var(--surface); stroke: var(--line); opacity: .96; }
.dynoChart .pv { font-size: 10.5px; fill: var(--text); font-weight: 600; } .dynoChart .pv.kw { fill: var(--accent); } .dynoChart .pv.nm { fill: #e0703a; }
.runExtras { display: grid; gap: 8px; margin-top: 8px; }
.runExtras .runSmooth { display: grid; gap: 6px; }
.runExtras .runCorrect { display: grid; gap: 6px; }
.runCorrectAll { display: grid; gap: 6px; margin-bottom: 12px; }
.runExtras .runSmooth .seg { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: var(--surface-2); }
.runExtras .runSmooth .seg button { flex: 1 1 0; min-width: 0; text-align: center; border: 0; background: none; color: var(--text-2); padding: 8px 4px; border-radius: 9px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.runExtras .runSmooth .seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.runExtras .runFixes { display: flex; gap: 6px; align-items: flex-start; color: var(--text-2); }
.runExtras .checkRow { display: flex; gap: 8px; align-items: flex-start; }
.runExtras .runHow summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 4px 0; }
.runExtras .runHow ul { margin: 4px 0 8px; padding-left: 18px; }
.dynoLegend .kw { color: var(--accent); } .dynoLegend .nm { color: #e0703a; } .dynoLegend .older { opacity: .55; }
.dynoTimes { display: flex; gap: 8px; flex-wrap: wrap; }
.dynoTimes span { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px; display: grid; }
.dynoTimes small { color: var(--text-3); font-size: 11.5px; }
.dynoQuality { margin: 0; padding-left: 18px; }
.dynoReading { padding: 12px 14px; display: grid; gap: 6px; }
.dynoReading.healthy b { color: var(--accent); } .dynoReading.low b, .dynoReading.slightly-low b { color: var(--amber, #b5701a); }
.dynoReading ul, .dynoReading ol { margin: 0; padding-left: 18px; }
.dynoCardRow { width: 100%; text-align: left; }
/* Drive lab */
.dynoCardRow + .dynoCardRow { margin-top: 8px; }
.labTabs { margin: 8px 16px 0; }
.labStart { padding: 14px; display: grid; gap: 8px; }
.labStatus { margin: 0; }
.labGauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.labGauges > div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: grid; gap: 2px; text-align: center; }
.labGauges small { color: var(--text-3); font-size: 11.5px; font-weight: 600; }
.labGauges b { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.labGauges span { font-size: 11.5px; color: var(--text-2); }
.labCalib, .labTest, .labVerdict, .labDrag { padding: 12px 14px; display: grid; gap: 8px; }
.labTest > .btn, .labVerdict > .btn, .labDrag > .btn { justify-self: start; }
.labTable { width: 100%; border-collapse: collapse; font-size: 14px; }
.labTable th, .labTable td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.labTable .n { text-align: right; font-variant-numeric: tabular-nums; }
.labTable td.off { color: var(--amber, #b5701a); font-weight: 700; }
.labVerdict.match b { color: var(--accent); } .labVerdict.tyre-or-final b, .labVerdict.one-gear b, .labVerdict.mixed b { color: var(--amber, #b5701a); }
.labResult { margin: 0; font-size: 14px; } .labResult.fix, .labResult.slipping { color: var(--red, #c33); } .labResult.watch { color: var(--amber, #b5701a); } .labResult.fine { color: var(--accent); }
@media (max-width: 360px) { .labGauges { grid-template-columns: repeat(2, 1fr); } }
.labTabs { display: grid; grid-template-columns: repeat(4, 1fr); }
.labTabs button { padding-left: 4px; padding-right: 4px; font-size: 13.5px; white-space: nowrap; }
/* Dyno lab: tabs scroll on phones; the driving view (big, dark, glanceable) */
.labTabs { display: flex !important; overflow-x: auto; scrollbar-width: none; }
.labTabs::-webkit-scrollbar { display: none; }
.labTabs button { flex: none; padding-left: 12px; padding-right: 12px; }
.driveView { position: fixed; inset: 0; z-index: 90; background: #07090a; color: #f2f5f3; display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top) + 10px) 16px calc(env(safe-area-inset-bottom) + 14px); gap: 12px; }
.dvTop { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.dvTop b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dvDot { width: 10px; height: 10px; border-radius: 50%; background: #555; } .dvDot.on { background: #2fd27a; box-shadow: 0 0 8px #2fd27a; }
.dvClose { font: inherit; font-weight: 700; color: #fff; background: #26302b; border: 0; border-radius: 12px; padding: 10px 16px; }
.dvMain { flex: 1; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 10px 18px; align-content: center; }
.dvGear { grid-row: span 2; display: grid; align-content: center; justify-items: center; background: #121816; border-radius: 22px; padding: 10px 22px; }
.dvGear small, .dvRpm small, .dvNums small { color: #8a9890; font-size: 14px; font-weight: 600; }
.dvGear b { font-size: 120px; line-height: 1; font-weight: 800; }
.dvRpm { position: relative; display: grid; align-content: end; padding-bottom: 14px; }
.dvRpm b { font-size: 64px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; }
.dvRpm i { position: absolute; left: 0; bottom: 0; height: 8px; border-radius: 4px; background: #2fd27a; transition: width .15s; }
.dvRpm i.hot { background: #ff5a3c; }
.dvNums { display: flex; gap: 18px; flex-wrap: wrap; }
.dvNums span { display: grid; } .dvNums b { font-size: 40px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.05; }
.dvSay { font-size: 26px; font-weight: 700; line-height: 1.25; background: #121816; border-radius: 18px; padding: 16px 18px; min-height: 3em; }
.dvNext { font: inherit; font-size: 20px; font-weight: 800; color: #07090a; background: #2fd27a; border: 0; border-radius: 18px; min-height: 64px; }
@media (orientation: landscape) and (max-height: 500px) { .dvGear b { font-size: 90px; } .dvRpm b { font-size: 52px; } .dvSay { font-size: 20px; padding: 10px 14px; } .dvNext { min-height: 48px; } }
.labGuide { display: grid; gap: 6px; border-left: 4px solid var(--accent, #6d5efc); }
.labGuide b { font-size: 1.15rem; }
.labGuide .row { display: flex; gap: 8px; }
.dvBtns { display: flex; gap: 10px; }
/* Phones held upright: the gear on its own row, the revs full width, the three figures side by side (the
   revs no longer run off the screen at 6,000+). */
@media (orientation: portrait) and (max-width: 600px) {
  .dvMain { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .dvGear { grid-row: auto; display: flex; align-items: center; justify-content: space-between; padding: 8px 18px; }
  .dvGear b { font-size: 84px; }
  .dvRpm b { font-size: 76px; }
  .dvNums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .dvNums b { font-size: 34px; }
}
.dvBtns .dvNext { flex: 1; }
.dvNext.dvStop { background: #3a1214; color: #ffb4b4; }

/* 14a: Tools and parts (the owner's garage) */
.stockScreen .toast { position: fixed; }
.stockActions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 4px 0 12px; }
.stockActions button { display: grid; justify-items: center; gap: 6px; padding: 10px 4px; border: 0; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); color: var(--text); font: inherit; font-size: 12px; font-weight: 600; line-height: 1.2; text-align: center; cursor: pointer; }
.stockAlerts { display: grid; gap: 6px; margin-bottom: 10px; }
.stockAlert { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 0; border-radius: 12px; background: var(--amber-soft); color: var(--amber); font: inherit; font-size: 13.5px; font-weight: 600; text-align: left; cursor: pointer; }
.stockFilters { margin-bottom: 8px; }
.stockFilters .carChip { padding: 6px 12px; }
.stockCount { margin-left: 2px; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.carChip.on .stockCount { background: rgba(255,255,255,.25); color: inherit; }
.stockSearch { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.stockSearch input { flex: 1 1 100%; min-width: 0; }
.stockSearch select { flex: 1; min-width: 0; }
@media (min-width: 600px) { .stockSearch input { flex-basis: 0; } .stockSearch select { flex: 0 1 200px; } }
.chipToggle { display: inline-flex; align-items: center; gap: 4px; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.chipToggle.on { background: var(--accent-soft); border-color: transparent; color: var(--accent-strong, var(--accent)); }
.stockGroup { display: flex; gap: 6px; align-items: baseline; margin-top: 14px; }
.stockGroup small, .sectionTitle small { color: var(--text-3); font-weight: 600; }
.stockItemRow { display: flex; align-items: center; gap: 0; padding: 0; }
.stockRowMain { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.stockThumb { width: 44px; height: 44px; flex: none; border-radius: 12px; object-fit: cover; background: var(--surface-3); }
.stockStep { display: flex; gap: 4px; padding-right: 10px; }
.stockStep button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 18px; font-weight: 700; cursor: pointer; }
.stockLinks { display: flex; gap: 12px; margin-top: 3px; font-size: 12.5px; }
.stockLinks a { color: var(--accent); font-weight: 600; }
.stockPhotos { display: flex; flex-wrap: wrap; gap: 8px; }
.stockPhoto { position: relative; width: 68px; height: 68px; }
.stockPhoto img, .stockPhoto .imgPlaceholder { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display: block; }
.stockPhoto button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--text); color: var(--bg-outer, #fff); display: grid; place-items: center; cursor: pointer; }
.stockKinds { grid-template-columns: repeat(3, 1fr); margin: 4px 0 0; }
.stockQty { display: flex; gap: 6px; } .stockQty input { flex: 1; min-width: 0; } .stockQty select { width: 76px; }
.stockCars { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.stockMore { display: flex; flex-wrap: wrap; gap: 8px; }
.stockMore .btn { flex: 1 1 140px; }
.stockAddPlace { display: flex; gap: 8px; margin-top: 8px; } .stockAddPlace input { flex: 1; min-width: 0; }
.stockFound .row { gap: 10px; }
.stockFoundRow.off { opacity: .45; }
.stockFoundRow input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.stockFoundName { width: 100%; font-weight: 650; border: 0; background: none; padding: 2px 0; font: inherit; font-weight: 650; color: inherit; }
.stockFoundRow small { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.stockFoundRow small select, .stockFoundQty { font-size: 12.5px; padding: 2px 4px; border-radius: 6px; }
.stockFoundQty { width: 58px; }
.stockScanView { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.stockScanView video { width: 100%; height: 100%; object-fit: cover; display: block; }
.stockScanFrame { position: absolute; inset: 18% 22%; border: 3px solid rgba(255,255,255,.85); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.25); }
.stockTips ul { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; }
.stockPick { display: flex; gap: 14px; margin: 0 0 6px; }
.stockPickList { max-height: 300px; overflow-y: auto; margin-bottom: 10px; }
.stockPickList .row { gap: 10px; cursor: pointer; }
.stockPickList input { width: 18px; height: 18px; accent-color: var(--accent); }
/* Label sheets: real size in mm, previewed scaled down on a phone. */
.lblPages { display: grid; justify-content: center; gap: 16px; padding: 0 16px 40px; }
.lblPage { background: #fff; color: #000; box-shadow: 0 2px 12px rgba(0,0,0,.18); box-sizing: border-box; transform-origin: top left; }
.lblGrid { display: grid; }
.lbl { box-sizing: border-box; display: flex; align-items: center; gap: 1.6mm; padding: 1.4mm 2mm; overflow: hidden; border: .2mm dashed #ccc; font-family: -apple-system, "Helvetica Neue", Arial, sans-serif; color: #000; }
.lbl.empty { border-color: transparent; }
.lblQr { flex: none; }
.lblText { min-width: 0; display: grid; gap: .4mm; line-height: 1.1; }
.lblText b { font-size: 9pt; font-weight: 800; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lblText span { font-size: 6.5pt; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lblText code { font-size: 7pt; font-weight: 700; letter-spacing: .04em; }
.lbl-small .lblText b { font-size: 7pt; } .lbl-small .lblText code { font-size: 6.5pt; }
.lbl-large .lblText b { font-size: 15pt; } .lbl-large .lblText span { font-size: 9pt; white-space: normal; } .lbl-large .lblText code { font-size: 11pt; }
.lbl-roll .lblText b { font-size: 10pt; }
@media (max-width: 900px) { .lblPages { overflow-x: auto; justify-content: start; } .lblPages .lblPage { zoom: .45; } .lblPages.lbl-roll .lblPage { zoom: 1; } }
@media (max-width: 420px) { .stockActions { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stockActions button { grid-template-columns: auto 1fr; justify-items: start; align-items: center; text-align: left; padding: 10px; } }
.labelsPortal .labelsScreen { z-index: 70; }
@media print {
  body:has(.labelsPortal) > :not(.labelsPortal) { display: none !important; }
  .labelsScreen { position: static !important; overflow: visible !important; background: #fff !important; }
  body * { visibility: hidden !important; }
  .labelsScreen .lblPages, .labelsScreen .lblPages * { visibility: visible !important; }
  .labelsScreen .lblPages { position: absolute; left: 0; top: 0; padding: 0; gap: 0; display: block; }
  .lblPage { box-shadow: none; zoom: 1 !important; break-after: page; }
  .lblPage:last-child { break-after: auto; }
  .lbl { border-color: transparent; }
  .noPrint { display: none !important; }
}
.omShort { color: var(--amber); font-weight: 600; }

/* 14j: swipe actions and selecting several, across the app's lists */
.swRow { position: relative; overflow: hidden; display: flex; align-items: stretch; }
.list > .swRow + .swRow { border-top: 1px solid var(--line); }
.swFront { position: relative; z-index: 1; flex: 1; min-width: 0; display: flex; align-items: center; background: var(--surface); transition: transform .22s ease; touch-action: pan-y; }
.swFront > .row { flex: 1; min-width: 0; background: transparent; }
.swActs { position: absolute; right: 0; top: 0; bottom: 0; display: flex; z-index: 0; }
.swAct { width: 76px; border: 0; display: grid; place-items: center; align-content: center; gap: 3px; color: #fff; font: inherit; font-size: 11.5px; font-weight: 650; cursor: pointer; padding: 0 4px; }
.swAct span { max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swAct.red { background: var(--red); } .swAct.accent { background: var(--accent); } .swAct.blue { background: var(--blue); } .swAct.amber { background: var(--amber); } .swAct.violet { background: #7c5cff; } .swAct.grey { background: #8a9290; }
.swSelect { position: absolute; left: 0; top: 0; bottom: 0; z-index: 0; display: flex; align-items: center; gap: 6px; padding-left: 18px; background: var(--accent); color: #fff; font-weight: 650; font-size: 13px; width: 100%; }
.swTick { flex: none; width: 22px; height: 22px; margin-left: 12px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; }
.swTick.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.swRow.picked .swFront { background: var(--accent-soft); }
.swMore { position: relative; z-index: 2; display: none; align-items: center; padding-right: 4px; background: var(--surface); }
.swMenu { position: absolute; right: 6px; top: 100%; z-index: 30; min-width: 170px; display: grid; padding: 6px; border-radius: 14px; background: var(--surface); box-shadow: 0 8px 28px rgba(0,0,0,.18); }
.swMenu button { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 0; border-radius: 9px; background: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.swMenu button:hover { background: var(--surface-3); } .swMenu button.red { color: var(--red); }
@media (hover: hover) and (pointer: fine) { .swMore { display: flex; } }
.bulkBar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 90; width: min(620px, calc(100vw - 20px)); box-sizing: border-box; padding: 10px 12px; border-radius: 20px; background: var(--surface); box-shadow: 0 10px 36px rgba(0,0,0,.25); display: grid; gap: 8px; }
.bulkHead { display: flex; align-items: center; gap: 12px; } .bulkHead b { flex: 1; font-size: 14.5px; }
.bulkActs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; } .bulkActs::-webkit-scrollbar { display: none; }
.bulkActs.off { opacity: .4; pointer-events: none; }
.bulkBtn { position: relative; flex: none; min-width: 64px; display: grid; justify-items: center; gap: 3px; padding: 7px 8px; border: 0; border-radius: 12px; background: var(--surface-3); color: var(--text); font: inherit; font-size: 11.5px; font-weight: 650; cursor: pointer; }
.bulkBtn.red { color: var(--red); }
.bulkSel select { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; font-size: 16px; }
.selecting-pad { padding-bottom: 120px; }
.stockThumbBtn { display: contents; cursor: zoom-in; }
.stockPhoto { cursor: zoom-in; }
.stockSuggest { margin-top: 6px; align-self: start; font-size: 12.5px; }
.photoZoom { position: fixed; inset: 0; z-index: 200; background: #000; display: flex; flex-direction: column; }
.pzScroll { flex: 1; overflow: auto; display: grid; place-items: center; touch-action: pan-x pan-y pinch-zoom; }
.pzScroll .pzImg { max-width: 100vw; max-height: calc(100vh - 70px); object-fit: contain; }
.pzScroll.big { place-items: start; } .pzScroll.big .pzImg { max-width: none; max-height: none; width: 250vw; }
.pzBar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); color: #fff; }
.pzBar .iconBtn { color: #fff; background: rgba(255,255,255,.12); }
.pzNav { display: flex; align-items: center; gap: 12px; }
.lbl-tiny .lblText b { font-size: 6.5pt; -webkit-line-clamp: 1; } .lbl-tiny .lblText code { font-size: 5.5pt; } .lbl-tiny .lbl { padding: .6mm 1mm; gap: 1mm; }
.stockPrinterNote { background: var(--surface-3); border-radius: 10px; padding: 8px 10px; }
.lblPages.lbl-roll .lblPage, .lblPages.lbl-tiny .lblPage, .lblPages.lbl-large .lblPage { margin-bottom: 8px; }
@media (max-width: 900px) { .lblPages.lbl-tiny .lblPage, .lblPages.lbl-large .lblPage { zoom: 1; } }
.selBar.withActs { flex-wrap: wrap; row-gap: 8px; }
.selBar.withActs .selCount { flex: 1 1 auto; }
.selAct { position: relative; flex: none; } .selAct.off { opacity: .45; }
.selAct select { position: absolute; inset: 0; opacity: 0; width: 100%; font-size: 16px; cursor: pointer; }
.listSearch { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; }
.listSearchBox { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); color: var(--text-3); }
.listSearchBox input { flex: 1; min-width: 0; border: 0; background: none; padding: 10px 0; font: inherit; color: var(--text); outline: none; box-shadow: none; }
.listSearchBox .iconBtn { width: 26px; height: 26px; }
.pickRow .selBox { margin-right: 4px; }
.swRow.swiping .swMore { display: none; }
.bulkActs { flex-wrap: wrap; overflow: visible; }
.bulkActs .bulkBtn { flex: 1 0 60px; }
/* 14k: Tools and parts, tidier layout */
.stockScreen .accountBody { gap: 8px; }
.stockFind { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.stockFind .listSearchBox { flex: 1; }
.stockFind .listSearchBox input { padding: 12px 0; font-size: 15px; }
.stockScanBtn { flex: none; width: 46px; height: 46px; border-radius: 14px; border: 0; background: var(--text); color: var(--bg-outer, #fff); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
.stockActions { display: flex; gap: 8px; margin: 0; grid-template-columns: none; }
.stockActions button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 8px; border-radius: 12px; font-size: 13.5px; font-weight: 650; white-space: nowrap; grid-template-columns: none; text-align: center; }
.stockActions button.primary { flex: 1.6; background: var(--accent); color: #fff; box-shadow: none; }
@media (max-width: 420px) { .stockActions { display: flex; grid-template-columns: none; } .stockActions button { display: flex; grid-template-columns: none; justify-items: initial; padding: 10px 6px; } }
.stockAlert { justify-content: flex-start; } .stockAlert span { flex: 1; } .stockAlert.red { background: var(--red-soft); color: var(--red); }
.stockFilters { margin: 2px -16px 0; }
.stockFilters .carChip { gap: 6px; padding: 7px 12px; }
.stockSearch { flex-wrap: nowrap; margin: 0; }
.chipSelect { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-size: 13px; font-weight: 600; color: var(--text-2); max-width: 55%; cursor: pointer; }
.chipSelect span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chipSelect.on { background: var(--accent-soft); color: var(--accent-strong, var(--accent)); box-shadow: none; }
.chipSelect select { position: absolute; inset: 0; opacity: 0; width: 100%; font-size: 16px; cursor: pointer; }
.stockTotal { margin-left: auto; font-size: 12px; color: var(--text-3); }
.stockCode { font: 600 11px/1 ui-monospace, Menlo, monospace; padding: 2px 5px; margin-right: 6px; border-radius: 5px; background: var(--surface-3); color: var(--text-2); vertical-align: 1px; }
.stockItemRow .rowText small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stockThumb { width: 48px; height: 48px; border-radius: 12px; }
.stockGroup { margin-top: 16px; }
.stockEmpty { display: grid; justify-items: center; gap: 10px; padding: 28px 18px; margin-top: 8px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.stockEmpty > b { font-size: 19px; }
.stockEmpty ol { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 12px; text-align: left; width: 100%; }
.stockEmpty li { display: flex; gap: 12px; align-items: flex-start; }
.stockEmpty li > svg { flex: none; margin-top: 2px; color: var(--accent); }
.stockEmpty li small { display: block; color: var(--text-2); font-size: 13px; }
.swMore { background: transparent; padding-right: 2px; }
.swMore .iconBtn { width: 30px; height: 30px; background: none; box-shadow: none; color: var(--text-3); }
.swMore .iconBtn:hover { background: var(--surface-3); }
.stockItemRow .stockRowMain { padding-right: 4px; }

/* 15d: drive logs */
.logViewer { z-index: 85; }
.logStats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin: 6px 0 12px; }
.logStats div { background: var(--surface); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); display: grid; }
.logStats small { color: var(--text-3); font-size: 11.5px; } .logStats b { font-size: 17px; }
.logTabs { grid-template-columns: 1fr 1fr; margin-bottom: 8px; }
.logMetrics { margin: 0 -16px 6px; }
.logChart { margin: 0 0 10px; background: var(--surface); border-radius: 14px; padding: 8px 8px 2px; box-shadow: var(--shadow); }
.logChart figcaption { display: flex; align-items: baseline; gap: 4px; padding: 0 4px 2px; font-size: 13px; }
.logChart figcaption small { color: var(--text-3); }
.logVal { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.logChart svg { width: 100%; height: auto; display: block; cursor: crosshair; }
.logGrid { stroke: var(--line); stroke-width: 1; } .logAxis { font-size: 9px; fill: var(--text-3); }
.logCursor { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 3 3; }
.logAt { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }
.logTable { max-height: 60vh; overflow: auto; }
.logTable td, .logTable th { font-variant-numeric: tabular-nums; }
.logRec { display: flex; align-items: center; gap: 10px; }
.logRec .recDot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: recBlink 1s infinite; }
@keyframes recBlink { 50% { opacity: .25; } }
.basisSwitch { display: grid; gap: 4px; margin: 4px 0 10px; }
.basisSwitch .segTabs { grid-template-columns: repeat(3, 1fr); }
/* 15d: Dyno lab calibration */
.calSteps { display: grid; gap: 10px; }
.calStep { display: grid; gap: 8px; }
.calHead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.calChip { font-style: normal; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--chip, rgba(127,127,127,.15)); color: var(--muted, inherit); white-space: nowrap; }
.calChip.ok { background: rgba(46, 160, 67, .16); color: #2ea043; }
.calGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.calGrid label, .calInline { display: grid; gap: 4px; font-size: 13px; }
.calGrid input { width: 100%; min-width: 0; }
.calInline { grid-template-columns: 1fr auto; align-items: center; }
/* 15d: recipe book */
.recipeEntry { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin: 0 0 12px; }
.recipeEntry .rowText { flex: 1; min-width: 0; }
.recipeBook .sheetScrim { position: fixed; z-index: 70; }
.recipeTags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.recipeTags i, .recipeMeta span { font-style: normal; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: rgba(127,127,127,.14); }
.recipeStages { grid-template-columns: repeat(4, 1fr); margin: 6px 0; }
.recipeCats { margin: 8px 0 4px; }
.recipeRow { width: 100%; text-align: left; align-items: flex-start; }
.recipeRow .rowText small { white-space: normal; }
.recipeMeta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.stageBadge { font-style: normal; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(46,160,67,.16); color: #2ea043; }
.stageBadge.stage { background: rgba(56,132,255,.16); color: #3884ff; }
.stageBadge.build { background: rgba(140,90,255,.18); color: #8c5aff; }
.recipeView { display: grid; gap: 10px; }
.recipeView ul, .recipeView ol { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.recipeFit { display: grid; gap: 4px; border-left: 4px solid #2ea043; }
.recipeFit.partly { border-left-color: #d29922; }
.recipeFit.no { border-left-color: #e5534b; }
.recipeStats { grid-template-columns: repeat(2, 1fr); }
.recipeStats b { font-size: 14px; }
.recipeSteps li { display: grid; gap: 2px; }
.recipePhase { display: block; margin: 10px 0 2px; }
.warnBox { border-left: 4px solid #d29922; }
.recipeView .card { display: grid; gap: 4px; }
.siriCard { display: grid; gap: 8px; margin: 8px 0 12px; }
/* 15e: not losing tools */
.stockWhere { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: rgba(127,127,127,.1); font-size: 14px; }
.stockWhere span { flex: 1; min-width: 0; }
.stockWhere .btn { width: auto; flex: none; }
.toolCheck, .shelfCheck { display: grid; gap: 10px; }
.toolCheck .checkRow, .shelfCheck .checkRow { align-items: center; gap: 10px; }
.shelfCheck select { max-width: 120px; }
.stockScan .segTabs { margin-bottom: 8px; }
.stockAskBack { display: flex; gap: 8px; align-items: center; margin: 16px 0 0; }
.stockCropBtn { padding: 0; border: 0; background: none; flex: none; cursor: pointer; }
.stockAlt { display: inline-block; margin: 2px 0 4px; font-size: 12px; }
.placesHead { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.placesHead .btn { width: auto; }
.placeRow { display: flex; align-items: center; gap: 8px; }
.placeRow .stockRowMain { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; background: none; border: 0; text-align: left; padding: 0; color: inherit; }
.placesBulk { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 10px; }
.placesBulk .btn { width: auto; }
/* 15f: parts you already have */
.haveIt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 3px; font-size: 12px; }
.haveIt .linkBtn { font-size: 12px; color: #b07400; text-align: left; padding: 0; }
.haveIt.sure .linkBtn { color: #2e8b3e; font-weight: 600; }
.haveIt .haveUse { font-size: 12px; padding: 2px 8px; }
.bsHave { display: block; color: #2e8b3e; }
/* 15f: small screens (320–390 px) */
.swRow:not(.swiping) .swActs, .swRow:not(.swiping) .swSelect { visibility: hidden; }
.stockActions button { min-width: 0; }
.stockActions button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 360px) { .stockActions { gap: 6px; } .stockActions button { font-size: 12.5px; gap: 5px; padding: 10px 4px; } .stockActions button.primary { flex: 1.35; } }
.stockItemRow .pill { flex-shrink: 1; min-width: 0; max-width: 42%; overflow: hidden; text-overflow: ellipsis; margin-left: 4px; }
.stockRowMain .rowText b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; line-height: 1.25; }
.stockWhere span { overflow-wrap: anywhere; }
.dynoBody { grid-template-columns: minmax(0, 1fr); }
.dynoBody > * { min-width: 0; }
.labGauges { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 360px) { .labGauges { grid-template-columns: repeat(2, minmax(0, 1fr)); } .labGauges b { font-size: 24px; } }
.labGauges > div { min-width: 0; }
.calSteps, .recipeView, .toolCheck, .shelfCheck, .calStep { grid-template-columns: minmax(0, 1fr); }
.calStep small, .calStep b { overflow-wrap: anywhere; }
.calChip { max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.calGrid { grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr)); }
.recipeStages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.recipeStages button { white-space: normal; font-size: 13px; padding: 8px 4px; line-height: 1.2; }
/* sheets opened inside a full-screen panel (Tools and parts, Dyno lab, Recipe book…) stay on screen when it's scrolled */
.passportScreen .sheetScrim, .dynoScreen .sheetScrim { position: fixed; z-index: 70; }
.labCalib, .labTest, .labVerdict, .labDrag, .logRec { grid-template-columns: minmax(0, 1fr); }
.labCalib .promoIn, .calStep .promoIn { flex-wrap: wrap; }
.labCalib .promoIn input, .calStep .promoIn input { flex: 1 1 120px; }
.labCalib .linkBtn { justify-self: start; text-align: left; font-size: 13px; }
.stockKinds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stockKinds button { min-width: 0; padding-left: 4px; padding-right: 4px; font-size: 13px; }
.lblPages { max-width: 100%; }
@media screen and (max-width: 420px) { .lblPages:not(.lbl-roll):not(.lbl-tiny):not(.lbl-large) .lblPage { zoom: .34; } }
.form > .field, .form .field input, .form .field select { min-width: 0; max-width: 100%; }
.stockSuggest { max-width: 100%; white-space: normal; text-align: left; }
.stockMoreDetails { border-top: 1px solid var(--line); padding-top: 8px; }
.stockMoreDetails > summary { cursor: pointer; font-weight: 650; font-size: 14px; list-style: none; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.stockMoreDetails > summary::before { content: "▸"; color: var(--text-3); }
.stockMoreDetails[open] > summary::before { content: "▾"; }
.stockMoreDetails > summary small { color: var(--text-3); font-weight: 500; font-size: 12px; }
.stockMoreDetails > .form { margin-top: 8px; }
.stockTip { display: grid; gap: 6px; margin-bottom: 10px; padding: 12px 14px; border-left: 4px solid var(--accent); }
.stockTip ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; color: var(--text-2); }
.stockTip .btn { justify-self: start; width: auto; }
@media (max-width: 360px) { [data-stock-select] { padding-left: 10px; padding-right: 10px; } }
.calGrid input, .calStep .promoIn input, .calInline select { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0 12px; font-size: 16px; color: var(--text); box-sizing: border-box; }
.calInline select { width: auto; }
.calGrid label { font-size: 13px; color: var(--text-2); font-weight: 600; }
/* Dyno lab: the gear you're in (quiet cars), the rev counter camera, gear buttons in the driving view. */
.labGearPick { display: grid; gap: 6px; margin: 10px 0; }
.labGearPick .segTabs { display: flex; flex-wrap: nowrap; overflow-x: auto; }
.labGearPick .segTabs button { flex: 1 0 40px; min-width: 40px; padding-left: 4px; padding-right: 4px; }
.labQuiet ul { margin: 6px 0 4px 18px; display: grid; gap: 4px; }
.labCam { display: grid; gap: 8px; }
.camPreview { width: 100%; border-radius: 12px; background: #000; touch-action: manipulation; cursor: crosshair; }
.dvGearBtns { display: flex; gap: 8px; margin-top: 6px; }
.dvGearBtns button { width: 48px; height: 44px; border-radius: 12px; border: 0; background: #26302c; color: #fff; font-size: 22px; font-weight: 700; }
.dvGearBtns button.on { background: var(--accent); color: var(--on-accent); }
/* Power run: sharing, the report, times, shift points, before and after. */
.dynoActions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.dynoTimesCard { display: grid; gap: 8px; margin: 10px 0; }
.dynoTimesCard { min-width: 0; }
.dynoTimesCard .dynoTimes { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.inRow { display: flex; gap: 8px; align-items: center; min-width: 0; }
.inRow input { flex: 1; min-width: 0; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 0 12px; font: inherit; font-size: 16px; }
.inRow .btn { flex: none; }
.dynoTimesCard .dynoTimes span { position: relative; min-width: 78px; }
.dynoTimesCard .dynoTimes em { font-style: normal; font-size: 12px; color: var(--text-2); }
.dynoTimesCard .dynoTimes .linkBtn { position: absolute; top: 2px; right: 6px; min-height: 0; padding: 0; }
.dynoNote { margin: 10px 0; }
[data-dyno-shifts], [data-dyno-compare] { display: grid; gap: 8px; margin: 10px 0; }
.btn.off { opacity: .5; pointer-events: none; }
.dynoReport h1 { font-size: 24px; margin: 0 0 4px; }
.dynoReport h3 { font-size: 16px; margin: 18px 0 6px; }
.dynoReport .dynoChart { max-width: 640px; }
@media print { .dynoReportScreen .dynoTimes span, .dynoReportScreen .dynoPeaks > div { background: #f3f5f4 !important; color: #000; } .dynoReportScreen .card { box-shadow: none; border: 1px solid #ddd; } }
/* Filming with the numbers on: the card that says so, the live preview, the "video ready" pop-up, the logo. */
.filmCard { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px 12px; margin: 10px 0; border: 1.5px solid color-mix(in srgb, var(--red) 35%, transparent); }
.filmCard.on { border-color: var(--red); }
.filmCard .filmIcon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.filmCard .rowText b { display: block; }
.filmCard .rowText small { color: var(--text-2); font-size: 13px; }
.filmCard .logoSetting { grid-column: 1 / -1; }
.btn.filmGo, .btn.filmBtn { background: var(--red); color: #fff; gap: 8px; }
.btn.filmGo .recDot, .btn.filmBtn .recDot, .dvRec .recDot { background: #fff; width: 10px; height: 10px; }
.btn.filmBtn.pulse { animation: filmPulse 1.4s infinite; }
@keyframes filmPulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--red) 25%, transparent); } }
.filmView { position: fixed; inset: 0; z-index: 95; background: #000; display: grid; grid-template-rows: auto 1fr auto auto; color: #fff; padding: calc(env(safe-area-inset-top) + 8px) 12px calc(env(safe-area-inset-bottom) + 14px); }
.filmTop { display: flex; align-items: center; gap: 10px; font-size: 16px; padding: 6px 4px 10px; }
.filmBox { min-height: 0; display: grid; place-items: center; overflow: hidden; }
.filmBox canvas { max-width: 100%; max-height: 100%; border-radius: 14px; object-fit: contain; }
.filmGuide { display: grid; gap: 6px; padding: 12px 4px; text-align: center; font-size: 15px; }
.filmGuide b { font-size: 20px; }
.filmGuide .row { justify-content: center; }
.filmStop { justify-self: center; width: 74px; height: 74px; border-radius: 50%; border: 4px solid #fff; background: transparent; display: grid; place-items: center; }
.filmStop span { width: 28px; height: 28px; border-radius: 6px; background: var(--red); }
.sheetScrim[data-video-ready] { position: fixed; z-index: 120; }
.videoReady { display: grid; gap: 12px; max-width: 520px; margin: 0 auto; }
.videoReady .sheetTitle { font-size: 19px; padding-top: 8px; }
.videoReadyPlayer { width: 100%; max-height: 52vh; border-radius: 14px; background: #000; }
.videoReadyActions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn.ghost.danger { background: transparent; color: var(--red); }
.logoSetting { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.logoSetting .logoThumb { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; background: var(--surface-2); }
.logoSetting .rowText b { display: block; font-size: 14.5px; }
.logoSetting .rowText small { color: var(--text-2); font-size: 12.5px; }
.logoSetting .logoBtns { display: flex; gap: 6px; }
.logoSetting .err { grid-column: 1 / -1; }
.dvRec { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 17px; border: 0; background: var(--red); color: #fff; font-weight: 700; margin-right: 8px; }
/* The log button beside Film: grey to start, red with the time while it records. */
.dvRec.dvLog { background: rgba(255,255,255,.14); font-variant-numeric: tabular-nums; }
.dvRec.dvLog.on { background: var(--red); }
/* On a phone the Film and Log buttons take the title's place. */
@media (max-width: 440px) { .dvTop .dvName { display: none; } .dvTop .dvGauges { margin-left: auto; } }
.dvTop [data-dv-title] { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Filming, the driving view and the finished video on big screens and phones turned sideways. */
@media (min-width: 768px), (orientation: landscape) and (min-width: 560px) and (max-height: 520px) {
  .dvGear b { font-size: clamp(120px, 26vh, 220px); }
  .dvRpm b { font-size: clamp(64px, 10vw, 150px); }
  .dvNums b { font-size: clamp(34px, 5vw, 64px); }
  .sheetScrim[data-video-ready] .sheet.videoReady { max-width: 900px; width: 100%; grid-template-columns: minmax(0, 1.35fr) minmax(260px, 1fr); align-items: start; column-gap: 20px; }
  .videoReady .sheetTitle { grid-column: 1 / -1; }
  .videoReady .videoReadyPlayer { grid-column: 1; grid-row: 2 / span 4; max-height: 70vh; }
  .videoReady > :not(.sheetTitle):not(.videoReadyPlayer) { grid-column: 2; }
  .videoReady .videoReadyActions { grid-template-columns: 1fr; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .filmView { grid-template-columns: minmax(0, 1fr) minmax(120px, 30vw); grid-template-rows: auto minmax(0, 1fr) auto; column-gap: 14px; padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .filmTop { grid-column: 2; grid-row: 1; flex-wrap: wrap; justify-content: center; }
  .filmBox { grid-column: 1; grid-row: 1 / -1; }
  .filmGuide { grid-column: 2; grid-row: 2; align-self: center; }
  .filmStop { grid-column: 2; grid-row: 3; }
  .sheetScrim[data-video-ready] .sheet.videoReady { max-height: 96%; padding-top: 10px; }
  .videoReady .videoReadyPlayer { max-height: 74vh; }
}
/* The suite's apps shown with their own app icons (the same pictures as on the Home Screen). */
img.tile.appTile { display: block; flex: none; border-radius: 24%; object-fit: cover; background: none; box-shadow: 0 1px 2px rgba(0,0,0,.12); }

/* Plans (account screen): one card per plan, monthly or yearly; the allowance meter for members. */
.planCard .seg { justify-self: start; }
.planList { display: grid; gap: 8px; }
.planOpt { display: grid; gap: 3px; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line, rgba(0,0,0,.1)); background: var(--surface); color: var(--text); min-height: 44px; }
.planOpt.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.planOpt .planTop { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.planOpt .planApps { font-size: 13px; color: var(--text-2); }
.planOpt .planPrice { font-size: 15px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.planOpt small { color: var(--text-2); font-size: 12.5px; }
.planCard .bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.planCard .bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.planCard .bar.warn i { background: #d98a1c; }
.planCard .bar.over i { background: #d0453c; }

/* Club logos fill their frame (rounded square, circle or wide rounded rectangle, as chosen in the club's look),
   cropped to it instead of shrunk inside it with bands around (2026.11.17g). */
img.clubLogo, img.clubAppLogo, .lookPvHead img.logoShape { object-fit: cover; background: transparent; }
.loginScreen img.clubAppLogo { width: 96px; height: 96px; max-width: 100%; border-radius: 22%; object-fit: cover; background: transparent; }
.loginScreen img.clubAppLogo.lsRound { border-radius: 50%; }
.loginScreen img.clubAppLogo.lsWide { width: 192px; height: 96px; aspect-ratio: auto; border-radius: 11% / 22%; }
.loginScreen h1 { overflow-wrap: anywhere; }

/* Club look › Logo shape: the three choices on their own full-width line under the explanation (long labels in
   Portuguese, Spanish and French squeezed the text to one word a line). */
.row.logoShapeRow { flex-wrap: wrap; row-gap: 10px; }
.row.logoShapeRow > .rowText { flex: 1 1 100%; min-width: 0; }
.row.logoShapeRow > .seg { width: 100%; margin-left: 0; grid-auto-columns: 1fr; }
.row.logoShapeRow > .seg button { justify-content: center; text-align: center; white-space: normal; line-height: 1.2; padding: 8px 6px; }
.row.logoRow { flex-wrap: wrap; row-gap: 10px; }
.row.logoRow > .rowText { flex: 1 1 100%; min-width: 0; }
.row.logoRow > img.clubLogo { margin-right: auto; }

/* Badges across the suite (account) */
.badgesCard { background: var(--surface); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); margin-top: 14px; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.badgesCard .plusHead { display: flex; justify-content: space-between; align-items: baseline; }
.badgeRow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.badgeDot { aspect-ratio: 1; padding: 0; border: 0; background: none; display: grid; place-items: center; opacity: .38; transition: transform .15s ease, opacity .15s ease; }
.badgeDot svg { width: 100%; height: 100%; display: block; }
.badgeDot.on { opacity: 1; filter: drop-shadow(0 4px 10px rgba(0,0,0,.14)); }
.badgeDot.sel { transform: scale(1.08); }
.badgeDot:active { transform: scale(.94); }
.badgeInfo { display: grid; gap: 3px; justify-items: start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.badgeInfo small { color: var(--text-2); }

/* Google Drive backups (account) */
.driveCard { display: grid; gap: 12px; margin: 4px 0 10px; }
.driveCard p { margin: 0; }
.driveCard .segTabs { justify-self: start; }
.driveList .row { cursor: default; }

/* Download my data: two ways */
.dataRow { align-items: flex-start; }
.dataRow .dataDl { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }

/* ---- Restoration (the deeper kind of project) ---- */
.kindChoice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .kindChoice { grid-template-columns: 1fr; } }
.kindOpt { display: grid; gap: 6px; align-content: start; text-align: left; padding: 14px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.kindOpt.on { border-color: var(--accent); background: var(--accent-soft); }
.kindOpt b { font-size: 15.5px; }
.kindOpt small { font-size: 12.5px; color: var(--text-2); line-height: 1.4; }
.areaChips { flex-wrap: wrap; margin: 6px 0 8px; }
.byBadge.resto { background: var(--violet-soft); color: var(--violet); }
.restoration .logBtn { margin: 4px 0 14px; }
.rTabs { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; margin: 0 0 14px; padding-bottom: 2px; scrollbar-width: none; }
.rTabs .chip, .partFilter .chip { white-space: nowrap; }
.rTabs .chip { padding: 7px 11px; font-size: 14px; }
.entryMeta { margin-top: -4px; }
.rTabs .chip em, .partFilter .chip em { font-style: normal; margin-left: 6px; opacity: .6; font-weight: 600; }
.restoration .nextUp { border-radius: 16px; border: 0; margin-bottom: 14px; }
.rHint { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--violet-soft); margin-bottom: 14px; }
.rHint span { display: grid; gap: 2px; } .rHint small { color: var(--text-2); font-size: 13px; line-height: 1.4; }
@media (max-width: 420px) { .rHint { grid-template-columns: auto minmax(0, 1fr); } .rHint .btn { grid-column: 1 / -1; } }
.areaGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.areaCard { display: grid; gap: 4px; text-align: left; padding: 12px 13px; border-radius: 16px; border: 0; background: var(--surface); box-shadow: var(--shadow-sm, none); color: var(--text); font: inherit; cursor: pointer; border-left: 4px solid var(--line); }
.areaCard small { color: var(--text-2); font-size: 12.5px; }
.areaCard.st-strip, .areaBlock.st-strip { border-left-color: var(--amber, #d68a00); }
.areaCard.st-work, .areaBlock.st-work { border-left-color: var(--violet); }
.areaCard.st-done, .areaBlock.st-done { border-left-color: var(--accent); }
.areaList { gap: 10px; }
.areaBlock { border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm, none); border-left: 4px solid var(--line); overflow: hidden; }
.areaHead { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 13px 14px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.areaHead .rowText { display: grid; gap: 3px; } .areaHead small { color: var(--text-2); font-size: 12.5px; }
.areaBody { display: grid; gap: 10px; padding: 0 14px 14px; }
.areaBody .seg { width: 100%; grid-auto-columns: 1fr; } .areaBody .seg button { justify-content: center; padding: 7px 4px; font-size: 12.5px; }
.taskLine.done b { text-decoration: line-through; color: var(--text-2); }
.addArea { display: grid; gap: 10px; margin-top: 12px; } .addArea .chips { flex-wrap: wrap; }
.partFilter { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; margin-bottom: 10px; scrollbar-width: none; }
.partLine .rowMain { flex: 1; min-width: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; padding: 0; cursor: pointer; }
.statusPill { display: inline-flex; align-items: center; gap: 3px; padding: 5px 9px; border-radius: 999px; border: 0; font: 650 12px/1 inherit; font-family: inherit; white-space: nowrap; cursor: pointer; background: var(--grey-soft); color: var(--text-2); }
.statusPill:disabled { cursor: default; }
.statusPill.ps-ordered { background: var(--blue-soft, #e6f0ff); color: var(--blue, #2463d6); }
.statusPill.ps-shelf { background: var(--violet-soft); color: var(--violet); }
.statusPill.ps-fitted { background: var(--accent-soft); color: var(--accent); }
.statusPill.ps-kept { background: #fff3dc; color: #9a5b00; }
.journal { display: grid; gap: 12px; }
.entry { display: grid; gap: 8px; padding: 13px 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm, none); }
.entry header { display: flex; align-items: center; gap: 8px; } .entry header .muted { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .entry header .headActions { margin-left: auto; flex: none; }
.entry p { margin: 0; line-height: 1.5; }
.entryPhotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.entryPhotos .thumbBtn { aspect-ratio: 1; border-radius: 10px; overflow: hidden; padding: 0; border: 0; }
.entryPhotos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.budgetBar.big { display: block; height: 10px; border-radius: 6px; margin: 4px 0 12px; }
.rSwitch { text-align: center; margin: 22px 0 6px; }
.toResto { margin: 6px 2px 10px; }
.bbCover { padding: 8px 0 18px; border-bottom: 2px solid #111; margin-bottom: 18px; }
.bbCover small { text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: #666; }
.bbCover h1 { margin: 6px 0 2px; font-size: 30px; } .bbCover h2 { margin: 0 0 8px; font-size: 19px; font-weight: 600; color: #444; }
.buildBook section { margin-bottom: 18px; break-inside: avoid-page; }
.bbEntry { padding: 8px 0; border-bottom: 1px solid #ddd; break-inside: avoid; } .bbEntry p { margin: 2px 0; }
.bbPhotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; }
.bbPhotos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; display: block; }
.bsTable td.n { text-align: right; }

/* How hands-on the owner is (the AI explains at that level) */
.handsOnChip { width: fit-content; justify-self: start; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 6px 11px; border-radius: 999px; border: 0; background: var(--surface-3, var(--grey-soft)); color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; max-width: 100%; }
.handsOnChip b { color: var(--text); font-weight: 650; }
.handsOnChip.ask { background: var(--violet-soft); color: var(--violet); } .handsOnChip.ask b { color: var(--violet); }
.handsOn + .fine { margin: 10px 6px 0; }
.sheet .handsOn { margin-top: 10px; }
.handsOnNext { display: flex; flex-wrap: wrap; gap: 8px; }
.handsOnNext button + button { background: var(--surface-3, var(--grey-soft)); color: var(--text); }

/* Restoration, cleaner (S: look and feel) */
.rHead { padding-bottom: 6px; }
.rNotes { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rSeg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; margin: 6px 0 16px; }
.rSeg button { justify-content: center; padding: 8px 6px; font-size: 14px; }
.rSummary { display: grid; gap: 8px; width: 100%; text-align: left; padding: 15px 16px; border: 0; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm, none); color: var(--text); font: inherit; cursor: pointer; margin-bottom: 12px; }
.rsTop { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; } .rsTop b { font-size: 22px; letter-spacing: -.01em; } .rsTop small { color: var(--text-2); }
.rsLine { display: flex; gap: 16px; font-size: 14px; color: var(--text-2); align-items: center; } .rsLine span:first-child { color: var(--text); font-weight: 650; } .rsLine em { font-style: normal; color: var(--text-2); font-weight: 500; }
.rsMore { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-weight: 600; }
.restoration .nextUp { grid-template-columns: minmax(0, 1fr) auto; }
.restoration .nextUp b { font-size: 15px; }
.rAreas .row { gap: 12px; }
.rDot { width: 10px; height: 10px; border-radius: 5px; background: var(--line); flex: none; }
.rDot.st-strip { background: var(--amber, #d68a00); } .rDot.st-work { background: var(--violet); } .rDot.st-done { background: var(--accent); }
.rMini { width: 64px; height: 6px; border-radius: 3px; background: var(--surface-3, var(--grey-soft)); overflow: hidden; flex: none; } .rMini i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.areaActions { display: flex; flex-wrap: wrap; gap: 6px 16px; padding-top: 2px; }
.areaActions .linkBtn { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; }
.rFab { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 30; display: inline-flex; align-items: center; gap: 8px; padding: 13px 18px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: inherit; font-weight: 700; font-size: 15px; box-shadow: 0 8px 24px rgba(0,0,0,.18); cursor: pointer; }
.restoration { padding-bottom: 90px; }
.rWideOnly { display: none; }
@media (min-width: 900px) {
  .restoration { max-width: 1180px; }
  .rOverview { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .rOverview .rSide { position: sticky; top: 12px; }
  .rWideOnly { display: block; }
  .restoration .areaList { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
  .restoration .areaList .areaBlock.open { grid-column: 1 / -1; }
  .restoration .journal { grid-template-columns: 1fr 1fr; align-items: start; }
  .rOverview .journal { grid-template-columns: 1fr; }
  .rSeg { max-width: 520px; }
  .rFab { bottom: calc(28px + env(safe-area-inset-bottom)); right: 32px; }
}
.importCols summary { cursor: pointer; font-weight: 650; } .importCols .chips { margin: 10px 0; flex-wrap: wrap; }
.colMap { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin-top: 10px; }
.importSheet .seg { width: 100%; grid-auto-columns: 1fr; } .importSheet .seg button { justify-content: center; }

/* No side scrolling: rows of chips and buttons wrap onto a second line instead of scrolling sideways. */
.carChips, .toolChips { flex-wrap: wrap; overflow-x: visible; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
.searchKinds, .bulkActs, .partFilter, .rTabs { flex-wrap: wrap; overflow-x: visible; }
.labTabs { flex-wrap: wrap; overflow-x: visible; }
.labGearPick .segTabs { flex-wrap: wrap; overflow-x: visible; }
/* Long words, links and part numbers break instead of pushing the page wider. */
.rowText b, .rowText small, .bubble p, .bubble li { overflow-wrap: anywhere; }

/* Big screens: use the width. */
@media (min-width: 1200px) {
  /* Garage: the links in two columns. */
  .homeLinks { display: grid; grid-template-columns: 1fr 1fr; column-gap: 0; }
  .homeLinks > .row:nth-child(odd) { border-right: 1px solid var(--line); }
}
@media (min-width: 768px) {
  /* Dyno lab: the tabs line up with the page below them. */
  .labTabs { max-width: 980px; width: calc(100% - 32px); margin-left: auto !important; margin-right: auto !important; }
}
@media (min-width: 1100px) {
  /* Dyno lab, live: the controls on the left, the gauges on the right. */
  .driveLab .dynoBody:has(> .labGauges) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-auto-flow: row dense; column-gap: 20px; max-width: 1180px; }
  .driveLab .dynoBody:has(> .labGauges) > * { grid-column: 1; }
  .driveLab .dynoBody:has(> .labGauges) > .labGauges { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
  .driveLab .dynoBody:has(> .labGauges) > .basisSwitch { grid-column: 2; grid-row: 3; }
  .driveLab:has(.dynoBody > .labGauges) .labTabs { max-width: 1180px; }
}

/* Fuel cards, allowances, brand filter and price alerts */
.allowNote { display: flex !important; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.allowNote.near { color: var(--amber); } .allowNote.over { color: var(--red); }
.allowBar { display: inline-block; flex: 0 0 72px; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.allowBar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.allowBar.near i { background: var(--amber); } .allowBar.over i { background: var(--red); }
.fuelKinds, .brandFilter { margin-bottom: 10px; }
.brandFilter .chip { padding: 5px 11px; font-size: 13px; }
.brandPick { display: grid; gap: 8px; }
.brandOther { display: flex; gap: 8px; } .brandOther input { flex: 1; min-width: 0; }
.stationPrice s { display: block; font-size: 11px; font-weight: 500; opacity: .6; text-align: center; }
.alertNow { color: var(--accent) !important; font-weight: 600; margin-top: 3px; }
.banner .btn.small { flex: none; white-space: nowrap; align-self: center; }
.warnRow { display: flex; gap: 8px; flex-wrap: wrap; } .warnRow { align-items: center; } .warnRow select:first-child { flex: 1 1 150px; } .warnRow input { flex: 0 1 110px; min-width: 70px; }
.allowBar { position: relative; } .allowBar b { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--text-3); opacity: .7; }
.warnRow + .warnRow { margin-top: 6px; } .warnRow .iconBtn { flex: none; }

/* Dyno lab: readiness for tests, and the driving view's max */
.labReady { display: grid; gap: 6px; width: 100%; text-align: left; padding: 10px 14px; margin: 0 0 10px; border-radius: 14px; background: var(--surface); color: var(--text); border: 1px solid var(--line, transparent); }
.labReady .lrHead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; } .labReady .lrHead i { font-style: normal; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--amber); }
.labReady.ok .lrHead i { color: var(--accent); }
.labReady .lrBar { display: flex; gap: 4px; } .labReady .lrBar > span { flex: 1; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.labReady .lrBar i { display: block; height: 100%; background: var(--amber); border-radius: 99px; } .labReady .lrBar .full i { background: var(--accent); }
.labReady small { color: var(--text-3); font-size: 12.5px; }
.labReady .lrNext { display: block; margin-top: 2px; font-style: normal; font-weight: 700; color: var(--accent); }
.dvMax { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-top: 14px; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.06); color: #cfd8d3; font-size: 15px; text-align: left; border: 0; width: 100%; }
.dvMax small { color: #8a9890; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 12px; } .dvMax b { color: #fff; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dvMax { position: relative; padding-right: 92px; } .dvMaxReset { position: absolute; top: 8px; right: 8px; font: inherit; font-size: 14px; font-weight: 700; color: #fff; background: rgba(255,255,255,.12); border: 0; border-radius: 10px; padding: 8px 12px; min-height: 40px; }
.dvMax i { font-style: normal; color: #8a9890; font-size: 13px; } .dvMax em { font-style: normal; color: #8a9890; font-size: 13px; flex-basis: 100%; }

/* Driving view: gauge styles and the layout panel */
.driveView { overflow-y: auto; } .dvMain > .dvMax { grid-column: 1 / -1; }
.dvDials { flex-wrap: nowrap; }
.dvGauges { padding: 10px 12px; display: grid; place-items: center; }
.dvMain > .dvGear:only-child { grid-column: span 2; }
.dvClassic { grid-template-columns: 1fr; justify-items: center; }
.dvDials { display: flex; gap: 10px; width: 100%; justify-content: center; flex-wrap: wrap; }
.dvDial { flex: 1 1 140px; max-width: min(48vw, 44vh, 380px); }
.dvDial svg { width: 100%; height: auto; display: block; }
.dvDial .track { fill: none; stroke: #26302c; stroke-width: 6; } .dvDial .redZone { fill: none; stroke: #ff5a3c; stroke-width: 6; }
.dvDial line { stroke: #cfd8d3; } .dvDial line.red { stroke: #ff5a3c; }
.dvDial text { fill: #cfd8d3; font-size: 14px; font-weight: 700; font-family: inherit; }
.dvDial .needle { stroke: #ff5a3c; stroke-width: 4; stroke-linecap: round; transition: all .15s linear; } .dvDial .hub { fill: #f2f5f3; }
.dvDial .dialNum { fill: #fff; font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; } .dvDial .dialUnit { fill: #8a9890; font-size: 12px; }
.dvSide { display: flex; gap: 14px 22px; align-items: center; justify-content: center; flex-wrap: wrap; }
.dvSide .dvGear { padding: 6px 18px; } .dvSide .dvGear b { font-size: 72px; }
.dvSportMain { grid-template-columns: 1fr; justify-items: center; text-align: center; }
.dvSport { position: relative; width: min(100%, 560px); }
.dvSport svg { width: 100%; height: auto; display: block; }
.dvSport .seg { fill: none; stroke: #1c2421; stroke-width: 22; } .dvSport .seg.on { stroke: #2fd27a; } .dvSport .seg.on.a { stroke: #ffb020; } .dvSport .seg.on.r { stroke: #ff3b2f; }
.shiftLights { display: flex; justify-content: center; gap: 8px; margin-bottom: 6px; }
.shiftLights i { width: 18px; height: 18px; border-radius: 50%; background: #1c2421; }
.shiftLights i.g { background: #2fd27a; box-shadow: 0 0 10px #2fd27a; } .shiftLights i.a { background: #ffb020; box-shadow: 0 0 10px #ffb020; } .shiftLights i.r { background: #ff3b2f; box-shadow: 0 0 10px #ff3b2f; }
.shiftLights i.flash { background: #ff3b2f; box-shadow: 0 0 14px #ff3b2f; animation: dvFlash .25s steps(2) infinite; }
@keyframes dvFlash { 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .shiftLights i.flash { animation: none; } }
.sportCore { position: absolute; left: 0; right: 0; bottom: 4%; display: grid; justify-items: center; gap: 2px; }
.dvSportMain > .sportCore { position: static; }
.sportGear { font-size: clamp(80px, 22vw, 150px); line-height: .9; font-weight: 900; }
.dvSport.shift .sportGear { color: #ff3b2f; }
.sportRpm { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; } .sportSpeed { font-size: 22px; font-weight: 700; color: #cfd8d3; font-variant-numeric: tabular-nums; }
.sportRpm small, .sportSpeed small { font-size: 13px; color: #8a9890; }
.sportBtns { display: flex; align-items: center; gap: 10px; } .sportBtns small { color: #8a9890; font-weight: 600; } .sportBtns .dvGearBtns { margin: 0; }
.dvSportMain .dvNums { justify-content: center; }
.dvMinimal { grid-template-columns: 1fr auto; align-items: center; }
.minSpeed { display: grid; } .minSpeed b { font-size: clamp(110px, 32vw, 220px); line-height: .9; font-weight: 900; font-variant-numeric: tabular-nums; } .minSpeed small { color: #8a9890; font-size: 16px; font-weight: 600; }
.dvMinimal .dvGear { grid-row: auto; } .dvMinimal .minRpm, .dvMinimal .dvNums, .dvMinimal .dvMax { grid-column: 1 / -1; }
.minRpm { padding-bottom: 14px; } .minRpm small { color: #8a9890; font-size: 15px; font-weight: 600; }
.dvLayout { position: absolute; inset: auto 0 0 0; z-index: 3; max-height: 88%; overflow-y: auto; background: #101614; border-radius: 22px 22px 0 0; padding: 16px 16px calc(env(safe-area-inset-bottom) + 16px); box-shadow: 0 -10px 40px rgba(0,0,0,.6); display: grid; gap: 10px; }
.dvLayoutHead { display: flex; align-items: center; justify-content: space-between; font-size: 20px; }
.dvLayoutSub { color: #8a9890; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: 12px; }
.dvStyles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.dvStyles button { display: grid; grid-template-columns: 48px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 14px; border: 2px solid transparent; background: #1a2320; color: #f2f5f3; font: inherit; }
.dvStyles button.on { border-color: var(--accent); }
.dvStyles button b { font-size: 16px; } .dvStyles button small { grid-column: 2; color: #8a9890; font-size: 12.5px; line-height: 1.3; }
.dvStyleIcon { grid-row: span 2; width: 48px; height: 32px; fill: #f2f5f3; stroke: #f2f5f3; }
.dvStyles button.on .dvStyleIcon { fill: var(--accent); stroke: var(--accent); }
.dvFields { display: flex; flex-wrap: wrap; gap: 8px; }
.dvFields button { padding: 9px 14px; border-radius: 999px; border: 0; background: #1a2320; color: #cfd8d3; font: inherit; font-weight: 600; }
.dvFields button.on { background: var(--accent); color: var(--on-accent); }
.dvLink { justify-self: start; background: none; border: 0; color: #8a9890; font: inherit; text-decoration: underline; padding: 4px 0; }
@media (orientation: landscape) and (max-height: 560px) {
  .dvClassic { grid-template-columns: 1fr auto; } .dvDials { flex-wrap: nowrap; } .dvDial { max-width: 62vh; } .dvSide { flex-direction: column; }
  .dvSport { width: min(100%, 70vh); } .sportGear { font-size: 22vh; }
}

/* Service: the jobs done, and reading past services' photos */
.jobList { display: grid; gap: 6px; }
.jobRow { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-radius: 12px; background: var(--surface-2); color: var(--accent); }
.jobRow input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; padding: 8px 0; outline: none; }
.jobRow button { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--text-3); display: grid; place-items: center; }
.jobRow.add { background: transparent; border: 1px dashed var(--line, var(--surface-3)); color: var(--text-3); }
.jobRow.add button:not(:disabled) { color: var(--accent); }
.photoReview { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 12px; border-radius: 16px; background: var(--surface); flex-wrap: wrap; }
.photoReview .rowText { flex: 1 1 200px; }
.ppJobs { display: block; color: var(--text-2, inherit); }

/* Events for this car */
.evArea { display: flex; gap: 8px; margin: 4px 0 12px; } .evArea input { flex: 1; min-width: 0; }
.evRow { align-items: flex-start; }
.evDate { flex: none; width: 46px; display: grid; justify-items: center; padding: 6px 0; border-radius: 12px; background: var(--surface-2); line-height: 1.1; }
.evDate b { font-size: 20px; font-weight: 800; } .evDate small { font-size: 11px; text-transform: uppercase; color: var(--text-3); }
.evTags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; } .evTags em { font-style: normal; font-size: 12px; color: var(--accent); }
.evFor { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-3); color: var(--text-2, var(--text)); }
.evFor.model { background: var(--accent); color: var(--on-accent); } .evFor.classic { background: var(--amber); color: #1b1300; }
.evArea input { padding: 11px 14px; border-radius: 12px; border: 1px solid var(--surface-3); background: var(--surface-2); color: var(--text); font: inherit; }
.sheet a.row b, a.evRow b { color: var(--text); } .sheet a.row { color: inherit; text-decoration: none; }

/* An event's preview (Events for this car, Track Lab's events) */
.evPreview { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; }
.evpCard { width: min(100%, 560px); max-height: 92vh; overflow-y: auto; background: var(--bg, #101614); color: var(--text); border-radius: 22px 22px 0 0; padding: 16px 16px calc(env(safe-area-inset-bottom) + 16px); display: grid; gap: 12px; box-shadow: 0 -10px 40px rgba(0,0,0,.4); }
@media (min-width: 700px) { .evPreview { align-items: center; } .evpCard { border-radius: 22px; } }
.evpHead { display: flex; align-items: flex-start; gap: 10px; } .evpHead b { flex: 1; font-size: 20px; line-height: 1.25; }
.evpClose { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text); display: grid; place-items: center; }
.evpImg { width: 100%; max-height: 220px; object-fit: cover; border-radius: 14px; background: var(--surface-2); }
.evpFacts { display: grid; gap: 8px; } .evpFacts > span { display: flex; align-items: center; gap: 8px; color: var(--text); } .evpFacts svg { color: var(--accent); flex: none; } .evpFacts p { margin: 0; color: var(--text-3); }
.evpTags { display: flex !important; gap: 6px; flex-wrap: wrap; } .evpTags i { font-style: normal; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--surface-3); } .evpTags i.on { background: var(--accent); color: var(--on-accent); }
.evpAbout { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); } .evpAbout small { color: var(--text-3); font-weight: 600; } .evpAbout p { margin: 0; line-height: 1.5; white-space: pre-line; }
.evpActions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .evpActions .btn { width: 100%; justify-content: center; text-decoration: none; } .evpActions > :first-child, .evpActions > :last-child { grid-column: 1 / -1; }
.evpMsg { color: var(--accent); }
.evSaved { padding-right: 6px; } .evSavedMain { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; background: none; border: 0; color: inherit; font: inherit; text-align: left; padding: 0; }
.evSavedX { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--text-3); display: grid; place-items: center; }
.evFor.on { background: var(--surface-3); color: var(--accent); }
button.evRow { width: 100%; text-align: left; font: inherit; color: inherit; background: transparent; border: 0; }

/* Event actions: round icon buttons in one row that scrolls sideways. */
.evActs { display: flex; gap: 8px; margin: 8px -4px 0; padding: 2px 4px 4px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.evActs::-webkit-scrollbar { display: none; }
.evAct { position: relative; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; scroll-snap-align: start; background: var(--surface-2, rgba(127,127,127,.14)); color: var(--accent-strong, var(--accent)); border: 0; padding: 0; text-decoration: none; cursor: pointer; }
.evAct:active { transform: scale(.94); }
.evAct.on { background: var(--accent); color: #fff; }
.evAct i { position: absolute; right: 4px; bottom: 3px; font-style: normal; font-size: 9px; font-weight: 800; line-height: 1; }
.evActMsg { display: block; margin-top: 4px; color: var(--muted); }
.evCalPick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; } .evCalPick .btn { flex: 1 1 140px; min-height: 40px; padding: 8px 12px; font-size: 14px; gap: 6px; }
.evFollowIc { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2, rgba(127,127,127,.14)); color: var(--accent); flex: 0 0 auto; }
/* Find parts */
.partsForm { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.partsForm input:first-child { grid-column: 1 / -1; }
.partsScope { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; margin-top: 10px; }
.partsScope button { justify-content: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.partsTools { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.partsFilter { margin: 8px 0; }
.partOffer { display: block; padding: 0; }
.partMain { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 12px 14px; color: inherit; text-decoration: none; }
.partTags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 3px; }
.partTags em { font-style: normal; font-size: 12.5px; color: var(--text-2); }
.tier { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); }
.tier.original { background: #1f4d8a; color: #fff; } .tier.oem { background: #2b6fb3; color: #fff; } .tier.premium { background: var(--accent); color: #fff; } .tier.used { background: #8a5a1f; color: #fff; }
.partFit { display: flex; gap: 4px; align-items: center; margin-top: 3px; }
.partFit.yes { color: var(--accent-strong, var(--accent)); } .partFit.check { color: var(--amber, #c98a12); }
.partPrice { display: grid; justify-items: end; align-content: start; gap: 1px; text-align: right; }
.partPrice b { font-size: 16px; } .partPrice small { color: var(--text-2); font-size: 12px; white-space: nowrap; }
.partImport { margin: 0 14px 12px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--amber, #c98a12) 12%, transparent); font-size: 13px; }
.partImport summary { cursor: pointer; font-weight: 600; display: flex; gap: 6px; align-items: center; list-style: none; }
.partImport summary::-webkit-details-marker { display: none; }
.partImport ul { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 6px; }
.partImport li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.partImport li small { display: block; color: var(--text-2); font-size: 12px; }
.basketSeg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 4px 0; }
.basketShop li { flex-wrap: wrap; align-items: center; } .basketShop li .bItem { flex: 1; min-width: 0; white-space: normal; color: inherit; }
.basketShop li .iconBtn.small { width: 28px; height: 28px; flex: none; }
.fillSetup { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2, rgba(127,127,127,.08)); font-size: 13.5px; } .fillSetup ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; } .fillSetup p { margin: 4px 0 0; }
.partOffer .partPick { margin: 0 0 8px 12px; align-self: flex-start; }
.bCheck { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; color: var(--amber, #c98a12); }
.bPin { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; color: var(--accent); }
.bAlt { flex-basis: 100%; display: grid; gap: 6px; padding: 8px 0 4px; }
.bAltRow { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .bAltRow span { flex: 1; white-space: normal; } .bAltRow .btn { margin: 0; }
.bActs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; } .basket .bActs .btn { margin-top: 0; }
.bPaid { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .bPaid label { display: flex; align-items: center; gap: 6px; font-size: 13.5px; } .bPaid input { width: 96px; min-height: 36px; }
.onOrder { display: grid; gap: 6px; margin-top: 10px; } .onOrder .supRow .btn { margin: 0; }
.basketCost { color: var(--text-2); font-size: 13px; } .basketCost.warn { color: var(--amber, #c98a12); }
.partsBasket > .row { width: 100%; text-align: left; display: flex; gap: 10px; align-items: center; }
.basketParts { list-style: none; padding: 0 4px; margin: 6px 0; display: grid; gap: 4px; }
.basketParts li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.basketParts li small { display: block; color: var(--text-2); font-size: 12px; }
.partsForm input { min-height: 46px; border-radius: 12px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font: inherit; font-size: 16px; width: 100%; box-sizing: border-box; }

/* Gear calibration: the rev counter's reading typed when the microphone can't hear the engine. */
/* A box the guide asks for (the rev counter's reading): title, what's heard, then the number and Use. */
.calAsk { display: grid; gap: 6px; margin: 0; padding: 14px; border-radius: 16px; background: rgba(127,127,127,.14); flex-shrink: 0; }
.calAsk > b { font-size: 18px; } .calAsk > small { font-size: 14px; opacity: .8; }
.calAskRow { display: flex; gap: 10px; }
.micSens { display: grid; grid-template-columns: repeat(4, 1fr); margin: 2px 0; } .calAsk .micSens button { min-height: 40px; }
.driveView .micSens { background: rgba(255,255,255,.1); } .driveView .micSens button { color: #cfd8d3; } .driveView .micSens button.on { background: #fff; color: #0b0f0d; }
.calMicBtn { justify-self: start; background: #ffb020; color: #1a1200; margin: 2px 0; }
.calAskRow .btn.ghost { flex: 1; } .calAskRow .btn:only-child, [data-cal-rev-yes] { flex: 2; }
.calAskWarn { display: block; font-style: normal; font-weight: 700; color: #ffb020; font-size: 14px; margin-top: 2px; }
.calAskRow input { flex: 1 1 auto; width: auto; min-width: 0; min-height: 52px; font-size: 24px; font-weight: 700; border-radius: 12px; padding: 0 14px; border: 1px solid rgba(127,127,127,.4); background: rgba(0,0,0,.25); color: inherit; box-sizing: border-box; }
.calAskRow .btn { flex: 0 0 auto; width: auto; min-height: 52px; min-width: 88px; padding: 0 18px; }
.labGuide .calAsk input { background: var(--surface); }
/* The driving view scrolls instead of squashing its parts on top of each other. */
.driveView > * { flex-shrink: 0; } .dvSay.small { font-size: 19px; padding: 12px 14px; }
.calStep.calFocus { outline: 3px solid var(--accent); outline-offset: 2px; transition: outline-color .6s; }

/* Background work: notices over the app until seen (app/background.tsx). */
.jobNotices { position: fixed; z-index: 1000; top: calc(env(safe-area-inset-top, 0px) + 8px); left: 10px; right: 10px; max-width: 520px; margin: 0 auto; display: grid; gap: 8px; pointer-events: none; }
.jobNotice { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.jobNotice > span:not(.spinner) { flex: 1; min-width: 0; display: grid; gap: 2px; } .jobNotice b { font-size: 15px; } .jobNotice small { color: var(--text-2); font-size: 13px; overflow-wrap: anywhere; }
.jobNotice.ok > svg { color: var(--accent); } .jobNotice.bad > svg { color: var(--red); } .jobNotice.busy { opacity: 1; }
.jobNotice .btn.small { margin: 0; flex: none; }
.jobNotice .jobGo { cursor: pointer; }
.jobNotice .jobBusy { position: relative; flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-style: normal; }
.jobNotice .jobBusy .spinner.small { position: absolute; right: -3px; bottom: -3px; width: 13px; height: 13px; background: var(--surface); }
.oldBaskets { margin-top: 10px; } .oldBaskets > summary { cursor: pointer; font-weight: 700; color: var(--accent); padding: 6px 2px; }
.oldBasket { border-top: 1px solid var(--line, rgba(0,0,0,.08)); padding: 6px 2px; } .oldBasket > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; } .oldBasket > summary span { flex: 1; min-width: 0; }
.oldBasketShop p { display: flex; justify-content: space-between; margin: 8px 0 2px; } .oldBasketShop ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; font-size: 14px; }
.oldBasketShop li { display: flex; justify-content: space-between; gap: 10px; } .oldBasketShop li a { min-width: 0; overflow-wrap: anywhere; }

.crashGuard { max-width: 520px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 40px) 20px 40px; display: grid; gap: 12px; color: var(--text); background: var(--bg); min-height: 100vh; align-content: start; }
.crashGuard .crashMsg code { word-break: break-word; font-size: 12px; color: var(--text-2); }
/* Runs and logs (one car's history, with smart filters) */
.carHistory .histSearch { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; background: var(--surface); margin-bottom: 10px; color: var(--text-3); }
.carHistory .histSearch input { flex: 1; border: 0; background: none; font: inherit; color: var(--text); padding: 11px 0; min-width: 0; outline: none; }
.carHistory .histGroup { margin: 0 0 8px; }
.carHistory .histGroup > small { display: block; color: var(--text-3); font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .4px; margin: 0 2px 4px; }
.carHistory .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.carHistory .chip em { font-style: normal; font-size: 11.5px; opacity: .6; margin-left: 6px; font-variant-numeric: tabular-nums; }
.carHistory .chip:disabled { opacity: .4; }
.carHistory .histBar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 6px; }
.carHistory .histBar > .fine { flex: 1; margin: 0; }
.carHistory .histBar select { font: inherit; font-size: 13.5px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; background: var(--surface); color: var(--text); }
.carHistory .list > .row > svg:first-child, .carHistory .list .rowText ~ svg { flex: 0 0 auto; }
.carHistory .histMore { display: block; margin: 2px 2px 4px; font-size: 13.5px; }

/* The guide's big tap button (gears with the rev counter) and the "listening" line, in the driving view. */
.dvTap { display: block; width: 100%; min-height: 72px; margin: 10px 0 0; border: 0; border-radius: 18px; background: var(--accent); color: #fff; font: inherit; font-size: 20px; font-weight: 800; }
.dvListen { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0 0; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.1); color: #fff; font-weight: 700; }
.dvListen .recDot { animation: dvPulse 1s ease-in-out infinite; }
@keyframes dvPulse { 50% { opacity: .3; } }

/* Track Lab: Virtual Mechanic's design system (lab/globals.css) with its own racing blue highlight, and its screens. */
/* Track Lab's highlight: racing blue (Virtual Mechanic is green, Virtual Garage orange, Dyno Lab violet). Everything
   else is Virtual Mechanic's design system, so the apps look and feel the same. */
:root { --accent: #1565d8; --accent-strong: #0d4fb3; --accent-soft: #e3eeff; --on-accent: #ffffff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --accent: #5aa2ff; --accent-strong: #84baff; --accent-soft: #11264a; --on-accent: #04152e; } }
:root[data-theme="dark"] { --accent: #5aa2ff; --accent-strong: #84baff; --accent-soft: #11264a; --on-accent: #04152e; }
.priceTag.best { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.chip.dlCredits { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 17px; background: var(--surface); box-shadow: var(--shadow); font-weight: 650; font-size: 13.5px; color: var(--text); }
.dlHero { display: grid; gap: 10px; justify-items: start; }
.dlHero b { font: 700 19px/1.25 var(--font-display); }
.dlCar { display: grid; gap: 12px; margin-bottom: 12px; }
.dlCarHead { display: flex; align-items: center; gap: 12px; }
.dlCarHead .rowText { flex: 1; min-width: 0; }
.dlCarHead .rowText b { display: block; font-size: 17px; }
.dlCarHead .rowText small { color: var(--text-2); font-size: 12.5px; }
.dlStats { display: flex; gap: 8px; }
.dlStats span { flex: 1; background: var(--surface-2); border-radius: 12px; padding: 8px 10px; display: grid; }
.dlStats small { color: var(--text-3); font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .4px; }
.dlStats b { font: 700 20px/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.dlStats em { font-style: normal; color: var(--text-2); font-size: 12px; }
.dlActions { display: flex; gap: 8px; margin-top: 6px; }
.dlActions .btn { flex: 1; }
.list select { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; }
.dlToast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 200; background: #111; color: #fff; padding: 10px 16px; border-radius: 14px; font-size: 14px; max-width: 90vw; }
.jumpSheet { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center; background: var(--scrim); }
.jumpSheet.hint { align-items: flex-start; background: none; pointer-events: none; }
.jumpHint { pointer-events: auto; margin: calc(env(safe-area-inset-top) + 74px) 12px 0; background: #111; color: #fff; border-radius: 16px; padding: 12px 16px; box-shadow: var(--shadow-lg); }
.jumpBox { background: var(--surface); width: 100%; max-width: 440px; border-radius: 22px 22px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 10px; }
.jumpBox p { color: var(--text-2); font-size: 14.5px; }
a.row { color: inherit; }
.dlAppIcon { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.dlCarPhoto { width: 64px; height: 44px; object-fit: cover; border-radius: 10px; background: var(--surface-2); flex: none; }
.btn.filmGo.wide { width: 100%; }
.row.logoRow { display: block; }
.row.logoRow .logoSetting { border-top: 0; padding-top: 0; }
/* Big screens (tablets, computers) and phones turned sideways: the whole window, not a phone-sized column.
   Virtual Mechanic's rules expect its side bar of tabs; Dyno Lab has none, so its home is a centred page with the
   cars side by side, and the lab screens use the full window. */
@media (min-width: 768px), (orientation: landscape) and (min-width: 560px) and (max-height: 520px) {
  .phone, .phone:not(:has(> .tabbar)) { display: flex; flex-direction: column; align-items: stretch; max-width: none; }
  .phone:not(:has(> .tabbar)) > * { width: auto; max-width: none; }
  .content.noTabs { padding: max(28px, env(safe-area-inset-top)) max(32px, env(safe-area-inset-right), calc((100% - 1120px) / 2)) 48px max(32px, env(safe-area-inset-left), calc((100% - 1120px) / 2)); }
  .tlStart { max-width: 760px; }
  .dlMore { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 0 28px; align-items: start; }
  .dlHero { max-width: 760px; }
  .jumpSheet { align-items: center; }
  .jumpBox { border-radius: 22px; }
  /* The lab and power run screens: full window, content kept to a readable width. */
  .dynoBody { max-width: 980px; padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
  .mrBar { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
}
/* Phones sideways: less height, so tighter tops. */
@media (orientation: landscape) and (max-height: 520px) {
  .content.noTabs { padding-top: max(14px, env(safe-area-inset-top)); }
  .screenHead h1 { font-size: 26px; }
  .mrBar { padding-top: max(6px, env(safe-area-inset-top)); padding-bottom: 6px; }
  .dynoBody { padding-top: 10px; }
}
.screenHead > .headActions { flex: none; }

/* ---- Track Lab ------------------------------------------------------------------------------------------------ */
.tlStart { display: grid; gap: 10px; justify-items: stretch; }
.tlStart > b { font: 700 19px/1.25 var(--font-display); }
.tlStart .dlActions { margin-top: 0; }
.chipRow { display: flex; flex-wrap: wrap; gap: 6px; }
.chipRow .chip { height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 600 14px/1 var(--font); }
.chipRow .chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.big { min-height: 56px; font-size: 17px; }
.tlHow ol { margin: 6px 0 8px; padding-left: 20px; display: grid; gap: 6px; }
.checkRow { gap: 12px; align-items: flex-start; }
.checkRow input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.noteBox { background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; color: var(--text); }

/* The live screen: black, big numbers, readable at a glance in a mount. */
.tlLive { position: fixed; inset: 0; z-index: 90; background: #07090a; color: #f2f5f3; display: flex; flex-direction: column; gap: 10px; padding: calc(env(safe-area-inset-top) + 10px) max(14px, env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 12px) max(14px, env(safe-area-inset-left)); }
.tlTop { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.tlWhere { flex: 1; min-width: 0; display: grid; }
.tlWhere b, .tlWhere small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tlTop .tlTrack { font-size: 15px; }
.tlTop .tlStatus { color: #8a9890; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.tlTop .dvClose, .tlTop .dvRec { flex: none; padding: 9px 12px; font-size: 14px; }
.dvClose.stop { background: #e5484d; }
.dvClose:disabled { opacity: .45; }
.tlMain { flex: 1; min-height: 0; display: grid; grid-template-rows: auto minmax(120px, 1fr) auto; gap: 14px; }
.tlNow { display: grid; justify-items: center; gap: 6px; }
.tlNow small, .tlSide small { color: #8a9890; font-size: 14px; font-weight: 600; }
.tlClock { font: 800 clamp(64px, 22vw, 180px)/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -2px; }
.tlDelta { position: relative; width: min(100%, 520px); height: 54px; border-radius: 14px; background: #121816; display: grid; place-items: center; overflow: hidden; }
.tlDelta b { position: relative; z-index: 1; font: 800 34px/1 var(--font-display); font-variant-numeric: tabular-nums; color: #8a9890; }
.tlDelta.up b { color: #3ddc84; } .tlDelta.down b { color: #ff5f63; }
.tlDelta i { position: absolute; top: 0; bottom: 0; opacity: .28; }
.tlDelta.up i { background: #3ddc84; } .tlDelta.down i { background: #ff5f63; }
.tlDelta:not(.up):not(.down) b { font-size: 16px; font-weight: 600; }
.tlSide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tlSide > span { display: grid; justify-items: center; background: #121816; border-radius: 16px; padding: 10px 6px; }
.tlSide > span b { font: 800 clamp(22px, 6vw, 40px)/1.15 var(--font-display); font-variant-numeric: tabular-nums; }
.tlSide em { font-style: normal; font-size: 13px; color: #8a9890; }
.tlSide em.slow { color: #ff8a8d; }
.tlSecs { grid-column: 1 / -1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.tlSec { display: grid; justify-items: center; padding: 8px 4px; border-radius: 12px; background: #121816; border: 2px solid transparent; }
.tlSec b { font: 800 22px/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.tlSec.best { border-color: #b57bff; background: #261a3a; } .tlSec.close { border-color: #3ddc84; } .tlSec.slow { border-color: #f5b83d; }
/* The coach */
.aiTag { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .2px; text-transform: none; color: #6b3fd6; background: linear-gradient(90deg, rgba(139,92,246,.14), rgba(59,130,246,.14)); vertical-align: middle; }
.aiTag::before { content: "✦"; font-size: 10px; }
.aiTag.dark { color: #cdb6ff; background: rgba(139,92,246,.22); margin: 0 8px 0 0; }
.tlTip.quiet { color: #8a9890; font-weight: 600; font-size: 14px; }
/* The live map */
.tlMapLive { position: relative; min-height: 0; border-radius: 18px; background: #0e1312; display: grid; overflow: hidden; }
.tlMapLive svg { width: 100%; height: 100%; min-height: 0; display: block; }
.tlMapLive.empty { place-items: center; color: #8a9890; font-weight: 600; font-size: 14px; padding: 12px; text-align: center; }
.tlmBed { fill: none; stroke: #1f2a27; stroke-width: 30; stroke-linejoin: round; stroke-linecap: round; }
.tlmRoad { fill: none; stroke: #3a4a45; stroke-width: 10; stroke-linejoin: round; stroke-linecap: round; }
.tlmLap { fill: none; stroke-width: 12; stroke-linejoin: round; stroke-linecap: round; }
.tlmLap.draw { stroke: #f2f5f3; stroke-dasharray: 2 18; stroke-width: 10; }
.tlMapLive.drawing .tlmLap.draw { stroke-dasharray: none; stroke: #8fd3ff; }
.tlmLap.even { stroke: #9aa6a0; } .tlmLap.gain { stroke: #3ddc84; } .tlmLap.lose { stroke: #ff5f63; }
.tlmGate { stroke: #fff; stroke-width: 7; stroke-linecap: round; }
.tlmSector { stroke: #b57bff; stroke-width: 5; stroke-linecap: round; }
.tlmGhost { fill: #b57bff; stroke: #07090a; stroke-width: 5; opacity: .9; }
.tlmCar { fill: #2f8cff; stroke: #fff; stroke-width: 6; }
.tlmCarHalo { fill: #2f8cff; opacity: .22; }
.tlmKey { position: absolute; left: 10px; bottom: 8px; display: flex; gap: 12px; font-size: 12px; font-weight: 650; color: #8a9890; }
.tlmKey i { display: inline-block; width: 10px; height: 10px; border-radius: 5px; margin-right: 5px; vertical-align: -1px; }
.tlmKey i.ghost { background: #b57bff; } .tlmKey i.gain { background: #3ddc84; } .tlmKey i.lose { background: #ff5f63; }
.tlmDrawing { color: #8fd3ff; }
.tlmDrawing::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 4px; background: #8fd3ff; margin-right: 6px; animation: tlmBlink 1s infinite; }
@keyframes tlmBlink { 50% { opacity: .2; } }
.tlTip { margin: 0; text-align: center; font-size: 17px; font-weight: 650; color: #ffd27a; }
.tlLaps { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tlLaps span { flex: none; padding: 6px 10px; border-radius: 10px; background: #121816; font-weight: 700; font-variant-numeric: tabular-nums; }
.tlLaps span small { color: #8a9890; margin-right: 6px; }
.tlLaps span.best { background: #261a3a; color: #d9b8ff; }
.tlUp { color: #3ddc84; margin-left: 10px; } .tlDown { color: #ff5f63; margin-left: 10px; }
@media (orientation: landscape) and (max-height: 520px), (min-width: 900px) {
  .tlMain { grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
  .tlMapLive { align-self: stretch; }
  .tlMain .tlClock { font-size: min(30vh, 10.5vw); }
  .tlMain .tlSide > span b { font-size: min(8vh, 2.9vw); }
  .tlClock { font-size: clamp(64px, 14vw, 200px); }
  .tlSide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Review and history. */
.tlStats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.tlStats span { background: var(--surface); box-shadow: var(--shadow); border-radius: 16px; padding: 12px 14px; display: grid; gap: 2px; }
.tlStats small { color: var(--text-3); font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .4px; }
.tlStats b { font: 700 24px/1.15 var(--font-display); font-variant-numeric: tabular-nums; }
.tlStats b i { font-style: normal; font-size: 13px; color: var(--text-2); }
.tlStats em { font-style: normal; color: var(--text-2); font-size: 12.5px; }
.tlMapCard { display: grid; gap: 10px; }
.tlMap { width: 100%; max-height: 360px; background: var(--surface-2); border-radius: 14px; }
.tlTable { padding: 4px 0; overflow-x: auto; }
.tlTable table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14.5px; }
.tlTable th { text-align: left; color: var(--text-3); font-size: 12px; font-weight: 650; padding: 8px 10px; }
.tlTable td { padding: 9px 10px; border-top: 1px solid var(--line); white-space: nowrap; }
.tlTable tr { cursor: pointer; }
.tlTable tr.best td:nth-child(2) b { color: var(--accent-strong); }
.tlTable tr.on { background: var(--amber-soft); }
.tlTable td.secBest { color: #8a3ffc; font-weight: 700; }
.tlCompare { display: grid; gap: 6px; }
.tlCompare svg { width: 100%; height: auto; }
.tlCompare .grid, .tlProgress .grid { stroke: var(--line); stroke-width: 1; }
.tlCompare .axis, .tlProgress .axis { fill: var(--text-3); font-size: 9.5px; }
.lineA { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; }
.lineB { fill: none; stroke: #f08a24; stroke-width: 2; stroke-linejoin: round; }
.lineGap { fill: none; stroke: var(--text); stroke-width: 1.8; }
.tlLegend { display: flex; gap: 14px; font-size: 13px; font-weight: 650; }
.tlLegend span::before { content: ""; display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.tlLegend .a::before { background: var(--accent); } .tlLegend .b::before { background: #f08a24; }
.tlLosses { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.tlLosses b { font-variant-numeric: tabular-nums; color: #d9363e; margin-right: 4px; }
.tlNote { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--surface); color: var(--text); font: inherit; resize: vertical; }
.tlProgress svg { width: 100%; height: auto; }
.tlProgress .dot { fill: var(--accent); } .tlProgress .dotNote { fill: #f08a24; stroke: var(--surface); stroke-width: 2; }
@media (min-width: 768px), (orientation: landscape) and (min-width: 560px) and (max-height: 520px) {
  [data-review] .dynoBody, [data-track-page] .dynoBody { max-width: 1040px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .tlLive { gap: 6px; }
  .tlSide { gap: 6px; }
  .tlSide > span { padding: 5px 6px; }
  .tlSide > span b { font-size: clamp(20px, 8vh, 34px); }
  .tlSec { padding: 4px; } .tlSec b { font-size: 18px; }
  .tlClock { font-size: clamp(56px, 30vh, 150px); }
  .tlDelta { height: 44px; } .tlDelta b { font-size: 28px; }
  .tlTip { font-size: 15px; }
}

/* A link to another app of the suite, with its icon. */
.dlSister { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-top: 8px; border-radius: 12px; background: var(--surface-2); color: var(--text); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.dlSister img { width: 28px; height: 28px; border-radius: 24%; flex: none; }
.dlSister span { flex: 1; min-width: 0; }
.dlSister svg { color: var(--text-3); flex: none; }
.dlHeroIcon { width: 52px; height: 52px; border-radius: 24%; box-shadow: var(--shadow); }
.tlMapBox { position: relative; }
.tlMapBox .tlMap { display: block; width: 100%; height: auto; max-height: 520px; background: #1d2a22; border-radius: 14px; }
.tlMapBar { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; pointer-events: none; }
.tlMapBar > * { pointer-events: auto; }
.tlMapBar .chip { height: 30px; padding: 0 12px; border-radius: 15px; border: 0; background: rgba(0,0,0,.6); color: #fff; font: 600 13px/1 var(--font); }
.tlAttr { font-size: 10px; color: #fff; background: rgba(0,0,0,.45); padding: 2px 6px; border-radius: 6px; }
.tlLibRow { border-radius: 14px; background: var(--surface-2); text-align: left; }
.tlFlag { font-size: 24px; width: 36px; text-align: center; flex: none; }
.okNote { color: var(--accent-strong); }

/* Events near me */
.tlEvent { align-items: flex-start; cursor: default; }
.tlEvDate { flex: none; width: 44px; display: grid; justify-items: center; padding: 4px 0; border-radius: 10px; background: var(--accent-soft); color: var(--accent-strong); }
.tlEvDate b { font-size: 19px; line-height: 1.1; }
.tlEvDate small { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }


[data-events-busy] { display: flex; align-items: center; gap: 8px; }
.spinner.small { width: 16px; height: 16px; border-width: 2px; }

/* Leaderboards and badges */
.tlBoardRow { cursor: default; }
.tlBoardRow.me { background: var(--accent-soft); }
.tlRank { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px; background: var(--surface-2, rgba(127,127,127,.12)); }
.tlRank.r1 { background: #F5C542; color: #3a2a00; } .tlRank.r2 { background: #C9D1DA; color: #222; } .tlRank.r3 { background: #D9955B; color: #2a1400; }
.tlBoardTime { font-variant-numeric: tabular-nums; font-size: 17px; flex: none; }
.tlJoin { display: grid; gap: 10px; }
.tlBadges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tlBadge { display: grid; gap: 4px; align-content: start; justify-items: start; padding: 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.tlBadge:not(.on) .tlBadgeIcon { opacity: .4; }
.tlBadge:not(.on) b { color: var(--text-2, inherit); }
.tlBadge.on .tlBadgeIcon svg { filter: drop-shadow(0 5px 12px rgba(0,0,0,.18)); }
.tlBadge small { color: var(--text-2, var(--muted, #6b7671)); font-size: 12.5px; line-height: 1.35; }
.tlBadgeIcon { display: block; width: 52px; height: 52px; margin-bottom: 6px; }
.tlBadgeIcon svg, .tlBadgeMini svg { display: block; }
.tlBadgeMini { display: grid; place-items: center; }
.tlBadgeWhen { color: var(--accent-strong) !important; font-weight: 600; }
.tlShareRow { display: flex; gap: 8px; flex-wrap: wrap; }
.tlBoardShare { margin-top: 12px; }
.tlCoach { display: grid; gap: 10px; }
.tlCoach .tlLosses .aiTag { margin-left: 6px; }
.tlDebrief { border-radius: 14px; padding: 12px 14px; background: linear-gradient(135deg, rgba(139,92,246,.08), rgba(59,130,246,.08)); }
.tlDebrief p { margin: 0 0 6px; } .tlDebrief ul, .tlDebrief ol { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 4px; }

/* No side scrolling on small phones: the lap table gets tighter, and top speed hides (it's on the lap card). */
@media (max-width: 400px) {
  .tlTable th, .tlTable td { padding: 8px 5px; font-size: 13px; }
  .tlTable th:last-child, .tlTable td:last-child { display: none; }
}

/* Big screens: home in two columns (start a session on the left, your tracks and sessions on the right), and a
   session's review with the track on the left and the laps on the right. */
@media (min-width: 1100px) {
  .content.noTabs:has(> .tlStart) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; align-content: start; }
  .content.noTabs:has(> .tlStart) > * { grid-column: 2; min-width: 0; }
  .content.noTabs:has(> .tlStart) > .screenHead { grid-column: 1 / -1; }
  .content.noTabs:has(> .tlStart) > .tlStart { grid-column: 1; grid-row: 2 / span 40; align-self: start; position: sticky; top: 16px; max-width: none; }
  .content.noTabs:has(> .tlStart) > section.section:nth-child(3) { margin-top: 0; }
  [data-review] .dynoBody { max-width: 1280px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-auto-flow: row dense; column-gap: 24px; }
  [data-review] .dynoBody > * { grid-column: 1 / -1; }
  [data-review] .dynoBody > section.section { grid-column: 2; }
  [data-review] .dynoBody > section.section:first-of-type { grid-column: 1; grid-row: span 8; align-self: start; position: sticky; top: 0; }
}
