:root {
  --bg: #ffffff;
  --band: #ececec;
  --surface: #ffffff;
  --ink: #161616;
  --muted: #6e6e6e;
  --line: #e2e2e2;
  --accent: #000000;
  --danger: #b3261e;
  --accent-ink: #ffffff;
  --chip: #ececec;
  --radius: 2px;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --max: 1200px;
  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* beats display:flex/grid on .field etc. */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--font);
}
img { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------- header (mirrors the main ERA Squarespace site) ---------- */
.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 16px 0;
  background: #fff;
}
.logo { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #000; }
.logo-mark {
  font-weight: 900;
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  font-size: clamp(48px, 9vw, 82px);
  line-height: .9;
  letter-spacing: .02em;
}
.logo-sub {
  font-weight: 300;
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  font-size: clamp(14px, 2.4vw, 25px);
  letter-spacing: .32em;
  margin-right: -.32em; /* optically re-center tracked text */
  text-transform: uppercase;
  margin-top: 14px;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  margin: 38px 0 22px;
}
.site-nav a {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  text-transform: uppercase;
  text-decoration: none;
  color: #000;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: #000; }

main { max-width: var(--max); margin: 0 auto; padding: 32px 16px 64px; }
/* Inventory sits on a light gray band, like the reference card grid. */
.band { background: var(--band); min-height: 70vh; }
.band main { padding-top: 40px; }
.page-head { text-align: center; margin-bottom: 28px; }
.page-head .lede { margin: 0 auto; }

h1 {
  font-weight: 800;
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  text-transform: uppercase;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.1;
  letter-spacing: .02em;
  margin: 0 0 10px;
}
.lede { color: var(--muted); margin: 0 0 28px; max-width: 640px; }

/* ---------- inventory ---------- */
.filters {
  display: grid;
  grid-template-columns: 2fr repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.filters input, .filters select { width: 100%; }
.result-count { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 2px;
  overflow: hidden;
  text-decoration: none;
  transition: box-shadow .15s ease;
}
.card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); }
/* Owner photos have every kind of background, so they fill a fixed 4:3 frame. */
.card .thumb { position: relative; aspect-ratio: 4 / 3; background: #dcdcdc; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .thumb img { transform: scale(1.03); }
.tags { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tag {
  font: 600 10px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  background: rgba(255,255,255,.92);
  color: var(--ink);
  border-radius: 2px;
  padding: 5px 7px;
}
.tag.featured { background: var(--ink); color: #fff; }
.tag-id { position: absolute; top: 12px; left: 12px; }
.card .body { display: flex; flex-direction: column; flex: 1; padding: 18px 16px 18px; }
.card .title { font-size: 16px; font-weight: 500; margin: 0 0 2px; }
.card .subtitle { color: var(--muted); font-size: 12px; margin: 0 0 16px; min-height: 18px; }
.card .rows { margin: 0 0 18px; border-top: 1px solid var(--line); }
.card .rows div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 7px 0; border-bottom: 1px solid var(--line);
  font: 500 10px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase;
}
.card .rows dt { color: var(--muted); }
.card .rows dd { margin: 0; text-align: right; }
.limits { display: flex; margin: -8px 0 18px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.limit { font: 600 10px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 4px 6px; border-radius: 2px; background: var(--ink); color: #fff; }
.card .view {
  margin-top: auto; align-self: flex-start;
  background: var(--chip); color: var(--ink);
  font-size: 12px; padding: 8px 16px; border-radius: 2px;
}
.card:hover .view { background: var(--ink); color: #fff; }

.badge {
  display: inline-block;
  font: 600 10px/1 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--ink);
  color: #fff;
  border-radius: 2px;
  padding: 5px 7px;
  margin-bottom: 10px;
}

.empty, .error {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.error { color: var(--danger); }

/* ---------- vehicle detail ---------- */
.back { display: inline-block; margin-bottom: 20px; color: var(--muted); font-size: 14px; }
.detail { display: grid; grid-template-columns: 3fr 2fr; gap: 32px; align-items: start; }
.gallery .main { aspect-ratio: 4 / 3; background: #dcdcdc; border-radius: var(--radius); overflow: hidden; }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; margin-top: 10px; }
.thumbs button {
  padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden;
  aspect-ratio: 1; background: #e7e3da; cursor: pointer;
}
.thumbs button[aria-current="true"] { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.specs { margin: 20px 0; border-top: 1px solid var(--line); }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; text-align: right; font-weight: 600; white-space: pre-wrap; }
.notes { white-space: pre-line; }

/* ---------- forms ---------- */
input, select, textarea {
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid #d6d6d6;
  border-radius: 2px;
  padding: 11px 12px;
  min-height: 44px;
}
textarea { min-height: 96px; resize: vertical; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 2px;
  background: var(--ink); color: #fff;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn[disabled] { opacity: .55; cursor: progress; }

.form { max-width: 760px; }
.form fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px 18px 8px;
  margin: 0 0 20px;
}
.form legend { font-weight: 800; padding: 0 6px; font-size: 18px; }
.form .hint { color: var(--muted); font-size: 14px; margin: -4px 0 14px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-weight: 600; font-size: 14px; }
.req { color: var(--accent); }
.sub-field { margin: 14px 0 0; }
.sub-field > span { font-weight: 500; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid #d6d6d6; border-radius: 2px; padding: 8px 14px; cursor: pointer;
  min-height: 40px;
}
.choices input { min-height: 0; margin: 0; }
.choices label:has(input:checked) { border-color: var(--ink); background: #ececec; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 20px; }
.consent input { min-height: 0; margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 22px; text-align: center; cursor: pointer; margin-bottom: 12px;
}
.dropzone.drag { border-color: var(--ink); background: #ececec; }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-bottom: 14px; }
.preview { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #e7e3da; }
.preview img { width: 100%; height: 100%; object-fit: cover; }
.preview button {
  position: absolute; top: 4px; right: 4px; width: 28px; height: 28px;
  border: 0; border-radius: 50%; background: rgba(0,0,0,.7); color: #fff; cursor: pointer; font-size: 16px; line-height: 1;
}
.preview .cover {
  position: absolute; left: 4px; bottom: 4px; font-size: 11px; font-weight: 700;
  background: rgba(0,0,0,.7); color: #fff; padding: 2px 6px; border-radius: 4px;
}
.status { margin: 14px 0 0; font-weight: 600; }
.status.err { color: var(--danger); }
.done {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 24px; max-width: 640px;
}

@media (max-width: 480px) {
  .site-nav { gap: 6px 14px; margin: 28px 0 18px; }
  .site-nav a { font-size: 13px; }
}

@media (max-width: 860px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .search, .filters #location { grid-column: 1 / -1; }
  .detail { grid-template-columns: 1fr; }
}

/* ---------- multi-vehicle submission ---------- */
.stepper { display: flex; align-items: stretch; gap: 8px; margin-bottom: 12px; }
.stepper input { width: 96px; text-align: center; font-size: 20px; font-weight: 700; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper .step {
  width: 48px; border: 1px solid #d6d6d6; border-radius: 2px; background: var(--surface);
  font: inherit; font-size: 22px; cursor: pointer;
}
.stepper .step:hover { background: var(--chip); }
.vehicle-card { position: relative; }
.vehicle-card legend { max-width: calc(100% - 90px); }
.v-remove {
  position: absolute; top: 14px; right: 14px;
  border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px;
  text-decoration: underline; cursor: pointer; padding: 4px;
}
.v-done { margin: 0 0 12px; font-weight: 700; }
.vehicle-card.done { opacity: .6; }
.more { margin: 4px 0 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.more-head { font-size: 16px; margin: 4px 0 12px; }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--ink); }
.add-vehicle { width: 100%; margin: 0 0 20px; }

/* ---------- admin ---------- */
.admin-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  max-width: var(--max); margin: 0 auto; padding: 10px 16px;
  font: 500 12px/1.3 var(--mono); letter-spacing: .04em; text-transform: uppercase;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.link-btn { border: 0; background: none; font: inherit; text-decoration: underline; cursor: pointer; padding: 4px; color: inherit; }
.login { max-width: 420px; margin: 24px auto; }
.login .form { max-width: none; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.admin-head h1 { margin: 0; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.status-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.status-tabs button {
  border: 1px solid #d6d6d6; border-radius: 2px; background: var(--surface); padding: 8px 12px;
  font: inherit; font-size: 14px; cursor: pointer; min-height: 40px;
}
.status-tabs button span { color: var(--muted); margin-left: 4px; }
.status-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.status-tabs button[aria-selected="true"] span { color: #bbb; }
.admin-filters { grid-template-columns: 2fr 1fr; }
.admin-list { display: flex; flex-direction: column; gap: 8px; }
.admin-row {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 2px; padding: 10px; text-decoration: none;
}
.admin-row:hover { border-color: var(--ink); }
.admin-row .thumb { aspect-ratio: 4 / 3; background: #dcdcdc; overflow: hidden; border-radius: 2px; }
.admin-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-row .main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.admin-row .name { font-weight: 600; }
.admin-row .sub { color: var(--muted); font-size: 13px; }
.admin-row .side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.admin-row .date { color: var(--muted); font-size: 12px; }
.pill {
  display: inline-block; font: 600 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 7px; border-radius: 2px; background: var(--chip); color: var(--ink);
}
.pill.pending { background: #fff1c2; color: #6b5200; }
.pill.approved { background: #d7f0dc; color: #1d5e2c; }
.pill.rejected { background: #f7d9d6; color: #8a1f14; }
.pill.featured { background: var(--ink); color: #fff; }
.manage { border: 1px solid var(--line); border-radius: 2px; padding: 4px 16px 16px; margin-top: 16px; background: var(--surface); }
.manage h2, .admin-sections h2 { font-size: 16px; margin: 18px 0 8px; }
.field.check { flex-direction: row; align-items: center; gap: 8px; align-self: end; min-height: 44px; }
.field.check input { min-height: 0; }
.admin-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; margin-top: 16px; }
.admin-sections .specs { margin: 0 0 8px; }
.admin-sections dd { max-width: 65%; overflow-wrap: anywhere; }
.specs .na { color: #a0a0a0; font-weight: 400; font-style: italic; }
.siblings { margin: 0 0 8px; padding-left: 18px; }
.siblings li { margin: 6px 0; }
@media (max-width: 860px) {
  .admin-sections { grid-template-columns: 1fr; }
  .admin-filters { grid-template-columns: 1fr; }
  .admin-row { grid-template-columns: 72px 1fr; }
  .admin-row .side { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; flex-wrap: wrap; }
}

/* ---------- embedded in a Squarespace page (see assets/embed.js) ---------- */
.embedded .site-header { display: none; }
.embedded body { min-height: 0; margin: 0; }
.embedded .band { min-height: 0; }
.embedded main { padding-top: 8px; }

/* List-your-car: center the form column on the page. */
main.narrow { max-width: calc(760px + 32px); }
main.narrow .form, main.narrow .done { max-width: none; }
