/* Everylot. System font, light weights, one accent, 6px radii, 36px controls that share a baseline. */
:root {
  --bg: #ffffff;
  --fg: #18181b;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #e5e7eb;
  --ring: #f1f2f4;
  --hover: #f8f9fa;
  --accent: #2563eb;
  --accent-fg: #ffffff;
  --good: #15803d;
  --radius: 6px;
  --control: 36px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0d;
    --fg: #e7e7ea;
    --muted: #9a9aa3;
    --faint: #6b6b74;
    --line: #26262c;
    --ring: #17171b;
    --hover: #141418;
    --accent: #5b8def;
    --accent-fg: #0b0b0d;
    --good: #4ade80;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: 20px; }
h2 { font-size: 15px; }
p { margin: 0 0 12px; }
em { font-style: normal; color: var(--fg); background: var(--ring); padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
pre, code { font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
pre { background: var(--ring); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; overflow-x: auto; }
code { background: var(--ring); padding: 1px 4px; border-radius: 4px; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }
.wrap.wide { max-width: 1080px; }

.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 15px; }
.brand svg { color: var(--fg); display: block; }
.nav { display: flex; gap: 18px; color: var(--muted); font-size: 13.5px; }
.nav a:hover { color: var(--fg); text-decoration: none; }

main { padding: 24px 0 48px; }
.foot { border-top: 1px solid var(--line); padding: 20px 0 32px; color: var(--muted); font-size: 12.5px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* Hero */
.hero { padding: 40px 0 8px; max-width: 720px; }
.hero h1 { font-size: 28px; font-weight: 500; letter-spacing: -0.02em; margin-bottom: 8px; }
.lede { font-size: 15px; color: var(--muted); margin-bottom: 20px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 14px; }
.browse { margin-top: 36px; }
.browse h2 { margin-bottom: 10px; }

/* Search form */
.search { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.field.q {
  display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 12px 0 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 0 0 4px var(--ring), var(--shadow);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.field.q:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, var(--ring)); }
.field.q svg { color: var(--faint); flex: none; }
.field.q input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 15px; color: var(--fg);
}
.field.q input::placeholder { color: var(--faint); font-weight: 400; }
.field.q input::-webkit-search-decoration, .field.q input::-webkit-search-cancel-button { -webkit-appearance: none; }
.field.q .kbds { display: none; gap: 4px; flex: none; }
.field.q kbd {
  display: inline-flex; align-items: center; height: 20px; padding: 0 6px;
  font: 11px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: var(--muted);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--ring);
}
@media (min-width: 640px) { .field.q .kbds { display: inline-flex; } }

/* Suggestions: same combobox as the interaction checker. One query row, then makes and models. */
.qwrap { position: relative; }
.menu {
  position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0;
  max-height: 340px; overflow-y: auto; margin: 0; padding: 4px; list-style: none;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12), 0 2px 6px rgba(16, 24, 40, 0.06);
  animation: menu-in 120ms ease-out;
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }
.mi {
  display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 10px;
  border-radius: 5px; cursor: pointer; font-size: 13.5px; line-height: 1.3;
}
.mi[aria-selected="true"] { background: var(--hover); }
.mi .name { font-weight: 500; white-space: nowrap; }
.mi .sub { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mi .tag { margin-left: auto; flex: none; color: var(--faint); font-size: 12px; font-feature-settings: "tnum" 1; }
.mi.is-query .name { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .menu { animation: none; } }
.search.big .field.q { height: 50px; }
.search.big .field.q input { font-size: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.row select, .row input, .row button, .button {
  height: var(--control); border-radius: var(--radius); font: inherit; font-size: 13.5px; color: var(--fg);
  border: 1px solid var(--line); background: var(--bg); padding: 0 10px; line-height: calc(var(--control) - 2px);
}
.row select {
  appearance: none; -webkit-appearance: none; padding-right: 26px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}
.row select:disabled { color: var(--faint); cursor: default; }
.row input.zip { width: 76px; }
.row select:focus, .row input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.row button, .button {
  background: var(--fg); color: var(--bg); border-color: var(--fg); padding: 0 14px; cursor: pointer; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
}
.row button:hover, .button:hover { opacity: 0.9; text-decoration: none; }
.search:not(.big) .row button { display: none; }
.search:not(.big) .row button.show { display: inline-flex; }

/* Results */
.results-block { transition: opacity 160ms ease; }
.results-block.is-loading { opacity: 0.55; }
.bar { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 22px 0 6px; flex-wrap: wrap; }
.bar h1 { font-size: 18px; }
.bar h1 .muted { font-weight: 400; font-size: 14px; }
.sorts { display: flex; gap: 2px; font-size: 13px; }
.sorts a { color: var(--muted); padding: 4px 8px; border-radius: 5px; }
.sorts a:hover { color: var(--fg); background: var(--hover); text-decoration: none; }
.sorts a.on { color: var(--fg); background: var(--ring); }
.count { color: var(--muted); font-size: 12.5px; margin: 0 0 8px; }
.note { color: var(--muted); font-size: 13px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ring); }
.results { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); animation: rise 160ms ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .results { animation: none; } }
.item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.item:hover { background: var(--hover); }
.thumb { flex: none; width: 132px; height: 88px; border-radius: 4px; overflow: hidden; background: var(--ring); display: block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.noimg { display: block; width: 100%; height: 100%; }
.item .body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.line1 { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.title { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price { font-size: 15px; font-weight: 500; white-space: nowrap; }
.drop { color: var(--good); font-size: 12.5px; font-weight: 400; margin-left: 8px; }
.line2, .line3 { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.good { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 500; letter-spacing: 0.02em; color: var(--good); border: 1px solid color-mix(in srgb, var(--good) 35%, transparent); border-radius: 4px; padding: 0 5px; line-height: 16px; vertical-align: 1px; }
.new { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 500; letter-spacing: 0.02em; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 4px; padding: 0 5px; line-height: 16px; vertical-align: 1px; }
.empty { padding: 28px 0; color: var(--muted); }
.empty a { color: var(--accent); }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; font-size: 13.5px; }
.pager a { color: var(--accent); }

.also { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.also h2 { margin-bottom: 4px; }
.also p { font-size: 13px; }
.also ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.also li a { display: inline-block; height: 30px; line-height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; }
.also li a:hover { background: var(--hover); text-decoration: none; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; }
.chips a span { color: var(--faint); font-size: 12px; }
.chips a:hover { background: var(--hover); text-decoration: none; }

/* Home strips */
.strip { margin-top: 32px; }
.strip-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.strip-head .more { margin-left: auto; color: var(--muted); font-size: 13px; }
.strip-head .more:hover { color: var(--fg); }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); box-shadow: var(--shadow); transition: border-color 120ms ease, transform 120ms ease; }
.card:hover { text-decoration: none; border-color: var(--faint); transform: translateY(-1px); }
.card-img { display: block; width: 100%; aspect-ratio: 16 / 10; border-radius: 5px; overflow: hidden; background: var(--ring); margin-bottom: 4px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-title { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-line { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-line .drop { margin-left: 8px; }
.card-line .price { font-size: 13.5px; }
@media (max-width: 640px) {
  .cards { display: flex; overflow-x: auto; scrollbar-width: none; gap: 10px; padding-bottom: 2px; }
  .cards::-webkit-scrollbar { display: none; }
  .cards li { flex: 0 0 200px; min-width: 0; }
  .cards .card { width: 200px; }
}

/* Landing pages */
.related { margin-top: 28px; padding-top: 8px; border-top: 1px solid var(--line); }
.related h2 { margin: 18px 0 8px; }
.related .small { margin-top: 18px; }

/* Listing */
.crumbs { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.crumbs a:hover { color: var(--fg); }
.listing .head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.listing h1 { font-size: 22px; }
.pricebox { display: flex; align-items: baseline; gap: 10px; }
.pricebox .price { font-size: 22px; }
.pricebox .drop { color: var(--muted); text-decoration: line-through; }
.listing.inactive h1 { color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 0 0 16px; }
.gallery img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); background: var(--ring); display: block; }
.cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.cta .muted { font-size: 13px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); column-gap: 40px; margin: 0 0 16px; border-top: 1px solid var(--line); }
.facts div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.similar { margin-top: 28px; }
.similar h2 { margin-bottom: 6px; }

/* Prose pages */
.prose { max-width: 680px; }
.eyebrow { display: inline-block; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.prose h1 { font-size: 24px; margin-bottom: 6px; }
.prose h2 { font-size: 15px; margin: 22px 0 6px; }
.prose p { font-size: 14.5px; }
.prose a { color: var(--accent); }

/* Admin */
.admin table { border-collapse: collapse; width: 100%; font-size: 12.5px; margin-bottom: 16px; }
.admin th, .admin td { text-align: left; padding: 4px 8px 4px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin h2 { margin: 18px 0 6px; }

@media (max-width: 640px) {
  .wrap { padding: 0 14px; }
  .hero { padding-top: 22px; }
  .hero h1 { font-size: 24px; }
  .thumb { width: 104px; height: 70px; }
  .title, .price { font-size: 14px; }
  .line1 { flex-direction: column; align-items: flex-start; gap: 1px; }
  .title { max-width: 100%; }
  .search { gap: 8px; }
  .row { flex-wrap: nowrap; overflow-x: auto; min-width: 0; padding-bottom: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .row::-webkit-scrollbar { display: none; }
  .row select, .row input { flex: none; }
  .row input.zip { width: 72px; }
  .nav { display: none; }
  .facts { grid-template-columns: 1fr; }
}
