/* =============================================================================
   MetaPlan 官网 — 产品文档中心（对齐控制台文档壳）
   ============================================================================= */

.docs-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
}

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

.docs-page .navbar {
  position: sticky;
  top: 0;
  flex: 0 0 auto;
  z-index: 40;
}

.docs-page .nav-links a.is-active,
.docs-page .nav-docs.is-active {
  color: var(--text-primary);
}

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

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

#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 var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-surface);
  overflow: hidden;
}

.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 var(--border-subtle);
  text-decoration: none;
  color: inherit;
}

.docs-aside-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent-cyan) 14%, transparent);
  color: var(--accent-cyan);
}

.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: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 700;
}

.docs-aside-text em {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-style: normal;
}

.docs-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.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: var(--text-muted);
  cursor: pointer;
}

.docs-nav-toggle:hover {
  color: var(--accent-cyan);
  background: color-mix(in srgb, var(--accent-cyan) 10%, transparent);
}

.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: 8px;
  background: transparent;
  color: var(--text-secondary);
  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: var(--text-primary);
}

.docs-nav-item:hover,
.docs-nav-leaf:hover,
.docs-nav-item.is-active,
.docs-nav-leaf.is-active,
.docs-nav-item.is-current {
  color: var(--accent-cyan);
  background: color-mix(in srgb, var(--accent-cyan) 10%, transparent);
}

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

.docs-nav-sub,
.docs-nav-leafs {
  margin: 0 0 0.2rem 0.7rem;
  padding: 0 0 0 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  border-left: 1px solid color-mix(in srgb, var(--accent-cyan) 22%, var(--border-subtle));
}

.docs-nav-leafs {
  border-left-color: var(--border-subtle);
}

.docs-nav-leaf {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

.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 var(--border-subtle);
  border-radius: 16px;
  background:
    linear-gradient(
      105deg,
      color-mix(in srgb, var(--bg-surface) 88%, transparent) 0%,
      color-mix(in srgb, var(--bg-surface) 42%, transparent) 52%,
      transparent 100%
    ),
    radial-gradient(ellipse 70% 80% at 88% 18%, color-mix(in srgb, var(--accent-cyan) 22%, transparent), transparent 58%),
    radial-gradient(ellipse 50% 70% at 72% 92%, color-mix(in srgb, var(--accent-violet) 16%, transparent), transparent 55%),
    var(--bg-surface);
  overflow: hidden;
}

.docs-hero-kicker {
  display: none;
}

.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: var(--text-primary);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.docs-hero-spark {
  width: 1.15rem;
  height: 1.15rem;
  color: var(--accent-cyan);
}

.docs-hero-desc {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  max-width: 38rem;
  color: var(--text-secondary);
  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 color-mix(in srgb, var(--bg-surface) 55%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-surface) 72%, transparent);
  color: var(--accent-cyan);
  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: color-mix(in srgb, var(--accent-cyan) 32%, transparent);
  background: color-mix(in srgb, var(--bg-surface) 62%, transparent);
}

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

.docs-search input {
  width: 100%;
  height: 3rem;
  padding: 0 3.1rem 0 1.05rem;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.93rem;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--text-primary) 6%, transparent);
}

.docs-search input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent-cyan) 55%, var(--border-subtle));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-cyan) 16%, transparent);
}

.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: color-mix(in srgb, var(--accent-cyan) 14%, transparent);
  color: var(--accent-cyan);
  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: color-mix(in srgb, var(--accent-cyan) 10%, transparent);
  color: var(--accent-cyan);
}

.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: var(--accent-cyan);
}

.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: color-mix(in srgb, var(--accent-cyan) 14%, transparent);
  color: var(--accent-cyan);
  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 color-mix(in srgb, var(--bg-surface) 55%, var(--border-subtle));
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-surface) 72%, transparent);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent-cyan) 8%, transparent);
  text-align: center;
  cursor: pointer;
}

.docs-learn-card:hover {
  border-color: color-mix(in srgb, var(--accent-cyan) 32%, transparent);
}

.docs-learn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent-cyan) 12%, transparent);
  color: var(--accent-cyan);
}

.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: color-mix(in srgb, var(--accent-cyan) 55%, var(--text-muted));
}

.docs-learn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: auto;
  padding-top: 0.35rem;
  color: var(--accent-cyan);
  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 var(--border-subtle);
  border-radius: 16px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--accent-cyan) 8%, var(--bg-base)) 0%,
    color-mix(in srgb, var(--accent-cyan) 3%, var(--bg-base)) 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 color-mix(in srgb, var(--bg-surface) 70%, var(--border-subtle));
  border-radius: 10px;
  background: var(--bg-surface);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--text-primary) 4%, transparent);
}

.docs-cat:hover {
  border-color: color-mix(in srgb, var(--docs-cat-accent, var(--accent-cyan)) 35%, var(--border-subtle));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--docs-cat-accent, var(--accent-cyan)) 12%, transparent);
}

.docs-cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--docs-cat-accent, var(--accent-cyan)) 12%, transparent);
  color: var(--docs-cat-accent, var(--accent-cyan));
}

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

.docs-cat--0 { --docs-cat-accent: var(--accent-cyan); }
.docs-cat--1 { --docs-cat-accent: var(--accent-green, #0f766e); }
.docs-cat--2 { --docs-cat-accent: var(--accent-violet); }
.docs-cat--3 { --docs-cat-accent: #2563eb; }
.docs-cat--4 { --docs-cat-accent: #b45309; }

.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 var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-surface);
}

.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: color-mix(in srgb, var(--accent-cyan) 8%, transparent);
}

.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: #6b7280;
  background: color-mix(in srgb, #6b7280 16%, transparent);
}

.docs-hot-rank.is-1 { color: #d45252; background: color-mix(in srgb, #e06a6a 22%, transparent); }
.docs-hot-rank.is-2 { color: #db7a3a; background: color-mix(in srgb, #e8924e 22%, transparent); }
.docs-hot-rank.is-3 { color: #c9a21e; background: color-mix(in srgb, #dfb832 22%, transparent); }
.docs-hot-rank.is-4 { color: #3d6fb8; background: rgb(220, 234, 255); }

.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: var(--accent-cyan);
  background: color-mix(in srgb, var(--accent-cyan) 14%, transparent);
}

.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.15rem 0.15rem 0.5rem;
}

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

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

.docs-article h1.docs-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.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 var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-surface);
}

.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: var(--accent-cyan);
}

.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: 0.6rem;
}

.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: var(--accent-cyan); }
.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(14, 116, 144, 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: var(--bg-elevated, #eef3f6);
}
.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 var(--border-subtle);
}

.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 var(--border-subtle);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}

.docs-pager a:hover {
  border-color: color-mix(in srgb, var(--accent-cyan) 35%, var(--border-subtle));
}

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

.docs-pager small {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.docs-pager strong {
  color: var(--text-primary);
  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 rgba(14, 116, 144, 0.16);
  border-top-color: var(--accent-cyan);
  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 {
    text-align: left;
  }
}
