/* EbikeMate — one stylesheet, mobile first. Brand: Volt Lime #A3E635, Charcoal #18181B, Slate #52525B. */
:root {
  --ink: #18181B;
  --ink-2: #27272A;
  --muted: #52525B;
  --line: #E4E4E7;
  --line-2: #D4D4D8;
  --bg: #F6F7F4;
  --card: #ffffff;
  --brand: #18181B;
  --link: #3F6212;
  --brand-2: #A3E635;
  --brand-ink: #18181B;
  --brand-tint: #F2FADF;
  --accent: #A3E635;
  --accent-ink: #18181B;
  --ok: #157f3b;
  --ok-tint: #e7f5ec;
  --warn: #9a5b00;
  --warn-tint: #fff5e0;
  --danger: #b42318;
  --danger-tint: #fdecea;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(24, 24, 27, .06), 0 4px 16px rgba(24, 24, 27, .06);
  --shadow-lg: 0 10px 40px rgba(24, 24, 27, .12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
*, *::before, *::after { 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(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
h2, .h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75em; }
code, .mono { font-family: var(--mono); font-size: .9em; }
.i { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.18em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.measure { max-width: 70ch; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.block { display: block; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.ok-text { color: var(--ok); }
.warn-text { color: var(--warn); }
.danger-text { color: var(--danger); }
.sr, .skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; left: 8px; top: 8px; width: auto; height: auto; clip: auto; background: #fff; padding: 8px 12px; z-index: 100; border-radius: 8px; }
.row { display: flex; align-items: center; }
.gap { gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
:focus-visible { outline: 3px solid #65A30D; outline-offset: 2px; border-radius: 6px; }

/* ---------- header */
.top { background: var(--brand-ink); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.top-row { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "brand nav" "search search"; gap: 10px 12px; padding-top: 10px; padding-bottom: 10px; align-items: center; }
.brand { grid-area: brand; display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 800; letter-spacing: -.02em; font-size: 1.05rem; }
.brand:hover { color: inherit; }
.brand span { white-space: nowrap; }
.logo-mark { width: 40px; height: 31px; color: #fff; }
.top-search { grid-area: search; display: flex; background: #fff; border-radius: 999px; overflow: hidden; }
.top-search input { flex: 1; border: 0; padding: 10px 16px; font: inherit; min-width: 0; color: var(--ink); background: transparent; }
.top-search input:focus { outline: none; }
.top-search button { border: 0; background: var(--accent); color: var(--accent-ink); padding: 0 16px; cursor: pointer; display: grid; place-items: center; }
.top-nav { grid-area: nav; display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.nav-link { color: #D4D4D8; text-decoration: none; font-weight: 600; font-size: .92rem; padding: 6px 8px; border-radius: 8px; }
.nav-link:hover, .nav-link.is-active { color: #fff; background: rgba(255,255,255,.1); }
.place-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #D4D4D8; border-radius: 999px; padding: 5px 10px; font: inherit; font-size: .85rem; cursor: pointer; }
.place-chip:hover { background: rgba(255,255,255,.1); color: #fff; }
@media (max-width: 560px) {
  .brand span { display: none; }
  .place-chip span { max-width: 9ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .top-nav .btn-sm { padding: 6px 10px; }
  .nav-msg { display: none; }
  .hero-points { display: none; }
  .hero { padding: 22px 0 28px; }
}
@media (min-width: 900px) {
  .top-row { grid-template-columns: auto minmax(260px, 1fr) auto; grid-template-areas: "brand search nav"; }
}

/* ---------- buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 650; border-radius: 10px; padding: 11px 18px; border: 1px solid transparent; cursor: pointer; text-decoration: none; line-height: 1.2; min-height: 44px; transition: background .15s, box-shadow .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 7px 12px; min-height: 36px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--brand-ink); color: #fff; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #B8F05A; color: var(--accent-ink); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--bg); color: var(--ink); }
.btn.danger { color: var(--danger); }
.btn[disabled], .btn[aria-busy="true"] { opacity: .55; cursor: not-allowed; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; cursor: pointer; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-weight: 600; font-size: .92rem; }
.field input, .field select, .field textarea, .input { font: inherit; padding: 11px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; color: var(--ink); width: 100%; min-height: 44px; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); outline: 3px solid rgba(163,230,53,.45); outline-offset: 0; }
.field input[disabled] { background: var(--bg); color: var(--muted); }
.field .hint { font-size: .82rem; color: var(--muted); font-weight: 400; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field .err { color: var(--danger); font-size: .85rem; }
.field-inline { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 10px; cursor: pointer; }
.field-inline input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--brand); }
.choice-row { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.choice-row legend { font-weight: 600; font-size: .92rem; margin-bottom: 6px; padding: 0; }
.form-error { color: var(--danger); font-weight: 600; }
.form-msg { margin: 8px 0 0; font-size: .92rem; min-height: 1.2em; }
.form-msg.ok { color: var(--ok); }
.form-msg.bad { color: var(--danger); }
.stack > * + * { margin-top: 0; }

/* ---------- layout bits */
.main { min-height: 60vh; }
.page { padding-top: 18px; padding-bottom: 48px; }
.page-head { margin-bottom: 18px; }
.section { padding-top: 22px; padding-bottom: 22px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.link { font-weight: 600; text-decoration: none; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: .06em; font-size: .76rem; font-weight: 700; color: var(--link); margin-bottom: 8px; }
.lede { font-size: 1.08rem; color: var(--ink-2); }
.two-col { display: grid; gap: 24px; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1fr 1fr; } }
.split { display: grid; gap: 16px; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.panel h2 { display: flex; gap: 8px; align-items: center; }
.panel-warn { background: linear-gradient(180deg, #fffaf0, #fff); border-color: #f3dfb0; }
.band { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 16px 0; }
.empty { background: #fff; border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 24px; color: var(--ink-2); text-align: center; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0 0 12px; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin: 0 6px 0 2px; color: var(--line-2); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.is-on { color: var(--ink); border-bottom-color: var(--brand); }

/* ---------- notices & badges */
.notice { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 0 12px; border: 1px solid; font-size: .94rem; }
.notice .i { margin-top: 2px; }
.notice-info { background: var(--brand-tint); border-color: #D9EFB0; color: var(--ink); }
.notice-warn { background: var(--warn-tint); border-color: #f1d9a6; color: #5b3a00; }
.notice-ok { background: var(--ok-tint); border-color: #bfe3cb; color: #0d4f25; }
.notice-danger { background: var(--danger-tint); border-color: #f4c3be; color: #7a1a12; }
.tier { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; font-size: .8rem; font-weight: 700; line-height: 1.4; white-space: nowrap; border: 1px solid transparent; }
.tier b { background: rgba(255,255,255,.75); border-radius: 999px; padding: 0 6px; font-size: .72rem; font-family: var(--mono); }
.tier.big { font-size: .95rem; padding: 5px 14px 5px 6px; }
.tier-1000, .tier-1500 { background: linear-gradient(90deg, #18181B, #3F3F46); color: #fff; border-color: #18181B; }
.tier-1000 b, .tier-1500 b { background: var(--accent); color: var(--accent-ink); }
.tier-2000 { background: #dff3e7; color: #0d5a2b; border-color: #b9e2c8; }
.tier-3000 { background: #e7f4ea; color: #24603a; border-color: #cbe6d3; }
.tier-4000 { background: #eef3e2; color: #475a19; border-color: #d7e2bb; }
.tier-5000 { background: #fff3d6; color: #6d4b00; border-color: #f0dca6; }
.tier-6000 { background: #ffe8d6; color: #7a3a00; border-color: #f4ccaa; }
.tier-7000 { background: #eceeed; color: #3d4744; border-color: #d6dbd9; }
.tier-new { background: var(--accent); color: var(--accent-ink); padding-left: 10px; }
.tier-none { background: #eee; color: #555; padding-left: 10px; }
.mini-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .76rem; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: #eef2f0; color: var(--ink-2); }
.mini-badge.ok { background: var(--ok-tint); color: var(--ok); }
.mini-badge.warn { background: var(--warn-tint); color: var(--warn); }
.pill { display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .75rem; padding: 1px 8px; border-radius: 999px; }
.fit { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; margin-left: 8px; vertical-align: 1px; }
.fit-verified { background: var(--ok-tint); color: var(--ok); }
.fit-reported { background: #eef2f0; color: var(--ink-2); }
.fit-spec { background: #eaf1fb; color: #1d4f91; }
.fit-dot { color: var(--brand-2); font-size: .7em; }
.status { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #eef2f0; color: var(--ink-2); }
.status-active { background: var(--ok-tint); color: var(--ok); }
.status-in_review { background: #eaf1fb; color: #1d4f91; }
.status-rejected { background: var(--danger-tint); color: var(--danger); }
.status-sold { background: var(--accent); color: var(--accent-ink); }

/* ---------- home */
.hero { background: radial-gradient(1200px 400px at 85% -10%, rgba(163,230,53,.18), transparent 60%), linear-gradient(180deg, #18181B, #202024); color: #fff; padding: 28px 0 36px; }
.hero-grid { display: grid; gap: 24px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 48px; } .hero { padding: 56px 0 64px; } }
.hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); letter-spacing: -.02em; }
.hero .hl { color: var(--accent); }
.hero .eyebrow { color: #A3E635; }
.hero .lede { color: #D4D4D8; max-width: 56ch; }
.hero-points { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 6px; color: #F4F4F5; }
.hero-points li { display: flex; gap: 8px; align-items: flex-start; }
.hero-points .i { color: var(--accent); margin-top: 3px; }
.picker { background: #fff; color: var(--ink); border-radius: 18px; padding: 22px; box-shadow: var(--shadow-lg); }
.picker-h { font-size: 1.2rem; }
.picker-alt { margin: 12px 0 0; }
.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .stat-row { grid-template-columns: repeat(4, 1fr); } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 1.6rem; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: .88rem; }
.tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); height: 100%; transition: border-color .15s, box-shadow .15s; }
.tile:hover { border-color: var(--brand-2); box-shadow: var(--shadow); color: var(--ink); }
.tile-name { font-weight: 700; }
.tile-sub { font-size: .85rem; color: var(--muted); }
.tier-strip { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
@media (min-width: 760px) { .tier-strip { grid-template-columns: repeat(2, 1fr); gap: 10px 24px; } }
.tier-strip li { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }

/* ---------- cards */
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 14px; }
@media (max-width: 520px) { .cards { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.card:hover { box-shadow: var(--shadow); border-color: var(--line-2); }
.card-link { display: block; text-decoration: none; color: inherit; height: 100%; }
.card-link:hover { color: inherit; }
.card-img { position: relative; aspect-ratio: 4 / 3; background: #eef2f0; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.noimg { display: grid; place-items: center; height: 100%; color: #A1A1AA; }
.noimg .i { width: 36px; height: 36px; }
.ribbon { position: absolute; top: 8px; left: 8px; background: var(--brand-ink); color: #fff; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.ribbon-inline { background: var(--brand-ink); color: #fff; padding: 1px 6px; border-radius: 5px; }
.card-body { padding: 10px 12px 14px; }
.card-top { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.card-title { font-size: .98rem; margin: 0 0 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-part { font-size: .8rem; color: var(--muted); margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.card-price { font-weight: 800; font-size: 1.15rem; margin: 0 0 4px; }
.card-meta, .card-seller { font-size: .78rem; color: var(--muted); margin: 0; display: flex; gap: 4px; align-items: flex-start; }
.card-seller.is-verified { color: var(--ok); font-weight: 600; }
@media (max-width: 520px) { .card-body { padding: 8px 10px 12px; } .card-title { font-size: .9rem; } .tier { font-size: .72rem; } }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; gap: 8px; }

/* ---------- search */
.search-layout { display: grid; gap: 18px; }
@media (min-width: 900px) { .search-layout { grid-template-columns: 260px 1fr; align-items: start; } .filters { position: sticky; top: 84px; } }
.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
@media (max-width: 899px) { .filters { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; } .filters .field:first-child, .filters .btn { grid-column: 1 / -1; } }

/* ---------- bike & part */
.bike-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 6px 0 0; }
.facts div { display: flex; flex-direction: column; }
.facts dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.facts dd { margin: 0; font-weight: 600; }
.group-h { margin-top: 18px; color: var(--ink-2); font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; }
.fit-list { list-style: none; padding: 0; margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.fit-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.fit-row:last-child { border-bottom: 0; }
.fit-main a { font-weight: 650; }
.quals { display: block; font-size: .82rem; color: var(--warn); margin-top: 2px; }
.spec { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: .94rem; }
.spec th, .spec td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { width: 45%; color: var(--ink-2); font-weight: 600; background: #fafbfb; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.spec tr.is-fit th { color: var(--brand-ink); }
.mini-form { margin-top: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.mini-form summary { cursor: pointer; font-weight: 650; color: var(--brand); }
.mini-form form { margin-top: 12px; }
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.link-list a { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--ink); }
.link-list a:hover { border-color: var(--brand-2); }
.ds-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }

/* ---------- listing */
.listing-grid { display: grid; gap: 22px; }
@media (min-width: 900px) { .listing-grid { grid-template-columns: 1.2fr .8fr; align-items: start; } .buybox { position: sticky; top: 84px; } }
.gallery-main { background: #eef2f0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; display: grid; place-items: center; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; background: #111; }
.thumbs { list-style: none; padding: 0; margin: 10px 0; display: flex; gap: 8px; overflow-x: auto; }
.thumb { border: 2px solid transparent; padding: 0; border-radius: 10px; overflow: hidden; width: 72px; height: 72px; flex: none; cursor: pointer; background: #eee; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-on { border-color: var(--brand); }
.buybox { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.listing-title { font-size: clamp(1.3rem, 3vw, 1.7rem); margin-bottom: 4px; }
.listing-part { margin-bottom: 8px; font-size: .92rem; }
.price { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 10px; }
.grade-box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.grade-box p { width: 100%; margin: 6px 0 0; }
.axes { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.axes div { display: flex; flex-direction: column; background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.axis-l { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted); }
.get-it p { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 6px; }
.seller-box { border-top: 1px solid var(--line); margin: 12px 0; padding-top: 12px; }
.seller-name { font-weight: 700; margin: 0; }
.seller-box p { margin: 0 0 2px; }
.enquire { margin-top: 8px; }
.reasons { margin: 0 0 12px; padding-left: 20px; }
.defects { padding-left: 20px; }
.defect { margin-bottom: 14px; }
.defect p { margin: 0 0 4px; }
.defect-photos { display: flex; gap: 6px; flex-wrap: wrap; }
.history { list-style: none; padding: 0; margin: 0 0 18px; border-left: 3px solid var(--line); }
.history li { padding: 0 0 12px 14px; position: relative; }
.history li::before { content: ""; position: absolute; left: -8px; top: 4px; width: 13px; height: 13px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; }
.history p { margin: 0 0 4px; }

/* ---------- account & app */
.rows { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.row-item { display: grid; grid-template-columns: auto 1fr; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.row-item:has(> .row-main:only-child) { grid-template-columns: 1fr; }
.row-img { width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: #eef2f0; }
.row-img img { width: 100%; height: 100%; object-fit: cover; }
.row-main p { margin: 0 0 2px; }
.row-title { font-weight: 700; }
.row-actions { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
@media (min-width: 760px) { .row-item { grid-template-columns: auto 1fr auto; align-items: center; } .row-actions { grid-column: auto; justify-content: flex-end; } }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); max-width: 460px; margin: 16px auto; }
.chat { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 85%; background: #fff; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 10px 14px; align-self: flex-start; }
.bubble.mine { align-self: flex-end; background: var(--brand-tint); border-color: #D9EFB0; border-radius: 14px 14px 4px 14px; }
.bubble p { margin: 0 0 4px; }

/* ---------- sell */
.steps { list-style: none; padding: 0; margin: 0 0 16px; display: flex; gap: 6px; overflow-x: auto; }
.steps li { flex: 1 0 auto; }
.steps button { width: 100%; font: inherit; padding: 8px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .85rem; font-weight: 650; color: var(--muted); text-align: center; white-space: nowrap; cursor: default; }
.steps button.is-on { background: var(--brand); color: #fff; border-color: var(--brand); }
.steps button.is-done { color: var(--ok); border-color: #bfe3cb; background: var(--ok-tint); cursor: pointer; }
.upload-drop:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.sell-body { display: grid; gap: 18px; }
@media (min-width: 960px) { .sell-body { grid-template-columns: 1fr 320px; align-items: start; } .sell-side { position: sticky; top: 84px; } }
.sell-main { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.sell-side:empty { display: none; }
.grade-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.grade-panel h3 { margin-bottom: 8px; }
.grade-panel ul { padding-left: 18px; margin: 8px 0; font-size: .9rem; }
.problem-list li { color: var(--danger); }
.part-results { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.part-option { width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; cursor: pointer; font: inherit; color: var(--ink); }
.part-option:hover, .part-option.is-on { border-color: var(--brand); background: var(--brand-tint); }
.part-option b { display: block; }
.cosmetic-options { display: grid; gap: 8px; margin-bottom: 16px; }
.option-card { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; cursor: pointer; }
.option-card:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.option-card input { margin-top: 4px; accent-color: var(--brand); width: 18px; height: 18px; flex: none; }
.photo-grid { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.photo-grid li { position: relative; border-radius: 10px; overflow: hidden; background: #eee; aspect-ratio: 1; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid .tag { position: absolute; left: 6px; bottom: 6px; font-size: .7rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.92); }
.photo-grid .tag.warn { color: var(--warn); }
.photo-grid .del { position: absolute; right: 6px; top: 6px; border: 0; background: rgba(0,0,0,.6); color: #fff; border-radius: 999px; width: 28px; height: 28px; cursor: pointer; }
.upload-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 22px; text-align: center; cursor: pointer; background: var(--bg); }
.upload-drop:hover { border-color: var(--brand); }
.defect-editor { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 10px; background: #fcfdfd; }
.defect-photo-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.defect-photo-pick label { position: relative; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; cursor: pointer; border: 2px solid transparent; }
.defect-photo-pick label:has(input:checked) { border-color: var(--brand); }
.defect-photo-pick input { position: absolute; opacity: 0; }
.defect-photo-pick img { width: 100%; height: 100%; object-fit: cover; }
.sell-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.checks { list-style: none; padding: 0; display: grid; gap: 8px; }
.checks li { display: flex; gap: 8px; align-items: flex-start; }
.checks .i { color: var(--ok); margin-top: 3px; }
.levels { padding-left: 20px; }
.levels li { margin-bottom: 8px; }
.levels li span { display: block; color: var(--muted); font-size: .92rem; }
.profile-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.table-scroll { overflow-x: auto; }
.grid-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); font-size: .92rem; min-width: 560px; }
.grid-table th, .grid-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.grid-table th { background: #fafbfb; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.prose h2 { margin-top: 1.4em; }

/* ---------- admin */
.admin-grid { display: grid; gap: 14px; }
@media (min-width: 900px) { .admin-grid.two { grid-template-columns: 1fr 1fr; } }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.admin-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.admin-item h3 { margin-bottom: 4px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.count { display: inline-block; min-width: 1.6em; text-align: center; background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: .78rem; font-weight: 800; padding: 0 6px; margin-left: 6px; }
.audit-row { font-size: .85rem; border-bottom: 1px solid var(--line); padding: 6px 0; }

/* ---------- dialog & footer */
.dialog { border: 0; border-radius: 18px; padding: 0; width: min(92vw, 460px); box-shadow: var(--shadow-lg); }
.dialog::backdrop { background: rgba(6, 30, 25, .55); }
.dialog-body { padding: 22px; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 60; max-width: 92vw; }
.foot { background: #111113; color: #A1A1AA; margin-top: 40px; padding: 32px 0 20px; }
.foot a { color: #E4E4E7; text-decoration: none; display: block; padding: 3px 0; }
.foot a:hover { color: #fff; }
.foot-grid { display: grid; gap: 22px; grid-template-columns: 1fr 1fr; }
@media (min-width: 800px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.foot-grid > div:first-child { grid-column: 1 / -1; }
@media (min-width: 800px) { .foot-grid > div:first-child { grid-column: auto; } }
.foot-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #8B8B94; }
.brand-foot { color: #fff; margin-bottom: 8px; }
.foot-legal { border-top: 1px solid rgba(255,255,255,.08); margin-top: 20px; padding-top: 14px; color: #8B8B94; }
.error-page { text-align: center; padding-top: 60px; }
.error-page .brand { color: var(--brand); justify-content: center; margin-bottom: 18px; }
.error-page .logo-mark { width: 64px; height: 50px; color: var(--ink); }

/* ---------- utilities used by scripts (no inline styles: the CSP forbids them) */
.grow { flex: 1; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-14 { margin-top: 14px; } .mt-18 { margin-top: 18px; }
.mb-12 { margin-bottom: 12px; }
.wrap-row { flex-wrap: wrap; }
.row .field { margin-bottom: 0; }

.grade-inline { background: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: .92rem; }
.grade-inline:empty { display: none; }
@media (min-width: 960px) { .grade-inline { display: none; } }

/* ================= round 2: fitment-first shopping ================= */

/* ---------- context bar: your bike + your area (like a parts store's garage + store) */
.context-bar { background: #202024; color: #fff; border-top: 1px solid rgba(255,255,255,.06); }
.context-row { display: flex; gap: 8px; padding-top: 7px; padding-bottom: 7px; overflow-x: auto; scrollbar-width: none; }
.context-row::-webkit-scrollbar { display: none; }
.ctx-chip { display: inline-flex; align-items: center; gap: 7px; flex: none; min-height: 36px; max-width: 100%; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); color: #E4E4E7; border-radius: 999px; padding: 4px 12px 4px 10px; font: inherit; font-size: .86rem; cursor: pointer; white-space: nowrap; }
.ctx-chip:hover { background: rgba(255,255,255,.14); color: #fff; }
.ctx-chip .i { width: 18px; height: 18px; flex: none; }
.ctx-label { color: #A1A1AA; font-size: .78rem; }
.ctx-chip b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.ctx-chip.has-bike { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.ctx-chip.has-bike .ctx-label { color: #6b4e00; }
.ctx-chip.has-bike:hover { background: #B8F05A; color: var(--accent-ink); }
.ctx-change { text-decoration: underline; font-size: .78rem; }
.ctx-change:empty { display: none; }
@media (max-width: 560px) {
  .ctx-label { display: none; }
  .ctx-chip { font-size: .82rem; padding: 4px 10px 4px 8px; }
  .ctx-chip:first-child b { max-width: 20ch; }
}

/* ---------- trust strip */
.trust-strip { background: #fff; border-bottom: 1px solid var(--line); font-size: .82rem; color: var(--ink-2); }
.trust-row { list-style: none; margin: 0 auto; display: flex; gap: 22px; padding-top: 7px; padding-bottom: 7px; overflow-x: auto; scrollbar-width: none; }
.trust-row::-webkit-scrollbar { display: none; }
.trust-row li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; }
.trust-row .i { width: 16px; height: 16px; color: var(--brand-2); }
@media (max-width: 700px) { .trust-row li:nth-child(n+3) { display: none; } .trust-row { gap: 14px; font-size: .78rem; } }

/* ---------- search suggestions */
.top-search { position: relative; overflow: visible; }
.top-search input { border-radius: 999px 0 0 999px; }
.top-search button { border-radius: 0 999px 999px 0; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; color: var(--ink); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 40; max-height: 70vh; overflow: auto; }
.suggest[hidden] { display: none; }
.sg-h { margin: 6px 10px 2px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sg-h:empty { border-top: 1px solid var(--line); margin: 6px 4px; }
.suggest a { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.suggest a small { color: var(--muted); font-size: .78rem; }
.suggest a:hover, .suggest a[aria-selected="true"] { background: var(--brand-tint); }

/* ---------- garage dialog */
#garage-dialog { width: min(94vw, 520px); }
#garage-dialog h2 { display: flex; align-items: center; gap: 8px; }
.garage-list { list-style: none; padding: 0; margin: 12px 0 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.garage-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.garage-list li:last-child { border-bottom: 0; }
.garage-list li.is-current { background: var(--brand-tint); }
.g-title { font-weight: 650; }
.g-actions { display: flex; gap: 6px; flex: none; }
.g-actions .btn-sm { min-height: 34px; padding: 6px 10px; }
.small-h { font-size: .95rem; margin: 0 0 8px; }
.garage-fields { display: grid; gap: 0 10px; }
@media (min-width: 480px) { .garage-fields { grid-template-columns: 1fr 1fr; } }
.wrap-row { flex-wrap: wrap; }

/* ---------- fit chips and the fit line */
.fitchip { display: inline-flex; align-items: center; gap: 3px; font-size: .74rem; font-weight: 750; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.fitchip .i { width: 13px; height: 13px; }
.fitchip.fit-yes { background: var(--ok-tint); color: var(--ok); }
.fitchip.fit-maybe { background: var(--warn-tint); color: var(--warn); }
.fitchip.fit-no { background: var(--danger-tint); color: var(--danger); }
.fitline { display: flex; align-items: flex-start; gap: 10px; border-radius: var(--radius-sm); padding: 10px 12px; margin: 10px 0 12px; font-size: .92rem; border: 1px solid transparent; }
.fitline > .i { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.fitline.fit-yes { background: var(--ok-tint); color: #0f5c2b; border-color: #bfe3cc; }
.fitline.fit-maybe { background: var(--warn-tint); color: #6b4000; border-color: #f2d9a6; }
.fitline.fit-no { background: var(--danger-tint); color: #8c1b12; border-color: #f3c5c0; }
.fitline.fit-unknown { background: #f1f4f3; color: var(--ink-2); border-color: var(--line); }
.fitline.fit-none { background: #fff; border: 1px dashed var(--line-2); align-items: center; justify-content: space-between; flex-wrap: wrap; color: var(--ink-2); }
.fitline.fit-none > span { display: inline-flex; gap: 8px; align-items: center; }
.fitline .linklike { color: inherit; }

/* ---------- cards */
.card-get { font-size: .78rem; margin: 2px 0 0; display: flex; gap: 4px; align-items: center; color: var(--ink-2); }
.card-get .i, .card-meta .i { width: 14px; height: 14px; flex: none; }
.card-get.is-pickup { color: var(--warn); }

/* ---------- search page */
.pn-match { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; background: #fff; border: 2px solid var(--brand); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; color: var(--ink); text-decoration: none; }
.pn-match:hover { background: var(--brand-tint); color: var(--ink); }
.pn-tag { background: var(--brand); color: #fff; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 6px; }
.pn-go { font-weight: 700; color: var(--brand); }
@media (max-width: 560px) { .pn-match { grid-template-columns: 1fr; } }
.block { display: block; }
.fit-tabs { display: flex; gap: 6px; margin: 4px 0 16px; border-bottom: 2px solid var(--line); overflow-x: auto; }
.fit-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; margin-bottom: -2px; border-bottom: 3px solid transparent; color: var(--ink-2); text-decoration: none; font-weight: 650; white-space: nowrap; }
.fit-tabs a .i { width: 18px; height: 18px; }
.fit-tabs a.is-on { border-color: var(--brand); color: var(--brand-ink); }
.count { display: inline-block; min-width: 1.6em; text-align: center; background: #e9eeec; color: var(--ink-2); border-radius: 999px; padding: 0 7px; font-size: .78rem; font-weight: 700; }
.is-on .count { background: var(--brand); color: #fff; }
.filters-box { align-self: start; }
.filters-sum { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; justify-content: center; font-weight: 700; background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 14px; min-height: 44px; }
.filters-sum::-webkit-details-marker { display: none; }
.filters-box[open] .filters-sum { margin-bottom: 10px; }
@media (min-width: 900px) {
  .filters-sum { display: none; }
  .filters-box { position: sticky; top: 84px; }
  .filters { position: static; }
}
.seg { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.seg legend { font-weight: 650; font-size: .92rem; margin-bottom: 6px; padding: 0; }
.seg label { flex: 1; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: block; text-align: center; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 6px; font-size: .88rem; cursor: pointer; background: #fff; }
.seg input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (max-width: 899px) { .filters .seg { grid-column: 1 / -1; } }
.active-chips { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.active-chips a { display: inline-flex; align-items: center; gap: 4px; background: var(--brand-tint); color: var(--brand-ink); border: 1px solid #D9EFB0; border-radius: 999px; padding: 4px 8px 4px 12px; font-size: .84rem; font-weight: 650; text-decoration: none; }
.active-chips a:hover { background: #E6F5C6; }
.active-chips .i { width: 14px; height: 14px; }
.cat-list { list-style: none; padding: 0; margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.cat-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cat-row:last-child { border-bottom: 0; }
.cat-title { font-weight: 700; }
.cat-main .fitchip { margin-top: 4px; }
.cat-side { display: flex; gap: 8px; align-items: center; }

/* ---------- bike page */
.bike-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
@media (max-width: 700px) { .bike-actions { align-items: flex-start; flex-direction: row; flex-wrap: wrap; } }
.saved-bike { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: var(--accent-ink); font-weight: 750; border-radius: 10px; padding: 9px 14px; }
.jump-chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 2px; scrollbar-width: thin; }
.jump-chips a { display: inline-flex; align-items: center; gap: 6px; flex: none; background: #fff; border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; text-decoration: none; color: var(--ink); font-weight: 650; font-size: .88rem; }
.jump-chips a:hover { border-color: var(--brand); }
.jump-chips a.is-sale { background: var(--brand); border-color: var(--brand); color: #fff; }
.jump-chips a.is-sale .count { background: rgba(255,255,255,.25); color: #fff; }
.group-h { scroll-margin-top: 90px; }

/* ---------- part page */
.part-head { display: grid; gap: 4px 24px; align-items: start; }
@media (min-width: 900px) { .part-head { grid-template-columns: 1fr minmax(320px, 420px); } }
.part-buy { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 16px 14px; box-shadow: var(--shadow); }
.part-from { margin: 0; }
.price-inline { font-weight: 800; font-size: 1.15rem; }
.compat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.compat-h { margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafbfb; }
.compat-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.compat-table th, .compat-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compat-table thead th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #fafbfb; }
.compat-table tbody tr:last-child th, .compat-table tbody tr:last-child td { border-bottom: 0; }
.compat-table tr.is-mine { background: #fff8e1; }
.compat-table tr.is-no th a { color: var(--muted); }
.compat-more summary { padding: 10px 14px; cursor: pointer; color: var(--brand); font-weight: 650; border-top: 1px solid var(--line); }
@media (max-width: 700px) {
  .compat-table thead { display: none; }
  .compat-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .compat-table tbody tr:last-child { border-bottom: 0; }
  .compat-table th, .compat-table td { border: 0; padding: 2px 0; }
  .compat-table th { grid-column: 1 / -1; }
  .compat-table td::before { content: attr(data-label); display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
  .compat-table td[data-label="Notes"] { grid-column: 1 / -1; }
}
.grade-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 4px 0 8px; }
.grade-tile { display: flex; flex-direction: column; gap: 2px; background: #fff; border: 1.5px solid var(--line-2); border-radius: 12px; padding: 10px 12px; text-decoration: none; color: var(--ink); }
.grade-tile:hover { border-color: var(--brand); color: var(--ink); }
.grade-tile.is-on { border-color: var(--brand); background: var(--brand-tint); box-shadow: inset 0 0 0 1px var(--brand); }
.gt-name { font-weight: 700; font-size: .9rem; }
.gt-name b { font-family: var(--mono); font-size: .8rem; background: #eef2f0; border-radius: 6px; padding: 0 5px; margin-right: 2px; }
.gt-price { font-weight: 800; }
.gt-n { font-size: .78rem; color: var(--muted); }

/* ---------- listing page */
.keynums { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 12px 0 10px; }
.keynum { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.keynum dt { font-size: .74rem; color: var(--muted); line-height: 1.3; }
.keynum dd { margin: 2px 0 0; font-weight: 800; font-size: 1.05rem; }
.meter { display: block; height: 6px; background: #e6ebe9; border-radius: 999px; margin-top: 6px; overflow: hidden; }
.meter-fill { display: block; height: 100%; border-radius: 999px; }
.meter-good { background: var(--ok); }
.meter-ok { background: #c98a00; }
.meter-low { background: var(--danger); }
.meter-fill.w0 { width: 0%; }
.meter-fill.w5 { width: 5%; }
.meter-fill.w10 { width: 10%; }
.meter-fill.w15 { width: 15%; }
.meter-fill.w20 { width: 20%; }
.meter-fill.w25 { width: 25%; }
.meter-fill.w30 { width: 30%; }
.meter-fill.w35 { width: 35%; }
.meter-fill.w40 { width: 40%; }
.meter-fill.w45 { width: 45%; }
.meter-fill.w50 { width: 50%; }
.meter-fill.w55 { width: 55%; }
.meter-fill.w60 { width: 60%; }
.meter-fill.w65 { width: 65%; }
.meter-fill.w70 { width: 70%; }
.meter-fill.w75 { width: 75%; }
.meter-fill.w80 { width: 80%; }
.meter-fill.w85 { width: 85%; }
.meter-fill.w90 { width: 90%; }
.meter-fill.w95 { width: 95%; }
.meter-fill.w100 { width: 100%; }
.get-it p > .i { flex: none; margin-top: 2px; }
.get-battery { background: var(--warn-tint); border-radius: 10px; padding: 8px 10px; color: #6b4000; }

/* ---------- home picker: saved bike */
.picker-mine { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; background: var(--accent); color: var(--accent-ink); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; text-decoration: none; }
.picker-mine:hover { background: #B8F05A; color: var(--accent-ink); }
.picker-mine .i { width: 26px; height: 26px; }
.picker-mine .muted { color: #6b4e00; }
.pm-go { grid-column: 2; font-weight: 750; text-decoration: underline; font-size: .9rem; }

/* ---------- round 2 polish */
.tab-short, .t-short { display: none; }
@media (max-width: 560px) {
  .tab-long, .t-long { display: none; }
  .tab-short, .t-short { display: inline; }
  .ctx-change { display: none; }
  .ctx-chip:first-child b { max-width: 17ch; }
  .fit-tabs a { padding: 10px 10px; }
}
.filters fieldset.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.keynums { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }

.grade-tiles { list-style: none; padding: 0; }
.grade-tiles li { display: flex; }
.grade-tiles li > a { flex: 1; }
.sg-all { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }

/* ================= round 3: carsales-style e-bike marketplace ================= */

/* ---------- header: section menu; only sticky on wide screens */
@media (max-width: 899px) { .top { position: static; } }
.main-nav { border-top: 1px solid rgba(255,255,255,.08); }
.main-nav-row { list-style: none; margin: 0 auto; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.main-nav-row::-webkit-scrollbar { display: none; }
.main-nav-row a { display: block; padding: 10px 12px; color: #D4D4D8; text-decoration: none; font-weight: 650; font-size: .92rem; white-space: nowrap; border-bottom: 3px solid transparent; }
.main-nav-row a:hover { color: #fff; }
.main-nav-row a.is-on { color: #fff; border-bottom-color: var(--accent); }
@media (max-width: 560px) { .hide-sm { display: none; } .main-nav-row a { padding: 9px 10px; font-size: .88rem; } }

/* ---------- home hero + finder */
.hero-ebike { background: radial-gradient(120% 140% at 100% 0%, #2A3A12 0%, #18181B 55%); color: #fff; padding: 34px 0 26px; }
.hero-h { font-size: clamp(1.9rem, 4.5vw, 3rem); margin: 0 0 8px; letter-spacing: -.02em; }
.hero-sub { color: #D4D4D8; max-width: 62ch; margin: 0 0 18px; }
.finder { background: #fff; color: var(--ink); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.finder-tabs { display: flex; border-bottom: 1px solid var(--line); }
.finder-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: #f2f5f4; font: inherit; font-weight: 750; padding: 13px 10px; cursor: pointer; color: var(--ink-2); border-bottom: 3px solid transparent; }
.finder-tabs button.is-on { background: #fff; color: var(--brand-ink); border-bottom-color: var(--brand); }
.finder-tabs .i { width: 20px; height: 20px; }
.finder-panel { padding: 16px; display: grid; gap: 0 12px; grid-template-columns: 1fr 1fr; align-items: end; }
.finder-panel[hidden] { display: none; }
.finder-panel .field { margin-bottom: 10px; }
.finder-go { grid-column: 1 / -1; min-height: 50px; font-size: 1.05rem; margin-bottom: 4px; }
#panel-parts { display: block; }
#panel-parts[hidden] { display: none; }
.parts-picker { display: grid; gap: 0 12px; grid-template-columns: 1fr 1fr; align-items: end; }
.finder-alt { margin: 6px 0 0; color: var(--muted); }
@media (min-width: 900px) {
  .finder-panel { grid-template-columns: repeat(5, 1fr) auto; }
  .finder-go { grid-column: auto; margin-bottom: 10px; }
  .parts-picker { grid-template-columns: 1fr 1fr auto; }
}
@media (max-width: 420px) { .finder-panel, .parts-picker { grid-template-columns: 1fr; } }
.style-chips { list-style: none; padding: 0; margin: 16px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.style-chips a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; text-decoration: none; font-weight: 650; font-size: .88rem; border: 1px solid rgba(255,255,255,.2); }
.style-chips a:hover { background: rgba(255,255,255,.22); color: #fff; }

/* ---------- home strips */
.etiles { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .etiles { grid-template-columns: repeat(4, 1fr); } }
.etile a { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--ink); }
.etile a:hover { box-shadow: var(--shadow); color: var(--ink); }
.etile-img { aspect-ratio: 4 / 3; background: #eef2f0; display: grid; place-items: center; overflow: hidden; }
.etile-img img { width: 100%; height: 100%; object-fit: cover; }
.etile-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.etile-title { font-size: .95rem; line-height: 1.3; }
.etile-price { font-weight: 800; font-size: 1.15rem; }
.etile-facts, .etile-seller { font-size: .78rem; color: var(--muted); }
.make-chips { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.make-chips a { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 14px; text-decoration: none; color: var(--ink); font-weight: 650; font-size: .9rem; }
.make-chips a:hover { border-color: var(--brand); }
.sell-band { background: var(--brand-tint); }
.sell-band-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 22px; }
.sell-band-row h2 { margin: 0 0 4px; }
.sell-band-row p { margin: 0; color: var(--ink-2); }
.mt { margin-top: 22px; }

/* ---------- model cards (research) */
.mgrid { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.mcard a { display: flex; flex-direction: column; gap: 4px; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-decoration: none; color: var(--ink); }
.mcard a:hover { border-color: var(--brand); box-shadow: var(--shadow); color: var(--ink); }
.mcard-make { font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--brand); }
.mcard-name { font-weight: 800; font-size: 1.05rem; }
.mfacts { list-style: none; padding: 0; margin: 4px 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .82rem; color: var(--ink-2); }
.mfacts li { display: inline-flex; align-items: center; gap: 5px; }
.mfacts .i { width: 16px; height: 16px; color: var(--brand-2); }
.mfacts.big { font-size: .95rem; gap: 6px 18px; margin-top: 10px; }
.mfacts.big .i { width: 20px; height: 20px; }
.mcard-foot { margin-top: auto; display: flex; justify-content: space-between; gap: 8px; font-size: .82rem; font-weight: 650; padding-top: 6px; border-top: 1px solid var(--line); }

/* ---------- dealers */
.dealer-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.dcard a { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-decoration: none; color: var(--ink); height: 100%; }
.dcard a:hover { border-color: var(--brand); color: var(--ink); }
.dcard-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dcard-body .i { width: 14px; height: 14px; vertical-align: -2px; margin-right: 3px; }
.dlogo { width: 56px; height: 56px; border-radius: 12px; object-fit: contain; background: #fff; border: 1px solid var(--line); flex: none; }
.dlogo.big { width: 96px; height: 96px; border-radius: 18px; }
.dlogo-text { display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 1.2rem; border: 0; }
.dlogo-text.big { font-size: 2rem; }
.svc-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.dealer-hero { background: #fff; border-bottom: 1px solid var(--line); }
.dealer-head { display: flex; gap: 20px; align-items: flex-start; padding-top: 22px; padding-bottom: 18px; flex-wrap: wrap; }
.dealer-head h1 { margin: 0 0 4px; }
.dealer-facts { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; font-size: .94rem; }
.dealer-facts li { display: flex; gap: 8px; align-items: flex-start; }
.dealer-facts .i { width: 18px; height: 18px; color: var(--brand-2); flex: none; margin-top: 2px; }
.logo-box { width: 120px; height: 120px; border: 1px dashed var(--line-2); border-radius: 16px; display: grid; place-items: center; background: #fff; overflow: hidden; }
.logo-box img { width: 100%; height: 100%; object-fit: contain; }
.section-gap { margin-top: 18px; }
.field-label { font-weight: 650; margin: 0; }

/* ---------- e-bike results (list cards) */
.results-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.results-head h1 { font-size: clamp(1.25rem, 2.6vw, 1.7rem); margin: 0; }
.count-big { color: var(--brand); }
.sort-form label { display: flex; align-items: center; gap: 8px; }
.sort-form select { font: inherit; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; }
.filters-group { margin: 10px 0 8px; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); grid-column: 1 / -1; }
.filters-group:first-child { margin-top: 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
@media (max-width: 899px) { .filters .pair { grid-column: 1 / -1; } }
.erows { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.erow { position: relative; display: grid; grid-template-columns: 1fr; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.erow:hover { box-shadow: var(--shadow); }
.erow-img { position: relative; display: block; aspect-ratio: 16 / 10; background: #eef2f0; overflow: hidden; }
.erow-img img { width: 100%; height: 100%; object-fit: cover; }
.erow-img .noimg { display: grid; place-items: center; height: 100%; color: var(--muted); }
.photo-count { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; background: rgba(6, 30, 25, .72); color: #fff; font-size: .76rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.photo-count .i { width: 14px; height: 14px; }
.erow-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.erow-title { margin: 0; font-size: 1.12rem; }
.erow-title a { color: var(--ink); text-decoration: none; }
.erow-title a::after { content: ""; position: absolute; inset: 0; }
.erow-title a:hover { color: var(--ink); }
.erow-sub { margin: 0; font-size: .84rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.erow-price { margin: 4px 0 2px; font-size: 1.45rem; font-weight: 800; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price-label { font-size: .78rem; font-weight: 600; color: var(--muted); }
.keyrow { list-style: none; padding: 0; margin: 4px 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .86rem; color: var(--ink-2); }
.keyrow li { display: inline-flex; align-items: center; gap: 5px; }
.keyrow .i { width: 17px; height: 17px; color: var(--brand-2); flex: none; }
.erow-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.erow-seller { margin: 4px 0 0; font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.erow-seller .i { width: 15px; height: 15px; }
.erow-seller.is-verified { color: var(--ok); font-weight: 650; }
.erow-cta { display: none; }
.erow .ribbon { position: absolute; top: 8px; left: 8px; }
@media (min-width: 700px) {
  .erow { grid-template-columns: 280px 1fr auto; align-items: stretch; }
  .erow-img { aspect-ratio: auto; min-height: 190px; }
  .erow-cta { display: inline-flex; position: relative; z-index: 1; align-self: end; margin: 0 14px 14px 0; }
}
.model-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.model-chips a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; text-decoration: none; font-weight: 650; font-size: .88rem; }

/* ---------- e-bike detail */
.ebike-grid { display: grid; gap: 22px; }
@media (min-width: 960px) { .ebike-grid { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } .ebike-side { position: sticky; top: 140px; } }
.gallery-main { position: relative; }
.ebike-side { display: grid; gap: 14px; }
.keydetails ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .keydetails ul { grid-template-columns: repeat(4, 1fr); } }
.keydetails li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: center; }
.keydetails .i { grid-row: span 2; width: 24px; height: 24px; color: var(--brand-2); }
.kd-label { font-size: .74rem; color: var(--muted); }
.kd-value { font-weight: 750; font-size: .95rem; line-height: 1.25; }
.kd-sub { display: block; font-size: .8rem; font-weight: 700; }
.spec-groups { display: grid; gap: 14px; }
@media (min-width: 760px) { .spec-groups { grid-template-columns: 1fr 1fr; } }
.spec-group h3 { font-size: .95rem; margin: 0 0 6px; }
.price-label-big { margin: -4px 0 10px; color: var(--muted); font-size: .9rem; }
.tips h2 { display: flex; align-items: center; gap: 8px; margin-top: 0; }
.tips ul { padding-left: 18px; margin: 0; display: grid; gap: 6px; }
.h3 { font-size: 1.05rem; }

/* ---------- research */
.research-hero, .sell-hero { background: radial-gradient(120% 140% at 100% 0%, #2A3A12 0%, #18181B 55%); color: #fff; padding: 30px 0 26px; }
.research-hero h1, .sell-hero h1 { margin: 0 0 6px; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.research-hero .lede, .sell-hero .lede { color: #D4D4D8; max-width: 62ch; }
.research-hero .eyebrow, .sell-hero .eyebrow { color: var(--accent); }
.research-search { display: flex; gap: 8px; max-width: 560px; margin-top: 14px; }
.research-search input { flex: 1; min-width: 0; font: inherit; padding: 12px 14px; border-radius: 10px; border: 0; }
.az { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.az a { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 750; }
.make-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.make-grid a { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; text-decoration: none; color: var(--ink); scroll-margin-top: 140px; }
.make-grid a:hover { border-color: var(--brand); color: var(--ink); }
.make-grid li { scroll-margin-top: 140px; }
.style-tiles { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.style-tiles a { display: flex; flex-direction: column; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; text-decoration: none; color: var(--ink); }
.style-tiles a:hover { border-color: var(--brand); color: var(--ink); }
.model-head { display: grid; gap: 18px; align-items: start; }
@media (min-width: 900px) { .model-head { grid-template-columns: 1fr 340px; } }
.model-head h1 { margin: 0 0 6px; font-size: clamp(1.7rem, 4vw, 2.5rem); }
.model-price p { margin: 0 0 10px; }
.model-price .btn { margin-top: 6px; }

/* ---------- sell landing */
.sell-options { display: grid; gap: 12px; margin-top: -10px; }
@media (min-width: 800px) { .sell-options { grid-template-columns: 1.3fr 1fr; } }
.sell-option { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.sell-option:hover { border-color: var(--brand); color: var(--ink); }
.sell-option.is-main { border: 2px solid var(--accent); }
.sell-option .btn { grid-column: 1 / -1; justify-self: start; }
.so-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-tint); color: var(--link); display: grid; place-items: center; }
.so-icon .i { width: 28px; height: 28px; }
.how { counter-reset: how; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
@media (min-width: 900px) { .how { grid-template-columns: repeat(5, 1fr); } }
.how li { counter-increment: how; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.how li::before { content: counter(how); width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.how li span { color: var(--ink-2); }

.show-sm { display: none; }
@media (max-width: 560px) { .show-sm { display: inline; } }

.ebike-grid > *, .search-layout > * { min-width: 0; }
.thumbs { overflow-x: auto; scrollbar-width: thin; }
.mobile-head { display: none; }
@media (max-width: 959px) {
  .mobile-head { display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
  .mh-name { font-weight: 800; font-size: 1.15rem; margin: 0; }
  .mh-price { font-weight: 800; font-size: 1.4rem; margin: 2px 0 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
}
@media (max-width: 760px) { .home-models .mcard:nth-child(n+5) { display: none; } }

/* ---------- wordmark */
.wordmark { font-weight: 800; letter-spacing: -.035em; font-size: 1.25rem; }
.wordmark b { color: var(--accent); font-weight: 800; }
.error-page .wordmark b { color: #65A30D; }
.brand-foot .wordmark b { color: var(--accent); }
@media (max-width: 560px) { .brand .wordmark { display: inline; font-size: 1rem; } }
