:root {
  --green: #2f7a0a;
  --green-dark: #1e5006;
  --blue: #4b43a8;
  --sky: #8ec9e6;
  --teal: #00a878;
  --blush: #e6a7b8;
  --mustard: #8f8a3a;
  --ink: #20222a;
  --muted: #646a76;
  --line: #d9dde5;
  --paper: #ffffff;
  --wash: #f5f7f4;
  --danger: #b42318;
  --warning: #8a5a00;
  --success: #17663a;
}

* {
  box-sizing: border-box;
}

html {
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
  background: #ececec;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
}

.site-header,
.site-footer {
  background: var(--blue);
  color: #fff;
}

.site-header a,
.site-footer a {
  color: #fff;
}

.nav-shell,
.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-shell {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 8px 10px;
  border-radius: 6px;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
}

.menu-button {
  display: none;
}

.page-band {
  padding: 48px 0;
}

.muted-band {
  background: var(--wash);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  line-height: 1.12;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

.hero {
  min-height: 520px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(32, 34, 42, 0.78), rgba(32, 34, 42, 0.24)),
    url("/images/hero-bg.webp") center / cover;
  color: #fff;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: end;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 8vw, 4.8rem);
  line-height: 1;
}

.hero-copy p {
  max-width: 650px;
  font-size: 1.15rem;
  margin: 0 0 24px;
}

.hero-panel {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 8px;
  padding: 18px;
}

.eyebrow,
.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-panel strong {
  display: block;
  font-size: 1.65rem;
  margin: 4px 0 16px;
}

.actions,
.row,
.zip-form,
.pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.spread {
  justify-content: space-between;
}

.button,
button {
  border: 0;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
}

.button:hover,
button:hover {
  background: var(--green-dark);
  text-decoration: none;
}

.button.secondary {
  background: #fff;
  color: var(--blue);
  border: 1px solid var(--line);
}

.button.secondary:hover {
  background: #f2f4fa;
}

.button.danger,
button.danger {
  background: var(--danger);
}

.button.small,
.nav-links .button.small {
  min-height: 34px;
  padding: 7px 12px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.cards {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.grid.two,
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.grid.trio {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.trio section,
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.grid.trio section {
  padding: 16px;
}

.grid.trio img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 14px;
}

.card-body {
  padding: 16px;
}

.listing-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #eef0f3;
}

.listing-card h3,
.card h3 {
  margin: 12px 0 8px;
}

.listing-card p {
  color: var(--muted);
  min-height: 54px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: rgba(142, 201, 230, 0.28);
  color: #28305f;
  padding: 4px 9px;
  font-size: 0.82rem;
  font-weight: 700;
}

.muted-pill {
  background: #f0f1f2;
  color: var(--muted);
}

.flash {
  margin: 16px 0 0;
  border-radius: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.flash.success {
  color: var(--success);
  border-color: rgba(23, 102, 58, 0.35);
}

.flash.error {
  color: var(--danger);
  border-color: rgba(180, 35, 24, 0.35);
}

.flash.warning {
  color: var(--warning);
  border-color: rgba(138, 90, 0, 0.35);
}

.content-flow > * + * {
  margin-top: 22px;
}

.form {
  display: grid;
  gap: 16px;
  max-width: 760px;
}

.form.narrow {
  max-width: 460px;
}

label,
fieldset {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #bfc5d0;
  border-radius: 6px;
  padding: 9px 10px;
  font: inherit;
  background: #fff;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.check input {
  width: auto;
  min-height: 0;
}

.hidden-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px 160px auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 24px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

th,
td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: var(--wash);
}

td form {
  display: inline-flex;
  margin: 0 4px 4px 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.stats div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.stats strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1;
}

.stats span {
  color: var(--muted);
}

.details {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px 14px;
}

.details dt {
  color: var(--muted);
}

.details dd {
  margin: 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 32px;
}

.detail-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #eef0f3;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.detail-copy {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.detail-copy h1 {
  margin: 14px 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
}

.trade-activity {
  display: grid;
  gap: 12px;
}

.trade-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.mini-offer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px 8px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
}

.mini-offer img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
}

.mini-offer.cash {
  color: var(--success);
  font-weight: 700;
}

.leaderboard {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 24px;
}

.leaderboard li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.leaderboard span {
  color: var(--muted);
  margin-left: 8px;
}

.empty {
  background: #fff;
  border: 1px dashed #bfc5d0;
  border-radius: 8px;
  padding: 24px;
  color: var(--muted);
}

.back-link {
  display: inline-flex;
  margin-bottom: 12px;
}

.site-footer {
  padding: 22px 0;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-grid p {
  margin: 0;
}

.footer-grid nav {
  display: flex;
  gap: 14px;
}

code,
pre {
  background: #f1f3f5;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 5px;
}

pre {
  overflow: auto;
  padding: 12px;
}

@media (max-width: 820px) {
  .menu-button {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.12);
  }

  .nav-links {
    display: none;
    width: 100%;
    padding-bottom: 14px;
  }

  .nav-links.open {
    display: grid;
  }

  .nav-shell {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .hero {
    min-height: 620px;
  }

  .hero-inner,
  .grid.two,
  .grid.trio,
  .split,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .details {
    grid-template-columns: 1fr;
  }
}
