:root {
  --cream: #faf6ec;
  --gold: #c9962e;
  --gold-dark: #a8761f;
  --brown: #4a2f1d;
  --brown-soft: #6b4a2f;
  --line: #e5d9bd;
  --card: #fffdf7;
  --green: #2e7d32;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--cream); color: var(--brown);
  font-family: Georgia, 'Times New Roman', serif; line-height: 1.5;
}
.wrap { max-width: 1020px; margin: 0 auto; padding: 0 18px; }
.site-header { background: var(--brown); color: var(--cream); padding: 12px 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.wordmark { color: var(--gold); font-size: 1.7rem; font-weight: bold; text-decoration: none; letter-spacing: 1px; }
.site-header nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.site-header nav a { color: var(--cream); text-decoration: none; }
.site-header nav a:hover { color: var(--gold); }
.inline { display: inline; margin: 0; }
.linklike { background: none; border: none; color: var(--cream); cursor: pointer; font: inherit; padding: 0; }
.linklike:hover { color: var(--gold); }
.btn {
  display: inline-block; background: var(--gold); color: var(--brown) !important;
  padding: 8px 18px; border-radius: 6px; text-decoration: none; font-weight: bold; border: none; cursor: pointer;
}
.btn:hover { background: var(--gold-dark); color: #fff !important; }
.btn-outline {
  display: inline-block; border: 2px solid var(--gold); color: var(--brown);
  padding: 6px 16px; border-radius: 6px; text-decoration: none; font-weight: bold; background: transparent; cursor: pointer;
}
main.wrap { padding-top: 26px; padding-bottom: 40px; min-height: 60vh; }
.hero {
  text-align: center; padding: 38px 20px; background: var(--card);
  border: 2px solid var(--line); border-radius: 12px; margin-bottom: 28px;
}
.hero h1 { font-size: 2.1rem; margin: 0 0 8px; }
.hero p.tag { color: var(--brown-soft); font-style: italic; margin: 0 0 18px; }
.hero .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-split { display: flex; align-items: center; gap: 26px; text-align: left; }
.hero-split .commodore-full {
  height: 340px; width: auto; border-radius: 12px;
  border: 2px solid var(--line); flex-shrink: 0; background: #fff;
}
.hero-split .cta-row { justify-content: flex-start; }
@media (max-width: 640px) {
  .hero-split { flex-direction: column; text-align: center; }
  .hero-split .commodore-full { height: 280px; }
  .hero-split .cta-row { justify-content: center; }
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; text-decoration: none; color: inherit; display: block;
}
.card:hover { border-color: var(--gold); }
.card .thumb {
  width: 100%; height: 150px; object-fit: cover; border-radius: 6px; background: #eee5cf;
  display: flex; align-items: center; justify-content: center; font-size: 2.4rem; margin-bottom: 10px; overflow: hidden;
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.card h3 a { color: var(--brown); text-decoration: none; }
.meta { color: var(--brown-soft); font-size: 0.88rem; }
.price { color: var(--green); font-weight: bold; }
.badge {
  display: inline-block; font-size: 0.75rem; background: var(--gold); color: var(--brown);
  border-radius: 20px; padding: 2px 10px; font-weight: bold; margin-left: 6px; vertical-align: middle;
}
h2.section { border-bottom: 2px solid var(--gold); padding-bottom: 6px; }
form.stack { display: grid; gap: 12px; max-width: 560px; }
label { font-weight: bold; display: grid; gap: 4px; }
input, select, textarea {
  font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; background: #fff;
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkline { display: flex; align-items: center; gap: 8px; font-weight: normal; }
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.detail .photos img { width: 100%; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 10px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; margin: 14px 0; }
.kv dt { font-weight: bold; color: var(--brown-soft); }
.kv dd { margin: 0; }
.offer-box { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 14px; }
.status { font-size: 0.8rem; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; }
.status.pending { color: #b07d10; } .status.accepted { color: var(--green); }
.status.declined, .status.superseded { color: #999; }
.alert { background: #fff4d6; border: 1px solid var(--gold); border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; }
.error { background: #fdecea; border: 1px solid #c0392b; border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; }
.site-footer { border-top: 2px solid var(--line); padding: 22px 0 34px; color: var(--brown-soft); }
.site-footer .fine { font-size: 0.85rem; font-style: italic; }
.searchbar { display: flex; gap: 8px; margin-bottom: 18px; }
.searchbar input { flex: 1; }
@media (max-width: 700px) { .detail { grid-template-columns: 1fr; } .row2 { grid-template-columns: 1fr; } }

/* Trade-loop visualization */
.loopviz { width: 100%; max-width: 340px; display: block; margin: 6px auto 4px; }
.viz-node { fill: #fffdf7; stroke: #c9962e; stroke-width: 2.5; }
.viz-name { font-size: 11px; font-weight: bold; fill: #4a2f1d; font-family: Georgia, serif; }
.viz-cash { font-size: 10px; fill: #2e7d32; font-family: Georgia, serif; }
.viz-item { font-size: 10px; fill: #6b4a2f; font-style: italic; font-family: Georgia, serif; }
.looptable { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.9rem; }
.looptable th, .looptable td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.looptable th { background: #f3ead2; }
