:root {
  --bg: #0f1117;
  --surface: #181b24;
  --border: #2a3040;
  --text: #e8ecf4;
  --muted: #8b95a8;
  --accent: #f26522;
  --accent-dim: #c44e14;
  --green: #3dd68c;
  --blue: #5b9cf5;
  --font: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: var(--blue);
}

header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  background: linear-gradient(180deg, #1a1f2e 0%, var(--bg) 100%);
}

header h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

header p {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  max-width: 72ch;
}

.disclaimer {
  margin-top: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: rgba(242, 101, 34, 0.12);
  border: 1px solid rgba(242, 101, 34, 0.35);
  border-radius: 6px;
  font-size: 0.78rem;
  color: #f0c4a8;
}

main {
  padding: 1.25rem 1.5rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

.stat-card .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.stat-card .value {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 0.2rem;
}

.stat-card .value.ok {
  color: var(--green);
}

.stat-card .value.warn {
  color: var(--accent);
}

.pipeline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.75rem;
}

.pipeline span {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.pipeline span.done {
  border-color: var(--green);
  color: var(--green);
}

.pipeline span.pending {
  color: var(--muted);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
  align-items: center;
}

.toolbar input,
.toolbar select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
}

.toolbar input {
  min-width: 200px;
  flex: 1;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

thead {
  background: #1e2433;
}

th,
td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover {
  background: rgba(91, 156, 245, 0.08);
}

.tag {
  display: inline-block;
  font-size: 0.68rem;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  background: #252b3a;
  margin-right: 0.25rem;
  color: var(--muted);
}

.tag.ai-native {
  color: #7ee787;
  background: rgba(61, 214, 140, 0.15);
}

.tag.ai-feature {
  color: #79c0ff;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(480px, 100vw);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
  transform: translateX(100%);
  transition: transform 0.2s ease;
  z-index: 100;
  overflow-y: auto;
  padding: 1.25rem;
}

.drawer.open {
  transform: translateX(0);
}

.drawer h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.drawer .close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.25rem;
  cursor: pointer;
}

.drawer section {
  margin-top: 1.25rem;
}

.drawer h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.founder-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.65rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.tag-row {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem;
  margin-bottom: 0.5rem;
  font-size: 0.78rem;
}

.tag-row .evidence {
  color: var(--muted);
  font-style: italic;
  margin-top: 0.25rem;
}

.loading,
.error-banner {
  padding: 1rem;
  text-align: center;
  color: var(--muted);
}

.error-banner {
  color: #ff8a8a;
  background: rgba(255, 80, 80, 0.1);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 99;
}

.overlay.open {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 768px) {
  table {
    font-size: 0.75rem;
  }
  .hide-sm {
    display: none;
  }
}
