:root {
  --bg: #0c111a;
  --bg-alt: #111822;
  --bg-hi: #16202e;
  --border: #1a2636;
  --green: #4ade80;
  --amber: #f59e0b;
  --red: #ef4444;
  --cyan: #22d3ee;
  --text: #c8d6e5;
  --text-dim: #6a7a8a;
}

html, body { background: #070b10 !important; color: var(--text); }

/* Sidebar / nav */
.wy-nav-side { background: var(--bg) !important; }
.wy-side-nav-search { background: var(--bg-hi) !important; }
.wy-side-nav-search input[type=text] { border-color: var(--border) !important; background: var(--bg) !important; color: var(--text) !important; }
.wy-menu-vertical { background: var(--bg) !important; }
.wy-menu-vertical li { background: transparent !important; }
.wy-menu-vertical li a { color: var(--text-dim) !important; background: transparent !important; }
.wy-menu-vertical li a:hover { background: var(--bg-hi) !important; color: var(--green) !important; }
.wy-menu-vertical li.current { background: transparent !important; }
.wy-menu-vertical li.current a { color: var(--text) !important; background: transparent !important; border-right-color: var(--border) !important; }
.wy-menu-vertical li.current a:hover { background: var(--bg-hi) !important; }
.wy-menu-vertical li.current > a { background: var(--bg-alt) !important; color: var(--green) !important; }
.wy-menu-vertical li.current > a:hover { background: var(--bg-hi) !important; }
.wy-menu-vertical li.toctree-l1.current > a { border: none !important; }
.wy-menu-vertical li.on a { background: var(--bg-alt) !important; color: var(--green) !important; }
.wy-menu-vertical li.on a:hover { background: var(--bg-hi) !important; }

/* Content area */
.wy-nav-content-wrap { background: #070b10 !important; }
.wy-nav-content { background: var(--bg) !important; }
.rst-content { color: var(--text); }
.rst-content a { color: var(--cyan); }
.rst-content a:visited { color: var(--amber); }
.rst-content a:hover { color: var(--green); }
.rst-content h1, .rst-content h2, .rst-content h3, .rst-content h4,
.rst-content h5, .rst-content h6 { color: var(--green); }

/* Code */
.rst-content code, .rst-content tt, code {
  color: var(--amber) !important;
  background: var(--bg-alt) !important;
  border-color: var(--border) !important;
}
.rst-content code.literal { color: var(--amber) !important; background: var(--bg-alt) !important; }
.rst-content pre { background: #05080c !important; border-color: var(--border) !important; color: var(--text) !important; }
.rst-content .highlight { background: #05080c !important; }

/* Tables */
.rst-content table, .wy-table { border-color: var(--border); }
.rst-content table th, .wy-table thead th { background: var(--bg-hi) !important; color: var(--green) !important; }
.rst-content table td, .wy-table td { background: var(--bg) !important; color: var(--text) !important; }
.wy-table-odd td { background: var(--bg) !important; }
.wy-table-even td { background: var(--bg-alt) !important; }

/* Admonitions */
.rst-content .admonition { background: var(--bg-alt) !important; border-color: var(--border); }
.rst-content .admonition-title { background: var(--bg-hi) !important; color: var(--green) !important; }
.rst-content .note { border-color: #0a2030 !important; }
.rst-content .note .admonition-title { background: #0a2030 !important; color: var(--cyan) !important; }
.rst-content .warning { border-color: #2e2008 !important; }
.rst-content .warning .admonition-title { background: #2e2008 !important; color: var(--amber) !important; }
.rst-content .danger { border-color: #2e0e0e !important; }
.rst-content .danger .admonition-title { background: #2e0e0e !important; color: var(--red) !important; }
.rst-content .tip, .rst-content .hint, .rst-content .important {
  border-color: #0f2e1a !important;
}
.rst-content .tip .admonition-title,
.rst-content .hint .admonition-title,
.rst-content .important .admonition-title {
  background: #0f2e1a !important; color: var(--green) !important;
}
.rst-content .seealso { border-color: #0a2030 !important; }
.rst-content .seealso .admonition-title { background: #0a2030 !important; color: var(--cyan) !important; }

/* Sidebar (content aside) */
.rst-content .sidebar { background: var(--bg-alt) !important; border-color: var(--border) !important; }
.rst-content .sidebar .sidebar-title { background: var(--bg-hi) !important; color: var(--green) !important; }

/* Signature / definition lists */
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) > dt {
  background: var(--bg-hi) !important; color: var(--cyan) !important; border-top-color: var(--border) !important;
}
html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) > dt {
  background: var(--bg-alt) !important; color: var(--text) !important; border-left-color: var(--border) !important;
}

/* Buttons */
.btn { background: var(--bg-hi) !important; color: var(--text) !important; border-color: var(--border) !important; }
.btn:hover { background: #0f2e1a !important; color: var(--green) !important; border-color: var(--green) !important; }
.btn-neutral { background: var(--bg-alt) !important; color: var(--text) !important; }
.btn-neutral:hover { background: var(--bg-hi) !important; }

/* Search */
input[type="text"], input[type="search"], input[type="submit"] {
  background: var(--bg) !important; color: var(--text) !important; border-color: var(--border) !important;
}

/* Footer */
footer { color: var(--text-dim) !important; }
footer a { color: var(--cyan); }

/* Misc */
.ethical-rtd { display: none !important; }
.rst-content .guilabel, .rst-content .menuselection {
  border-color: var(--border) !important; background: var(--bg-alt) !important; color: var(--text) !important;
}
.rst-content .viewcode-link { color: var(--cyan); }
.rst-content .viewcode-back { color: var(--cyan); }
.rst-versions { background: #05080c !important; }
