/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --text-primary: #f0f0f5;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --purple: #8023C3;
  --purple-dark: #6B1DA3;
  --purple-light: #9B4DDB;
  --purple-glow: rgba(128, 35, 195, 0.15);
  --border: rgba(255, 255, 255, 0.08);
  --nav-bg: rgba(10, 10, 15, 0.8);
  --code-header-bg: rgba(255, 255, 255, 0.03);
  --code-dot-muted: rgba(255, 255, 255, 0.15);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fb;
  --bg-card: #f1f3f5;
  --bg-card-hover: #e9ecef;
  --text-primary: #111118;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --purple: #8023C3;
  --purple-dark: #6B1DA3;
  --purple-light: #9B4DDB;
  --purple-glow: rgba(128, 35, 195, 0.1);
  --border: rgba(0, 0, 0, 0.08);
  --nav-bg: rgba(255, 255, 255, 0.85);
  --code-header-bg: rgba(0, 0, 0, 0.03);
  --code-dot-muted: rgba(0, 0, 0, 0.15);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1.1rem;
}

.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--purple);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Logo theme switching */
.nav-logo .logo-dark { display: none; }
.nav-logo .logo-light { display: block; }
.footer-logo .logo-dark { display: none; }
.footer-logo .logo-light { display: block; }

[data-theme="light"] .nav-logo .logo-dark { display: block; }
[data-theme="light"] .nav-logo .logo-light { display: none; }
[data-theme="light"] .footer-logo .logo-dark { display: block; }
[data-theme="light"] .footer-logo .logo-light { display: none; }

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(12px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.nav-logo img {
  height: 40px;
}

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

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links .btn-sm {
  padding: 0.4rem 1rem;
  background: var(--purple);
  color: white;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: opacity 0.2s;
}

.nav-links .btn-sm:hover {
  opacity: 0.9;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.active { display: flex; }
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 6rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--purple-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 800px;
}

.hero-logo {
  margin-bottom: 2rem;
}

.hero-logo img {
  height: 96px;
}

.hero-logo .logo-dark { display: none; }
.hero-logo .logo-light { display: block; margin: 0 auto; }

[data-theme="light"] .hero-logo .logo-dark { display: block; margin: 0 auto; }
[data-theme="light"] .hero-logo .logo-light { display: none; }

/* Ecosystem link */
.hero-ecosystem {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.hero-ecosystem:hover {
  color: var(--purple-light);
}

[data-theme="light"] .hero-ecosystem:hover {
  color: var(--purple-dark);
}

.hero-ecosystem img {
  height: 24px;
  width: 24px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--purple-light), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="light"] .hero h1 .highlight {
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  -webkit-background-clip: text;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--purple);
  color: white;
}

.btn-primary:hover {
  background: var(--purple-dark);
  box-shadow: 0 0 30px var(--purple-glow);
}

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

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(128, 35, 195, 0.3);
}

/* Sections */
section {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Features section needs extra bottom breathing room before How It Works */
#features {
  padding-bottom: 10rem;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  justify-items: center;
}

.features-grid .feature-card:last-child:nth-child(3n+1) {
  grid-column: 2;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(128, 35, 195, 0.2);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--purple-glow);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* How It Works */
.how-it-works {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 2rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
}

/* Connecting lines between steps */
.steps::before {
  content: '';
  position: absolute;
  top: 24px;
  left: calc(16.67% + 24px);
  right: calc(16.67% + 24px);
  height: 2px;
  background: var(--border);
  z-index: 0;
}

@media (max-width: 768px) {
  .steps {
    grid-template-columns: 1fr;
  }
  .steps::before {
    display: none;
  }
}

.step {
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 48px;
  height: 48px;
  background: var(--purple);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 auto 1.25rem;
  position: relative;
  z-index: 2;
}

.step h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.step p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 280px;
  margin: 0 auto;
}

/* Code Block */
.code-section {
  padding: 6rem 0;
}

.code-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  max-width: 700px;
  margin: 0 auto;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--code-header-bg);
  border-bottom: 1px solid var(--border);
}

.code-dots {
  display: flex;
  gap: 6px;
}

.code-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--code-dot-muted);
}

.code-dots span:first-child { background: #ef4444; }
.code-dots span:nth-child(2) { background: #eab308; }
.code-dots span:last-child { background: #22c55e; }

.code-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.code-body {
  padding: 1.5rem;
  overflow-x: auto;
}

.code-body pre {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-primary);
}

.code-body .cmd {
  color: var(--purple-light);
}

[data-theme="light"] .code-body .cmd {
  color: var(--purple-dark);
}

.code-body .flag {
  color: #22c55e;
}

[data-theme="light"] .code-body .flag {
  color: #16a34a;
}

.code-body .string {
  color: #fbbf24;
}

[data-theme="light"] .code-body .string {
  color: #d97706;
}

.code-body .comment {
  color: var(--text-secondary);
}

/* Evaluators CTA (homepage) */
.evaluators-cta {
  padding: 6rem 0;
}

.evaluators-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin: 0 auto;
  max-width: 960px;
}

.evaluators-cta-inner:hover {
  border-color: rgba(128, 35, 195, 0.2);
}

.evaluators-cta-text h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.evaluators-cta-text p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 500px;
}

.evaluators-cta-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .evaluators-cta-inner {
    flex-direction: column;
    text-align: center;
  }
  .evaluators-cta-text p {
    max-width: 100%;
  }
  .evaluators-cta-actions {
    justify-content: center;
  }
}

/* Interfaces Section */
.interfaces {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.interfaces-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 700px;
  margin: 0 auto;
}

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

.interface-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s;
}

.interface-card:hover {
  border-color: rgba(128, 35, 195, 0.2);
  transform: translateY(-2px);
}

.interface-icon {
  font-size: 2.5rem;
  margin-bottom: 1.25rem;
}

.interface-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.interface-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* CTA */
.cta {
  text-align: center;
  padding: 8rem 2rem;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  bottom: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--purple-glow) 0%, transparent 70%);
  pointer-events: none;
}

.cta-content {
  position: relative;
}

.cta h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.cta p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo img {
  height: 28px;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text-secondary);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* SVG Icons */
.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
}

/* ========== Docs ========== */

.docs-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 65px;
  max-width: 1400px;
  margin: 0 auto;
}

.docs-sidebar {
  width: 260px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--bg-secondary);
  position: sticky;
  top: 65px;
  height: calc(100vh - 65px);
  overflow-y: auto;
}

.docs-sidebar-inner {
  padding: 2rem 1.5rem;
}

.docs-sidebar h3 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.docs-nav {
  list-style: none;
}

.docs-nav li {
  margin-bottom: 0.25rem;
}

.docs-nav a {
  display: block;
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: all 0.2s;
}

.docs-nav a:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.docs-nav a.active {
  color: var(--purple);
  background: var(--purple-glow);
  font-weight: 500;
}

.docs-main {
  flex: 1;
  min-width: 0;
}

.docs-content {
  max-width: 960px;
  padding: 3rem 4rem;
}

.docs-content h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.docs-intro {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

/* Docs index cards */
.docs-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.docs-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: all 0.2s;
}

.docs-card:hover {
  border-color: rgba(128, 35, 195, 0.3);
  transform: translateY(-2px);
}

.docs-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.docs-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Docs article content */
.docs-article h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.docs-article h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.docs-article p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.docs-article ul,
.docs-article ol {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  line-height: 1.7;
}

.docs-article li {
  margin-bottom: 0.35rem;
}

.docs-article code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-card);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.docs-article .highlight {
  margin-bottom: 1.5rem;
}

.docs-article pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.docs-article pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-primary);
}

/* Chroma syntax highlighting — dark theme (default) */
.highlight pre { background: var(--bg-secondary); }
.highlight .chroma { background: var(--bg-secondary); color: var(--text-primary); }
.chroma .line { display: flex; }
.chroma .cl { /* code line */ }
.chroma .c, .chroma .ch, .chroma .cm, .chroma .c1, .chroma .cs,
.chroma .cp, .chroma .cpf { color: #75715e; } /* comments */
.chroma .k, .chroma .kc, .chroma .kd, .chroma .kn, .chroma .kp,
.chroma .kr { color: #66d9ef; } /* keywords */
.chroma .kt { color: #66d9ef; } /* keyword type */
.chroma .n, .chroma .ni, .chroma .nl, .chroma .nn, .chroma .nx,
.chroma .py { color: #f8f8f2; } /* names */
.chroma .na { color: #a6e22e; } /* name attribute */
.chroma .nb { color: #f8f8f2; } /* name builtin */
.chroma .nc { color: #a6e22e; } /* name class */
.chroma .nf, .chroma .fm { color: #a6e22e; } /* name function */
.chroma .no { color: #66d9ef; } /* name constant */
.chroma .nv, .chroma .vc, .chroma .vg, .chroma .vi, .chroma .vm { color: #f8f8f2; } /* variables */
.chroma .o, .chroma .ow { color: #f92672; } /* operators */
.chroma .p { color: #f8f8f2; } /* punctuation */
.chroma .s, .chroma .sa, .chroma .sb, .chroma .sc, .chroma .dl,
.chroma .s2, .chroma .sh, .chroma .s1, .chroma .ss { color: #e6db74; } /* strings */
.chroma .se { color: #ae81ff; } /* string escape */
.chroma .si { color: #e6db74; } /* string interpol */
.chroma .m, .chroma .mb, .chroma .mf, .chroma .mh, .chroma .mi,
.chroma .mo, .chroma .il { color: #ae81ff; } /* numbers */

/* Chroma syntax highlighting — light theme */
[data-theme="light"] .chroma { background: var(--bg-secondary); color: var(--text-primary); }
[data-theme="light"] .chroma .c, [data-theme="light"] .chroma .ch,
[data-theme="light"] .chroma .cm, [data-theme="light"] .chroma .c1,
[data-theme="light"] .chroma .cs, [data-theme="light"] .chroma .cp,
[data-theme="light"] .chroma .cpf { color: #6a737d; }
[data-theme="light"] .chroma .k, [data-theme="light"] .chroma .kc,
[data-theme="light"] .chroma .kd, [data-theme="light"] .chroma .kn,
[data-theme="light"] .chroma .kp, [data-theme="light"] .chroma .kr { color: #d73a49; }
[data-theme="light"] .chroma .kt { color: #d73a49; }
[data-theme="light"] .chroma .n, [data-theme="light"] .chroma .ni,
[data-theme="light"] .chroma .nl, [data-theme="light"] .chroma .nn,
[data-theme="light"] .chroma .nx, [data-theme="light"] .chroma .py { color: #24292e; }
[data-theme="light"] .chroma .na { color: #6f42c1; }
[data-theme="light"] .chroma .nb { color: #005cc5; }
[data-theme="light"] .chroma .nc { color: #6f42c1; }
[data-theme="light"] .chroma .nf, [data-theme="light"] .chroma .fm { color: #6f42c1; }
[data-theme="light"] .chroma .no { color: #005cc5; }
[data-theme="light"] .chroma .nv, [data-theme="light"] .chroma .vc,
[data-theme="light"] .chroma .vg, [data-theme="light"] .chroma .vi,
[data-theme="light"] .chroma .vm { color: #e36209; }
[data-theme="light"] .chroma .o, [data-theme="light"] .chroma .ow { color: #d73a49; }
[data-theme="light"] .chroma .p { color: #24292e; }
[data-theme="light"] .chroma .s, [data-theme="light"] .chroma .sa,
[data-theme="light"] .chroma .sb, [data-theme="light"] .chroma .sc,
[data-theme="light"] .chroma .dl, [data-theme="light"] .chroma .s2,
[data-theme="light"] .chroma .sh, [data-theme="light"] .chroma .s1,
[data-theme="light"] .chroma .ss { color: #032f62; }
[data-theme="light"] .chroma .se { color: #032f62; }
[data-theme="light"] .chroma .si { color: #032f62; }
[data-theme="light"] .chroma .m, [data-theme="light"] .chroma .mb,
[data-theme="light"] .chroma .mf, [data-theme="light"] .chroma .mh,
[data-theme="light"] .chroma .mi, [data-theme="light"] .chroma .mo,
[data-theme="light"] .chroma .il { color: #005cc5; }

.docs-article table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.docs-article th {
  text-align: left;
  padding: 0.6rem 1rem;
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  color: var(--text-primary);
}

.docs-article td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.docs-article td code {
  font-size: 0.8rem;
}

.docs-article blockquote {
  border-left: 3px solid var(--purple);
  padding: 0.75rem 1.25rem;
  margin: 1rem 0 1.5rem;
  background: var(--purple-glow);
  border-radius: 0 8px 8px 0;
}

.docs-article blockquote p {
  margin-bottom: 0.5rem;
}

.docs-article blockquote p:last-child {
  margin-bottom: 0;
}

.docs-article hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

.docs-article strong {
  color: var(--text-primary);
  font-weight: 600;
}

@media (max-width: 768px) {
  .docs-layout {
    flex-direction: column;
  }

  .docs-sidebar {
    width: 100%;
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .docs-content {
    padding: 2rem 1.5rem;
  }

  .docs-cards {
    grid-template-columns: 1fr;
  }
}

/* ========== Evaluators Registry ========== */

.eval-registry {
  padding-top: 100px;
  padding-bottom: 4rem;
  min-height: 100vh;
}

.eval-header {
  text-align: center;
  margin-bottom: 2rem;
}

.eval-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.eval-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.eval-header-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.eval-search-wrapper {
  flex: 1;
  max-width: 400px;
}

.eval-search {
  width: 100%;
  padding: 0.65rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.eval-search::placeholder {
  color: var(--text-muted);
}

.eval-search:focus {
  border-color: var(--purple);
}

/* Stats bar */
.eval-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.eval-stat strong {
  color: var(--text-primary);
}

.eval-stat-sep {
  color: var(--border);
}

.eval-stat-link {
  color: var(--purple-light);
  transition: color 0.2s;
}

[data-theme="light"] .eval-stat-link {
  color: var(--purple-dark);
}

.eval-stat-link:hover {
  color: var(--purple);
}

/* Evaluator Grid */
.eval-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

@media (max-width: 1024px) {
  .eval-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Evaluator Card */
.eval-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
}

.eval-card:hover {
  border-color: rgba(128, 35, 195, 0.3);
  transform: translateY(-2px);
}

.eval-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.eval-card-icon {
  flex-shrink: 0;
}

.lang-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--purple-glow);
  color: var(--purple-light);
}

[data-theme="light"] .lang-icon {
  color: var(--purple-dark);
}

.lang-icon.lang-python {
  background: rgba(53, 114, 165, 0.15);
  color: #3572a5;
}

.lang-icon.lang-js {
  background: rgba(241, 224, 90, 0.15);
  color: #f1e05a;
}

.lang-icon.lang-ts {
  background: rgba(49, 120, 198, 0.15);
  color: #3178c6;
}

.eval-card-meta h3 {
  font-size: 1.05rem;
  font-weight: 600;
  font-family: var(--font-mono);
  line-height: 1.3;
  word-break: break-word;
}

.eval-card-author {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.eval-card-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
  flex: 1;
  margin-bottom: 1rem;
}

.eval-card-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.eval-tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.eval-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.eval-card-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--purple-light);
  transition: color 0.2s;
}

[data-theme="light"] .eval-card-link {
  color: var(--purple-dark);
}

.eval-card-link:hover {
  color: var(--purple);
}

.eval-card-lang {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Empty state */
.eval-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  font-size: 1rem;
}

/* How to use */
.eval-howto {
  border-top: 1px solid var(--border);
  padding-top: 4rem;
  margin-bottom: 4rem;
}

.eval-howto h2 {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2.5rem;
  letter-spacing: -0.01em;
}

.eval-howto-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .eval-howto-grid {
    grid-template-columns: 1fr;
  }
}

.eval-howto-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}

.eval-howto-step .step-number {
  width: 36px;
  height: 36px;
  background: var(--purple);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.eval-howto-step h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.eval-howto-code {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
}

.eval-howto-code pre {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0;
}

.eval-howto-code pre .cmd { color: var(--purple-light); }
[data-theme="light"] .eval-howto-code pre .cmd { color: var(--purple-dark); }
.eval-howto-code pre .flag { color: #22c55e; }
[data-theme="light"] .eval-howto-code pre .flag { color: #16a34a; }
.eval-howto-code pre .string { color: #fbbf24; }
[data-theme="light"] .eval-howto-code pre .string { color: #d97706; }

.eval-howto-note {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.eval-howto-note code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--bg-card-hover);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}

/* Submit CTA */
.eval-cta {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.eval-cta h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.eval-cta > p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.eval-cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* Nav active state */
.nav-active {
  color: var(--purple-light) !important;
}

[data-theme="light"] .nav-active {
  color: var(--purple-dark) !important;
}
