/* BioCatalyst Radar — Public Frontend Styles */
:root {
  --bg:          #0d1117;
  --bg-card:     #161b22;
  --bg-input:    #1e2d3d;
  --border:      #1e2d3d;
  --border-soft: #2a3a4a;
  --text:        #c9d1d9;
  --text-muted:  #8b949e;
  --text-dim:    #4a5568;
  --accent:      #58a6ff;
  --accent-dim:  #1a3a5c;
  --green:       #3fb950;
  --yellow:      #e3b341;
  --red:         #f85149;
  --orange:      #d29922;
  --radius:      6px;
  --radius-lg:   10px;
  --font-mono:   'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navigation ──────────────────────────────────────────────────────────── */
.nav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  white-space: nowrap;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  flex: 1;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }
.nav-cta {
  margin-left: auto;
  background: var(--accent);
  color: #fff !important;
  padding: 6px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity .15s;
}
.nav-cta:hover { opacity: .85; text-decoration: none !important; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 64px;
  text-align: center;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: #e6edf3;
  line-height: 1.25;
  margin-bottom: 20px;
}
.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 32px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity .15s;
  border: none;
  text-align: center;
}
.btn:hover { opacity: .85; text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-soft);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.card-title {
  font-weight: 600;
  color: #e6edf3;
  margin-bottom: 8px;
  font-size: 0.975rem;
}
.card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.card-body { color: var(--text); font-size: 0.875rem; line-height: 1.55; }

/* ── Score badges ────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.badge-high  { background: #3a1a1a; color: var(--red); }
.badge-med   { background: #2d2010; color: var(--yellow); }
.badge-low   { background: #1a2a1a; color: var(--green); }
.badge-demo  { background: #1e2a34; color: #7aa4c8; }
.badge-real  { background: #1a2d1a; color: var(--green); }

.score-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.score-track {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.score-fill { height: 100%; border-radius: 2px; background: var(--accent); }

/* ── Source status dots ─────────────────────────────────────────────────── */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.status-active { background: var(--green); }
.status-config { background: var(--yellow); }
.status-planned { background: var(--text-dim); }

/* ── Section header ─────────────────────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 40px;
}
.section-header h2 { font-size: 1.7rem; font-weight: 700; color: #e6edf3; margin-bottom: 8px; }
.section-header p { color: var(--text-muted); max-width: 520px; margin: 0 auto; }

/* ── Source bar ──────────────────────────────────────────────────────────── */
.source-bar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 32px 0;
}
.source-item { font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }

/* ── Pricing ─────────────────────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.pricing-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px 24px; }
.pricing-card.featured { border-color: var(--accent); }
.pricing-name { font-weight: 700; color: #e6edf3; margin-bottom: 4px; }
.pricing-price { font-size: 1.6rem; font-weight: 700; color: var(--accent); margin: 8px 0 4px; }
.pricing-note { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 16px; }
.pricing-features { list-style: none; }
.pricing-features li { font-size: 0.85rem; color: var(--text); padding: 5px 0; border-bottom: 1px solid var(--border); }
.pricing-features li::before { content: "✓ "; color: var(--green); }

/* ── Form ────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; }
input, select, textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 80px; }

/* ── Compliance footer ───────────────────────────────────────────────────── */
.compliance {
  background: #0a1220;
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ── Utility ─────────────────────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }
.hidden { display: none; }
.loading { color: var(--text-muted); font-size: 0.875rem; }

/* ── Demo tier badge ─────────────────────────────────────────────────────── */
.demo-banner {
  background: #0e1a2b;
  border-bottom: 1px solid #1a3a5c;
  padding: 6px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: #8b949e;
}
.demo-banner .tier-badge {
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
}
.demo-banner .tier-badge.free         { background: #1e2d3d; color: #8b949e; }
.demo-banner .tier-badge.pro          { background: #1a3a5c; color: #58a6ff; }
.demo-banner .tier-badge.premium      { background: #2d2010; color: #e3b341; }
.demo-banner .tier-badge.institutional{ background: #1a2d1a; color: #3fb950; }
.demo-banner .demo-warn               { color: #4a5568; margin-left: auto; }
.demo-banner .logout-btn {
  background: transparent;
  border: 1px solid #1e2d3d;
  color: #4a5568;
  padding: 2px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: color .15s, border-color .15s;
}
.demo-banner .logout-btn:hover { color: #c9d1d9; border-color: #4a5568; }

/* ── Dashboard sections ──────────────────────────────────────────────────── */
.dash-section { margin-bottom: 40px; }
.dash-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #e6edf3;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #1e2d3d;
  display: flex;
  align-items: center;
  gap: 8px;
}
.locked-feature {
  background: #0d1117;
  border: 1px dashed #1e2d3d;
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  color: #4a5568;
}
.locked-feature .lock-icon { font-size: 1.5rem; margin-bottom: 8px; }
.locked-feature .lock-tier { color: var(--accent); font-size: 0.85rem; margin-top: 6px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding: 48px 0 40px; }
  .section { padding: 40px 0; }
  .demo-banner { flex-wrap: wrap; gap: 6px; }
}
