*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #fff; --text: #1a1a2e; --muted: #64748b; --border: #e2e8f0;
  --primary: #2563eb; --primary-hover: #1d4ed8; --code-bg: #f1f5f9;
  --sidebar-bg: #f8fafc; --sidebar-w: 260px; --max-w: 1200px;
}
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--text); line-height: 1.7; background: var(--bg); }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; }

/* Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); background: var(--sidebar-bg); border-right: 1px solid var(--border);
  padding: 2rem 1.25rem; position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto;
}
.content { margin-left: var(--sidebar-w); flex: 1; padding: 2.5rem 3rem; max-width: calc(var(--max-w) - var(--sidebar-w)); }

/* Sidebar */
.sidebar .logo { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 0.15rem; display: block; }
.sidebar .logo span { color: var(--primary); }
.sidebar .logo-product { display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; margin-bottom: 2rem; }
.sidebar nav ul { list-style: none; }
.sidebar nav > ul > li { margin-bottom: 0.25rem; }
.sidebar nav a {
  display: block; padding: 0.35rem 0.75rem; border-radius: 6px; color: var(--muted);
  font-size: 0.9rem; transition: all 0.15s;
}
.sidebar nav a:hover { color: var(--text); background: var(--border); text-decoration: none; }
.sidebar nav a.active { color: var(--primary); background: #eff6ff; font-weight: 600; }
.sidebar nav .section-label {
  font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text); padding: 1.25rem 0.75rem 0.35rem; margin-top: 0.5rem;
  border-top: 1px solid var(--border);
}

/* Content */
.content h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
.content h2 { font-size: 1.4rem; font-weight: 600; margin: 2rem 0 0.75rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.content h3 { font-size: 1.1rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }
.content p { margin-bottom: 1rem; }
.content ul, .content ol { margin: 0 0 1rem 1.5rem; }
.content li { margin-bottom: 0.35rem; }
.content code { background: var(--code-bg); padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.9em; }
.content pre { background: var(--code-bg); padding: 1rem; border-radius: 8px; overflow-x: auto; margin-bottom: 1rem; }
.content pre code { background: none; padding: 0; }
.content img { max-width: 100%; border: 1px solid var(--border); border-radius: 8px; margin: 1rem 0; }
.content .lead { font-size: 1.15rem; color: var(--muted); margin-bottom: 1.5rem; }
.content table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.content th, .content td { text-align: left; padding: 0.6rem 1rem; border-bottom: 1px solid var(--border); }
.content th { font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }

/* Tips/Notes */
.tip, .note, .warning {
  padding: 1rem 1.25rem; border-radius: 8px; margin: 1.25rem 0; border-left: 4px solid;
}
.tip { background: #f0fdf4; border-color: #22c55e; }
.note { background: #eff6ff; border-color: #3b82f6; }
.warning { background: #fefce8; border-color: #eab308; }

/* Language switcher */
.lang-switcher {
  display: flex; gap: 0.25rem; margin-bottom: 1.5rem;
  padding-bottom: 1rem; border-bottom: 1px solid var(--border);
}
.lang-switcher a {
  display: inline-block; padding: 0.3rem 0.6rem; border-radius: 4px;
  font-size: 0.8rem; font-weight: 600; color: var(--muted); background: transparent;
}
.sidebar .lang-switcher a:hover { color: var(--text); background: var(--border); text-decoration: none; }
.sidebar .lang-switcher a.active { color: #fff; background: var(--primary); border-radius: 4px; }

/* Responsive */
@media (max-width: 768px) {
  .sidebar { position: static; width: 100%; border-right: none; border-bottom: 1px solid var(--border); padding: 1rem; }
  .content { margin-left: 0; padding: 1.5rem; }
  .layout { flex-direction: column; }
}
