:root {
  --navy: #1b3a6b;
  --navy-d: #142d53;
  --gold: #c99b2e;
  --ink: #1d2733;
  --muted: #5d6b7a;
  --line: #d6dce3;
  --bg: #f4f6f9;
  --card: #ffffff;
  --live: #1f8a4c;
  --bad: #b4322a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

/* gov banner */
.gov-banner {
  background: #eef1f5;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  padding: 6px 16px;
  text-align: center;
}
.gov-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-right: 7px; vertical-align: middle; }

/* masthead */
.masthead { background: linear-gradient(180deg, var(--navy), var(--navy-d)); color: #fff; }
.masthead-in { max-width: 1040px; margin: 0 auto; padding: 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.seal svg { width: 52px; height: 52px; display: block; }
.masthead-txt { flex: 1 1 auto; min-width: 200px; }
.masthead-txt h1 { margin: 0; font-size: 22px; letter-spacing: .2px; }
.masthead-txt p { margin: 2px 0 0; color: #c8d4e6; font-size: 13.5px; }
.masthead-meta { text-align: right; font-size: 12.5px; color: #c8d4e6; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.sale-badge { background: rgba(255,255,255,.12); border: 1px solid rgba(233,195,90,.5); color: #f0e3bf; padding: 3px 9px; border-radius: 4px; font-weight: 600; }

/* breadcrumb */
.breadcrumb { background: #fff; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.breadcrumb .wrap { padding: 8px 16px; }
.breadcrumb strong { color: var(--ink); }

/* intro + search */
.intro { margin: 22px 0 6px; }
.intro h2 { margin: 0 0 6px; font-size: 20px; }
.intro p { max-width: 70ch; }

.searchbar { margin: 16px 0 20px; }
#search-form { display: flex; gap: 10px; flex-wrap: wrap; }
#make {
  flex: 1 1 320px; min-width: 0; padding: 11px 13px;
  background: #fff; border: 1px solid #b9c2cd; border-radius: 6px;
  color: var(--ink); font-size: 15px;
}
#make:focus { outline: 2px solid var(--navy); outline-offset: 0; border-color: var(--navy); }
button {
  padding: 11px 20px; background: var(--navy); color: #fff; border: 1px solid var(--navy-d);
  border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 15px;
}
button:hover { background: var(--navy-d); }
.status { margin-top: 10px; min-height: 20px; font-size: 13px; }
.status.err { color: var(--bad); font-weight: 600; }
.status.ok { color: var(--muted); }

/* results grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; padding-bottom: 8px; }
.placeholder { grid-column: 1 / -1; color: var(--muted); padding: 28px; text-align: center; background: #fff; border: 1px dashed var(--line); border-radius: 8px; }

.lot {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 1px 2px rgba(20,45,83,.05);
}
.lot:hover { border-color: #b9c2cd; box-shadow: 0 3px 10px rgba(20,45,83,.10); }
.lot-photo { aspect-ratio: 16 / 10; background: #e8eaed center/cover no-repeat; position: relative; }
.lot-lotno { position: absolute; top: 8px; left: 8px; background: rgba(27,58,107,.92); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .4px; padding: 3px 8px; border-radius: 4px; }
.lot-grade { position: absolute; top: 8px; right: 8px; background: #fff; color: var(--navy); font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 4px; border: 1px solid var(--line); }
.lot-body { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lot-title { font-size: 15px; font-weight: 700; line-height: 1.25; }
.lot-year { color: var(--muted); font-weight: 600; }
.lot-vin { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 11.5px; color: var(--muted); word-break: break-all; }
.lot-foot { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 9px; }
.lot-foot .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.lot-price { font-size: 17px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }

/* footer */
.footer { margin-top: 30px; border-top: 1px solid var(--line); background: #fff; }
.footer .wrap { padding: 16px; font-size: 12.5px; color: var(--muted); text-align: center; }

@media (max-width: 520px) {
  .masthead-meta { text-align: left; align-items: flex-start; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
}
