:root {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --border: #cbd5e1;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --go-bg: #dcfce7;
  --go-ink: #166534;
  --rev-bg: #fef3c7;
  --rev-ink: #92400e;
  --pass-bg: #e2e8f0;
  --pass-ink: #334155;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.topbar {
  background: #0f172a;
  color: #fff;
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid #1e293b;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
}

.logo-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 12px #38bdf8;
}

.badge-pill {
  font-size: 11px;
  font-weight: 600;
  background: #1e293b;
  color: #7dd3fc;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid #334155;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-btn, .nav-link {
  background: transparent;
  color: #cbd5e1;
  border: 1px solid transparent;
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.nav-btn.active {
  background: var(--accent);
  color: #fff;
}

.nav-btn:hover:not(.active), .nav-link:hover {
  background: #1e293b;
  color: #fff;
}

main { padding: 24px 0 60px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.card {
  background: var(--surface);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.hero {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 24px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 8px;
}

h1 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.22;
}

h2, h3, h4 { margin-top: 0; }
.subtitle { color: var(--muted); margin: 0 0 18px; }

.scan-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

input, select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
}

.scan-form input:first-child { flex: 2; min-width: 220px; }
.scan-form input:nth-child(2) { flex: 1; min-width: 140px; }

.hero-stats {
  display: grid;
  gap: 10px;
}

.stat-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
}

.stat-label { font-size: 12px; color: var(--muted); display: block; }
.stat-val { font-size: 22px; display: block; }
.stat-sub { font-size: 12px; color: var(--muted); }

.section { margin-top: 24px; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  padding: 9px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn.primary:hover { background: var(--accent-dark); }
.btn.small { padding: 6px 10px; font-size: 12px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

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

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px;
}

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

.stack-form { display: grid; gap: 12px; }
.stack-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stack-list { display: grid; gap: 10px; }

.item-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  background: #fff;
}

.item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.pill.go { background: var(--go-bg); color: var(--go-ink); }
.pill.review { background: var(--rev-bg); color: var(--rev-ink); }
.pill.pass { background: var(--pass-bg); color: var(--pass-ink); }
.pill.live { background: #dbeafe; color: #1e40af; }
.pill.seed { background: #f1f5f9; color: #475569; }

.muted { color: var(--muted); font-size: 13px; }
.md-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  max-height: 360px;
  overflow: auto;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #0f172a;
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
  z-index: 50;
  max-width: 400px;
  font-size: 13px;
}

.hidden { display: none !important; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
}
