:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --border: #e2e8f0;
  --shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 4px 10px -5px rgba(15, 23, 42, 0.04);

  --code-bg: #0f172a;
  --code-text: #e2e8f0;

  --badge-category-bg: #eef2ff;
  --badge-category-text: #4f46e5;

  --status-supported-bg: #dcfce7;
  --status-supported-text: #166534;
  --status-planned-bg: #fef9c3;
  --status-planned-text: #854d0e;
  --status-not-yet-bg: #f1f5f9;
  --status-not-yet-text: #64748b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  gap: 1rem;
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

/* Hero */
.hero {
  padding: 5rem 0 3.5rem;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 1.5rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.75rem;
  text-decoration: none;
  transition: all 0.15s;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

#health {
  font-size: 0.875rem;
  color: var(--text-muted);
  min-height: 1.5rem;
}

/* Modules */
.modules {
  padding: 2rem 0 5rem;
}

.modules h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

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

.module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, transform 0.15s;
}

.module-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.module-card h3 {
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
  color: var(--text-primary);
}

.module-card p {
  color: var(--text-secondary);
  margin: 0 0 1.25rem;
  line-height: 1.6;
}

.module-link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent);
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

/* Compare table */
.compare-table-wrapper {
  overflow-x: auto;
  margin-bottom: 4rem;
}

.compare-table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  font-size: 0.9375rem;
}

.compare-table th,
.compare-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.compare-table th {
  background: var(--bg);
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.compare-table tbody tr:last-child td {
  border-bottom: none;
}

.compare-table td code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  background: var(--badge-category-bg);
  color: var(--badge-category-text);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

.compare-aspect {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .nav {
    height: auto;
    padding: 1rem 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .hero {
    padding: 3rem 0 2rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }
}
