:root {
  color-scheme: light;
  --page-plane: #f9f9f7;
  --surface-1: #fcfcfb;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #898781;
  --border: rgba(11, 11, 11, 0.10);
  --gridline: #e1e0d9;
  --accent: #2a78d6;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page-plane: #0d0d0d;
    --surface-1: #1a1a19;
    --text-primary: #ffffff;
    --text-secondary: #c3c2b7;
    --text-muted: #898781;
    --border: rgba(255, 255, 255, 0.10);
    --gridline: #2c2c2a;
    --accent: #3987e5;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page-plane: #0d0d0d;
  --surface-1: #1a1a19;
  --text-primary: #ffffff;
  --text-secondary: #c3c2b7;
  --text-muted: #898781;
  --border: rgba(255, 255, 255, 0.10);
  --gridline: #2c2c2a;
  --accent: #3987e5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-plane);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

header.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 40px;
}

header.hero h1 {
  font-size: 28px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

header.hero p {
  margin: 0;
  color: var(--text-secondary);
  max-width: 46ch;
}

#theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  flex: none;
}

#theme-toggle:hover {
  color: var(--text-primary);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 40px;
}

.stat-tile {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}

.stat-tile .value {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
}

.stat-tile .label {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-muted);
}

.flow-note {
  font-size: 14px;
  color: var(--text-secondary);
  border-left: 2px solid var(--accent);
  padding-left: 14px;
  margin: 0 0 40px;
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.agent-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.agent-card .top-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.agent-card h2 {
  font-size: 19px;
  margin: 0;
}

.agent-card .role {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.agent-card .tagline {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 12px;
}

.agent-card .description {
  font-size: 14px;
  color: var(--text-primary);
  margin: 0 0 16px;
}

.agent-card .tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.agent-card .tag-list li {
  font-size: 12px;
  color: var(--text-secondary);
  border: 1px solid var(--gridline);
  border-radius: 999px;
  padding: 3px 10px;
}

footer {
  margin-top: 48px;
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .agent-grid {
    grid-template-columns: 1fr;
  }
  header.hero {
    flex-direction: column;
  }
}
