/* EpsimoAI Documentation Portal */
:root {
  --sidebar-width: 260px;
  --primary: #2563eb;
  --primary-light: #dbeafe;
  --text: #1f2937;
  --text-muted: #6b7280;
  --bg: #ffffff;
  --bg-sidebar: #f8fafc;
  --border: #e5e7eb;
  --code-bg: #f1f5f9;
  --radius: 6px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--text); line-height: 1.6; }

/* Layout */
.docs-layout { display: flex; min-height: 100vh; }
.docs-sidebar {
  width: var(--sidebar-width); min-width: var(--sidebar-width);
  background: var(--bg-sidebar); border-right: 1px solid var(--border);
  padding: 1.5rem 0; overflow-y: auto; position: sticky; top: 0; height: 100vh;
}
.docs-sidebar-header { padding: 0 1.25rem 1rem; font-weight: 700; font-size: 1.1rem; }
.docs-sidebar-header a { color: var(--primary); text-decoration: none; }
.docs-content { flex: 1; max-width: 800px; padding: 2rem 3rem; }

/* Sidebar nav */
.docs-nav-section { margin-bottom: 1.25rem; }
.docs-nav-section h3 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); padding: 0 1.25rem; margin-bottom: 0.25rem; }
.docs-nav-section ul { list-style: none; }
.docs-nav-section li a {
  display: block; padding: 0.3rem 1.25rem; font-size: 0.875rem;
  color: var(--text); text-decoration: none; border-left: 3px solid transparent;
}
.docs-nav-section li a:hover { background: var(--primary-light); }
.docs-nav-section li.active a { border-left-color: var(--primary); color: var(--primary); font-weight: 500; background: var(--primary-light); }

/* Content typography */
.docs-content h1 { font-size: 2rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
.docs-content h2 { font-size: 1.5rem; margin-top: 2rem; margin-bottom: 0.75rem; }
.docs-content h3 { font-size: 1.2rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.docs-content p { margin-bottom: 1rem; }
.docs-content ul, .docs-content ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.docs-content li { margin-bottom: 0.25rem; }
.docs-content a { color: var(--primary); text-decoration: none; }
.docs-content a:hover { text-decoration: underline; }
.docs-content strong { font-weight: 600; }

/* Code */
.docs-content code { background: var(--code-bg); padding: 0.15em 0.4em; border-radius: 3px; font-size: 0.875em; }
.docs-content pre { background: var(--code-bg); border-radius: var(--radius); padding: 1rem; overflow-x: auto; margin-bottom: 1rem; }
.docs-content pre code { background: none; padding: 0; font-size: 0.85rem; }
.highlight { background: var(--code-bg); border-radius: var(--radius); padding: 1rem; overflow-x: auto; margin-bottom: 1rem; }
.highlight pre { margin: 0; padding: 0; background: none; }

/* Tables */
.docs-content table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; font-size: 0.9rem; }
.docs-content th, .docs-content td { border: 1px solid var(--border); padding: 0.5rem 0.75rem; text-align: left; }
.docs-content th { background: var(--bg-sidebar); font-weight: 600; }
.docs-content tr:nth-child(even) { background: #fafafa; }

/* Admonitions */
.admonition { border-left: 4px solid var(--primary); background: var(--primary-light); padding: 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
.admonition-title { font-weight: 600; margin-bottom: 0.25rem; }
.admonition.warning { border-left-color: #f59e0b; background: #fef3c7; }
.admonition.danger { border-left-color: #ef4444; background: #fee2e2; }

/* Mermaid */
.mermaid { margin: 1rem 0; text-align: center; }

/* TOC permalink */
.headerlink { color: var(--text-muted); text-decoration: none; margin-left: 0.25rem; font-size: 0.8em; opacity: 0; }
h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink { opacity: 1; }

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