:root {
  --bg: #07080c;
  --bg-2: #0d1017;
  --panel: #121722;
  --line: rgba(232, 196, 124, 0.16);
  --gold: #e8c47c;
  --gold-2: #f3d9a4;
  --teal: #3ee0b2;
  --ink: #f4efe4;
  --muted: #9aa3b5;
  --danger: #ff6b8a;
  --ok: #3ee0b2;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Instrument Sans", system-ui, sans-serif;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(232, 196, 124, 0.12), transparent 50%),
    radial-gradient(900px 500px at 100% 0%, rgba(62, 224, 178, 0.08), transparent 45%),
    var(--bg);
  color: var(--ink);
  display: grid;
  grid-template-columns: 260px 1fr;
}

h1, h2, h3, .brand strong { font-family: Syne, sans-serif; letter-spacing: -0.03em; }
h1 { font-size: 32px; margin: 0; }
h2 { font-size: 20px; margin: 0 0 14px; }
p { color: var(--muted); line-height: 1.55; }
a { color: var(--gold); }
code { color: var(--gold-2); }

.nav {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: rgba(7, 8, 12, 0.9);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.brand { display: flex; gap: 12px; align-items: center; }
.mark {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold), #8d6b32);
  color: #1a1408; font-family: Syne, sans-serif; font-weight: 800;
}
.brand span { display: block; color: var(--muted); font-size: 12px; }
.nav nav { display: grid; gap: 6px; }
.nav button, .ghost, .primary, button {
  font: inherit; cursor: pointer; border: 0;
}
.nav button {
  text-align: left; padding: 11px 12px; border-radius: 12px;
  background: transparent; color: var(--muted);
}
.nav button.active, .nav button:hover { background: var(--panel); color: var(--ink); }
.nav-foot { margin-top: auto; font-size: 12px; color: var(--muted); padding: 10px; border: 1px dashed var(--line); border-radius: 12px; }
.nav-foot.ok { color: var(--ok); border-color: rgba(62, 224, 178, 0.35); }
.nav-foot.bad { color: var(--danger); border-color: rgba(255, 107, 138, 0.35); }

main { padding: 28px 36px 80px; min-width: 0; }
.top { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 28px; }
.top-actions { display: flex; gap: 10px; }
.view { display: none; }
.view.show { display: block; }

.primary, .ghost, button.primary {
  padding: 11px 16px; border-radius: 999px;
}
.primary {
  background: linear-gradient(135deg, var(--gold), #c9a15a);
  color: #1a1408; font-weight: 700;
}
.ghost, .card button:not(.primary) {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line) !important; border-radius: 999px; padding: 10px 14px;
}

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 28px; font-family: Syne, sans-serif; }
.stat span { color: var(--muted); font-size: 13px; }

.grid-2 { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 16px; }
.card, .post, .offer {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent 40%), var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
}
.steps { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 8px; }
.list, .stack { display: grid; gap: 12px; }
.lede { margin-top: 0; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
input, textarea, select {
  width: 100%; background: var(--bg-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit;
}
.check { display: flex; align-items: center; gap: 8px; padding-top: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chip {
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px;
  background: transparent; color: var(--muted); display: inline-flex; gap: 6px; align-items: center;
}
.chip.on, .chip:has(input:checked) { color: var(--ink); border-color: var(--gold); background: rgba(232, 196, 124, 0.08); }
.hint { font-size: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }

.post { display: grid; grid-template-columns: 140px 1fr; gap: 16px; }
.post img { width: 140px; height: 140px; object-fit: cover; border-radius: 16px; background: #000; }
.post-body { white-space: pre-wrap; color: var(--ink); }
.meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.pill { font-size: 11px; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); text-transform: uppercase; }
.pill.live { color: var(--ok); border-color: rgba(62,224,178,.4); }
.pill.failed { color: var(--danger); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.console-log {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  background: #050608;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  height: min(70vh, 640px);
  overflow: auto;
  line-height: 1.45;
}
.console-log .line { padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.console-log .k-sale { color: #3ee0b2; }
.console-log .k-ship { color: #e8c47c; }
.console-log .k-click, .console-log .k-view { color: #7ab8ff; }
.console-log .k-search, .console-log .k-filter { color: #ff9ad1; }
.console-log .k-cart, .console-log .k-checkout { color: #ffb347; }
.console-log .meta { color: #8b93a7; word-break: break-all; }

#toast {
  position: fixed; right: 24px; bottom: 24px; background: var(--ink); color: #111;
  padding: 12px 16px; border-radius: 14px; font-weight: 600; z-index: 20;
}

.public { display: block; padding: 48px 20px 80px; }
.public-hero, .public-copy, .lead-box { max-width: 860px; margin: 0 auto 28px; }
.public-hero h1 { font-size: 48px; }
.public-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.offer-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.kind, .eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; color: var(--gold); }
.price { font-size: 28px; color: var(--ink); }
.flash { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); }
.flash.ok { color: var(--ok); }
.lead-box { display: grid; gap: 10px; background: var(--panel); padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); }
body.bio { display: block; }
.bio-card { max-width: 420px; margin: 0 auto; text-align: center; }
.bio-card h1 { font-size: 36px; }
.bio-card .mark { margin: 0 auto 16px; }
.bio-stack { display: grid; gap: 10px; margin: 22px 0; text-align: left; }
.bio-link {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 16px 18px; border-radius: 18px; border: 1px solid var(--line);
  background: var(--panel); color: inherit; text-decoration: none;
}
.bio-link strong { display: block; color: var(--ink); }
.bio-link em { display: block; font-style: normal; color: var(--muted); font-size: 13px; }
.bio-link b { color: var(--gold); white-space: nowrap; }
.bio-link.free b { color: var(--teal); }
.funnel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.funnel div { background: var(--bg-2); padding: 12px; border-radius: 14px; border: 1px solid var(--line); }
.ad { margin-bottom: 12px; }
.connect-fields { display: grid; gap: 8px; margin: 12px 0; }

@media (max-width: 980px) {
  body { grid-template-columns: 1fr; }
  .nav { height: auto; position: relative; }
  .stats, .grid-2, .form-grid, .funnel, .post { grid-template-columns: 1fr; }
}
