:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --ink: #16181d;
  --muted: #5d6370;
  --line: #e4e4de;
  --brand: #0f9d58;
  --brand-dark: #0b7a44;
  --brand-soft: #eef7f1;
  --accent: #ffcc33;
  --hot: #d9480f;
  --hot-soft: #fff1e8;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
a { color: inherit; }

/* Buttons */
.btn {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: .8em 1.4em;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-small { padding: .5em 1em; font-size: .9rem; }
.link { background: none; border: 0; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(250,250,247,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 800; font-size: 1.3rem; text-decoration: none; letter-spacing: -.02em; }
.logo span { color: var(--brand); }
.nav nav { display: flex; align-items: center; gap: 16px; }
.nav nav a { text-decoration: none; color: var(--muted); font-weight: 500; }
.nav nav a:hover { color: var(--ink); }

/* Hero */
.hero { padding: 72px 0 48px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: var(--brand); margin: 0 0 12px; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); letter-spacing: -.03em; }
.hero h1 span { background: linear-gradient(transparent 62%, var(--accent) 62%); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 620px; }
.quick-post {
  display: flex; gap: 8px; max-width: 680px; margin: 28px 0 10px;
  background: var(--surface); padding: 8px; border-radius: 999px;
  border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(0,0,0,.06);
}
.quick-post input { border: 0; background: transparent; }
.quick-post input:focus { outline: none; }
.quick-post > input { flex: 1; padding-left: 16px; }
.qp-price { display: flex; align-items: center; border-left: 1px solid var(--line); padding-left: 12px; width: 150px; }
.qp-price span { color: var(--muted); font-weight: 600; }
.hero-sub { margin: 0 0 36px; color: var(--muted); padding-left: 16px; }
.hero-sub a { color: var(--brand); font-weight: 600; text-decoration: none; }
.stats { display: flex; flex-wrap: wrap; gap: 40px; }
.stats strong { display: block; font-size: 1.8rem; }
.stats span { color: var(--muted); font-size: .9rem; }

/* Demand pulse */
.pulse { border-top: 1px solid var(--line); padding: 14px 0; }
.pulse-inner { display: flex; align-items: center; gap: 12px; overflow-x: auto; }
.pulse-label { font-weight: 700; font-size: .9rem; white-space: nowrap; }
.chips { display: flex; gap: 8px; }
.chip {
  white-space: nowrap; border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 6px 12px; font: inherit; font-size: .85rem; cursor: pointer; color: var(--ink);
}
.chip:hover { border-color: var(--brand); }
.chip b { color: var(--brand); }

/* How */
.how { padding: 64px 0; background: var(--surface); border-block: 1px solid var(--line); }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 24px; }
.how-col { padding: 28px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); }
.how-col ol { padding-left: 1.2em; margin: 0; }
.how-col li { margin-bottom: .8em; color: var(--muted); }
.how-col li b { color: var(--ink); }

/* Board */
.board { padding: 64px 0; }
.board-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.board-head h2 { margin: 0; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
input, select, textarea {
  font: inherit;
  padding: .6em .8em;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  width: 100%;
}
.filters input[type=search], .filters select { width: auto; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.check { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 6px; font-weight: 500 !important; font-size: .9rem; cursor: pointer; }
.check input { width: auto; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow .15s, transform .15s;
}
.card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.06); transform: translateY(-2px); }
.card-top { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.price { font-size: 1.6rem; font-weight: 800; color: var(--brand); white-space: nowrap; text-align: right; }
.price small { font-size: .75rem; font-weight: 600; color: var(--muted); display: block; }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; background: var(--brand-soft); color: var(--brand-dark); padding: 2px 10px; border-radius: 999px; }
.card h3 { font-size: 1.1rem; margin: 0; }
.card p { margin: 0; color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.badge.hot { background: var(--hot-soft); border-color: transparent; color: var(--hot); }
.buyer { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: .75rem; font-weight: 700; }
.verified { color: var(--brand); font-weight: 600; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; color: var(--muted); margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.card .btn { width: 100%; margin-top: 8px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* Alert band */
.alert-band { background: var(--brand-soft); padding: 48px 0; }
.alert-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.alert-inner p { margin: 0; color: var(--muted); }

/* Safety */
.safety { padding: 64px 0; }
.safety-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 24px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.tile span { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; margin-bottom: 10px; }
.tile h3 { font-size: 1.05rem; }
.tile p { margin: 0; color: var(--muted); font-size: .92rem; }
.tip { margin: 24px 0 0; padding: 14px 18px; border-radius: 10px; background: var(--hot-soft); color: #7a2e0b; }

/* CTA */
.cta { background: var(--ink); color: #fff; padding: 72px 0; text-align: center; }
.cta p { color: #b8bcc6; max-width: 520px; margin: 0 auto 24px; }

.footer { padding: 24px 0; color: var(--muted); font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

/* Dialogs */
dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(560px, calc(100% - 32px)); max-height: calc(100vh - 32px); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(10,12,16,.5); }
dialog form { padding: 28px; display: flex; flex-direction: column; gap: 14px; }
dialog label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; font-weight: 600; }
dialog small { font-weight: 400; color: var(--muted); }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; }
legend { font-size: .9rem; font-weight: 600; padding: 0 4px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actions { display: flex; justify-content: end; gap: 8px; margin-top: 8px; }
.muted { color: var(--muted); margin: 0; }
.previews { display: flex; gap: 8px; flex-wrap: wrap; }
.previews img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.previews:empty { display: none; }
.warn { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--hot-soft); color: #7a2e0b; font-size: .88rem; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 120px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px;
  transition: transform .25s; z-index: 50; max-width: calc(100% - 32px);
}
.toast.show { transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .nav nav a, .nav nav .btn-ghost { display: none; }
}
@media (max-width: 640px) {
  .hero { padding: 48px 0 32px; }
  .quick-post { flex-direction: column; border-radius: var(--radius); }
  .quick-post > input { padding-left: 8px; }
  .qp-price { width: auto; border-left: 0; border-top: 1px solid var(--line); padding: 4px 0 0 8px; }
  .hero-sub { padding-left: 0; }
  .row { grid-template-columns: 1fr; }
  .filters, .filters input[type=search], .filters select { width: 100%; }
}
