:root {
  --brand-primary: #16a085;
  --brand-primary-dark: #0f7d68;
  --brand-text: #1f2937;
  --brand-muted: #6b7280;
  --brand-line: #e5eaec;
  --brand-surface: #ffffff;
  --brand-surface-soft: #f9fbfb;
  --brand-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  --md-text-font: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --md-code-font: "JetBrains Mono", "SFMono-Regular", "Consolas", monospace;
}

html:not(.home-page) body {
  background: linear-gradient(180deg, #f8fafb 0%, #f3f6f7 100%);
  color: var(--brand-text);
}

html .md-header {
  background: rgba(248, 250, 251, 0.9);
  color: var(--brand-text);
  border-bottom: 1px solid rgba(229, 234, 236, 0.92);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

html .md-header__title,
html .md-header__topic,
html .md-header__button,
html .md-search__icon,
html .md-icon {
  color: var(--brand-text);
}

html .md-header__topic .md-ellipsis,
html .md-tabs__link {
  font-weight: 700;
}

html .md-search__form {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--brand-line);
  border-radius: 14px;
  box-shadow: none;
}

html .md-tabs {
  background: rgba(248, 250, 251, 0.88);
  color: #374151;
  border-bottom: 1px solid rgba(229, 234, 236, 0.86);
}

html .md-tabs__link {
  opacity: 1;
}

html .md-tabs__link--active,
html .md-tabs__link:hover {
  color: var(--brand-primary);
}

html .md-tabs__item--active {
  box-shadow: inset 0 -0.16rem 0 var(--brand-primary);
}

html:not(.home-page) .md-main__inner {
  margin-top: 1.4rem;
}

html:not(.home-page) .md-sidebar__scrollwrap,
html:not(.home-page) .md-sidebar__inner {
  background: transparent;
}

html:not(.home-page) .md-nav--primary .md-nav__title,
html:not(.home-page) .md-nav--secondary .md-nav__title {
  background: transparent;
  color: var(--brand-text);
  box-shadow: none;
}

html:not(.home-page) .md-nav__link--active,
html:not(.home-page) .md-nav__link:hover {
  color: var(--brand-primary);
}

@media screen and (min-width: 960px) {
  html:not(.home-page) .md-main__inner.md-grid {
    width: calc(100vw - 1.5rem);
    max-width: none;
    margin-left: 1rem;
    margin-right: 0.5rem;
  }

  html:not(.home-page) .md-sidebar {
    padding-top: 0.35rem;
  }

  html:not(.home-page) .md-sidebar--secondary {
    width: clamp(16rem, 24vw, 22rem);
  }

  html:not(.home-page) .md-content {
    min-width: 0;
  }

  html:not(.home-page) .md-sidebar__scrollwrap {
    margin: 0 0.45rem;
    padding: 0.72rem 0.55rem;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(229, 234, 236, 0.86);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.035);
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.55) transparent;
  }

  html:not(.home-page) .md-sidebar__scrollwrap::-webkit-scrollbar {
    width: 4px;
  }

  html:not(.home-page) .md-sidebar__scrollwrap::-webkit-scrollbar-track {
    background: transparent;
  }

  html:not(.home-page) .md-sidebar__scrollwrap::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.55);
    border-radius: 999px;
  }

  html:not(.home-page) .md-sidebar .md-nav {
    color: #596579;
    font-size: 0.72rem;
  }

  html:not(.home-page) .md-sidebar .md-nav__title {
    margin: 0 0.2rem 0.45rem;
    padding: 0 0.2rem 0.45rem;
    border-bottom: 1px solid rgba(229, 234, 236, 0.92);
    color: #273142;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
  }

  html:not(.home-page) .md-sidebar .md-nav__link {
    min-height: 0;
    margin: 0.02rem 0;
    padding: 0.18rem 0.42rem;
    border-radius: 6px;
    color: #5c6677;
    line-height: 1.42;
    transition: background-color 0.15s ease, color 0.15s ease;
  }

  html:not(.home-page) .md-sidebar .md-nav__link .md-ellipsis {
    display: block;
    overflow: hidden;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html:not(.home-page) .md-sidebar .md-nav__link:hover {
    background: rgba(22, 160, 133, 0.08);
    color: var(--brand-primary-dark);
  }

  html:not(.home-page) .md-sidebar .md-nav__link--active {
    background: rgba(22, 160, 133, 0.1);
    color: var(--brand-primary-dark);
    font-weight: 700;
  }

  html:not(.home-page) .md-sidebar--secondary .md-nav__link.toc-link--active {
    background: rgba(22, 160, 133, 0.1);
    color: var(--brand-primary-dark);
    font-weight: 700;
  }

  html:not(.home-page) .md-sidebar--secondary .md-nav__link {
    position: relative;
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding-left: 0.54rem;
    border-left: 2px solid transparent;
    border-radius: 0 6px 6px 0;
    font-size: 0.74rem;
    font-weight: 600;
  }

  html:not(.home-page) .md-sidebar--secondary .md-nav__link--active,
  html:not(.home-page) .md-sidebar--secondary .md-nav__link.toc-link--active {
    border-left-color: var(--brand-primary);
  }

  html:not(.home-page) .md-sidebar--secondary .md-nav .md-nav {
    margin-left: 0.2rem;
    padding-left: 0.32rem;
    border-left: 1px solid rgba(229, 234, 236, 0.92);
  }

  html:not(.home-page) .md-sidebar--secondary .md-nav .md-nav .md-nav__link {
    padding-top: 0.14rem;
    padding-bottom: 0.14rem;
    color: #667085;
    font-size: 0.69rem;
    font-weight: 500;
  }

  html:not(.home-page) .md-sidebar--secondary .md-nav .md-nav .md-nav .md-nav__link {
    font-size: 0.65rem;
    font-weight: 500;
  }

  html:not(.home-page) .md-sidebar--primary .md-nav__item--active > .md-nav__link {
    color: var(--brand-primary-dark);
    font-weight: 700;
  }
}

html:not(.home-page) .md-content__inner {
  margin: 0;
  padding: 2.2rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 28px;
}

html:not(.home-page) .md-content__button,
html:not(.home-page) .md-source-file {
  color: var(--brand-muted);
}

html:not(.home-page) .md-path {
  margin-bottom: 1rem;
  color: var(--brand-muted);
}

html:not(.home-page) .md-typeset {
  color: var(--brand-text);
  font-size: 0.84rem;
}

html:not(.home-page) .md-typeset h1 {
  margin: 0 0 1.2rem;
  color: var(--brand-text);
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.05em;
}

html:not(.home-page) .md-typeset h2 {
  margin-top: 2.4rem;
  margin-bottom: 1rem;
  color: var(--brand-text);
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

html:not(.home-page) .md-typeset h3 {
  margin-top: 1.8rem;
  margin-bottom: 0.7rem;
  color: #233248;
  font-size: 1.05rem;
  font-weight: 800;
}

html:not(.home-page) .md-typeset p,
html:not(.home-page) .md-typeset li,
html:not(.home-page) .md-typeset td,
html:not(.home-page) .md-typeset blockquote {
  color: var(--brand-muted);
  line-height: 1.9;
}

html:not(.home-page) .md-typeset strong {
  color: var(--brand-text);
}

html:not(.home-page) .md-typeset a {
  color: var(--brand-primary-dark);
}

html:not(.home-page) .md-typeset a:hover {
  color: var(--brand-primary);
}

html:not(.home-page) .md-typeset ul li::marker,
html:not(.home-page) .md-typeset ol li::marker {
  color: var(--brand-primary);
}

html:not(.home-page) .md-typeset hr {
  border-bottom-color: rgba(229, 234, 236, 0.95);
}

html:not(.home-page) .md-typeset code {
  padding: 0.2em 0.45em;
  color: var(--brand-primary-dark);
  background: #eef8f5;
  border-radius: 0.5rem;
}

html:not(.home-page) .md-typeset pre > code {
  padding: 0;
  background: transparent;
  color: inherit;
  border-radius: 0;
}

html:not(.home-page) .md-typeset .highlight pre,
html:not(.home-page) .md-typeset pre {
  background: #f5f8f9;
  border: 1px solid var(--brand-line);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

html:not(.home-page) .md-typeset table:not([class]) {
  border: 1px solid var(--brand-line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--brand-shadow);
}

html:not(.home-page) .md-typeset table:not([class]) th {
  background: #f4faf8;
  color: var(--brand-text);
}

html:not(.home-page) .md-typeset table:not([class]) tr:hover {
  background: #fbfdfd;
}

html:not(.home-page) .md-typeset blockquote {
  margin: 1.4rem 0;
  padding: 1rem 1.2rem;
  background: #f5fbf9;
  border-left: 4px solid var(--brand-primary);
  border-radius: 0 16px 16px 0;
}

html:not(.home-page) .md-typeset .admonition,
html:not(.home-page) .md-typeset details {
  border-radius: 18px;
  box-shadow: var(--brand-shadow);
}

html:not(.home-page) .md-typeset .admonition-title,
html:not(.home-page) .md-typeset summary {
  font-weight: 800;
}

html:not(.home-page) .md-top {
  background: var(--brand-primary);
}

html:not(.home-page) .md-footer {
  background: transparent;
}

html:not(.home-page) .md-footer-meta {
  background: transparent;
  border-top: 1px solid rgba(229, 234, 236, 0.9);
}

html:not(.home-page) .md-footer-meta__inner {
  color: var(--brand-muted);
}

html:not(.home-page) .md-copyright {
  width: 100%;
  color: var(--brand-muted);
  font-size: 0.62rem;
  line-height: 1.65;
  text-align: center;
}

html:not(.home-page) .md-copyright__highlight {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
  margin-bottom: 0.15rem;
  color: var(--brand-muted);
  font-weight: 600;
}

html:not(.home-page) .md-footer-meta .site-beian-link {
  color: #8a95a2;
  font-weight: 500;
  text-decoration: none;
}

html:not(.home-page) .md-footer-meta .site-beian-link:hover {
  color: var(--brand-primary-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

html:not(.home-page) .md-social {
  margin-left: 0.8rem;
}

@media screen and (max-width: 960px) {
  html:not(.home-page) .md-content__inner {
    padding: 1.4rem;
    border-radius: 22px;
  }

  html:not(.home-page) .md-typeset h1 {
    font-size: 1.6rem;
  }

  html:not(.home-page) .md-footer-meta__inner {
    align-items: center;
    flex-direction: column;
    gap: 0.6rem;
  }

  html:not(.home-page) .md-social {
    margin-left: 0;
  }
}

body[data-md-color-scheme="slate"] {
  --brand-primary: #4fd1b5;
  --brand-primary-dark: #7ce7d0;
  --brand-text: #e5eef7;
  --brand-muted: #9eb0c3;
  --brand-line: #243447;
  --brand-surface: #0f1722;
  --brand-surface-soft: #111c29;
  --brand-shadow: 0 18px 40px rgba(2, 6, 23, 0.38);
}

html:not(.home-page) body[data-md-color-scheme="slate"] {
  background: linear-gradient(180deg, #07111b 0%, #0c1622 100%);
  color: var(--brand-text);
}

html body[data-md-color-scheme="slate"] .md-header {
  background: rgba(11, 19, 30, 0.9);
  color: var(--brand-text);
  border-bottom-color: rgba(36, 52, 71, 0.95);
}

html body[data-md-color-scheme="slate"] .md-header__title,
html body[data-md-color-scheme="slate"] .md-header__topic,
html body[data-md-color-scheme="slate"] .md-header__button,
html body[data-md-color-scheme="slate"] .md-search__icon,
html body[data-md-color-scheme="slate"] .md-icon {
  color: var(--brand-text);
}

html body[data-md-color-scheme="slate"] .md-search__form {
  background: rgba(15, 23, 34, 0.96);
  border-color: var(--brand-line);
}

html body[data-md-color-scheme="slate"] .md-tabs {
  background: rgba(9, 16, 25, 0.92);
  color: var(--brand-text);
  border-bottom-color: rgba(36, 52, 71, 0.92);
}

html:not(.home-page) body[data-md-color-scheme="slate"] .md-nav--primary .md-nav__title,
html:not(.home-page) body[data-md-color-scheme="slate"] .md-nav--secondary .md-nav__title,
html:not(.home-page) body[data-md-color-scheme="slate"] .md-nav__link,
html:not(.home-page) body[data-md-color-scheme="slate"] .md-nav__item .md-nav__link {
  color: var(--brand-muted);
}

html:not(.home-page) body[data-md-color-scheme="slate"] .md-nav__link--active,
html:not(.home-page) body[data-md-color-scheme="slate"] .md-nav__link:hover {
  color: var(--brand-primary);
}

@media screen and (min-width: 960px) {
  html:not(.home-page) body[data-md-color-scheme="slate"] .md-sidebar__scrollwrap {
    background: rgba(15, 23, 34, 0.72);
    border-color: rgba(36, 52, 71, 0.86);
    box-shadow: 0 14px 28px rgba(2, 6, 23, 0.24);
    scrollbar-color: rgba(100, 116, 139, 0.72) transparent;
  }

  html:not(.home-page) body[data-md-color-scheme="slate"] .md-sidebar__scrollwrap::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.72);
  }

  html:not(.home-page) body[data-md-color-scheme="slate"] .md-sidebar .md-nav__title {
    border-bottom-color: rgba(36, 52, 71, 0.9);
    color: var(--brand-text);
  }

  html:not(.home-page) body[data-md-color-scheme="slate"] .md-sidebar .md-nav__link {
    color: var(--brand-muted);
  }

  html:not(.home-page) body[data-md-color-scheme="slate"] .md-sidebar .md-nav__link:hover,
  html:not(.home-page) body[data-md-color-scheme="slate"] .md-sidebar .md-nav__link--active,
  html:not(.home-page) body[data-md-color-scheme="slate"] .md-sidebar--secondary .md-nav__link.toc-link--active {
    background: rgba(79, 209, 181, 0.1);
    color: var(--brand-primary-dark);
  }

  html:not(.home-page) body[data-md-color-scheme="slate"] .md-sidebar--secondary .md-nav .md-nav {
    border-left-color: rgba(36, 52, 71, 0.9);
  }
}

html:not(.home-page) body[data-md-color-scheme="slate"] .md-content__inner {
  background: rgba(15, 23, 34, 0.9);
  border-color: var(--brand-line);
  box-shadow: var(--brand-shadow);
}

html:not(.home-page) body[data-md-color-scheme="slate"] .md-content__button,
html:not(.home-page) body[data-md-color-scheme="slate"] .md-source-file,
html:not(.home-page) body[data-md-color-scheme="slate"] .md-path,
html:not(.home-page) body[data-md-color-scheme="slate"] .md-typeset p,
html:not(.home-page) body[data-md-color-scheme="slate"] .md-typeset li,
html:not(.home-page) body[data-md-color-scheme="slate"] .md-typeset td,
html:not(.home-page) body[data-md-color-scheme="slate"] .md-typeset blockquote {
  color: var(--brand-muted);
}

html:not(.home-page) body[data-md-color-scheme="slate"] .md-typeset,
html:not(.home-page) body[data-md-color-scheme="slate"] .md-typeset h1,
html:not(.home-page) body[data-md-color-scheme="slate"] .md-typeset h2,
html:not(.home-page) body[data-md-color-scheme="slate"] .md-typeset strong,
html:not(.home-page) body[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  color: var(--brand-text);
}

html:not(.home-page) body[data-md-color-scheme="slate"] .md-typeset h2 {
  border-bottom-color: rgba(36, 52, 71, 0.95);
}

html:not(.home-page) body[data-md-color-scheme="slate"] .md-typeset h3 {
  color: #cfe0f2;
}

html:not(.home-page) body[data-md-color-scheme="slate"] .md-typeset code {
  color: #8cf3dd;
  background: #10252a;
}

html:not(.home-page) body[data-md-color-scheme="slate"] .md-typeset .highlight pre,
html:not(.home-page) body[data-md-color-scheme="slate"] .md-typeset pre,
html:not(.home-page) body[data-md-color-scheme="slate"] .md-typeset table:not([class]),
html:not(.home-page) body[data-md-color-scheme="slate"] .md-typeset blockquote,
html:not(.home-page) body[data-md-color-scheme="slate"] .md-typeset .admonition,
html:not(.home-page) body[data-md-color-scheme="slate"] .md-typeset details {
  background: #111c29;
  border-color: var(--brand-line);
  box-shadow: var(--brand-shadow);
}

html:not(.home-page) body[data-md-color-scheme="slate"] .md-typeset table:not([class]) tr:hover {
  background: #152232;
}

html:not(.home-page) body[data-md-color-scheme="slate"] .md-typeset blockquote {
  border-left-color: var(--brand-primary);
}

html:not(.home-page) body[data-md-color-scheme="slate"] .md-footer-meta {
  border-top-color: rgba(36, 52, 71, 0.95);
}

@media print {
  @page {
    size: A4;
    margin: 12mm 14mm;
  }

  *,
  *::before,
  *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .md-header,
  .md-tabs,
  .md-sidebar,
  .md-footer,
  .md-search,
  .md-top,
  .md-source,
  .md-skip,
  .md-banner,
  .md-consent,
  .md-dialog,
  nav.md-tabs,
  .md-typeset .headerlink,
  .md-content__button,
  .md-nav__link {
    display: none !important;
  }

  html .md-container,
  html .md-main,
  html .md-main__inner,
  html .md-content,
  html:not(.home-page) .md-content__inner,
  html .md-grid {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    background: #fff !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
  }

  body,
  .md-typeset {
    color: #1f2937 !important;
    background: #fff !important;
    font-size: 10.5pt !important;
    line-height: 1.55 !important;
  }

  html:not(.home-page) .md-typeset h1,
  html:not(.home-page) .md-typeset h2,
  html:not(.home-page) .md-typeset h3,
  html:not(.home-page) .md-typeset h4 {
    page-break-after: avoid;
    color: #111827 !important;
    border-top: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
  }

  html:not(.home-page) .md-typeset h2 {
    margin-top: 1.1rem !important;
    margin-bottom: 0.5rem !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
    font-size: 14pt !important;
  }

  html:not(.home-page) .md-typeset h3 {
    margin-top: 0.9rem !important;
    margin-bottom: 0.35rem !important;
    font-size: 12pt !important;
  }

  .md-typeset p,
  .md-typeset li {
    page-break-inside: avoid;
    margin: 0.18rem 0 !important;
  }

  .md-typeset ul,
  .md-typeset ol {
    margin: 0.3rem 0 0.6rem !important;
    padding-left: 1.2rem !important;
  }

  .md-typeset a {
    color: inherit !important;
    text-decoration: none !important;
  }

}
