﻿:root {
  --sidebar-w: 260px;
  --accent: #60a5fa;
  --accent-dark: #3b82f6;
  --accent-light: #3f5b8f;
  --bg: #0f1117;
  --surface: #1e2736;
  --border: #2d3a4a;
  --text: #e2e8f0;
  --text-muted: #9ca3af;
  --code-bg: #1e2736;
  --code-text: #e8edf3;
  --tag-bg: rgba(96,165,250,0.15);
  --tag-text: #60a5fa;
  --warn-bg: rgba(251,191,36,0.15);
  --warn-border: #fbbf24;
  --danger-bg: rgba(248,113,113,0.15);
  --danger-border: #f87171;
  --success-bg: rgba(74,222,128,0.15);
  --success-border: #4ade80;
  --radius: 6px;
  --shadow: 0 2px 8px rgba(0,0,0,0.3);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  color: var(--text);
  padding: 0;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  background: var(--accent-dark);
  padding: 18px 20px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: #fff;
  text-transform: uppercase;
}
.sidebar-brand span { display: block; font-size: 10px; font-weight: 400; opacity: 0.8; margin-top: 2px; letter-spacing: 0; text-transform: none; }
.sidebar-section { padding: 12px 20px 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.sidebar a {
  display: block;
  padding: 7px 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}
.sidebar a:hover { color: var(--text); background: rgba(96,165,250,0.1); }
.sidebar a.active { color: var(--accent); border-left-color: var(--accent); background: rgba(96,165,250,0.15); }
.sidebar a .badge { float: right; font-size: 10px; background: rgba(255,255,255,0.1); border-radius: 10px; padding: 1px 6px; margin-top: 2px; }

/* ── Main ── */
main {
  margin-left: var(--sidebar-w);
  max-width: 900px;
  padding: 40px 48px 80px;
  background: var(--bg);
  color: var(--text);
}

.page-header {
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}
.page-header .breadcrumb { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.page-header .breadcrumb a { color: var(--accent); text-decoration: none; }
.page-header h1 { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1.2; }
.page-header .subtitle { margin-top: 8px; color: var(--text-muted); font-size: 15px; }

h2 { font-size: 20px; font-weight: 700; margin: 36px 0 12px; color: var(--text); padding-bottom: 6px; border-bottom: 1px solid var(--border); }
h3 { font-size: 16px; font-weight: 600; margin: 24px 0 8px; color: var(--text); }
h4 { font-size: 14px; font-weight: 600; margin: 16px 0 6px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.5px; }

p { margin-bottom: 14px; color: var(--text-muted); }
ul, ol { margin: 0 0 14px 20px; color: var(--text-muted); }
li { margin-bottom: 4px; }
strong { color: var(--text); }

/* ── Code ── */
pre {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow-x: auto;
  margin: 16px 0;
  font-size: 13.5px;
  line-height: 1.6;
  box-shadow: var(--shadow);
}
code {
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}
p code, li code, td code {
  background: var(--code-bg);
  color: #93c5fd;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 13px;
}

/* ── Syntax colors (manual) ── */
.kw { color: #7ec8f5; }
.ty { color: #4ec9b0; }
.st { color: #ce9178; }
.cm { color: #6a9955; }
.nu { color: #b5cea8; }
.fn { color: #dcdcaa; }
.di { color: #f9c74f; font-weight: 600; }
.op { color: #c3a6e8; }
.pa { color: #9cdcfe; }

/* ── Callouts ── */
.callout {
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 18px 0;
  border-left: 4px solid;
  font-size: 14px;
}
.callout.info { background: rgba(96,165,250,0.1); border-color: var(--accent); color: var(--text); }
.callout.warn { background: var(--warn-bg); border-color: var(--warn-border); color: var(--text); }
.callout.danger { background: var(--danger-bg); border-color: var(--danger-border); color: var(--text); }
.callout.success { background: var(--success-bg); border-color: var(--success-border); color: var(--text); }
.callout strong { display: block; margin-bottom: 4px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; border: 1px solid var(--border); }
th { background: var(--accent); color: #fff; padding: 9px 12px; text-align: left; font-weight: 600; font-size: 13px; }
td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text); }
tr:hover td { background: rgba(96,165,250,0.05); }
tr:last-child td { border-bottom: none; }

/* ── Tags / Chips ── */
.tag {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 12px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 600;
  margin: 2px;
}
.tag.green { background: var(--success-bg); color: #1a7a50; }
.tag.orange { background: var(--warn-bg); color: #8a5a00; }
.tag.red { background: var(--danger-bg); color: #8a2020; }
.tag.gray { background: #eee; color: #555; }

/* ── Cards ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 20px 0; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow 0.15s, transform 0.15s;
}
.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.12); transform: translateY(-1px); }
.card .card-icon { font-size: 24px; margin-bottom: 10px; }
.card h3 { margin: 0 0 6px; font-size: 15px; color: var(--accent); }
.card p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ── Steps ── */
.steps { counter-reset: step; }
.step { display: flex; gap: 16px; margin-bottom: 24px; }
.step-num {
  counter-increment: step;
  width: 32px; height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}
.step-content { flex: 1; }
.step-content h3 { margin-top: 0; border: none; padding: 0; }

/* ── TOC ── */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 32px;
  font-size: 13.5px;
}
.toc h4 { margin: 0 0 10px; color: var(--text-muted); }
.toc ol { margin: 0; padding-left: 18px; }
.toc li { margin-bottom: 3px; }
.toc a { color: var(--accent); text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* ── Pipeline diagram ── */
.pipeline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin: 28px 0 16px;
  flex-wrap: wrap;
  padding: 20px;
  background: rgba(96,165,250,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
}
.pipeline-box {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 6px;
  padding: 12px 14px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  min-width: 130px;
  flex-shrink: 0;
}
.pipeline-box small { display: block; font-size: 11px; color: var(--text-muted); margin-top: 4px; font-weight: 400; }
.pipeline-arrow { color: var(--accent); font-size: 18px; padding: 0 4px; flex-shrink: 0; font-weight: bold; }
.pipeline-note { margin: 12px 0 0; color: var(--text-muted); }
.pipeline-note small { font-size: 12px; }

/* ── Scrollbar ── */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #3a4f61; border-radius: 2px; }

/* Logo in sidebar */
.sidebar-logo {
  display: block;
  width: 120px;
  margin-bottom: 10px;
  opacity: 0.9;
}

