/* Shared documentation theme: inspired by VitePress / Docusaurus information architecture. */
:root {
  --doc-bg: #f6f8fb;
  --doc-surface: #ffffff;
  --doc-sidebar: #f1f4f8;
  --doc-ink: #1f2937;
  --doc-muted: #64748b;
  --doc-line: #e2e8f0;
  --doc-brand: #3451b2;
  --doc-brand-soft: #e8edff;
  --doc-code: #172033;
}

body {
  background: var(--doc-bg) !important;
  color: var(--doc-ink) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif !important;
  padding: 24px !important;
}

.double-border {
  max-width: 1280px !important;
  border: 1px solid var(--doc-line) !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .08) !important;
  overflow: hidden;
}

.container { grid-template-columns: 248px minmax(0, 1fr) !important; }
.sidebar { background: var(--doc-sidebar) !important; border-right: 1px solid var(--doc-line) !important; padding: 28px 18px !important; }
.sidebar h3 { color: var(--doc-ink) !important; border-left: 3px solid var(--doc-brand) !important; padding-left: 12px !important; margin-bottom: 22px !important; font-size: 1.1rem !important; }
.chapter-list a { color: #526174 !important; border-radius: 7px !important; font-size: .91rem !important; padding: 8px 10px !important; }
.chapter-list a:hover { background: var(--doc-brand-soft) !important; color: var(--doc-brand) !important; transform: none !important; }
.chapter-list .active { background: var(--doc-brand) !important; color: #fff !important; box-shadow: 0 4px 10px rgba(52, 81, 178, .2) !important; }
.main-content { background: var(--doc-surface) !important; padding: 48px clamp(28px, 5vw, 76px) 52px !important; font-size: 1rem !important; line-height: 1.85 !important; }
h2 { color: #172554 !important; border-left: 4px solid var(--doc-brand) !important; padding-left: 14px !important; margin: 0 0 28px !important; font-size: clamp(1.65rem, 3vw, 2.2rem) !important; }
h3 { color: #26364d !important; background: linear-gradient(90deg, var(--doc-brand-soft), transparent) !important; border-left: 4px solid #7c8edb !important; border-radius: 5px !important; padding: 9px 13px !important; }
h4 { color: #334155 !important; }
.main-content p, .main-content li { color: #465569; }
.main-content strong { color: #9a3412 !important; }
.main-content code:not(pre code) { color: #a23b2a !important; background: #fff1ed !important; border: 1px solid #fed7cc; border-radius: 4px; padding: 1px 5px; }
pre { background: var(--doc-code) !important; border: 1px solid #273451 !important; border-radius: 9px !important; box-shadow: 0 10px 25px rgba(15, 23, 42, .12) !important; padding: 20px !important; font-size: .9rem !important; line-height: 1.7 !important; }
table { background: #fff !important; border-color: var(--doc-line) !important; }
th { background: #f8fafc !important; color: #334155 !important; border-color: var(--doc-line) !important; }
td { border-color: var(--doc-line) !important; }
.tip, .warning, .highlight, .success { border-width: 1px !important; border-left-width: 4px !important; box-shadow: none !important; border-radius: 8px !important; }
.tip { background: #eff6ff !important; border-color: #bfdbfe !important; border-left-color: #2563eb !important; }
.warning { background: #fff7ed !important; border-color: #fed7aa !important; border-left-color: #ea580c !important; }
.highlight { background: #fefce8 !important; border-color: #fde68a !important; border-left-color: #ca8a04 !important; }
.success { background: #f0fdf4 !important; border-color: #bbf7d0 !important; border-left-color: #16a34a !important; }
.footer-nav { border-top: 1px solid var(--doc-line) !important; }
.footer-nav a { background: #f8fafc !important; border: 1px solid var(--doc-line); color: var(--doc-brand) !important; border-radius: 7px !important; }
.footer-nav a:hover { background: var(--doc-brand-soft) !important; transform: none !important; }
footer { color: var(--doc-muted) !important; border-top-color: var(--doc-line) !important; }

@media (max-width: 860px) {
  body { padding: 10px !important; }
  .double-border { border-radius: 10px !important; }
  .main-content { padding: 30px 20px 38px !important; }
}
