/* Forecourt OS, a Proven Path Strategies product. Built to be used one handed on a forecourt in daylight: light by
   default (dark when the phone is), big targets, one main action per screen.
   Colours are Proven Path Strategies' own: navy #0F1E2E, teal #108599, cream paper, and the six colour spectrum
   (amber, gold, lime, green, sea, red) for the stripe and the figures. Type: Sora, DM Sans, JetBrains Mono.
   No inline styles in markup (the CSP blocks them); positions set by script use the CSSOM. */

:root {
  --bg: #fbfbf9; --card: #ffffff; --ink: #0f1e2e; --ink-2: #33424f; --muted: #5d6a76; --line: #e5e6e0; --soft: #f0f2ef;
  --accent: #0e7a8c; --accent-hi: #0b6474; --accent-ink: #ffffff; --teal-soft: #e5f2f4; --navy: #0f1e2e; --navy-2: #162a3e; --on-navy: #c9d3db;
  --green: #1f7a4f; --green-bg: #e3f4ea; --gold-bg: #fff1dc; --gold-ink: #8a5a12; --blue: #2c4766; --blue-bg: #e6ecf4; --red: #b5292f; --red-bg: #fbedee;
  --s1: #eda944; --s2: #f4c842; --s3: #d3dc55; --s4: #97c459; --s5: #3d8399; --s6: #b5292f;
  --grid: rgba(15, 30, 46, .03);
  --r: 14px; --r-lg: 20px; --shadow: 0 1px 2px rgba(15, 30, 46, .04), 0 6px 24px rgba(15, 30, 46, .05);
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --head: 'Sora', 'DM Sans', system-ui, sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1); --tabs: 72px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0c141c; --card: #131e28; --ink: #e7ecf0; --ink-2: #c3ced7; --muted: #9aa8b4; --line: #22303c; --soft: #1a2733; --accent: #1d93a6; --accent-hi: #6ccad8; --accent-ink: #ffffff; --teal-soft: #0f2e36; --navy: #0a1520; --navy-2: #13263a; --green: #4cc38a; --green-bg: #122c1e; --gold-bg: #33270f; --gold-ink: #f0c27c; --blue: #a6bfe0; --blue-bg: #18263a; --red: #ec6a6f; --red-bg: #3a181b; --grid: rgba(255, 255, 255, .025); --shadow: none; }
}
@font-face { font-family: 'Sora'; src: url('/fonts/sora.woff') format('woff'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/fonts/dmsans.woff') format('woff'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/jbmono.woff') format('woff'); font-weight: 500; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background-color: var(--bg); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 28px 28px; color: var(--ink); font: 400 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, .page-title { font-family: var(--head); letter-spacing: -.02em; }
/* the Proven Path Strategies colour stripe */
.stripe { display: flex; gap: 3px; height: 5px; }
.stripe span { flex: 1; }
.stripe span:nth-child(1) { background: var(--s1); } .stripe span:nth-child(2) { background: var(--s2); } .stripe span:nth-child(3) { background: var(--s3); } .stripe span:nth-child(4) { background: var(--s4); } .stripe span:nth-child(5) { background: var(--s5); } .stripe span:nth-child(6) { background: var(--s6); }
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h3 { font-size: 17px; }
p { margin: 0 0 12px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.ic { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.vh { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: -1px !important; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); } .small { font-size: 14px; } .block { display: block; } .m0 { margin: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }
/* the Forecourt OS icon: the white F on the PROVEN colours (brand/icon.py) */
.mark { display: inline-block; flex: none; width: 36px; height: 36px; background: url('../../icon.svg') center / contain no-repeat; }
.mark.sm { width: 30px; height: 30px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px; border-radius: 999px; border: 1px solid transparent; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; transition: background .15s, scale .12s var(--ease), opacity .15s; -webkit-tap-highlight-color: transparent; touch-action: manipulation; white-space: nowrap; }
.btn:active { scale: .96; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px -8px rgba(14, 122, 140, .6); }
.btn-soft { background: var(--gold-bg); color: var(--gold-ink); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.is-busy { opacity: .65; cursor: progress; }
@media (hover: hover) { .btn-primary:hover { background: var(--accent-hi); } .btn-ghost:hover { background: var(--soft); } }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--soft); cursor: pointer; }
.icon-btn.sm { width: 36px; height: 36px; }
.icon-btn[disabled] { opacity: .35; }
.link-btn { background: none; border: 0; padding: 4px; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 13px; }
.row-btns { display: flex; gap: 8px; align-items: center; }
.row-btns.wrap { flex-wrap: wrap; }

/* ---------- the frame ---------- */
.shell { min-height: 100vh; }
.side { display: none; }
.stage { padding-bottom: calc(var(--tabs) + env(safe-area-inset-bottom) + 16px); }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 16px 13px; background: var(--navy); color: #fff; border-bottom: 0; }
.top::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--s1) 0 16.6%, var(--s2) 16.6% 33.3%, var(--s3) 33.3% 50%, var(--s4) 50% 66.6%, var(--s5) 66.6% 83.3%, var(--s6) 83.3%); }
.top .icon-btn { background: rgba(255, 255, 255, .1); color: #fff; }
.top .pill.gold { background: var(--s1); color: var(--navy); }
.top-title { font-size: 17px; margin: 0; flex: 1; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; height: calc(var(--tabs) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--card) 92%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.tabs .nav-link { display: grid; justify-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--muted); text-decoration: none; background: none; border: 0; padding: 8px 0; cursor: pointer; }
.tabs .nav-link[aria-current='page'] { color: var(--accent); }
.tab-add { justify-self: center; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 8px 20px -6px rgba(14, 122, 140, .7), inset 0 -3px 0 rgba(0, 0, 0, .12); transition: scale .12s var(--ease); }
.tab-add:active { scale: .92; }
.main { outline: none; transition: opacity .18s; }
.main.leaving { opacity: .4; }
.page { width: 100%; max-width: 1080px; margin: 0 auto; padding: 16px 16px 24px; display: grid; gap: 16px; align-content: start; }
.page.narrow { max-width: 720px; }
.page > *, .stack > *, .stack-lg > *, .tab-panel > * { min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.page-title { font: 600 26px/1.15 var(--head); letter-spacing: -.03em; margin: 0; }
.eyebrow { font: 500 11px/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0 0 4px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-weight: 600; min-height: 40px; }
.hide-phone { display: none; }

@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: 248px 1fr; }
  .side { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; padding: 0 14px 20px; background: var(--navy); color: #fff; }
  .side::before { content: ''; display: block; height: 5px; margin: 0 -14px 20px; background: linear-gradient(90deg, var(--s1) 0 16.6%, var(--s2) 16.6% 33.3%, var(--s3) 33.3% 50%, var(--s4) 50% 66.6%, var(--s5) 66.6% 83.3%, var(--s6) 83.3%); }
  .side-brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 20px; }
  .side-brand strong { display: block; font-size: 15px; }
  .side-brand span:not(.mark) { font: 500 11px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #6cc3cf; }
  .side .nav-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 10px; color: var(--on-navy); text-decoration: none; font-weight: 600; background: none; border: 0; cursor: pointer; width: 100%; text-align: left; position: relative; }
  .side .nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
  .side .nav-link[aria-current='page'] { background: rgba(16, 133, 153, .28); color: #fff; }
  .side .nav-link[aria-current='page']::before { content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--s1); }
  .side .nav-link[aria-current='page'] .ic { color: #6cc3cf; }
  .side-foot { margin-top: auto; display: grid; gap: 8px; }
  .demo-note { font-size: 13px; color: var(--navy); background: var(--s1); padding: 10px 12px; border-radius: 10px; margin: 0; }
  .side-foot .nav-link { color: var(--on-navy); }
  .top { background: color-mix(in srgb, var(--bg) 90%, transparent); color: var(--ink); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .top::after { display: none; }
  .top .icon-btn { background: var(--soft); color: var(--ink); }
  .tabs, .top .mark { display: none; }
  .stage { padding-bottom: 32px; }
  .top { padding: 16px 32px; }
  .page { padding: 24px 32px 40px; gap: 20px; }
  .hide-phone { display: inline-flex; }
}

/* ---------- cards, figures, lists ---------- */
.card-sec { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); }
@media (min-width: 700px) { .card-sec { padding: 22px 24px; } }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-head h3 { margin: 0; }
.count { min-width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; padding: 0 8px; }
.stack { display: grid; gap: 14px; } .stack-lg { display: grid; gap: 16px; }
.figures { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 699px) { .figures:not(.three) > .figure:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (min-width: 700px) { .figures { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.figures.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 520px) { .figures.three .figure-value { font-size: 19px; } .figures.three .figure { padding: 12px; } }
.figure { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 16px 14px; display: grid; gap: 2px; box-shadow: var(--shadow); }
.figure::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--fig, var(--accent)); }
.figure:nth-child(6n+1) { --fig: var(--s5); } .figure:nth-child(6n+2) { --fig: var(--s1); } .figure:nth-child(6n+3) { --fig: var(--s4); } .figure:nth-child(6n+4) { --fig: var(--s2); } .figure:nth-child(6n+5) { --fig: var(--s3); } .figure:nth-child(6n+6) { --fig: var(--s6); }
.figure-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.figure-value { font: 600 24px/1.15 var(--head); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.figure-hint { font-size: 12px; color: var(--muted); }
.figure.neg .figure-value { color: var(--red); }
.tasks { display: grid; gap: 4px; }
.task, .lead-row, .car-row, .more-row, .car-link { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r); text-decoration: none; transition: background .12s, scale .12s var(--ease); -webkit-tap-highlight-color: transparent; }
.task:hover, .lead-row:hover, .car-row:hover, .more-row:hover, .car-link:hover { background: var(--soft); }
.task:active, .lead-row:active, .car-row:active, .car-link:active { scale: .985; }
.task-text, .lead-main { flex: 1; min-width: 0; display: grid; }
.task-text span, .lead-main span { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--soft); }
.task-ic.big { width: 52px; height: 52px; border-radius: 16px; }
.k-video, .k-viewing { background: var(--blue-bg); color: var(--blue); } .k-reserve, .k-aged { background: var(--gold-bg); color: var(--gold-ink); } .k-valuation, .k-sell { background: var(--green-bg); color: var(--green); } .k-photo { background: var(--red-bg); color: var(--red); } .k-sourcing { background: var(--gold-bg); color: var(--gold-ink); }
.all-clear { display: flex; gap: 10px; align-items: center; color: var(--green); padding: 8px 4px; }
.all-clear p { margin: 0; font-weight: 600; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-btn { display: grid; justify-items: center; gap: 6px; padding: 16px 8px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); text-decoration: none; font-weight: 700; font-size: 14px; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--soft); color: var(--ink-2); white-space: nowrap; }
.pill.green { background: var(--green-bg); color: var(--green); } .pill.gold { background: var(--gold-bg); color: var(--gold-ink); } .pill.blue { background: var(--blue-bg); color: var(--blue); } .pill.dark { background: rgba(0, 0, 0, .7); color: #fff; }
.pill.sm { font-size: 11px; padding: 2px 8px; margin-left: 6px; }
.tip { display: flex; gap: 10px; align-items: flex-start; background: var(--gold-bg); color: var(--gold-ink); border-radius: var(--r); padding: 12px 12px 12px 14px; }
.tip p, .tip span { margin: 0; flex: 1; font-size: 14px; }
.tip .icon-btn { background: transparent; color: inherit; }
.empty { text-align: center; padding: 32px 16px; display: grid; justify-items: center; gap: 4px; }
.empty-ic { width: 56px; height: 56px; border-radius: 18px; background: var(--soft); display: grid; place-items: center; margin-bottom: 8px; color: var(--muted); }
.empty p { color: var(--muted); max-width: 40ch; }

/* ---------- stock ---------- */
.search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; }
.search input { border: 0; background: transparent; min-height: 48px; width: 100%; outline: none; }
.search:focus-within { outline: 2.5px solid var(--accent); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chip { flex: none; display: inline-flex; gap: 6px; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 14px; cursor: pointer; }
.chip[aria-pressed='true'] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip-n { font-size: 12px; opacity: .7; }
.car-list > *, .lead-list > *, .tasks > * { min-width: 0; }
.car-list, .lead-list { display: grid; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px; }
.car-row .thumb { width: 96px; aspect-ratio: 4 / 3; flex: none; border-radius: 10px; overflow: hidden; background: var(--soft); display: grid; place-items: center; }
.car-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.car-row-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.car-row-top { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.car-row-main > *, .lead-main > *, .task-text > * { min-width: 0; }
.car-row-top strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.car-row-main > span { font-size: 14px; }
.car-row-price { font: 600 17px var(--head); font-variant-numeric: tabular-nums; flex: none; }
@media (max-width: 520px) { .car-row-price { display: none; } }
.no-photo { color: var(--muted); display: grid; place-items: center; }
.progress { height: 6px; border-radius: 99px; background: var(--soft); overflow: hidden; margin: 2px 0; }
.progress .bar { display: block; height: 100%; background: linear-gradient(90deg, var(--s5), var(--accent) 60%, var(--s4)); border-radius: 99px; width: 0; }
.w10 { width: 10% !important; } .w20 { width: 20% !important; } .w30 { width: 30% !important; } .w40 { width: 40% !important; } .w50 { width: 50% !important; } .w60 { width: 60% !important; } .w70 { width: 70% !important; } .w80 { width: 80% !important; } .w90 { width: 90% !important; } .w100 { width: 100% !important; }

/* ---------- a car ---------- */
.car-head { display: grid; gap: 16px; }
@media (min-width: 760px) { .car-head { grid-template-columns: 320px 1fr; align-items: center; } }
.car-hero { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3; background: var(--soft); }
.car-hero img { width: 100%; height: 100%; object-fit: cover; }
.no-photo.big { position: relative; width: 100%; height: 100%; padding: 0; border: 0; border-radius: var(--r-lg); background: var(--soft); cursor: pointer; overflow: hidden; }
.no-photo.big img { width: 100%; height: 100%; object-fit: cover; }
.no-photo.big .add-photos { position: absolute; right: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 6px 16px -6px rgba(14, 122, 140, .6); }
.car-head-text { display: grid; gap: 4px; }
.car-head-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.car-title { font: 600 26px/1.15 var(--head); font-stretch: 110%; margin: 4px 0 0; }
.car-price { font: 600 24px var(--head); margin: 6px 0 10px; display: flex; gap: 10px; align-items: baseline; font-variant-numeric: tabular-nums; }
.car-price s { font-size: 16px; }
.tabbar { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabbar [role='tab'] { flex: none; min-height: 44px; padding: 10px 14px; border: 0; background: none; font-weight: 700; color: var(--muted); border-bottom: 2.5px solid transparent; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.tabbar [role='tab'][aria-selected='true'] { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { outline: none; }
.grid2, .grid3 { display: grid; gap: 14px; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: repeat(3, 1fr); } }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th, .tbl td { text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: 13px; color: var(--muted); }
.tbl .n { text-align: right; font-variant-numeric: tabular-nums; }
.prep-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px 14px; }
.prep-item { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.prep-item:last-child { border-bottom: 0; }
.prep-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; }
.prep-item.done .prep-dot { background: var(--green); border-color: var(--green); color: #fff; }
.prep-text { display: grid; gap: 2px; min-width: 0; }
.prep-row { font-size: 14px; color: var(--muted); }
.nudge { display: flex; gap: 10px; background: var(--gold-bg); color: var(--gold-ink); border-radius: var(--r); padding: 14px; }
.nudge p { margin: 0; }
.cost-add { display: grid; gap: 12px; margin-top: 14px; align-items: end; }
@media (min-width: 640px) { .cost-add { grid-template-columns: 1fr 1fr 2fr auto; } }
.doc-list, .activity, .members, .lessons, .video-reqs, .shots { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.doc-list li, .activity li, .members li, .video-reqs li { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.doc-list li > span, .members li > span:not(.avatar) { flex: 1; }
.video-reqs li { flex-wrap: wrap; } .video-reqs li > div { flex: 1 1 220px; }
.video-req.focus { background: var(--gold-bg); border-radius: var(--r); padding: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-weight: 700; flex: none; }
.lessons a { display: flex; gap: 12px; align-items: center; padding: 12px 4px; text-decoration: none; border-bottom: 1px solid var(--line); }
.lessons a > span:nth-child(2) { flex: 1; }
.lesson-ic { width: 34px; height: 34px; border-radius: 50%; background: var(--gold-bg); color: var(--gold-ink); display: grid; place-items: center; }
.lesson { display: grid; gap: 14px; padding-left: 22px; font-size: 17px; }
.lesson li::marker { font-weight: 700; color: var(--accent); }
.practice { display: grid; gap: 14px; background: linear-gradient(135deg, var(--gold-bg), var(--card)); }
@media (min-width: 640px) { .practice { grid-template-columns: 1fr auto; align-items: center; } }

/* ---------- photo studio ---------- */
.studio-cta { display: grid; gap: 14px; }
@media (min-width: 640px) { .studio-cta { grid-template-columns: 1fr auto; align-items: center; } }
.shots { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.shot-btn { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-weight: 600; font-size: 14px; text-align: left; }
.shot-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.shots li.done .shot-dot { background: var(--green); border-color: var(--green); color: #fff; }
.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photo-grid.small { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.photo-grid.small img { border-radius: 10px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.photo-tile { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--soft); touch-action: none; cursor: grab; transition: scale .15s, box-shadow .15s; }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.photo-tile.lifted { z-index: 5; scale: 1.04; box-shadow: 0 16px 40px rgba(0, 0, 0, .3); cursor: grabbing; }
.photo-tile .pill { position: absolute; left: 6px; top: 6px; }
.tile-tools { position: absolute; right: 4px; bottom: 4px; display: flex; gap: 4px; }
.tile-tools .icon-btn { background: rgba(255, 255, 255, .9); color: #111; }
.drag { position: absolute; left: 6px; bottom: 6px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.cam { display: grid; gap: 10px; }
.cam-view { position: relative; aspect-ratio: 4 / 3; background: #000; border-radius: 14px; overflow: hidden; }
.cam-video { width: 100%; height: 100%; object-fit: cover; }
.cam-status { position: absolute; left: 12px; right: 12px; top: auto; bottom: 12px; z-index: 2; margin: 0; padding: 8px 12px; border-radius: 10px; background: rgba(15, 30, 46, .8); color: #fff; font-size: 14px; text-shadow: none; }
.cam-status:empty { display: none; }
/* the framing guide, drawn from tools/guides.py: dotted car outline, dotted wheels, the tyre line and viewfinder corners */
.cam-guide { position: absolute; inset: 0; pointer-events: none; }
.guide-svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 0 1px rgba(0, 0, 0, .9)) drop-shadow(0 1px 3px rgba(0, 0, 0, .45)); }
.g-fill { fill: rgba(255, 255, 255, .07); stroke: none; }
.g-car { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: .01 7; vector-effect: non-scaling-stroke; }
.g-wheel { fill: none; stroke: rgba(255, 255, 255, .8); stroke-width: 2; stroke-linecap: round; stroke-dasharray: .01 6; vector-effect: non-scaling-stroke; }
.g-ground { stroke: #6cc3cf; stroke-width: 2; stroke-dasharray: 12 7; vector-effect: non-scaling-stroke; }
.g-corners path { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.g-cross { stroke: rgba(255, 255, 255, .7); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.cam-facing { position: absolute; top: 10px; left: 50%; translate: -50% 0; z-index: 1; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: 999px; background: rgba(15, 30, 46, .78); color: #fff; font: 700 13px/1 var(--font); white-space: nowrap; }
.cam-facing.right { flex-direction: row-reverse; padding: 6px 8px 6px 12px; }
.cam-facing .ic { color: var(--s1); }
.cam-tyres { position: absolute; right: 7%; top: calc(84% + 6px); z-index: 1; font: 500 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #6cc3cf; text-shadow: 0 0 3px rgba(0, 0, 0, .9); }
.cam-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.cam-snap { width: 72px; height: 72px; border-radius: 50%; border: 4px solid var(--ink); background: var(--card); box-shadow: inset 0 0 0 4px var(--card), inset 0 0 0 40px var(--ink); cursor: pointer; transition: scale .12s; }
.cam-snap:active { scale: .9; }
.cam-snap[disabled] { opacity: .4; }
.plate-canvas { width: 100%; height: auto; border-radius: 12px; cursor: crosshair; touch-action: none; }
.warn { display: flex; gap: 8px; align-items: center; background: var(--red-bg); color: var(--red); padding: 10px 12px; border-radius: 10px; margin: 0; font-weight: 600; font-size: 14px; }
.range-label { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 14px; flex: 1; }
.range-label input { flex: 1; min-height: 0; padding: 0; accent-color: var(--accent); }

/* ---------- requests ---------- */
.lead-row.is-new .lead-main strong::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: middle; }
.lead-side { display: grid; justify-items: end; gap: 4px; flex: none; }
.lead-head { display: flex; gap: 14px; align-items: center; }
.car-link { background: var(--card); border: 1px solid var(--line); }
.car-link > span { flex: 1; }
.facts { display: grid; gap: 0; margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: normal; }
.facts dd a[href^="mailto:"] { overflow-wrap: anywhere; }
.quote { margin: 0; padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--card); border-radius: 0 var(--r) var(--r) 0; font-size: 17px; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 14px; }
.hint { font-size: 13px; color: var(--muted); }
input:not([type='checkbox']):not([type='radio']):not([type='range']), select, textarea { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 16px; }
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--accent); outline-offset: 0; }
input[disabled], select[disabled], textarea[disabled] { opacity: .7; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--accent); flex: none; }
.plate { font: 700 26px/1 var(--head) !important; letter-spacing: .08em; text-transform: uppercase; text-align: center; background: #f2c94c !important; color: #111 !important; border: 2px solid #111 !important; }
.plate::placeholder { color: rgba(17, 17, 17, .4); }
.code-input { font: 700 28px/1 var(--head) !important; letter-spacing: .3em; text-align: center; }
.stepper { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; counter-reset: s; }
.stepper li { flex: 1; font-size: 13px; font-weight: 700; color: var(--muted); padding-top: 10px; border-top: 3px solid var(--line); counter-increment: s; }
.stepper li::before { content: counter(s) '. '; }
.stepper li[aria-current='step'] { color: var(--ink); border-top-color: var(--accent); }
.stepper li.done { border-top-color: var(--green); }
.found { display: flex; gap: 10px; align-items: flex-start; background: var(--green-bg); color: var(--green); border-radius: var(--r); padding: 14px; }
.found p { margin: 0; display: grid; } .found span { font-size: 14px; }
.hours-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }
.faq-row { display: grid; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.error { color: var(--red); font-weight: 600; margin: 0; min-height: 1em; }
.error:empty { display: none; }

/* ---------- sheets, toasts and the tour ---------- */
dialog.sheet { margin: auto auto 0; width: 100%; max-width: 100%; max-height: 92vh; padding: 0; border: 0; border-radius: 22px 22px 0 0; background: var(--card); color: var(--ink); translate: 0 100%; transition: translate .26s var(--ease); overflow: auto; }
dialog.sheet.on { translate: 0 0; }
dialog.sheet::backdrop { background: rgba(0, 0, 0, .45); }
@media (min-width: 700px) { dialog.sheet { margin: auto; max-width: 520px; border-radius: 22px; translate: 0 24px; opacity: 0; transition: translate .22s var(--ease), opacity .22s; } dialog.sheet.wide { max-width: 760px; } dialog.sheet.on { translate: 0 0; opacity: 1; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 8px 20px; position: sticky; top: 0; background: var(--card); z-index: 2; }
.sheet-head h2 { font-size: 19px; margin: 0; }
.sheet-body { padding: 8px 20px calc(24px + env(safe-area-inset-bottom)); }
.more-list { display: grid; gap: 4px; }
.more-row { width: 100%; background: none; border: 0; text-align: left; cursor: pointer; }
.more-row > span { flex: 1; display: grid; } .more-row > span span { font-size: 14px; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabs) + env(safe-area-inset-bottom) + 14px); z-index: 90; translate: -50% 20px; opacity: 0; pointer-events: none; display: flex; gap: 12px; align-items: center; max-width: calc(100vw - 32px); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); transition: opacity .2s, translate .2s var(--ease); }
.toast.on { opacity: 1; translate: -50% 0; pointer-events: auto; }
.toast.bad { background: var(--red); color: #fff; }
.toast-act { background: none; border: 0; color: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }
@media (min-width: 960px) { .toast { bottom: 28px; } }
.tour { position: fixed; inset: 0; z-index: 95; }
.tour-ring { position: fixed; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55); transition: left .3s var(--ease), top .3s var(--ease), width .3s var(--ease), height .3s var(--ease); pointer-events: none; }
.tour.centre .tour-ring { left: 50%; top: 40%; width: 0; height: 0; }
.tour-card { position: fixed; width: min(360px, calc(100vw - 32px)); background: var(--card); color: var(--ink); border-radius: 18px; padding: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); outline: none; transition: left .3s var(--ease), top .3s var(--ease); }
.tour.centre .tour-card { left: 50% !important; top: 50% !important; translate: -50% -50%; }
.tour-card h2 { font-size: 19px; padding-right: 32px; }
.tour-x { position: absolute; right: 12px; top: 12px; }
.tour-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }

/* ---------- sign in ---------- */
.auth { min-height: 100vh; display: grid; place-content: center; gap: 16px; padding: 24px 16px; }
.auth-card { width: min(420px, calc(100vw - 32px)); background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 28px 24px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.auth-brand { display: flex; gap: 10px; align-items: center; font-weight: 700; }
.auth h1 { font: 600 28px var(--head); font-stretch: 110%; margin: 4px 0 0; }
.lede { color: var(--muted); margin: 0; }
.notice { background: var(--gold-bg); color: var(--gold-ink); padding: 10px 12px; border-radius: 10px; }
.auth-foot { text-align: center; color: var(--muted); font-size: 14px; }
.auth-demo { gap: 12px; padding: 20px 24px; }
.auth-demo strong { font-size: 16px; }
.qr { justify-self: center; background: #fff; border-radius: 12px; padding: 8px; }
.secret { display: block; overflow-wrap: anywhere; background: var(--soft); padding: 8px; border-radius: 8px; margin-top: 6px; }
.steps-list { margin: 0; padding-left: 20px; display: grid; gap: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
  .btn:active, .task:active, .tab-add:active { scale: 1; }
}
.deposit-line { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; color: var(--gold-ink); font-weight: 600; font-size: 14px; }
.buylog td:first-child { font-weight: 600; }
.buylog .best td:first-child::after { content: 'Best'; display: inline-block; margin-left: 6px; vertical-align: 2px; font-size: 11px; font-weight: 700; color: var(--gold-ink); background: var(--gold-bg); border-radius: 999px; padding: 2px 8px; }
.floor-edit { position: relative; touch-action: none; user-select: none; }
.floor-edit canvas { width: 100%; height: auto; display: block; border-radius: var(--r); }
.floor-edit .handle { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,.35); cursor: grab; }
.cam-guide-toggle[aria-pressed='false'] { opacity: .7; }
.cam-view.no-guide .cam-guide, .cam-view.no-guide .cam-facing, .cam-view.no-guide .cam-tyres { display: none; }
.bg-compare { display: grid; gap: 8px; }
.bg-compare canvas { width: 100%; height: auto; border-radius: var(--r); }

/* ---------- the spec lookup: equipment as ticks ---------- */
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row-head h3 { margin: 0; }
.kit { display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
.kit-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.kit-head h3 { margin: 0; }
.kit-count { font-size: 14px; color: var(--muted); }
.kit-group { display: grid; gap: 8px; }
.kit-group h4 { margin: 0; font-size: 15px; font-weight: 600; }
details.kit-group > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; }
details.kit-group > summary::-webkit-details-marker { display: none; }
details.kit-group > summary::after { content: '+'; margin-left: auto; font-size: 20px; color: var(--muted); }
details.kit-group[open] > summary::after { content: '\2212'; }
.kit-tools { display: flex; gap: 16px; }
.linkish { background: none; border: 0; padding: 6px 0; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.kit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
@media (min-width: 700px) { .kit-list { grid-template-columns: 1fr 1fr; } }
.kit-row { display: flex; align-items: flex-start; gap: 12px; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.kit-row:has(input:checked) { border-color: var(--ink); }
.kit-row input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--ink); }
.kit-row span { display: grid; gap: 2px; font-size: 15px; line-height: 1.35; }
.kit-row small { font-size: 13px; color: var(--muted); }

/* the screen never slides sideways on a phone (Matt, 9 November 2026): nothing may be wider than the screen, and the
   page itself is clipped at its edges in case something ever is. Sideways scrolling rows (tabs, chips) still scroll. */
html, body { overflow-x: clip; max-width: 100%; }
/* words stay whole: no word is split across two lines (Matt, 9 November 2026); codes and addresses may still break */
html { hyphens: manual; overflow-wrap: normal; word-break: normal; }

/* ---------- photos: take them here or upload ones already on the device ---------- */
.studio-btns { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 639px) { .studio-btns .btn { flex: 1 1 100%; } }
.cam-alt { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
/* button rows never run off the screen: they wrap, and the main action goes full width on its own line when needed */
.row-btns { flex-wrap: wrap; }
.row-btns > .btn { flex: 1 1 auto; }
.row-btns > .btn-primary:last-child { flex-basis: 100%; }
@media (min-width: 640px) { .row-btns > .btn-primary:last-child { flex-basis: auto; } }

/* ---------- reports ---------- */
.report-row strong { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.more-row > span.report-ic { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; display: grid !important; place-items: center; background: var(--teal-soft); color: var(--accent); }
.report-head { flex-wrap: wrap; align-items: flex-end; }
.report-head > div:first-child { flex: 1 1 320px; }
.export-btns .btn { flex: 1 1 auto; }
@media (max-width: 559px) { .export-btns { width: 100%; } .export-btns .btn { flex: 1 1 0; padding-left: 12px; padding-right: 12px; } }
.report-dates { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.report-dates .field { flex: 1 1 140px; }
.report-dates input { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); width: 100%; }
.report-loading { padding: 28px 4px; }
.tbl-scroll { overflow-x: auto; margin: 0 -6px; padding: 0 6px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.report-tbl { font-size: 14px; }
.report-tbl th { white-space: nowrap; }
.report-tbl td { white-space: nowrap; }
.report-tbl td.wrapcell { white-space: normal; min-width: 240px; max-width: 360px; }
.report-tbl td.strong { font-weight: 700; color: var(--ink); }
.report-tbl tbody tr:nth-child(even) td { background: var(--soft); }
.report-tbl tfoot td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0; }
.report-more { margin: 12px 0 0; }

/* Add a car: the Autotrader advert route */
.or-route { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.or-route p { margin: 0; display: grid; gap: 2px; flex: 1 1 220px; }
.or-route .muted { font-size: 14px; }
.check span { display: grid; gap: 2px; }
.check small { font-weight: 400; color: var(--muted); font-size: 13px; }
.warn[hidden] { display: none; }

/* ---------- dealership menu (more than one dealership, or Proven Path Strategies staff) ---------- */
.dealer-btn { display: inline-flex; align-items: center; gap: 4px; max-width: 48vw; min-height: 40px; padding: 6px 10px 6px 12px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #fff; font: 600 13px/1.2 var(--font); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dealer-btn > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dealer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.dealer-opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 10px; border: 0; border-radius: var(--r); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.dealer-opt:hover, .dealer-opt:focus-visible { background: var(--soft); }
.dealer-opt[aria-current='true'] { background: var(--teal-soft); }
.dealer-opt .ic { color: var(--accent); flex: none; }
.dealer-opt-text { flex: 1; display: grid; min-width: 0; }
.dealer-opt-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dealer-opt-text span { font-size: 13px; color: var(--muted); }
.dealer-add { margin-top: 6px; position: relative; }
.dealer-add::before { content: ''; position: absolute; left: 10px; right: 10px; top: -4px; border-top: 1px solid var(--line); }
@media (min-width: 960px) {
  .dealer-btn { display: none; }
  .brand-wrap { position: relative; margin: 0 0 16px; }
  .side-brand.is-switch { width: 100%; padding: 8px; margin: -4px 0 0; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
  .side-brand.is-switch:hover, .side-brand.is-switch[aria-expanded='true'] { background: rgba(255, 255, 255, .07); }
  .side-brand.is-switch:focus-visible { outline: 2px solid var(--s1); outline-offset: 2px; }
  .side-brand.is-switch > div { flex: 1; min-width: 0; }
  .side-brand.is-switch strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-brand.is-switch > .ic { color: #6cc3cf; flex: none; transition: rotate .15s var(--ease); }
  .side-brand.is-switch[aria-expanded='true'] > .ic { rotate: 180deg; }
  .dealer-menu { position: absolute; top: calc(100% + 6px); left: 0; width: 300px; z-index: 60; display: grid; gap: 2px; padding: 8px; max-height: 70vh; overflow: auto; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 18px 44px rgba(4, 18, 28, .32); }
  .dealer-menu[hidden] { display: none; }
  .dealer-menu-head { margin: 4px 10px 6px; font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
}
