/* =============================================================================
   MetaPlan 官网 — 产品文档中心（与首页品牌视觉对齐）
   ============================================================================= */

.docs-page {
  --accent-cyan: #003fec;
  --accent-violet: #0036cc;
  --accent-green: #003fec;
  --gradient-brand: linear-gradient(135deg, #003fec, #0036cc);
  --gradient-text: linear-gradient(90deg, #003fec, #0029a8);
  --bg-base: #ffffff;
  --bg-surface: #ffffff;
  --bg-elevated: #f8fafc;
  --bg-card: #ffffff;
  --border-subtle: rgba(15, 23, 42, 0.08);
  --text-primary: #0c1929;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --shadow-glow: 0 0 0 1px rgba(0, 63, 236, 0.14);
  --shadow-card-hover: 0 12px 32px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(0, 63, 236, 0.12);
  --home-page-canvas:
    radial-gradient(ellipse 70% 42% at 100% 6%, rgba(213, 227, 252, 0.38) 0%, rgba(213, 227, 252, 0.12) 36%, transparent 70%),
    radial-gradient(ellipse 48% 42% at 6% 96%, rgba(213, 227, 252, 0.42) 0%, rgba(213, 227, 252, 0.14) 42%, transparent 70%),
    radial-gradient(ellipse 70% 28% at 50% 100%, rgba(230, 238, 253, 0.28), transparent 72%),
    #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--home-page-canvas);
  background-attachment: fixed;
  color: var(--text-primary);
  scrollbar-width: thin;
  scrollbar-color: #e6eefd transparent;
}

.docs-page::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.docs-page::-webkit-scrollbar-thumb {
  background: #e6eefd;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.docs-page::-webkit-scrollbar-thumb:hover {
  background: #d7e3fe;
  background-clip: padding-box;
  border: 2px solid transparent;
}

.docs-page .page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.docs-page .navbar {
  position: sticky;
  top: 0;
  flex: 0 0 auto;
  z-index: 40;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(1.35) blur(18px);
  -webkit-backdrop-filter: saturate(1.35) blur(18px);
  border-bottom: none;
  box-shadow: none;
}

.docs-page .navbar.is-scrolled {
  background: rgba(255, 255, 255, 0.86);
}

.docs-page .nav-links a,
.docs-page .brand-name,
.docs-page .brand-tag,
.docs-page .lang-btn {
  color: var(--text-primary);
}

.docs-page .nav-links a:hover,
.docs-page .nav-links a:focus-visible,
.docs-page .nav-docs:hover,
.docs-page .lang-btn:hover {
  color: #003fec;
}

.docs-page:has(.navbar.is-hidden) .docs-aside,
.docs-page:has(.navbar.is-hidden) .docs-toc {
  top: 0.75rem;
  max-height: calc(100vh - 1.5rem);
}

.docs-page .nav-links a.is-active,
.docs-page .nav-docs.is-active {
  color: #003fec;
  font-weight: 650;
}

.docs-page .footer {
  display: none;
}

.docs-main {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
}

#docsApp {
  min-height: 0;
}

.docs-container {
  width: min(100% - 2rem, 1180px);
  margin: 0 auto;
}

/* ----- Workspace ----- */

.docs-workspace {
  display: grid;
  grid-template-columns: minmax(15.5rem, 17.5rem) minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  min-height: calc(100vh - var(--nav-h) - 1.5rem);
  padding: 0.75rem 1rem 1.25rem;
  box-sizing: border-box;
}

.docs-aside {
  position: sticky;
  top: calc(var(--nav-h) + 0.75rem);
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-height: calc(100vh - var(--nav-h) - 1.5rem);
  padding: 0.85rem 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.15rem;
  background: #ffffff;
  overflow: hidden;
  box-shadow: none;
}

.docs-aside-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0.2rem 0.75rem;
  padding: 0.2rem 0.35rem 0.85rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  text-decoration: none;
  color: inherit;
}

.docs-aside-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  background: #e6eefd;
  color: #003fec;
}

.docs-aside-mark svg {
  width: 1.05rem;
  height: 1.05rem;
}

.docs-aside-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.docs-aside-text strong {
  color: #0c1929;
  font-size: 0.92rem;
  font-weight: 700;
}

.docs-aside-text em {
  color: #64748b;
  font-size: 0.72rem;
  font-style: normal;
}

.docs-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #e6eefd transparent;
}

.docs-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-nav-row {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  min-width: 0;
}

.docs-nav-toggle,
.docs-nav-toggle-spacer {
  flex: 0 0 1.4rem;
  width: 1.4rem;
  height: 1.4rem;
}

.docs-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
}

.docs-nav-toggle:hover {
  color: #003fec;
  background: #e6eefd;
}

.docs-nav-toggle svg {
  width: 0.85rem;
  height: 0.85rem;
  transition: transform 0.15s var(--ease-out);
  transform: rotate(-90deg);
}

.docs-nav-toggle.is-open svg {
  transform: rotate(0deg);
}

.docs-nav-item,
.docs-nav-leaf {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  color: #334155;
  text-align: left;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.35;
  cursor: pointer;
}

.docs-nav-item svg,
.docs-nav-leaf svg {
  flex: 0 0 auto;
  width: 0.95rem;
  height: 0.95rem;
}

.docs-nav-item span,
.docs-nav-leaf span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-nav-item--parent {
  font-weight: 600;
  color: #0c1929;
}

.docs-nav-item:hover,
.docs-nav-leaf:hover,
.docs-nav-item.is-active,
.docs-nav-leaf.is-active,
.docs-nav-item.is-current {
  color: #003fec;
  background: #e6eefd;
}

.docs-nav-item.is-current {
  font-weight: 700;
}

.docs-nav > li + li {
  margin-top: 0.28rem;
}

.docs-nav-row:has(.is-current),
.docs-nav-row:has(.is-active) {
  margin-bottom: 0.2rem;
}

.docs-nav-sub,
.docs-nav-leafs {
  margin: 0.28rem 0 0.2rem 0.7rem;
  padding: 0 0 0 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  border-left: 1px solid rgba(0, 63, 236, 0.18);
}

.docs-nav-leafs {
  border-left-color: rgba(15, 23, 42, 0.08);
}

.docs-nav-leaf {
  font-size: 0.82rem;
  font-weight: 500;
  color: #64748b;
}

.docs-workspace-main {
  min-width: 0;
}

/* ----- Home ----- */

.docs-home {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  min-height: 100%;
  padding-bottom: 0.5rem;
}

.docs-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.4rem;
  min-height: 16.5rem;
  padding: 1.6rem 1.5rem 1.35rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.15rem;
  background:
    linear-gradient(160deg, rgba(230, 238, 253, 0.72) 0%, #ffffff 52%);
  overflow: hidden;
  box-shadow: none;
}

.docs-hero-kicker {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin: 0 0 0.75rem;
  padding: 0.42rem 1.15rem;
  border-radius: 999px;
  background: #e6eefd;
  color: #003fec;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.docs-hero h1 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  line-height: 1.25;
  color: #0c1929;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.docs-hero-spark {
  width: 1.15rem;
  height: 1.15rem;
  color: #003fec;
}

.docs-hero-desc {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  max-width: 38rem;
  color: #64748b;
  font-size: 0.98rem;
  line-height: 1.7;
}

.docs-hero-stack {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.docs-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.docs-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2rem;
  padding: 0.28rem 0.9rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: #ffffff;
  color: #003fec;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.docs-quick-btn svg {
  width: 0.9rem;
  height: 0.9rem;
}

.docs-quick-btn:hover {
  border-color: rgba(0, 63, 236, 0.28);
  background: #e6eefd;
}

.docs-search {
  position: relative;
  max-width: 36rem;
}

.docs-search input {
  width: 100%;
  height: 3rem;
  padding: 0 3.1rem 0 1.05rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.75rem;
  background: #ffffff;
  color: #0c1929;
  font: inherit;
  font-size: 0.93rem;
  box-shadow: none;
}

.docs-search input:focus {
  outline: none;
  border-color: rgba(0, 63, 236, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 63, 236, 0.1);
}

.docs-search-submit {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: #e6eefd;
  color: #003fec;
  cursor: pointer;
}

.docs-search-submit svg {
  width: 1rem;
  height: 1rem;
}

.docs-search-results {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 0.4rem);
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  max-height: 18rem;
  overflow: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-surface);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--text-primary) 10%, transparent);
}

.docs-search-results[hidden] {
  display: none;
}

.docs-search-results button {
  display: block;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.docs-search-results button:hover {
  background: #e6eefd;
  color: #003fec;
}

.docs-search-results .docs-search-meta {
  display: block;
  margin-top: 0.15rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.docs-hot-search {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.85rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.docs-hot-search-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.85rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-hot-search-list button {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.docs-hot-search-list button:hover {
  color: #003fec;
}

.docs-home-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17.5rem, 20.5rem);
  gap: 1rem;
  align-items: start;
}

.docs-learn-head {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.docs-learn-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-learn-item {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 0;
}

.docs-learn-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  margin: 0 auto;
  border-radius: 999px;
  background: #e6eefd;
  color: #003fec;
  font-size: 0.72rem;
  font-weight: 700;
}

.docs-learn-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 16.5rem;
  padding: 1.05rem 0.75rem 0.95rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.15rem;
  background: #ffffff;
  box-shadow: none;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.docs-learn-card:hover {
  border-color: rgba(0, 63, 236, 0.22);
}

.docs-learn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 0.85rem;
  background: #e6eefd;
  color: #003fec;
}

.docs-learn-icon svg {
  width: 1.55rem;
  height: 1.55rem;
}

.docs-learn-title {
  color: var(--text-primary);
  font-size: 0.98rem;
  font-weight: 700;
}

.docs-learn-desc {
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.5;
}

.docs-learn-bullets {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  width: 100%;
  text-align: left;
}

.docs-learn-bullets li {
  position: relative;
  padding-left: 0.85rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.docs-learn-bullets li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.5em;
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 999px;
  background: #003fec;
}

.docs-learn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: auto;
  padding-top: 0.35rem;
  color: #003fec;
  font-size: 0.8rem;
  font-weight: 600;
}

.docs-learn-link svg {
  width: 0.85rem;
  height: 0.85rem;
}

.docs-resources {
  margin-top: 1.15rem;
}

.docs-cats-wrap {
  padding: 1.15rem 0.95rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.15rem;
  background: linear-gradient(180deg, rgba(230, 238, 253, 0.55) 0%, #ffffff 100%);
}

.docs-cats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
  gap: 0.7rem;
}

.docs-cat {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 5.6rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.85rem;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  box-shadow: none;
  transition: border-color 0.2s ease;
}

.docs-cat:hover {
  border-color: rgba(0, 63, 236, 0.22);
  box-shadow: none;
}

.docs-cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.75rem;
  background: #e6eefd;
  color: #003fec;
}

.docs-cat-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.docs-cat--0,
.docs-cat--1,
.docs-cat--2,
.docs-cat--3,
.docs-cat--4 {
  --docs-cat-accent: #003fec;
}

.docs-cat strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.docs-cat span {
  display: block;
  margin-top: 0.2rem;
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.45;
}

.docs-side {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.docs-card {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.15rem;
  background: #ffffff;
  box-shadow: none;
}

.docs-card h2 {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.docs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.docs-list button,
.docs-hot-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.65rem;
  width: 100%;
  padding: 0.62rem 0.45rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.docs-list button:hover,
.docs-hot-row:hover {
  background: #e6eefd;
}

.docs-list-title,
.docs-hot-title {
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
}

.docs-hot-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  background: #e6eefd;
}

.docs-hot-rank.is-1 { color: #003fec; background: #e6eefd; }
.docs-hot-rank.is-2 { color: #0036cc; background: #e6eefd; }
.docs-hot-rank.is-3 { color: #334155; background: #f1f5f9; }
.docs-hot-rank.is-4 { color: #003fec; background: #e6eefd; }

.docs-hot-arrow {
  width: 0.85rem;
  height: 0.85rem;
  color: var(--text-muted);
}

.docs-tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  padding: 0 0.4rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.docs-tag--new {
  color: #003fec;
  background: #e6eefd;
}

.docs-tag--update {
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--text-primary) 6%, transparent);
}

.docs-list-time {
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

/* ----- Reader ----- */

.docs-reader {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 0 0.15rem 0.5rem;
}

.docs-reader-head {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.65rem;
}

.docs-reader-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.docs-article h1.docs-title,
.docs-reader-head .docs-title {
  margin: 0;
  padding-top: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #0c1929;
}

.docs-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.docs-crumb a {
  color: var(--text-secondary);
  text-decoration: none;
}

.docs-crumb a:hover {
  color: var(--accent-cyan);
}

.docs-crumb-sep {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.docs-reader .docs-search {
  flex: 0 0 20rem;
  max-width: 42%;
}

.docs-reader .docs-search input {
  height: 2.3rem;
  padding-right: 2.5rem;
  box-shadow: none;
}

.docs-reader .docs-search-submit {
  width: 1.7rem;
  height: 1.7rem;
  background: transparent;
  color: var(--text-muted);
}

.docs-updated {
  margin: 0 0 0.15rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.docs-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(10.5rem, 12.5rem);
  gap: 1.1rem;
  align-items: start;
  flex: 1 1 auto;
}

.docs-article {
  min-width: 0;
  padding: 1.15rem 1.35rem 1.5rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.15rem;
  background: #ffffff;
  box-shadow: none;
}

.docs-toc {
  position: sticky;
  top: calc(var(--nav-h) + 0.85rem);
  max-height: calc(100vh - var(--nav-h) - 1.6rem);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0.35rem 0 0.35rem 0.85rem;
  border-left: 1px solid var(--border-subtle);
}

.docs-toc strong {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 700;
}

.docs-toc a {
  display: block;
  padding: 0.22rem 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.4;
  text-decoration: none;
}

.docs-toc a.is-h3 {
  padding-left: 0.7rem;
}

.docs-toc a:hover,
.docs-toc a.is-active {
  color: #003fec;
}

.docs-md {
  color: var(--text-secondary);
  font-size: 0.97rem;
  line-height: 1.8;
}

.docs-md > *:first-child {
  margin-top: 0;
}

.docs-md h1,
.docs-md h2,
.docs-md h3,
.docs-md h4 {
  margin: 1.7rem 0 0.7rem;
  color: var(--text-primary);
  line-height: 1.35;
  scroll-margin-top: calc(var(--nav-h) + 0.85rem);
}

.docs-md h2 {
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 1.22rem;
}

.docs-md h3 { font-size: 1.06rem; }
.docs-md p { margin: 0.7rem 0; }
.docs-md a { color: #003fec; }
.docs-md ul,
.docs-md ol { padding-left: 1.3rem; }
.docs-md li + li { margin-top: 0.25rem; }
.docs-md blockquote {
  margin: 1rem 0;
  padding: 0.15rem 0 0.15rem 1rem;
  border-left: 3px solid rgba(0, 63, 236, 0.45);
  color: var(--text-muted);
}
.docs-md code {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.86em;
  padding: 0.08rem 0.32rem;
  border-radius: 5px;
  background: #e6eefd;
  color: #003fec;
}
.docs-md .docs-pre-wrap {
  position: relative;
  margin: 1rem 0;
}
.docs-md .docs-copy {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 1;
  padding: 0.2rem 0.5rem;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
}
.docs-md pre {
  overflow: auto;
  margin: 0;
  padding: 0.95rem 1rem;
  border-radius: 10px;
  background: #0c1929;
  color: #e2e8f0;
}
.docs-md pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}
.docs-md .docs-table-wrap {
  overflow: auto;
  margin: 1rem 0;
}
.docs-md table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.docs-md th,
.docs-md td {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border-subtle);
  text-align: left;
}
.docs-md th {
  background: var(--bg-elevated, #eef3f6);
  color: var(--text-primary);
}
.docs-md img {
  max-width: 100%;
  border-radius: 8px;
}
.docs-md .docs-mermaid {
  margin: 1.1rem 0;
  padding: 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: #fff;
  overflow: auto;
}
.docs-md .docs-mermaid svg {
  max-width: 100%;
  height: auto;
}
.docs-md .docs-mermaid-fallback {
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.docs-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.docs-pager--next-only,
.docs-pager--prev-only {
  grid-template-columns: 1fr;
}

.docs-pager--next-only .is-next,
.docs-pager--prev-only a {
  justify-self: stretch;
  width: 100%;
  max-width: none;
}

.docs-pager--next-only .is-next {
  text-align: right;
}

.docs-pager--prev-only a {
  text-align: left;
}

.docs-pager a,
.docs-pager span {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.85rem;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
}

.docs-pager a:hover {
  border-color: rgba(0, 63, 236, 0.28);
}

.docs-pager .is-next {
  text-align: right;
}

.docs-pager small {
  color: #94a3b8;
  font-size: 0.72rem;
}

.docs-pager strong {
  color: #0c1929;
  font-size: 0.88rem;
  font-weight: 600;
}

.docs-state {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-muted);
}

.docs-spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto 1rem;
  border: 3px solid #e6eefd;
  border-top-color: #003fec;
  border-radius: 50%;
  animation: docs-spin 0.8s linear infinite;
}

@keyframes docs-spin {
  to { transform: rotate(360deg); }
}

.docs-aside-toggle {
  display: none;
}

@media (max-width: 1080px) {
  .docs-home-body,
  .docs-article-layout {
    grid-template-columns: 1fr;
  }

  .docs-toc {
    display: none;
  }

  .docs-reader .docs-search {
    flex-basis: 14rem;
    max-width: 48%;
  }
}

@media (max-width: 900px) {
  .docs-workspace {
    display: block;
    min-height: 0;
    padding: 0.65rem 0.85rem 1.25rem;
  }

  .docs-aside-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.65rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: var(--bg-surface);
    color: var(--text-primary);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
  }

  .docs-aside {
    display: none;
    position: static;
    max-height: 70vh;
  }

  .docs-page.is-nav-open .docs-aside {
    display: flex;
  }

  .docs-workspace-main {
    height: auto;
    overflow: visible;
  }

  .docs-hero {
    min-height: 0;
  }

  .docs-reader-head-row {
    flex-direction: column;
    align-items: stretch;
  }

  .docs-reader .docs-search {
    flex-basis: auto;
    max-width: none;
  }

  .docs-pager {
    grid-template-columns: 1fr;
  }

  .docs-pager .is-next,
  .docs-pager--next-only .is-next {
    justify-self: stretch;
    width: 100%;
    text-align: left;
  }
}

/* 文档页一键置顶 */
.docs-back-top {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1.15rem, env(safe-area-inset-bottom, 0px));
  z-index: 60;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #0c1929;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.92);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease, color 0.2s ease, border-color 0.2s ease;
}

.docs-back-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.docs-back-top:hover,
.docs-back-top:focus-visible {
  color: #003fec;
  border-color: rgba(0, 63, 236, 0.22);
  outline: none;
}

.docs-back-top svg {
  width: 18px;
  height: 18px;
}

.docs-md .docs-mermaid svg .node rect,
.docs-md .docs-mermaid svg .node polygon,
.docs-md .docs-mermaid svg .node circle,
.docs-md .docs-mermaid svg .cluster rect {
  fill: #e6eefd !important;
  stroke: #003fec !important;
}

.docs-md .docs-mermaid svg .edgePath path,
.docs-md .docs-mermaid svg .flowchart-link {
  stroke: #003fec !important;
}

.docs-md .docs-mermaid svg .marker {
  fill: #003fec !important;
  stroke: #003fec !important;
}

/* 汉堡菜单：与官网一致，纯白不透明，不透出背后文档内容 */
body.docs-page.nav-open .navbar {
  background: #ffffff !important;
  background-color: #ffffff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: none !important;
  box-shadow: none !important;
  z-index: 200;
  overflow: visible;
}

body.docs-page.nav-open .nav-drawer {
  visibility: visible !important;
  pointer-events: auto !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  isolation: isolate;
  z-index: 201;
}

body.docs-page.nav-open .nav-drawer::before {
  content: "";
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background: #ffffff;
  pointer-events: none;
}

body.docs-page.nav-open .docs-main,
body.docs-page.nav-open .docs-back-top,
body.docs-page.nav-open .footer {
  visibility: hidden !important;
  pointer-events: none !important;
}

@media (max-width: 767px) {
  .docs-page .navbar {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }

  .docs-workspace {
    padding: 0.55rem max(0.75rem, env(safe-area-inset-right, 0px)) 1.35rem max(0.75rem, env(safe-area-inset-left, 0px));
  }

  .docs-reader .docs-search {
    flex-basis: auto;
    max-width: none;
    width: 100%;
  }

  .docs-md {
    font-size: 0.95rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
  }

  .docs-md h2 {
    font-size: 1.2rem;
  }

  .docs-md h3 {
    font-size: 1.05rem;
  }

  .docs-md .docs-table-wrap {
    margin-inline: -0.25rem;
    -webkit-overflow-scrolling: touch;
  }

  .docs-md pre,
  .docs-md .docs-pre-wrap {
    max-width: 100%;
    overflow-x: auto;
  }

  .docs-md img,
  .docs-md .docs-mermaid svg {
    max-width: 100%;
    height: auto;
  }

  .docs-aside {
    max-height: min(70vh, 28rem);
  }
}
