@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300..700;1,14..32,300..700&display=swap');

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

:root {
  --sidebar-w: 256px;
  --sidebar-bg: #0f172a;
  --sidebar-border: rgba(255,255,255,0.07);
  --sidebar-text: #94a3b8;
  --sidebar-hover: rgba(255,255,255,0.07);
  --sidebar-active-bg: rgba(56,189,248,0.12);
  --sidebar-active: #38bdf8;
  --sidebar-label: #475569;
  --accent: #0ea5e9;
  --accent-dark: #0284c7;
  --body-bg: #f1f5f9;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --code-bg: #f8fafc;
  --code-border: #e2e8f0;
  --pre-bg: #1e293b;
  --radius: 8px;
  --radius-sm: 5px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--body-bg);
  display: flex;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── Sidebar ─────────────────────────────────────────────────── */

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 22px 18px;
  text-decoration: none;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.01em;
}

.brand-sub {
  font-size: 11px;
  color: var(--sidebar-label);
  font-weight: 400;
  margin-top: 1px;
}

.sidebar-section {
  padding: 22px 18px 6px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sidebar-label);
}

.sidebar-nav {
  list-style: none;
  padding: 2px 10px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 450;
  color: var(--sidebar-text);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  margin-bottom: 1px;
}

.sidebar-nav a svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.sidebar-nav a:hover {
  background: var(--sidebar-hover);
  color: #e2e8f0;
}

.sidebar-nav a:hover svg { opacity: 0.85; }

.sidebar-nav a.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active);
  font-weight: 500;
}

.sidebar-nav a.active svg { opacity: 1; }

.sidebar-spacer { flex: 1; }

.sidebar-notice {
  margin: 0 10px 10px;
  padding: 10px 12px;
  border: 1px solid rgba(251,191,36,0.2);
  border-left: 3px solid #fbbf24;
  border-radius: 0 6px 6px 0;
  background: rgba(251,191,36,0.05);
  font-size: 11.5px;
  color: var(--sidebar-text);
  line-height: 1.55;
}

.sidebar-notice strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #fbbf24;
  margin-bottom: 3px;
  letter-spacing: 0.02em;
}

.sidebar-footer {
  padding: 14px 18px;
  font-size: 11.5px;
  color: var(--sidebar-label);
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

/* ─── Page content ────────────────────────────────────────────── */

.page-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding: 48px 40px;
  max-width: 840px;
  width: 100%;
}

footer {
  padding: 20px 40px;
  font-size: 12.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  max-width: 840px;
  width: 100%;
}

/* ─── Typography ──────────────────────────────────────────────── */

h1, h2, h3, h4 {
  font-weight: 650;
  line-height: 1.3;
  color: var(--text);
  margin-top: 2.2em;
  margin-bottom: 0.55em;
}

h1 { font-size: 1.9rem; margin-top: 0; }
h2 { font-size: 1.4rem; margin-top: 2.4em; padding-top: 1.6em; border-top: 1px solid var(--border); }
h3 { font-size: 1.1rem; }
h4 { font-size: 0.97rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }

main > :first-child { margin-top: 0 !important; }
main > h2:first-child { border-top: none; padding-top: 0; }

p { margin-bottom: 1em; }

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

strong { font-weight: 600; }

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

/* ─── Code ────────────────────────────────────────────────────── */

code {
  font-family: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', ui-monospace, monospace;
  font-size: 0.84em;
  background: var(--code-bg);
  color: #be185d;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--code-border);
}

pre {
  background: var(--pre-bg);
  color: #abb2bf;
  border-radius: var(--radius);
  padding: 20px 22px;
  overflow-x: auto;
  margin-bottom: 1.5em;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: 13px;
  line-height: 1.6;
}

/* ─── Aside / callout ─────────────────────────────────────────── */

aside {
  background: #eff6ff;
  border-left: 3px solid #60a5fa;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 13px 17px;
  margin: 1.5em 0;
  font-size: 14px;
  color: #1e3a5f;
}

/* ─── Table ───────────────────────────────────────────────────── */

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
  font-size: 14px;
}

th, td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  background: #f8fafc;
}

tr:last-child td { border-bottom: none; }

/* ─── Download links ──────────────────────────────────────────── */

.download-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 1.5em;
}

.download-list li a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.download-list li a:hover {
  border-color: var(--accent);
  background: #f0f9ff;
  color: var(--accent-dark);
  text-decoration: none;
}

/* ─── Responsive ──────────────────────────────────────────────── */

@media (max-width: 768px) {
  .sidebar { display: none; }

  main, footer { padding: 24px 20px; }
}
