
:root{--bg:#050816;--panel:#0b1020;--panel2:rgba(255,255,255,.06);--border:rgba(255,255,255,.12);--text:#f8fafc;--muted:#94a3b8;--soft:#cbd5e1;--cyan:#22d3ee;--blue:#2563eb;--violet:#7c3aed;--code:#111827;--codeText:#e5e7eb;}
*{box-sizing:border-box} html{scroll-behavior:smooth} body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:radial-gradient(circle at top left,rgba(34,211,238,.16),transparent 34rem),radial-gradient(circle at bottom right,rgba(124,58,237,.13),transparent 34rem),var(--bg);color:var(--text);line-height:1.68}.layout{display:grid;grid-template-columns:310px minmax(0,1fr);min-height:100vh}.sidebar{position:sticky;top:0;height:100vh;overflow:auto;border-right:1px solid var(--border);background:rgba(5,8,22,.88);backdrop-filter:blur(18px);padding:22px}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--text);margin-bottom:22px}.mark{width:34px;height:34px;border-radius:13px;background:linear-gradient(135deg,var(--cyan),var(--blue) 50%,var(--violet));box-shadow:0 0 30px rgba(34,211,238,.22)}.brand strong{display:block;line-height:1.1}.brand span{display:block;color:var(--muted);font-size:12px}.nav-section{margin:20px 0 8px;color:var(--cyan);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.nav-link{display:block;padding:8px 10px;border-radius:10px;color:var(--soft);text-decoration:none;font-size:13px}.nav-link:hover{background:rgba(34,211,238,.08);color:var(--text)}.content{min-width:0;padding:42px clamp(22px,5vw,72px) 72px}.doc{max-width:980px}.crumb{margin-bottom:20px;color:var(--muted);font-size:13px}.crumb a{color:var(--cyan);text-decoration:none}h1,h2,h3,h4{letter-spacing:-.035em;line-height:1.18}h1{font-size:clamp(34px,5vw,54px);margin:0 0 18px}h2{font-size:clamp(24px,3vw,34px);margin-top:44px;border-top:1px solid var(--border);padding-top:28px}h3{font-size:22px;margin-top:32px}h4{font-size:18px;margin-top:26px}p,li{color:var(--soft)}a{color:var(--cyan)}hr{border:0;border-top:1px solid var(--border);margin:34px 0}blockquote{margin:24px 0;padding:16px 18px;border-left:4px solid var(--cyan);background:rgba(255,255,255,.045);border-radius:0 14px 14px 0;color:var(--soft)}code{font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace;color:#67e8f9;background:rgba(255,255,255,.07);padding:.16em .36em;border-radius:7px}pre{overflow:auto;padding:18px;border-radius:16px;background:#020617;border:1px solid var(--border);box-shadow:0 16px 50px rgba(0,0,0,.25)}pre code{display:block;background:transparent;color:#e5e7eb;padding:0;white-space:pre}.mermaid{padding:18px;border-radius:16px;background:rgba(255,255,255,.94);color:#111827;border:1px solid var(--border);overflow:auto}table{width:100%;border-collapse:separate;border-spacing:0;margin:24px 0;overflow:hidden;border:1px solid var(--border);border-radius:16px;background:rgba(255,255,255,.035)}th,td{padding:12px 14px;border-bottom:1px solid var(--border);vertical-align:top}tr:last-child td{border-bottom:0}th{text-align:left;background:rgba(255,255,255,.07);color:var(--text)}td{color:var(--soft)}img{max-width:100%;border-radius:14px}.top-actions{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:28px}.btn{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--border);background:rgba(255,255,255,.055);padding:8px 12px;border-radius:999px;text-decoration:none;color:var(--text);font-weight:700;font-size:13px}.btn:hover{border-color:rgba(34,211,238,.55)}@media(max-width:920px){.layout{grid-template-columns:1fr}.sidebar{position:relative;height:auto}.content{padding-top:28px}.nav-list{columns:2}}@media(max-width:620px){.nav-list{columns:1}.sidebar{padding:18px}.content{padding:24px 16px 52px}}

.diagram-actions{margin:12px 0 18px;display:flex;gap:10px;flex-wrap:wrap}.doc .mermaid{background:#fff;color:#0f172a;border-radius:16px;padding:18px;overflow:auto;margin:18px 0;border:1px solid var(--border)}

/* Professional night documentation theme */
:root{--bg:#0c1218;--panel:#131c24;--panel2:#17232d;--border:#2a3742;--text:#edf2f5;--muted:#91a0ab;--soft:#c2cdd4;--cyan:#55b6bd;--blue:#6d9fbd;--violet:#879aa7;--code:#080d12;--codeText:#e6edf1}
body{background:linear-gradient(180deg,#0e151c 0,#0c1218 32rem);color:var(--text)}
.layout{grid-template-columns:292px minmax(0,1fr)}
.sidebar{border-right:1px solid var(--border);background:#101820;backdrop-filter:none;padding:24px 20px}
.brand{margin-bottom:24px}
.mark{width:32px;height:32px;border-radius:6px;background:#243746;box-shadow:inset 0 -4px 0 var(--cyan)}
.nav-section{color:#82929e;font-size:10px;letter-spacing:.12em;margin-top:24px}
.nav-link{color:#b3c0c8;border-radius:5px;padding:7px 9px}
.nav-link:hover{background:#1a2731;color:#f2f6f8}
.content{padding-top:52px}
.doc{max-width:920px}
.crumb a,a{color:#6fc5ca}
h1,h2,h3,h4{color:#edf2f5;letter-spacing:-.025em}
h1{font-size:clamp(34px,4vw,48px);font-weight:720}
h2{font-size:clamp(23px,2.5vw,30px);border-color:var(--border)}
p,li,td{color:var(--soft)}
blockquote{border-left-color:#4f8990;background:#131f27;border-radius:0 6px 6px 0}
code{color:#82d2d6;background:#17252d;border-radius:4px}
pre{border-radius:7px;background:var(--code);border-color:#263746;box-shadow:none}
table{border-radius:7px;background:#111a22}
th{background:#192630;color:#e4ebef}
.btn{border-color:#33434f;background:#131c24;border-radius:5px;color:#dce5ea}
.btn:hover{border-color:#607887;background:#18242d}
.doc .mermaid,.mermaid{border-radius:7px}
.theme-toggle{position:fixed;top:16px;right:18px;z-index:20;border:1px solid #33434f;border-radius:5px;background:#131c24;color:#dce5ea;padding:8px 12px;font:600 12px/1.2 Inter,ui-sans-serif,system-ui,sans-serif;cursor:pointer;box-shadow:0 4px 14px rgba(0,0,0,.18)}
.theme-toggle:hover{border-color:#607887;background:#18242d}

html[data-theme="light"]{--bg:#f5f7fa;--panel:#fff;--panel2:#f8fafc;--border:#dfe4ea;--text:#172431;--muted:#64717d;--soft:#354553;--cyan:#0b6b73;--blue:#285f87;--violet:#536a7a;--code:#17212b;--codeText:#eef2f6}
html[data-theme="light"] body{background:#f5f7fa;color:var(--text)}
html[data-theme="light"] .sidebar{background:#fff}
html[data-theme="light"] .mark{background:#18324a}
html[data-theme="light"] .nav-section{color:#52616e}
html[data-theme="light"] .nav-link{color:#40505d}
html[data-theme="light"] .nav-link:hover{background:#eef3f5;color:#173143}
html[data-theme="light"] .crumb a,html[data-theme="light"] a{color:#08636a}
html[data-theme="light"] h1,html[data-theme="light"] h2,html[data-theme="light"] h3,html[data-theme="light"] h4{color:#18324a}
html[data-theme="light"] blockquote{border-left-color:#4f7b80;background:#eef3f5}
html[data-theme="light"] code{color:#075e66;background:#e8eff1}
html[data-theme="light"] table{background:#fff}
html[data-theme="light"] th{background:#eef2f5;color:#213746}
html[data-theme="light"] .btn{border-color:#ccd4dc;background:#fff;color:#233846}
html[data-theme="light"] .btn:hover{border-color:#7e939f;background:#f8fafc}
html[data-theme="light"] .theme-toggle{border-color:#ccd4dc;background:#fff;color:#233846;box-shadow:0 4px 14px rgba(15,23,42,.09)}
html[data-theme="light"] .theme-toggle:hover{border-color:#7e939f;background:#f8fafc}
@media(max-width:620px){.theme-toggle{position:absolute;top:14px;right:14px}}
