/* KSL Cars mimic. Nunito Sans, KSL blue, white cards on a light grey page,
   4px radii, bold titles: the shape of cars.ksl.com as observed 2026-09-22. */
:root {
	--blue: #006fbc; --blue-dark: #005a99; --navy: #16294a; --page: #f6f6f6; --ink: #000; --ink-2: #444; --ink-3: #777;
	--line: #e3e3e3; --card: #fff; --good: #1f8a3b; --warn: #b45309;
	--font: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.4; }
a { color: var(--blue); text-decoration: none; }
button { font-family: inherit; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* top bar */
.topbar { background: var(--navy); color: #fff; height: 46px; }
.topwrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; height: 46px; display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; }
.ksl-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; color: #fff; font-weight: 700; font-size: 11px; letter-spacing: .04em; }
.topnav { display: flex; gap: 16px; font-size: 13px; }
.topnav a { color: #fff; }
.topnav .live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #e0334c; margin-right: 6px; vertical-align: middle; }
.topright { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 13px; }
.mkt { display: flex; flex-direction: column; line-height: 1.1; }
.mkt small { font-size: 10px; letter-spacing: .06em; color: #9fb0c7; }
.mkt span a { color: #fff; margin-right: 10px; }
.mkt span a.on { font-weight: 700; }
.wx, .ico, .login { color: #fff; }

.adslot { display: flex; justify-content: center; padding: 18px 0 6px; }
.ad { width: 728px; max-width: 100%; height: 90px; background: #e9edf3; color: #8a94a6; display: grid; place-items: center; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.ad.tall { width: 220px; height: 420px; }

.crumb { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); padding: 8px 0 12px; }
.crumb a { color: var(--ink-2); }
.pagetitle { font-size: 20px; font-weight: 700; margin: 0 0 14px; }
.lede { max-width: 820px; color: var(--ink-2); margin: 0 0 18px; }

/* search page */
.srp { display: grid; grid-template-columns: 224px 1fr; gap: 20px; align-items: start; padding-bottom: 40px; }
.rail { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 10px 14px 14px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.railhead { font-size: 13px; color: var(--blue); font-weight: 700; padding: 4px 0 8px; }
.fgroup { border-top: 1px solid var(--line); padding: 10px 0 8px; }
.fgroup h3 { margin: 0 0 6px; font-size: 14px; font-weight: 700; }
.fsub { font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.checks label { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 3px 0; cursor: pointer; }
.checks label em { margin-left: auto; font-style: normal; color: var(--ink-2); }
.checks input { width: 15px; height: 15px; accent-color: var(--blue); }
.onecheck { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.range { display: flex; align-items: center; gap: 6px; }
.range input, .fgroup select { width: 100%; padding: 6px 8px; border: 1px solid #cfcfcf; border-radius: 4px; font: inherit; font-size: 13px; }
.range span { font-size: 12px; color: var(--ink-3); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills button { border: 1px solid #cfcfcf; background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.pills button.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.assistant-nudge { background: #eef5fb; margin: 10px -14px -14px; padding: 12px 14px 14px; border-top: 0; }
.assistant-nudge p { font-size: 12.5px; color: var(--ink-2); margin: 0 0 10px; }
.btn { background: var(--blue); color: #fff; border: 0; border-radius: 4px; padding: 9px 14px; font-size: 14px; font-weight: 700; cursor: pointer; }
.btn:hover { background: var(--blue-dark); }
.btn.ghost { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.btn.ghost:hover { background: #eef5fb; }
.btn.wide { width: 100%; }

.results { min-width: 0; }
.rhead { display: flex; justify-content: space-between; align-items: center; padding: 4px 0 10px; }
.count { font-weight: 700; }
.addlisting { font-size: 14px; }
.searchrow { display: flex; gap: 10px; align-items: stretch; }
.sbox { flex: 1; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #cfcfcf; border-radius: 4px; padding: 0 12px; }
.sbox input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 14px; padding: 10px 0; }
.sortrow { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; font-size: 13px; }
.loc { border: 0; background: transparent; color: var(--blue); font-size: 13px; cursor: pointer; padding: 0; }
.sort select { border: 0; background: transparent; font: inherit; font-size: 13px; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid.small { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; color: var(--ink); display: flex; flex-direction: column; min-width: 0; }
.card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.thumb { position: relative; aspect-ratio: 4 / 3; background: #e6e6e6; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.noimg { width: 100%; height: 100%; display: grid; place-items: center; color: var(--ink-3); font-size: 12px; }
.noimg.big { min-height: 380px; }
.ribbon { position: absolute; left: 8px; top: 8px; background: #d9342b; color: #fff; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 3px; }
.ribbon.feat { background: var(--blue); }
.fav { position: absolute; right: 8px; bottom: 8px; background: rgba(255,255,255,.92); border-radius: 999px; font-size: 11px; padding: 2px 7px; }
.cbody { padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.ctitle { font-size: 15px; font-weight: 700; line-height: 1.25; }
.cmeta { font-size: 12px; color: var(--ink-2); }
.cmeta .city { color: var(--blue); }
.cprice { font-size: 18px; font-weight: 700; color: var(--blue); display: flex; align-items: baseline; gap: 8px; }
.cprice small { font-size: 11px; color: var(--ink-2); font-weight: 400; }
.ctags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.ctags span { font-size: 11px; padding: 2px 7px; border-radius: 3px; background: #f0f0f0; color: var(--ink-2); }
.ctags .seller.p { background: #fff4e0; color: #8a5a00; }
.ctags .vm { background: #e6f5ea; color: var(--good); font-weight: 700; }
.ctags .tt { background: #fde8e8; color: #9b1c1c; }
.more { display: flex; justify-content: center; padding: 22px 0; }

/* listing page */
.vdp { display: grid; grid-template-columns: 300px 1fr 240px; gap: 18px; align-items: start; padding-bottom: 40px; }
.vleft h1 { font-size: 24px; font-weight: 700; margin: 0 0 6px; }
.vloc { font-size: 13px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vloc .pin { color: var(--blue); }
.vloc .views { margin-left: auto; }
.vmiles { margin-top: 10px; font-size: 14px; }
.vprice { font-size: 32px; font-weight: 700; color: var(--blue); margin: 4px 0 8px; }
.vpay { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 9px 12px; font-size: 13px; }
.vpay b { font-weight: 700; }
.vactions { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; }
.vactions button { border: 0; background: transparent; font-size: 20px; cursor: pointer; color: var(--ink-2); }
.seller { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 14px; display: grid; grid-template-columns: 60px 1fr; gap: 12px; }
.avatar { width: 60px; height: 60px; border-radius: 50%; background: #c9c9c9; color: #fff; font-size: 26px; font-weight: 700; display: grid; place-items: center; }
.sinfo { font-size: 12.5px; display: flex; flex-direction: column; gap: 3px; }
.sname { font-size: 16px; font-weight: 700; }
.sinfo .btn { margin: 8px 0 4px; }
.sinfo .note { font-size: 10px; color: var(--ink-3); margin: 0; }
.morefrom { text-align: center; font-size: 13px; margin-top: 8px; }
.chip { background: #ffe9a8; border-radius: 3px; padding: 0 6px; font-size: 11px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 16px; margin-top: 16px; }
.panel h2 { font-size: 18px; font-weight: 700; margin: 0 0 12px; }
.calc .calcrow { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; border-bottom: 1px solid #f0f0f0; }
.calc .calcrow.total { font-size: 15px; border: 0; padding-top: 10px; }
.calc .note { font-size: 11px; color: var(--ink-3); }
.vmain { min-width: 0; }
.gallery .hero { position: relative; background: #000; border-radius: 4px; overflow: hidden; aspect-ratio: 4 / 3; }
.gallery .hero img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gallery .counter { position: absolute; left: 10px; bottom: 10px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 3px; }
.thumbs { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; }
.thumbs img { width: 56px; height: 42px; object-fit: cover; border-radius: 3px; border: 2px solid transparent; cursor: pointer; flex: 0 0 auto; }
.thumbs img.on { border-color: var(--blue); }
.tabs { display: flex; gap: 22px; margin-top: 16px; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; background: transparent; padding: 10px 0; font-size: 14px; font-weight: 700; color: var(--ink-2); cursor: pointer; border-bottom: 3px solid transparent; }
.tabs button.on { color: var(--blue); border-bottom-color: var(--blue); }
.desc { white-space: pre-line; line-height: 1.55; font-size: 14px; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 18px; }
.spec { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; border-bottom: 1px solid #f0f0f0; padding: 6px 0; }
.spec span { color: var(--ink-2); }
.spec b { text-align: right; word-break: break-word; }

/* the market panel: our addition, styled as a first party KSL module */
.market { border-left: 4px solid var(--blue); }
.mhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.mhead .src { font-size: 11px; color: var(--ink-3); }
.mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 14px; }
.mstat { background: var(--page); border-radius: 4px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.mstat b { font-size: 20px; font-weight: 700; }
.mstat span { font-size: 12px; color: var(--ink-2); line-height: 1.35; }
.mstat.good b { color: var(--good); }
.mstat.high b { color: var(--warn); }
.mcta { display: flex; flex-wrap: wrap; gap: 8px; }

/* market page */
.tablewrap { overflow-x: auto; }
.mt { width: 100%; border-collapse: collapse; font-size: 13px; }
.mt th { text-align: left; font-weight: 700; padding: 8px 10px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.mt td { padding: 8px 10px; border-bottom: 1px solid #f0f0f0; white-space: nowrap; }
.bar { position: relative; width: 180px; height: 18px; background: #eef2f7; border-radius: 3px; overflow: hidden; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--blue); opacity: .85; }
.bar span { position: absolute; left: 8px; top: 0; line-height: 18px; font-size: 11px; color: #fff; font-weight: 700; mix-blend-mode: normal; }

.foot { border-top: 1px solid var(--line); background: #fff; padding: 20px 0 30px; margin-top: 30px; }
.footlinks { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; }
.footnote { font-size: 11px; color: var(--ink-3); margin-top: 12px; max-width: 900px; }

@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } .vdp { grid-template-columns: 280px 1fr; } .vright { display: none; } }
@media (max-width: 820px) { .srp { grid-template-columns: 1fr; } .rail { position: static; max-height: none; } .grid, .grid.small { grid-template-columns: repeat(2, 1fr); } .vdp { grid-template-columns: 1fr; } .specs, .mgrid { grid-template-columns: 1fr 1fr; } .topnav { display: none; } }
@media (max-width: 480px) { .grid, .grid.small { grid-template-columns: 1fr; } .specs, .mgrid { grid-template-columns: 1fr; } }
