:root {
  --bg: #1a1b26;
  --bg-surface: #24283b;
  --bg-highlight: #292e42;
  --border: #3b4261;
  --text: #c0caf5;
  --text-muted: #565f89;
  --text-bright: #e0e6ff;
  --accent: #7aa2f7;
  --accent-dim: #3d59a1;
  --green: #9ece6a;
  --red: #f7768e;
  --yellow: #e0af68;
  --orange: #ff9e64;
  --purple: #bb9af7;
  --cyan: #7dcfff;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

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

nav.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
nav.breadcrumb a { color: var(--text-muted); }
nav.breadcrumb a:hover { color: var(--accent); }

h1 {
  font-size: 2rem;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.4rem;
  color: var(--accent);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.1rem;
  color: var(--purple);
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
}

h4 {
  font-size: 1rem;
  color: var(--cyan);
  margin-top: 1.2rem;
  margin-bottom: 0.4rem;
}

p { margin-bottom: 1rem; }

.subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
}

ul, ol { margin-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.3rem; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: 0.9rem;
}
th {
  background: var(--bg-highlight);
  color: var(--text-bright);
  text-align: left;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  font-weight: 600;
}
td {
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--border);
  vertical-align: top;
}
tr:nth-child(even) td { background: var(--bg-surface); }

code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  background: var(--bg-highlight);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.88em;
  color: var(--green);
}

pre {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  margin: 1rem 0;
  font-size: 0.85rem;
  line-height: 1.5;
}
pre code {
  background: none;
  padding: 0;
  color: var(--text);
}

blockquote {
  border-left: 3px solid var(--accent-dim);
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  background: var(--bg-surface);
  border-radius: 0 6px 6px 0;
  color: var(--text-muted);
  font-style: italic;
}

.callout {
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin: 1.2rem 0;
}
.callout-warning {
  background: rgba(224, 175, 104, 0.08);
  border-left: 3px solid var(--yellow);
}
.callout-critical {
  background: rgba(247, 118, 142, 0.08);
  border-left: 3px solid var(--red);
}
.callout-success {
  background: rgba(158, 206, 106, 0.08);
  border-left: 3px solid var(--green);
}
.callout-info {
  background: rgba(122, 162, 247, 0.08);
  border-left: 3px solid var(--accent);
}
.callout strong { display: block; margin-bottom: 0.3rem; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--accent); }
.card h3 { margin-top: 0; color: var(--accent); font-size: 1rem; }
.card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0; }

.tag {
  display: inline-block;
  padding: 0.15em 0.5em;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 500;
}
.tag-green { background: rgba(158,206,106,0.15); color: var(--green); }
.tag-red { background: rgba(247,118,142,0.15); color: var(--red); }
.tag-yellow { background: rgba(224,175,104,0.15); color: var(--yellow); }
.tag-blue { background: rgba(122,162,247,0.15); color: var(--accent); }
.tag-purple { background: rgba(187,154,247,0.15); color: var(--purple); }

.nav-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}
.nav-footer a {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.sources {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.sources a { color: var(--text-muted); }
.sources a:hover { color: var(--accent); }

.toc {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
}
.toc h4 { color: var(--text-muted); margin: 0 0 0.5rem 0; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.toc ul { list-style: none; margin: 0; }
.toc li { margin-bottom: 0.2rem; }
.toc a { font-size: 0.9rem; }

.compare-cell-yes { color: var(--green); }
.compare-cell-no { color: var(--red); }
.compare-cell-partial { color: var(--yellow); }

.pipeline-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 0.8rem 0;
  padding: 0.8rem;
  background: var(--bg-surface);
  border-radius: 6px;
  border-left: 3px solid var(--accent-dim);
}
.pipeline-step .step-num {
  background: var(--accent-dim);
  color: var(--text-bright);
  min-width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.pipeline-step .step-content { flex: 1; }
.pipeline-step .step-content strong { color: var(--text-bright); }
.pipeline-step .step-time { color: var(--text-muted); font-size: 0.8rem; }
