/* MeShare docs theme — distinct from default RTD / AKShare blue */

@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700&family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&display=swap");

:root {
  --ms-ink: #15262e;
  --ms-ink-mid: #1e3640;
  --ms-ink-soft: #2a4a56;
  --ms-accent: #c4783a;
  --ms-accent-soft: #d4925a;
  --ms-link: #1d6b63;
  --ms-link-hover: #15554f;
  --ms-surface: #f6f7f4;
  --ms-paper: #fcfcfa;
  --ms-line: #d8ddd6;
  --ms-text: #1c2428;
  --ms-muted: #5a6a72;
  --ms-code-bg: #eef2ef;
}

html {
  font-size: 16px;
}

body,
.wy-body-for-nav {
  font-family: "Source Sans 3", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ms-text);
  background: var(--ms-surface);
}

/* ----- Sidebar ----- */
.wy-nav-side {
  background: var(--ms-ink);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.wy-side-nav-search {
  background: var(--ms-ink-mid) !important;
  border-bottom: 2px solid var(--ms-accent);
  padding: 1.1rem 0.85rem 1rem;
}

.wy-side-nav-search > a,
.wy-side-nav-search .wy-dropdown > a {
  color: #f4f1ea !important;
  font-family: "Source Serif 4", "Source Han Serif SC", "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.wy-side-nav-search > a:hover {
  background: transparent !important;
  color: var(--ms-accent-soft) !important;
}

.wy-side-nav-search > a.icon::before {
  display: none;
}

.wy-side-nav-search input[type="text"] {
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: #f0f3f2;
  box-shadow: none;
}

.wy-side-nav-search input[type="text"]:focus {
  border-color: var(--ms-accent);
}

.wy-menu-vertical header,
.wy-menu-vertical p.caption {
  color: var(--ms-accent-soft) !important;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: none;
  margin-top: 0.85rem;
}

/* Keep expanded branches on dark ink (RTD defaults to light gray panels) */
.wy-menu-vertical li.current,
.wy-menu-vertical li.toctree-l1.current,
.wy-menu-vertical li.toctree-l1.current > ul,
.wy-menu-vertical li.toctree-l2.current > ul,
.wy-menu-vertical li.toctree-l3.current > ul {
  background: transparent !important;
}

.wy-menu-vertical a {
  color: #e6eef1 !important;
  background: transparent !important;
}

.wy-menu-vertical a:hover {
  background: var(--ms-ink-soft) !important;
  color: #fff !important;
}

.wy-menu-vertical li.toctree-l2 a,
.wy-menu-vertical li.toctree-l3 a,
.wy-menu-vertical li.toctree-l4 a {
  color: #d2dde2 !important;
  background: transparent !important;
}

.wy-menu-vertical li.current > a,
.wy-menu-vertical li.toctree-l1.current > a {
  background: var(--ms-ink-soft) !important;
  color: #fff !important;
  border-left: 3px solid var(--ms-accent) !important;
  border-top: none !important;
  border-bottom: none !important;
}

.wy-menu-vertical li.toctree-l2.current > a,
.wy-menu-vertical li.toctree-l3.current > a,
.wy-menu-vertical li.toctree-l4.current > a,
.wy-menu-vertical a.current {
  background: #243d48 !important;
  color: #fff !important;
}

.wy-nav-top {
  background: var(--ms-ink-mid) !important;
  color: #f4f1ea !important;
}

.wy-nav-top a {
  color: #f4f1ea !important;
}

/* ----- Content ----- */
.wy-nav-content-wrap {
  background: var(--ms-surface);
}

.wy-nav-content {
  background: var(--ms-paper);
  max-width: 920px;
}

.rst-content h1,
.rst-content h2,
.rst-content h3,
.rst-content h4 {
  font-family: "Source Serif 4", "Source Han Serif SC", "Noto Serif SC", serif;
  color: var(--ms-ink);
  font-weight: 700;
}

.rst-content h1 {
  border-bottom: 2px solid var(--ms-accent);
  padding-bottom: 0.35rem;
}

.rst-content h2 {
  border-bottom: 1px solid var(--ms-line);
  padding-bottom: 0.25rem;
}

.rst-content a {
  color: var(--ms-link);
}

.rst-content a:hover {
  color: var(--ms-link-hover);
}

.rst-content a.reference.internal:hover {
  text-decoration: underline;
}

.rst-content .toctree-wrapper .caption-text {
  color: var(--ms-ink);
  font-family: "Source Serif 4", serif;
}

.rst-content table.docutils {
  border: 1px solid var(--ms-line);
}

.rst-content table.docutils thead th {
  background: #e8eeea;
  color: var(--ms-ink);
  border-bottom: 2px solid var(--ms-accent);
}

.rst-content table.docutils td,
.rst-content table.docutils th {
  border-color: var(--ms-line) !important;
}

.rst-content code.literal,
.rst-content tt.literal {
  background: var(--ms-code-bg);
  border: 1px solid var(--ms-line);
  color: #8a3b12;
  border-radius: 3px;
  padding: 0 0.28em;
}

.rst-content div[class*="highlight"] {
  background: #f0f3f1;
  border: 1px solid var(--ms-line);
  border-left: 3px solid var(--ms-accent);
  border-radius: 0 4px 4px 0;
}

.rst-content blockquote {
  border-left: 3px solid var(--ms-accent);
  background: #f3f5f1;
  color: var(--ms-muted);
  padding: 0.6rem 1rem;
}

.rst-content .admonition {
  border-radius: 4px;
  border-left: 4px solid var(--ms-link);
}

.rst-content .admonition-title {
  background: var(--ms-link) !important;
}

.btn-neutral,
.rst-content .btn-neutral {
  background: var(--ms-ink-mid) !important;
  color: #f4f1ea !important;
  border-radius: 4px;
}

.btn-neutral:hover,
.rst-content .btn-neutral:hover {
  background: var(--ms-accent) !important;
  color: #fff !important;
}

.wy-breadcrumbs {
  color: var(--ms-muted);
}

.wy-breadcrumbs a {
  color: var(--ms-link);
}

footer,
.rst-footer-buttons {
  border-top: 1px solid var(--ms-line);
}

.rst-versions {
  background: var(--ms-ink) !important;
  border-top: 2px solid var(--ms-accent) !important;
}

/* ----- Language switch (中文 / EN) ----- */
.ms-lang-switch {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  margin: 0.65rem 0.5rem 0.15rem;
  padding: 0.2rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ms-lang-btn {
  flex: 1;
  text-align: center;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em;
  color: #c5d2d8 !important;
  padding: 0.28rem 0.45rem !important;
  border-radius: 4px;
  text-decoration: none !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.ms-lang-btn:hover {
  color: #fff !important;
  background: var(--ms-ink-soft) !important;
}

.ms-lang-btn.is-active {
  color: #15262e !important;
  background: var(--ms-accent-soft) !important;
}

.wy-nav-top .ms-lang-switch {
  display: none;
}
