:root {
  --ink: #0f1b2d;
  --ink-2: #33415a;
  --muted: #64708a;
  --line: #e2e6ee;
  --bg: #f5f7fa;
  --card: #ffffff;
  --accent: #0b8a5f;
  --accent-ink: #076646;
  --accent-soft: #e5f5ee;
  --navy: #102542;
  --warn: #b45309;
  --danger: #c0262d;
  --great: #0b8a5f;
  --good: #3f8f2f;
  --fair: #64708a;
  --high: #b45309;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 4px 16px rgba(15, 27, 45, .06);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--accent-ink); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.hidden { display: none !important; }
main { min-height: 70vh; outline: none; }
:focus-visible { outline: 3px solid #5fb5ff; outline-offset: 2px; }

/* ---------- header ---------- */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.main-nav { display: flex; gap: 4px; flex: 1; }
.main-nav a { color: #d5deeb; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; position: relative; }
.main-nav a:hover, .main-nav a.active { color: #fff; background: rgba(255, 255, 255, .08); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: #ff5a4e; color: #fff; font-size: .72rem; font-weight: 700; vertical-align: 1px; }
.account-area { display: flex; gap: 8px; align-items: center; }
.account-area .btn { padding: 8px 14px; }
.menu-btn { display: none; background: none; border: 0; color: #fff; cursor: pointer; padding: 6px; }
.user-menu { position: relative; }
.user-menu > button { background: rgba(255, 255, 255, .08); color: #fff; border: 0; border-radius: 999px; padding: 6px 12px 6px 6px; display: flex; gap: 8px; align-items: center; cursor: pointer; font: inherit; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; color: var(--ink); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); min-width: 200px; padding: 6px; display: none; }
.dropdown.open { display: block; }
.dropdown a, .dropdown button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 6px; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
.dropdown a:hover, .dropdown button:hover { background: var(--bg); }

@media (max-width: 1140px) {
  .menu-btn { display: block; margin-left: auto; }
  .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--navy); flex-direction: column; padding: 8px 16px 16px; border-top: 1px solid rgba(255,255,255,.1); }
  .main-nav.open { display: flex; }
  .header-inner { gap: 12px; }
  .account-area .btn-ghost-light { display: none; }
}

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: #b9c2d2; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .1); }
.btn-danger { background: #fff; color: var(--danger); border-color: #f1c4c6; }
.btn-danger:hover { background: #fdf1f1; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: .875rem; border-radius: 8px; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.link-btn { background: none; border: 0; color: var(--accent-ink); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }

label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink-2); }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #cdd4e0; border-radius: 10px; padding: 10px 12px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11, 138, 95, .18); }
textarea { resize: vertical; min-height: 110px; }
.field { margin-bottom: 16px; }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 600px) { .row-3 { grid-template-columns: 1fr 1fr; } }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; margin: 0; cursor: pointer; }
.check input { width: auto; accent-color: var(--accent); }
.form-error { background: #fdf1f1; color: var(--danger); border: 1px solid #f1c4c6; padding: 10px 12px; border-radius: 10px; margin-bottom: 16px; font-size: .92rem; }
.field-invalid input, .field-invalid select, .field-invalid textarea { border-color: var(--danger); }

/* ---------- cards & layout ---------- */
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.section { padding-top: 40px; padding-bottom: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-head h2 { margin: 0; }


.car-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.car-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; position: relative; transition: transform .15s, box-shadow .15s; }
.car-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(15,27,45,.06), 0 10px 28px rgba(15,27,45,.1); }
.car-card a.cover { position: absolute; inset: 0; z-index: 1; }
.car-card .thumb { aspect-ratio: 16 / 10; background: #e9edf3; object-fit: cover; width: 100%; }
.car-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.car-card .title { font-weight: 700; font-size: 1.02rem; margin: 0; }
.car-card .variant { color: var(--muted); font-size: .88rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car-card .price { font-size: 1.35rem; font-weight: 800; margin-top: 2px; }
.specs-inline { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; padding: 0; list-style: none; }
.specs-inline li { background: var(--bg); border-radius: 6px; padding: 3px 8px; font-size: .8rem; color: var(--ink-2); }
.car-card .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: .82rem; color: var(--muted); padding-top: 8px; border-top: 1px solid var(--line); }
.save-btn { position: absolute; top: 10px; right: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.15); color: var(--ink); }
.save-btn svg { width: 20px; height: 20px; }
.save-btn.saved { color: #e0245e; }
.save-btn.saved svg path { fill: currentColor; }
.ribbon { position: absolute; top: 10px; left: 10px; z-index: 2; background: var(--ink); color: #fff; font-size: .75rem; font-weight: 700; padding: 4px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .04em; }

.rating { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; width: fit-content; }
.rating::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.rating-great { color: var(--great); background: #e3f4ec; }
.rating-good { color: var(--good); background: #ecf5e6; }
.rating-fair { color: var(--fair); background: #eef0f4; }
.rating-higher { color: var(--high); background: #fbf0e3; }
.seller-tag { font-weight: 600; color: var(--ink-2); }

/* ---------- home ---------- */
.hero { background: radial-gradient(1200px 400px at 80% -10%, #1e4a7a 0%, transparent 60%), linear-gradient(160deg, var(--navy) 0%, #0b1a30 100%); color: #fff; padding: 56px 0 72px; }
.hero h1 { max-width: 640px; }
.hero p.lead { color: #c4d1e3; font-size: 1.1rem; max-width: 560px; }
.search-box { background: #fff; color: var(--ink); border-radius: 16px; padding: 20px; margin-top: 28px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); display: grid; grid-template-columns: repeat(5, 1fr) auto; gap: 12px; align-items: end; }
.search-box .field { margin: 0; }
@media (max-width: 960px) { .search-box { grid-template-columns: 1fr 1fr; } .search-box .btn { grid-column: 1 / -1; } }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-decoration: none; color: var(--ink); text-align: center; font-weight: 600; transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.tile svg { width: 100%; height: 46px; margin-bottom: 6px; }
.tile .count { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.makes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.makes a { display: flex; justify-content: space-between; padding: 10px 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; }
.makes a:hover { border-color: var(--accent); }
.makes a span { color: var(--muted); }
.cta-band { background: var(--accent-soft); border-radius: 16px; padding: 32px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; } }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.step::before { counter-increment: step; content: counter(step); display: inline-flex; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 10px; }

/* ---------- search ---------- */
.search-layout { display: grid; grid-template-columns: 290px 1fr; gap: 24px; padding: 24px 16px 48px; }
.filters { position: sticky; top: 80px; align-self: start; max-height: calc(100vh - 96px); overflow: auto; }
.filters h3 { display: flex; justify-content: space-between; align-items: center; }
.filters .field { margin-bottom: 14px; }
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.results-bar select { width: auto; }
.filter-toggle { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: .85rem; }
.chip button { border: 0; background: var(--bg); border-radius: 50%; width: 20px; height: 20px; cursor: pointer; line-height: 1; color: var(--ink-2); }
@media (max-width: 900px) {
  .search-layout { grid-template-columns: 1fr; padding-top: 16px; }
  .filters { position: fixed; inset: 0; top: 0; z-index: 60; max-height: none; border-radius: 0; display: none; }
  .filters.open { display: block; }
  .filter-toggle { display: inline-flex; }
}
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); padding: 0 10px; }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }
.empty { text-align: center; padding: 56px 20px; }
.empty svg { width: 72px; height: 72px; color: #b9c2d2; margin: 0 auto 12px; }

/* ---------- listing detail ---------- */
.crumbs { font-size: .88rem; color: var(--muted); padding: 18px 0 10px; }
.crumbs a { color: var(--muted); }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; padding-bottom: 48px; }
@media (max-width: 960px) { .detail { grid-template-columns: 1fr; } }
.gallery .main-img { position: relative; border-radius: var(--radius); overflow: hidden; background: #e9edf3; aspect-ratio: 16 / 10; }
.gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.gallery .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); cursor: pointer; font-size: 1.3rem; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.gallery .prev { left: 12px; } .gallery .next { right: 12px; }
.gallery .counter { position: absolute; bottom: 12px; right: 12px; background: rgba(15,27,45,.75); color: #fff; padding: 3px 10px; border-radius: 999px; font-size: .8rem; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button { border: 2px solid transparent; padding: 0; border-radius: 8px; overflow: hidden; cursor: pointer; flex: 0 0 96px; background: none; }
.thumbs button.active { border-color: var(--accent); }
.thumbs img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.key-specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 0; }
.key-specs div { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.key-specs dt { font-size: .78rem; color: var(--muted); }
.key-specs dd { margin: 0; font-weight: 700; }
.features { columns: 2; padding-left: 0; list-style: none; margin: 0; }
.features li { padding: 4px 0 4px 24px; position: relative; break-inside: avoid; }
.features li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
@media (max-width: 520px) { .features { columns: 1; } }
.description { white-space: pre-line; }
.side-col { display: flex; flex-direction: column; gap: 16px; }
.price-panel .price { font-size: 2.1rem; font-weight: 800; }
.price-panel .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.seller-card .seller-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.seller-card .avatar { width: 44px; height: 44px; font-size: 1.1rem; }
.finance output { display: block; font-size: 1.6rem; font-weight: 800; }
.finance input[type=range] { padding: 0; accent-color: var(--accent); border: 0; }
.finance .range-row { display: flex; justify-content: space-between; font-size: .85rem; }

/* ---------- sell form ---------- */
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; padding: 8px 16px 48px; }
@media (max-width: 960px) { .form-layout { grid-template-columns: 1fr; } }
.form-section { margin-bottom: 20px; }
.form-section h2 { font-size: 1.15rem; display: flex; gap: 10px; align-items: center; }
.form-section h2 .num { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); align-items: center; justify-content: center; font-size: .9rem; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.dropzone { border: 2px dashed #b9c2d2; border-radius: var(--radius); padding: 28px; text-align: center; cursor: pointer; background: #fafbfd; transition: border-color .15s, background .15s; }
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.photo { position: relative; border-radius: 10px; overflow: hidden; background: #e9edf3; aspect-ratio: 16/10; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .tools { position: absolute; inset: auto 6px 6px auto; display: flex; gap: 4px; }
.photo .tools button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95); cursor: pointer; font-weight: 700; }
.photo .cover-tag { position: absolute; top: 6px; left: 6px; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.photo.uploading::after { content: "Uploading…"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.75); font-weight: 600; font-size: .85rem; }
.sticky-side { position: sticky; top: 80px; align-self: start; }

/* ---------- dashboard ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.stat .n { font-size: 1.8rem; font-weight: 800; }
.stat .l { color: var(--muted); font-size: .85rem; }
.my-list { display: flex; flex-direction: column; gap: 12px; }
.my-item { display: grid; grid-template-columns: 160px 1fr auto; gap: 16px; align-items: center; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.my-item img { border-radius: 8px; aspect-ratio: 16/10; object-fit: cover; }
.my-item .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.status-pill { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; }
.status-active { background: #e3f4ec; color: var(--great); }
.status-sold { background: #e8ecf3; color: var(--ink-2); }
.status-draft { background: #fbf0e3; color: var(--warn); }
@media (max-width: 700px) { .my-item { grid-template-columns: 110px 1fr; } .my-item .actions { grid-column: 1 / -1; justify-content: flex-start; } }

/* ---------- messages ---------- */
.inbox { display: grid; grid-template-columns: 340px 1fr; gap: 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; min-height: 560px; margin-bottom: 48px; }
.convo-list { border-right: 1px solid var(--line); overflow-y: auto; max-height: 70vh; }
.convo-list a { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.convo-list a:hover, .convo-list a.active { background: var(--bg); }
.convo-list img { border-radius: 6px; aspect-ratio: 16/10; object-fit: cover; }
.convo-list .snippet { font-size: .85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo-list .unread .snippet { color: var(--ink); font-weight: 600; }
.thread { display: flex; flex-direction: column; min-height: 560px; }
.thread-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.thread-head img { width: 80px; border-radius: 6px; }
.thread-body { flex: 1; padding: 18px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: 55vh; background: #fafbfd; }
.bubble { max-width: 75%; padding: 10px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); white-space: pre-wrap; word-wrap: break-word; }
.bubble.mine { align-self: flex-end; background: var(--accent); color: #fff; border-color: var(--accent); }
.bubble time { display: block; font-size: .72rem; opacity: .7; margin-top: 4px; }
.thread-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.thread-form textarea { min-height: 46px; height: 46px; }
@media (max-width: 800px) {
  .inbox { grid-template-columns: 1fr; }
  .inbox.has-thread .convo-list { display: none; }
  .inbox:not(.has-thread) .thread { display: none; }
  .convo-list { max-height: none; border-right: 0; }
}

/* ---------- auth ---------- */
.auth-wrap { max-width: 440px; margin: 40px auto 64px; padding: 0 16px; }
.demo-note { background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; font-size: .9rem; margin-bottom: 16px; }

/* ---------- footer, toast, misc ---------- */
.site-footer { background: #0b1a30; color: #c4d1e3; padding: 40px 0 20px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.footer-grid h4 { color: #fff; margin-bottom: 10px; }
.footer-grid a { display: block; color: #c4d1e3; text-decoration: none; padding: 3px 0; }
.footer-grid a:hover { color: #fff; }
.footer-grid .muted { color: #8fa0b8; }
.logo-footer { margin-bottom: 8px; }
.footer-base { border-top: 1px solid rgba(255,255,255,.1); margin-top: 24px; padding-top: 16px; font-size: .85rem; color: #8fa0b8; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(120px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: transform .25s; z-index: 100; max-width: calc(100% - 32px); }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--danger); }
.skeleton { background: linear-gradient(90deg, #e9edf3 25%, #f3f5f8 50%, #e9edf3 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }
.loading-grid .skeleton { height: 320px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 60px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* fixes */
.badge[hidden] { display: none; }
.toast:not(.show) { visibility: hidden; }
.car-card .thumb, .gallery .main-img, .photo, .thumbs img, .my-item img, .convo-list img { aspect-ratio: 16 / 9; }
.page-head { padding-top: 28px; padding-bottom: 8px; }
.car-card .thumb { height: auto; }

/* ===================== v2 additions ===================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.error-text { color: var(--danger); }
.nowrap { white-space: nowrap; }
@media (max-width: 600px) { .hide-sm { display: none; } }
.footer-grid { grid-template-columns: 1.6fr repeat(4, 1fr); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* home */
.quick-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.quick-links a { color: #fff; text-decoration: none; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); padding: 6px 12px; border-radius: 999px; font-size: .88rem; }
.quick-links a:hover { background: rgba(255,255,255,.2); }
.search-box { grid-template-columns: 1.1fr 1.1fr 1fr 1.2fr 1fr auto; }
@media (max-width: 1060px) { .search-box { grid-template-columns: 1fr 1fr; } .search-box .btn { grid-column: 1 / -1; } }
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: -28px; position: relative; }
.trust div { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; text-align: center; }
.trust strong { display: block; font-size: 1.25rem; }
.trust span { color: var(--muted); font-size: .85rem; }
@media (max-width: 700px) { .trust { grid-template-columns: 1fr 1fr; } }
.shelf { padding-top: 12px; padding-bottom: 20px; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.guide-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; text-decoration: none; color: var(--ink); display: block; border-top: 4px solid var(--accent); transition: transform .15s; }
.guide-card:hover { transform: translateY(-2px); }
.guide-card h3 { margin: 6px 0; }
.guide-card p { margin: 0; font-size: .92rem; }
.guide-tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-ink); background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; }

/* articles & help */
.article-wrap { max-width: 820px; }
.article { padding: 28px clamp(18px, 4vw, 40px); }
.article h1 { margin-top: 10px; }
.article h2 { margin-top: 1.5em; font-size: 1.25rem; }
.article li { margin-bottom: 6px; }
.article p, .article li { line-height: 1.65; }
.lead-text { font-size: 1.12rem; color: var(--ink-2); }
.faq { margin-bottom: 16px; }
.faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 8px 0 0; color: var(--ink-2); }

/* cards */
.thumb-wrap { position: relative; }
.photo-count { position: absolute; bottom: 8px; left: 8px; background: rgba(15,27,45,.75); color: #fff; font-size: .72rem; padding: 2px 8px; border-radius: 999px; }
.price-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.car-card .price { margin: 0; }
.tag-ulez { background: var(--accent-soft) !important; color: var(--accent-ink) !important; font-weight: 600; }
.foot svg { vertical-align: -2px; }
.foot-right { display: flex; align-items: center; gap: 8px; }
.compare-btn { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 6px; padding: 3px 7px; font: inherit; font-size: .78rem; cursor: pointer; }
.compare-btn.on, .compare-btn-lg.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.ribbon-drop { background: var(--accent); display: inline-flex; align-items: center; gap: 3px; text-transform: none; letter-spacing: 0; }
.ribbon-drop svg { stroke: #fff; }
.compare-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 12px 10px 18px; display: flex; gap: 16px; align-items: center; z-index: 55; box-shadow: 0 10px 30px rgba(0,0,0,.3); max-width: calc(100% - 32px); }
.compare-bar[hidden] { display: none; }
.compare-bar .link-btn { color: #c4d1e3; }

/* search */
.results-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.checks { display: grid; gap: 8px; margin: 4px 0 12px; }
.more-filters { border-top: 1px solid var(--line); padding-top: 10px; }
.more-filters summary { cursor: pointer; font-weight: 600; margin-bottom: 10px; }

/* listing */
.notice { background: #fbf0e3; border: 1px solid #f0d6b4; color: #7a4a10; padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; }
.notice-good { background: #e9f7f0; border: 1px solid #b7e2cc; color: #0a5e41; padding: 10px 14px; border-radius: 10px; margin: 12px 0; }
.notice-good p { margin: 6px 0 0; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.data-table th, .data-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line, #e2e6ee); vertical-align: top; }
.data-table td { word-break: break-word; }
.nowrap { white-space: nowrap; }
#presets button { cursor: pointer; }
.notice-danger { background: #fdf1f1; border-color: #f1c4c6; color: var(--danger); }
.badges-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #eef0f4; color: var(--ink-2); }
.pill-good { background: #e3f4ec; color: var(--great); }
.pill-warn { background: #fbf0e3; color: var(--warn); }
.pill-drop { background: var(--accent); color: #fff; }
.pill-drop svg { stroke: #fff; }
.price-history { list-style: none; padding: 0; margin: 0; }
.price-history li { display: grid; grid-template-columns: 1fr auto 120px; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.price-history .down { color: var(--great); font-weight: 600; text-align: right; }
.price-history .up { color: var(--warn); font-weight: 600; text-align: right; }
.price-history .muted { text-align: right; }
.checklist { padding-left: 20px; margin: 0 0 10px; }
.gallery .expand { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border: 0; border-radius: 8px; background: rgba(255,255,255,.92); cursor: pointer; font-size: 1.1rem; }
.price-panel .actions { grid-template-columns: 1fr 1fr; }
.seller-card .seller-head { text-decoration: none; color: inherit; }
.quick-msgs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.quick-msgs button { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 5px 10px; font: inherit; font-size: .8rem; cursor: pointer; color: var(--ink-2); }
.quick-msgs button:hover { border-color: var(--accent); color: var(--accent-ink); }

/* modal / lightbox */
dialog.modal { border: 0; border-radius: 14px; padding: 24px; width: min(480px, calc(100% - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog.modal::backdrop { background: rgba(10,20,35,.6); }
dialog.modal-wide { width: min(1100px, calc(100% - 24px)); padding: 16px; background: #0b1a30; }
.modal-close { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 1.6rem; cursor: pointer; color: var(--muted); }
.modal-wide .modal-close { color: #fff; z-index: 2; }
.lightbox img { width: 100%; max-height: 78vh; object-fit: contain; border-radius: 8px; }
.lb-nav { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 12px; color: #fff; }

/* sell */
.lookup-panel { border: 2px solid var(--accent-soft); }
.lookup-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.lookup-row .field { margin-bottom: 12px; }
.lookup-row .btn { margin-bottom: 12px; }
input.plate { background: #f7d117; border: 2px solid #1d1f24; font-family: "Arial Narrow", Arial, sans-serif; font-weight: 800; font-size: 1.4rem; letter-spacing: .08em; text-transform: uppercase; text-align: center; max-width: 260px; }
.lookup-result { margin-top: 10px; background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; font-size: .92rem; }
.field.autofilled input, .field.autofilled select { border-color: var(--accent); background: #f3fbf7; }
.price-guide { margin: -6px 0 14px; color: var(--ink-2); }
.guide-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-weight: 600; font-size: .8rem; }
.guide-bar .bar { flex: 1; height: 8px; background: #e8ecf3; border-radius: 4px; position: relative; }
.guide-bar .bar i { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 4px; }
.photo .tools button { font-size: .85rem; }

/* dashboard & lists */
.tips { margin: 8px 0 0; padding-left: 18px; font-size: .82rem; color: var(--warn); }
.drop-text { color: var(--great); font-weight: 600; }
.status-reserved { background: #e7eefc; color: #2456b8; }
.status-removed { background: #fdf1f1; color: var(--danger); }
.search-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; flex-wrap: wrap; }
.search-item .actions { display: flex; gap: 6px; align-items: center; }
.search-name { font-weight: 700; color: var(--ink); text-decoration: none; }
.badge-new { background: var(--accent); color: #fff; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg a, .seg button { background: none; border: 0; font-family: inherit; padding: 6px 14px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.seg a.on { background: var(--ink); color: #fff; }
.seg-sm a, .seg-sm button { padding: 4px 10px; font-size: .82rem; }
.stats-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 900px) { .stats-6 { grid-template-columns: repeat(2, 1fr); } }
.table-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.data-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.report { margin-bottom: 0; }

/* messages */
.back-btn { display: none; }
@media (max-width: 800px) { .back-btn { display: inline-flex; } }
.thread-quick { padding: 8px 12px 0; margin: 0; border-top: 1px solid var(--line); }
.safety-note { margin: 0; padding: 0 12px 10px; }
.role-buying { color: #2456b8; } .role-selling { color: var(--accent-ink); }

/* seller profile */
.seller-profile { display: flex; gap: 20px; align-items: flex-start; margin-top: 28px; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.6rem; flex-shrink: 0; }
.profile-facts { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .92rem; }
@media (max-width: 600px) { .seller-profile { flex-direction: column; } }

/* compare */
.compare-scroll { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; }
.compare-table { border-collapse: collapse; width: 100%; min-width: 640px; }
.compare-table th, .compare-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare-table thead th { vertical-align: bottom; width: 22%; }
.compare-table tbody th { color: var(--muted); font-weight: 600; font-size: .88rem; width: 160px; }
.compare-table img { border-radius: 8px; aspect-ratio: 16/9; object-fit: cover; width: 100%; margin-bottom: 6px; }
.cmp-title { font-weight: 700; color: var(--ink); text-decoration: none; display: block; }
.compare-table td.best { background: #eaf7f1; font-weight: 700; color: var(--accent-ink); }

/* print a listing */
@media print {
  .site-header, .site-footer, .compare-bar, .seller-card form, .finance, .gallery .nav, .gallery .expand, .thumbs, .actions, #report-btn, .section, .check-panel { display: none !important; }
  .detail { grid-template-columns: 1fr; }
  body { background: #fff; }
  .panel { box-shadow: none; border: 1px solid #ddd; }
}
.lookup-result.is-error { background: #fdf1f1; color: var(--danger); }
.car-card .foot { flex-wrap: wrap; gap: 6px; }
.car-card .foot > span:first-child { flex: 1 1 100%; }
.car-card .foot-right { width: 100%; justify-content: space-between; }
.mobile-price { display: none; }
@media (max-width: 960px) {
  .mobile-price { display: block; margin-bottom: 12px; }
  .mobile-price h1 { font-size: 1.3rem; margin: 0 0 4px; }
  .mobile-price strong { font-size: 1.5rem; }
}
@media (max-width: 1140px) {
  .account-area .btn-ghost-light { display: inline-flex; }
  .account-area .btn-primary { display: none; }
}

/* ===================== v3 additions ===================== */
.avatar-img { object-fit: cover; background: #fff; border: 1px solid var(--line); }
.stars { color: #f5a623; letter-spacing: 1px; white-space: nowrap; }
.stars-off { color: #d6dbe4; }
.stars-lg { font-size: 1.4rem; }
.sbadges { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.sbadge { font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #eef0f4; color: var(--ink-2); }
.sbadge-top { background: #fff4dc; color: #8a5a00; }
.sbadge-fast { background: #e7eefc; color: #2456b8; }
.sbadge-dealer { background: var(--accent-soft); color: var(--accent-ink); }

/* header bell */
.bell { position: relative; color: #d5deeb; display: inline-flex; padding: 6px; border-radius: 8px; }
.bell:hover { color: #fff; background: rgba(255,255,255,.08); }
.bell-badge { position: absolute; top: -2px; right: -4px; margin: 0; }

/* cards */
.car-card.is-featured { box-shadow: 0 0 0 2px #f5a623, var(--shadow); }
.featured-tag { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 2; background: #f5a623; color: #1d1f24; font-size: .7rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; }
.tag-wo { background: #fdf1f1 !important; color: var(--danger) !important; font-weight: 700; }

/* listing */
.writeoff-notice p { margin: 6px 0 0; }
.pill-bad { background: #fdf1f1; color: var(--danger); }
.pill-featured { background: #fff4dc; color: #8a5a00; }
.video-wrap { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.seller-card .seller-head .avatar { flex-shrink: 0; }
.admin-tools { border: 1px dashed #b9c2d2; box-shadow: none; }

/* profile */
.profile-banner { height: 180px; margin-top: 20px; border-radius: var(--radius) var(--radius) 0 0; background: linear-gradient(120deg, var(--navy), #1e4a7a 60%, var(--accent)); background-size: cover; background-position: center; }
.profile-banner + .seller-profile { margin-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
.profile-banner + .seller-profile .avatar-lg { margin-top: -56px; border: 4px solid #fff; width: 96px; height: 96px; font-size: 2rem; box-shadow: var(--shadow); }
.tagline { margin: 2px 0 0; color: var(--ink-2); font-weight: 500; }
.profile-tabs { margin: 16px 0 0; }
.reviews-layout { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
@media (max-width: 800px) { .reviews-layout { grid-template-columns: 1fr; } }
.review-summary { text-align: center; }
.big-rating { font-size: 3rem; font-weight: 800; line-height: 1; }
.dist-row { display: grid; grid-template-columns: 28px 1fr 24px; gap: 8px; align-items: center; font-size: .85rem; margin: 4px 0; }
.dist-row .bar { height: 8px; background: #eef0f4; border-radius: 4px; overflow: hidden; }
.dist-row .bar i { display: block; height: 100%; background: #f5a623; }
.review-list { display: flex; flex-direction: column; gap: 12px; }
.review-body { margin: 8px 0 4px; white-space: pre-line; }
.review-reply { background: var(--bg); border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 6px; margin-top: 8px; font-size: .92rem; }
.review-reply p { margin: 4px 0 0; }
.review-actions { display: flex; gap: 12px; margin-top: 6px; }
.reply-form { margin-top: 8px; display: grid; gap: 8px; justify-items: start; }
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; } }
.hours { border-collapse: collapse; width: 100%; }
.hours th, .hours td { text-align: left; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.hours th { font-weight: 600; width: 45%; }

/* settings */
.settings-wrap { max-width: 820px; }
.settings-wrap .panel { margin-bottom: 16px; }
.profile-media { margin-bottom: 16px; }
.banner-edit { height: 140px; border-radius: 10px; background: linear-gradient(120deg, var(--navy), #1e4a7a 60%, var(--accent)); background-size: cover; background-position: center; display: flex; align-items: flex-end; justify-content: flex-end; gap: 6px; padding: 10px; }
.avatar-edit { display: flex; gap: 14px; align-items: center; margin-top: -36px; padding-left: 16px; }
.avatar-edit .avatar-lg { border: 4px solid #fff; box-shadow: var(--shadow); }
.hours-grid { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; align-items: center; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.checks-inline { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 12px; }
.free-note { background: var(--accent-soft); padding: 8px 10px; border-radius: 8px; margin: 12px 0 0; }

/* messages */
.offer-card { background: #fff; color: var(--ink); border: 2px solid #f5a623; border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; }
.bubble.mine .offer-card { border-color: #fff; }
.offer-amt { font-weight: 800; font-size: 1.15rem; }
.offer-accepted { border-color: var(--accent) !important; }
.offer-declined, .offer-withdrawn, .offer-replaced { opacity: .7; border-color: #b9c2d2 !important; }
.offer-actions { display: flex; gap: 6px; margin-top: 8px; }
.thread-banner { padding: 10px 14px; border-top: 1px solid var(--line); background: #fffaf0; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.thread-blocked { background: #fdf1f1; color: var(--danger); }
.star-input { display: flex; gap: 4px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; margin: 0; font-size: 2rem; color: #d6dbe4; line-height: 1; }
.star-input label.on { color: #f5a623; }
.star-input label:focus-within { outline: 2px solid #5fb5ff; border-radius: 4px; }

/* notifications */
.notif-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 48px; }
.notif { display: flex; gap: 12px; padding: 12px 14px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); }
.notif.unread { border-left: 4px solid var(--accent); }
.notif-icon { font-size: 1.3rem; }
.notif-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-text span { color: var(--ink-2); font-size: .92rem; }

/* pricing */
.pricing-wrap { max-width: 980px; }
.lead-narrow { max-width: 620px; margin: 0 auto; font-size: 1.05rem; }
.launch-banner { background: linear-gradient(120deg, var(--accent), #0e6b4b); color: #fff; border-radius: 14px; padding: 18px 22px; display: flex; flex-direction: column; gap: 4px; margin: 16px 0 24px; text-align: center; }
.pricing-h { margin-top: 28px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 12px 0 8px; }
.plans-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 800px) { .plans, .plans-2 { grid-template-columns: 1fr; } }
.plan { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; position: relative; border: 2px solid transparent; }
.plan-pop { border-color: var(--accent); }
.plan-flag { position: absolute; top: -12px; left: 20px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan-price { font-size: 1.8rem; font-weight: 800; margin: 4px 0 10px; }
.plan-price s { color: var(--muted); font-weight: 500; font-size: 1.1rem; margin-right: 6px; }
.small-price { font-size: 1.05rem; }
.plan ul { padding-left: 18px; margin: 0; }
.plan li { margin-bottom: 6px; }
.promises { margin: 28px 0 16px; }
.checklist-good { list-style: none; padding: 0; margin: 0; }
.checklist-good li { padding: 6px 0 6px 28px; position: relative; }
.checklist-good li::before { content: "✓"; position: absolute; left: 4px; color: var(--accent); font-weight: 800; }
[hidden] { display: none !important; }
.offer-card { white-space: normal; }
.avatar-edit > div { margin-top: 40px; }

/* ===================== v4 additions ===================== */
.main-nav a { padding: 8px 10px; }
.vat { font-size: .6em; font-weight: 600; color: var(--muted); }
.hero-tabs { display: flex; gap: 4px; margin-top: 24px; flex-wrap: wrap; }
.hero-tabs button { background: rgba(255,255,255,.1); color: #d5deeb; border: 0; border-radius: 10px 10px 0 0; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; }
.hero-tabs button.on { background: #fff; color: var(--ink); }
.hero-tabs + .search-box { margin-top: 0; border-top-left-radius: 0; }
.type-tiles .tile svg { height: 40px; }
.type-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.type-tabs a { text-decoration: none; color: var(--ink-2); background: #fff; border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: .9rem; }
.type-tabs a span { color: var(--muted); font-weight: 500; margin-left: 2px; }
.type-tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.type-tabs a.on span { color: #c4d1e3; }
.page-head .type-tabs { margin-top: 12px; }
.osm-map { width: 100%; height: 260px; border: 0; border-radius: 10px; margin-top: 8px; background: #e9edf3; }
.wiki p { line-height: 1.65; }

/* MOT */
.mot-panel { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border: 2px solid var(--accent-soft); }
dialog.modal-mot { width: min(820px, calc(100% - 24px)); max-height: 90vh; }
.mot-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.plate-badge { background: #f7d117; border: 2px solid #1d1f24; border-radius: 6px; padding: 4px 12px; font-family: "Arial Narrow", Arial, sans-serif; font-weight: 800; font-size: 1.3rem; letter-spacing: .06em; white-space: nowrap; }
.mot-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.mot-stats div { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.mot-stats .n { display: block; font-size: 1.3rem; font-weight: 800; }
.mot-stats .l { font-size: .78rem; color: var(--muted); }
@media (max-width: 600px) { .mot-stats { grid-template-columns: 1fr 1fr; } }
.mot-checks { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.mot-checks li { padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: .92rem; }
.chk-good { background: #e3f4ec; color: var(--great); }
.chk-warn { background: #fbf0e3; color: var(--warn); }
.chk-bad { background: #fdf1f1; color: var(--danger); }
.mot-chart { margin: 0 0 16px; }
.mot-chart figcaption { font-weight: 700; font-size: .9rem; margin-bottom: 4px; }
.mot-chart svg { width: 100%; height: auto; display: block; }
.mot-chart .grid { stroke: #e2e6ee; stroke-width: 1; }
.mot-chart .axis { fill: #64708a; font-size: 11px; }
.mot-chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.mot-chart .dot { fill: var(--accent); stroke: #fff; stroke-width: 2; }
.mot-chart .hit { fill: transparent; }
.mot-chart .pt:hover .dot { r: 6; }
.mot-chart .pt.bad .dot { fill: var(--danger); }
.mot-tests { list-style: none; padding: 0; margin: 0 0 12px; }
.mot-test { border-top: 1px solid var(--line); padding: 10px 0; }
.mot-test-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mot-result { font-size: .72rem; font-weight: 800; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; letter-spacing: .04em; }
.mot-result.pass { background: #e3f4ec; color: var(--great); }
.mot-result.fail { background: #fdf1f1; color: var(--danger); }
.defects { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; font-size: .88rem; }
.defects li { padding-left: 2px; }
.def-type { display: inline-block; min-width: 96px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.def-dangerous .def-type, .def-major .def-type, .def-fail .def-type { color: var(--danger); }
.def-advisory .def-type { color: var(--warn); }
.def-minor .def-type, .def-prs .def-type, .def-note .def-type { color: var(--muted); }
.mot-form label { font-weight: 700; }
.mot-form .lookup-row { margin-top: 6px; }
.test-row { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.test-row input { flex: 1; min-width: 200px; }

/* ---------- v6: landing pages, stock manager ---------- */
.prerender { padding: 24px 16px; }
.prerender ul { padding-left: 18px; }
.landing-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 4px 0 18px; flex-wrap: wrap; }
.landing-head h1 { margin: 0 0 6px; font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
.landing-head .lead { margin: 0; color: var(--ink-2); max-width: 760px; }
.landing-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: 24px 0 16px; }
.landing-cols .panel, .landing .faq-block, #wiki-slot .panel { margin: 0; }
.landing .faq-block, #wiki-slot { margin-bottom: 16px; display: block; }
.faq-block details { border-top: 1px solid var(--line); padding: 12px 0; }
.faq-block summary { cursor: pointer; font-weight: 600; }
.faq-block p { margin: 8px 0 0; color: var(--ink-2); }
.landing-sell { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--accent-soft); border-color: #bfe5d3; }
.landing-sell h2 { margin: 0 0 4px; }
.landing-sell p { margin: 0; }
.link-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.link-cloud a { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-size: .9rem; }
.link-cloud a:hover { border-color: var(--accent); color: var(--accent-ink); }
.link-cloud span { color: var(--muted); font-size: .8rem; }
.stats-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) { .stats-4 { grid-template-columns: 1fr 1fr; } }
.stats .n { overflow-wrap: anywhere; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.dash-grid .panel { margin: 0; min-width: 0; }
@media (max-width: 860px) { .dash-grid { grid-template-columns: 1fr; } }
.mini-chart { margin: 0; }
.mini-chart figcaption { margin-bottom: 8px; }
.chart-box { position: relative; }
.chart-box svg { width: 100%; height: auto; display: block; }
.chart-box .bar { fill: #2a5a96; }
.chart-box .hit.on .bar { fill: #173f70; }
.chart-box .grid { stroke: var(--line); stroke-width: 1; }
.chart-box .axis { fill: var(--muted); font-size: 11px; }
.chart-tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: .8rem; padding: 5px 9px; border-radius: 6px; white-space: nowrap; }
.att-head { font-size: 1rem; margin: 14px 0 2px; display: flex; gap: 8px; align-items: center; }
.att-head:first-of-type { margin-top: 4px; }
.badge-count { background: #fbf0e3; color: var(--warn); border-radius: 999px; font-size: .75rem; padding: 1px 8px; }
.att-list li { flex-wrap: wrap; gap: 4px 10px; justify-content: flex-start; align-items: baseline; }
.top-list { padding-left: 20px; margin: 0; }
.top-list li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.top-list li span { display: block; }

.stock-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.stock-tools input[type=search] { flex: 1; min-width: 200px; width: auto; }
.stock-tools select { width: auto; }
.bulk-bar { position: sticky; top: 64px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 12px; margin-bottom: 12px; box-shadow: var(--shadow); }
.bulk-bar .link-btn { color: #cfe0f5; }
.stock-table td { vertical-align: middle; }
.stock-table tr.sel td { background: #f1f7fd; }
.stock-table input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.stock-veh { display: flex; gap: 10px; align-items: center; min-width: 220px; }
.stock-veh img { width: 72px; height: 50px; object-fit: cover; border-radius: 6px; background: var(--bg); flex: none; }
.stock-veh a { font-weight: 600; color: var(--ink); text-decoration: none; }

.import-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.import-grid .panel { margin: 0; min-width: 0; }
@media (max-width: 900px) { .import-grid { grid-template-columns: 1fr; } }
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 2px dashed #cdd4e0; border-radius: 12px; padding: 28px 16px; text-align: center; cursor: pointer; background: var(--bg); }
.drop.over, .drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.col-list { list-style: none; padding: 0; margin: 0; font-size: .88rem; columns: 1; }
.col-list li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.col-list code { background: var(--bg); padding: 1px 5px; border-radius: 4px; }
.imp-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.imp-summary span { padding: 4px 12px; border-radius: 999px; font-weight: 600; font-size: .88rem; }
.pill-good { background: var(--accent-soft); color: var(--accent-ink); }
.pill-info { background: #e8f0fb; color: #1d4e89; }
.pill-bad { background: #fdf1f1; color: var(--danger); }
.pill-warn { background: #fbf0e3; color: var(--warn); }
.imp-table { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; }
.imp-table th { position: sticky; top: 0; background: #fff; }
.row-bad td { background: #fdf6f6; }
@media (max-width: 600px) {
  .stock-veh { min-width: 0; }
  .stock-veh img { display: none; }
  .stock-table th, .stock-table td { padding: 8px 4px; }
}
