/* ============================================================
   CarCheck Kenya — site styles
   Mobile-first. Tokens first, then layout, then components.
   ============================================================ */

:root {
  --navy: #0a1b3d;
  --navy-2: #1d3a78;
  --amber: #F5B82E;
  --bg: #F6F7F9;
  --card: #ffffff;
  --line: #E3E7EE;
  --line-2: #EEF1F5;
  --input: #CBD2DE;
  --text: #0a1b3d;
  --text-2: #39465E;
  --muted: #5A6478;
  --on-navy: #C9D2E3;
  --on-navy-2: #E4E9F2;
  --good: #0B7A47; --good-bg: #E6F4EC; --good-fg: #0A5C36;
  --bad: #B42318;  --bad-bg: #FDECEC;  --bad-fg: #7A1B12;
  --warn-bg: #FFF4D6; --warn-fg: #4A3A00;
  --soft: #EEF2F9;
  --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-xl: 22px;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow: 0 24px 60px rgba(10, 27, 61, .28);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); font-size: 16px; line-height: 1.55; color: var(--text); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: var(--navy); }
a:hover { color: var(--navy-2); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: var(--navy); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.icon { flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }
.section { padding: 56px 0; }
.section.white { background: var(--card); }
@media (min-width: 900px) { .section { padding: 96px 0; } }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 16px; }

.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--good); }
.on-navy .eyebrow, .hero .eyebrow { color: var(--amber); }
.h1 { font-size: 36px; font-weight: 700; letter-spacing: -.035em; line-height: 1.05; }
.h2 { font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.h3 { font-size: 20px; font-family: var(--body); letter-spacing: 0; }
@media (min-width: 900px) { .h1 { font-size: 58px; } .h2 { font-size: 44px; } }
.lead { font-size: 17px; color: var(--text-2); }
@media (min-width: 900px) { .lead { font-size: 19px; } }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 700px; margin-bottom: 32px; }
.section-head.split { max-width: none; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; }

/* Header */
.site-header { background: var(--navy); color: #fff; position: relative; z-index: 20; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.logo:hover { color: #fff; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--amber); color: var(--navy); display: grid; place-items: center; }
.logo-word { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; color: #fff; }
.logo-word span { color: var(--amber); }
.menu-btn { width: 44px; height: 44px; border: 0; background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; }
.site-nav { display: none; }
.site-nav a { color: #D6DDEB; text-decoration: none; font-size: 15px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; }
.site-nav.open { display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 68px; background: var(--navy); padding: 8px 16px 20px; gap: 4px; border-top: 1px solid rgba(255,255,255,.1); }
.site-nav.open a:not(.btn) { padding: 12px 0; }
@media (min-width: 980px) {
  .menu-btn { display: none; }
  .site-nav { display: flex; align-items: center; gap: 24px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 12px; border: 0; font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; transition: transform .05s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 15px; font-weight: 600; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); color: #fff; }
.btn-amber { background: var(--amber); color: var(--navy) !important; }
.btn-amber:hover { background: #ffc94d; color: var(--navy); }
.btn-ghost { background: #fff; color: var(--navy); border: 1px solid var(--input); }
.btn-ghost-dark { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); }
.btn-ghost-dark:hover { color: #fff; background: rgba(255,255,255,.08); }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--input); color: var(--text-2); cursor: not-allowed; }
.link-strong { font-weight: 600; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.field input, .field select { height: 50px; border: 1px solid var(--input); border-radius: var(--r-sm); padding: 0 14px; font: inherit; font-size: 16px; font-weight: 400; color: var(--text); background: #fff; width: 100%; }
.field input:focus, .field select:focus { border-color: var(--navy); outline: 2px solid rgba(10,27,61,.15); }
.field .hint { font-size: 13px; font-weight: 400; color: var(--muted); }
.field .error, .form-error { font-size: 13px; font-weight: 600; color: var(--bad); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-size: 14px; font-weight: 600; padding: 0; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chip { min-height: 44px; padding: 8px 14px; border-radius: var(--r-sm); border: 2px solid var(--input); background: #fff; color: var(--navy); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-align: center; }
.chip:hover { border-color: var(--navy-2); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip.tall { min-height: 56px; text-align: left; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.chip.tall small { font-size: 13px; font-weight: 400; opacity: .85; }
.chip.row { display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 12px; }
.check-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--input); background: #fff; border-radius: var(--r-sm); padding: 10px 14px; font-size: 14px; cursor: pointer; }
.check-pill:has(input:checked) { border: 2px solid var(--navy); background: var(--soft); font-weight: 600; padding: 9px 13px; }
.check-pill input { margin: 0; width: 18px; height: 18px; accent-color: var(--navy); }

/* Cards, notes, badges */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 24px; }
@media (min-width: 900px) { .card { padding: 32px; } }
.note { border-radius: 12px; padding: 14px; font-size: 14px; line-height: 1.5; }
.note.warn { background: var(--warn-bg); color: var(--warn-fg); }
.note.bad { background: var(--bad-bg); color: var(--bad-fg); }
.note.good { background: var(--good-bg); color: var(--good-fg); }
.note.info { background: var(--soft); color: var(--navy-2); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.badge.good { background: var(--good-bg); color: var(--good-fg); }
.badge.neutral { background: var(--soft); color: var(--navy-2); }
.badge.bad { background: var(--bad-bg); color: var(--bad-fg); }
.badge.warn { background: var(--warn-bg); color: #6B4E00; }
.pill-link { text-decoration: none; border: 1px solid var(--input); border-radius: 999px; padding: 10px 16px; font-size: 14px; background: #fff; }
.pill-link:hover { border-color: var(--navy); }

/* Hero */
.hero { background: var(--navy); color: #fff; padding: 32px 0 56px; }
@media (min-width: 900px) { .hero { padding: 56px 0 96px; } }
.hero-grid { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.hero-copy { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.hero-copy .lead { color: var(--on-navy); max-width: 540px; }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 15px; color: var(--on-navy-2); }
.ticks li { display: flex; align-items: center; gap: 8px; }
.ticks .icon { color: var(--amber); }
.hero-card { flex: 1 1 400px; min-width: 0; max-width: 500px; background: #fff; color: var(--text); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.tab { min-height: 56px; border: 0; border-bottom: 3px solid transparent; background: var(--bg); color: var(--navy); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; padding: 8px; }
.tab[aria-selected="true"] { background: #fff; border-bottom-color: var(--navy); font-weight: 700; }
.tab-panel { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 900px) { .tab-panel { padding: 28px; } }
.tab-panel[hidden] { display: none; }

/* Sources strip, pill rows */
.strip { background: #fff; border-bottom: 1px solid var(--line); }
.strip-row { padding: 22px 0; display: flex; flex-wrap: wrap; gap: 16px 36px; align-items: center; }
.strip-row .group { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.strip-row .label { font-size: 14px; font-weight: 600; margin-right: 4px; }

/* Feature cards */
.cards-3 { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 760px) { .cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.feature { background: #fff; border-radius: var(--r-lg); padding: 26px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--text); }
.section.white .feature { background: var(--bg); }
.feature p { color: var(--text-2); }
.num { font-family: var(--display); font-weight: 700; width: 36px; height: 36px; border-radius: 10px; background: var(--navy); color: #fff; display: grid; place-items: center; }
.num.amber { background: var(--amber); color: var(--navy); }
.go { font-weight: 600; font-size: 15px; color: var(--good); }

/* Model cards */
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.model-card { text-decoration: none; color: var(--text); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; background: #fff; }
.model-card:hover { border-color: var(--navy); }
.photo { position: relative; background: var(--soft); color: #8592AA; display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .silhouette { width: 45%; }
.model-card .body { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.model-card .name { font-family: var(--display); font-weight: 700; font-size: 19px; }
.credit { font-size: 11px; color: var(--muted); padding: 6px 2px 0; }
.credit a { color: var(--muted); }

/* Navy band */
.band { background: var(--navy); color: #fff; border-radius: 24px; padding: 32px 24px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; }
@media (min-width: 900px) { .band { padding: 48px; } }
.band p { color: var(--on-navy); }
.band-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; color: var(--on-navy-2); flex: 1 1 380px; }
.band-list li { display: flex; gap: 12px; }
.band-list .icon { color: var(--amber); margin-top: 2px; }
.band-list strong { color: #fff; }

/* FAQ */
.faq details { border-top: 1px solid #DDE2EA; padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid #DDE2EA; }
.faq summary { font-size: 18px; font-weight: 600; cursor: pointer; }
.faq details p { margin-top: 10px; color: var(--text-2); }

/* Footer */
.site-footer { background: var(--navy); color: var(--on-navy); padding: 40px 0; font-size: 14px; }
.footer-row { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: flex-start; }
.footer-brand { display: flex; flex-direction: column; gap: 6px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { color: var(--on-navy-2); text-decoration: none; padding: 6px 0; }
.footer-note { flex-basis: 100%; color: #AEB9CE; }

/* ---------- Flow pages (valuation, offers, import) ---------- */
.flow-page { background: var(--bg); }
.flow { max-width: 600px; margin: 0 auto; padding: 0 0 120px; }
@media (min-width: 720px) { .flow { padding: 32px 16px 64px; } }
.flow-shell { background: var(--bg); }
@media (min-width: 720px) { .flow-shell { background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; } }
.flow-top { background: var(--navy); color: #fff; padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.flow-top-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.flow-top .back { width: 44px; height: 44px; border: 0; background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; border-radius: 10px; }
.flow-top .back[hidden] { display: none; }
.flow-top-row::before { content: ''; width: 44px; flex: none; }
.flow-top-row:has(.back:not([hidden]))::before { display: none; }
.flow-top .step-label { font-size: 13px; color: var(--on-navy); min-width: 44px; text-align: right; white-space: nowrap; }
.flow-top .title { font-family: var(--display); font-weight: 700; font-size: 17px; flex: 1; text-align: center; }
.progress { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.progress span { height: 5px; border-radius: 999px; background: rgba(255,255,255,.22); }
.progress span.on { background: var(--amber); }
.flow-body { padding: 22px 16px 24px; display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 720px) { .flow-body { padding: 28px 28px 8px; } }
.flow-body .h1 { font-size: 28px; }
.step[hidden] { display: none; }
.step { display: flex; flex-direction: column; gap: 20px; }
.flow-cta { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); z-index: 10; }
@media (min-width: 720px) { .flow-cta { position: static; border-top: 0; padding: 16px 28px 28px; } }
.flow-cta .inner { max-width: 600px; margin: 0 auto; display: flex; gap: 10px; }
.flow-cta .inner > * { flex: 1; }

.summary-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.price-big { font-family: var(--display); font-weight: 700; font-size: 40px; letter-spacing: -.03em; line-height: 1; }
@media (min-width: 900px) { .price-big { font-size: 56px; } }
.price-rows { display: flex; flex-direction: column; gap: 8px; }
.price-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 12px; background: var(--bg); font-size: 14px; color: var(--text-2); }
.price-row strong { font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--text); }
.price-row.navy { background: var(--navy); color: var(--on-navy); }
.price-row.navy strong { color: #fff; font-size: 21px; }
.price-row.amber { background: var(--warn-bg); color: var(--warn-fg); }
.price-row.amber strong { color: #3A2D00; }
.range-bar { position: relative; height: 12px; border-radius: 999px; background: linear-gradient(90deg, #C9D0DC 0 30%, var(--navy) 30% 70%, var(--amber) 70% 100%); margin-top: 6px; }
.range-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 8px; }
.factor-list { list-style: none; margin: 0; padding: 0; }
.factor-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); font-size: 15px; }
.factor-list .up { color: var(--good); font-weight: 700; white-space: nowrap; }
.factor-list .down { color: var(--bad); font-weight: 700; white-space: nowrap; }
.factor-list .flat { color: var(--muted); font-weight: 600; white-space: nowrap; }

.table-box { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
table.data th { text-align: left; color: var(--muted); font-size: 13px; font-weight: 600; padding: 10px 8px; }
table.data td { padding: 13px 8px; border-top: 1px solid var(--line-2); }
table.data td.num-cell, table.data th.num-cell { text-align: right; }
table.data .dim { color: var(--muted); }

.offer { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.offer-top { display: flex; gap: 12px; }
.offer-thumb { flex: none; width: 84px; height: 64px; border-radius: 10px; background: var(--soft); color: #8592AA; display: grid; place-items: center; overflow: hidden; }
.offer-thumb img { width: 100%; height: 100%; object-fit: cover; }
.offer-thumb .silhouette { width: 70%; }
.offer-price { font-family: var(--display); font-weight: 700; font-size: 21px; }

.breakdown { list-style: none; margin: 0; padding: 0; }
.breakdown li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.breakdown li span:first-child { display: flex; flex-direction: column; font-size: 15px; }
.breakdown small { color: var(--muted); font-size: 12px; }
.breakdown .total { border-top: 2px solid var(--navy); font-weight: 700; }
.sticky-total { position: fixed; left: 0; right: 0; bottom: 0; background: var(--navy); color: #fff; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); z-index: 10; }
.sticky-total .inner { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 720px) { .sticky-total { position: static; padding: 18px 28px 28px; } }
.sticky-total .amount { font-family: var(--display); font-weight: 700; font-size: 26px; }

/* Result page (desktop two-column) */
.result-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.result-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.result-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.side-navy { background: var(--navy); color: #fff; border-radius: var(--r-xl); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.side-navy p { color: var(--on-navy); font-size: 15px; }
.side-navy .field { color: var(--on-navy-2); }
.side-navy .field input { border: 0; }
.tiles { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile { border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 4px; background: var(--bg); }
.tile strong { font-family: var(--display); font-size: 22px; }
.tile.navy { background: var(--navy); color: #fff; }
.tile.navy span { color: var(--on-navy); }
.tile.amber { background: var(--warn-bg); color: var(--warn-fg); }
.chips-static { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-static span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; }

/* Model guide */
.guide-head { background: #fff; border-bottom: 1px solid var(--line); }
.crumbs { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; padding-top: 28px; }
.crumbs a { color: var(--text-2); }
.guide-top { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding: 20px 0 24px; }
.guide-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.guide-side { flex: 1 1 320px; min-width: 0; background: var(--bg); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 1000px) { .guide-side { position: sticky; top: 16px; } }
.guide-photo { border-radius: var(--r-lg); overflow: hidden; }
.in-page { display: flex; gap: 4px; overflow-x: auto; font-weight: 600; font-size: 15px; margin: 0 -4px; }
.in-page a { text-decoration: none; padding: 14px 12px; white-space: nowrap; color: var(--text-2); }
.in-page a:first-child { color: var(--navy); border-bottom: 3px solid var(--navy); }
.two-col { display: flex; flex-wrap: wrap; gap: 20px; }
.two-col > * { flex: 1 1 340px; min-width: 0; }
.list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.stat { background: #fff; border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.stat strong { font-family: var(--display); font-size: 22px; }
