:root {
  --docs-primary: #0f766e;
  --docs-primary-deep: #115e59;
  --docs-bg: #ffffff;
  --docs-sidebar: #f0fdfa;
  --docs-border: #ccfbf1;
  --docs-text: #0f172a;
  --docs-muted: #64748b;
  --docs-code-bg: #134e4a;
  --docs-code-fg: #5eead4;
  --docs-active-bg: #ccfbf1;
  --docs-active-fg: #0f766e;
  --docs-callout-bg: #f0fdfa;
  --docs-callout-fg: #115e59;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--docs-bg);
  color: var(--docs-text);
  line-height: 1.65;
  font-size: 16px;
}

a { color: var(--docs-primary); text-decoration: none; }
a:hover { color: var(--docs-primary-deep); }

/* Header */
header.docs-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
}

.docs-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 800;
  color: var(--docs-text);
  flex-shrink: 0;
}

.docs-logo span { color: var(--docs-primary); }

.docs-nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
  font-size: 14px;
  flex-wrap: wrap;
}

.docs-nav-links a {
  color: var(--docs-muted);
  font-weight: 500;
}

.docs-nav-links a:hover,
.docs-nav-links a.active {
  color: var(--docs-primary);
  font-weight: 600;
}

.btn-docs {
  background: var(--docs-primary-deep);
  color: #fff !important;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.btn-docs:hover {
  background: #0f766e;
  color: #fff !important;
}

/* Layout */
.docs-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 220px;
  max-width: 1440px;
  margin: 0 auto;
  min-height: calc(100vh - 60px);
}

.docs-sidebar-left {
  background: var(--docs-sidebar);
  border-right: 1px solid var(--docs-border);
  padding: 24px 16px;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  font-size: 14px;
}

.sidebar-group-title {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  margin: 16px 0 8px;
  letter-spacing: 0.05em;
}

.sidebar-group-title:first-child { margin-top: 0; }

.sidebar-menu { list-style: none; }
.sidebar-menu li { margin-bottom: 4px; }

.sidebar-menu a {
  display: block;
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--docs-muted);
  font-weight: 500;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
  background: var(--docs-active-bg);
  color: var(--docs-active-fg);
}

.docs-main-content {
  padding: 36px 48px;
  max-width: 860px;
}

.docs-main-content h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--docs-text);
  line-height: 1.3;
}

.docs-lead {
  color: var(--docs-muted);
  margin-bottom: 20px;
  font-size: 16px;
}

.docs-main-content h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--docs-text);
}

.docs-main-content p {
  margin-bottom: 12px;
}

.docs-main-content ul {
  margin: 0 0 16px 20px;
}

.docs-main-content li {
  margin-bottom: 8px;
}

.callout-box {
  background: var(--docs-callout-bg);
  border-left: 4px solid var(--docs-primary);
  border-radius: 4px;
  padding: 16px;
  margin: 20px 0;
  font-size: 14px;
  color: var(--docs-callout-fg);
}

.docs-code {
  background: var(--docs-code-bg);
  color: var(--docs-code-fg);
  padding: 16px;
  border-radius: 8px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  margin: 16px 0;
  overflow-x: auto;
  line-height: 1.7;
  white-space: pre-wrap;
}

.docs-toc-right {
  padding: 24px 16px;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  font-size: 13px;
  color: var(--docs-muted);
  border-left: 1px solid #f1f5f9;
}

.toc-title {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
  font-size: 12px;
  text-transform: uppercase;
}

.toc-list { list-style: none; }
.toc-list li { margin-bottom: 8px; }
.toc-list a { color: var(--docs-muted); }
.toc-list a:hover { color: var(--docs-primary); }

/* Download flow steps */
.flow-step-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}

.flow-step-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--docs-primary-deep);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.flow-step-card h2 {
  font-size: 18px;
  margin: 0 0 8px;
}

.flow-step-card p {
  color: var(--docs-muted);
  font-size: 14px;
  margin: 8px 0 16px;
}

.flow-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.flow-actions .btn-docs {
  padding: 8px 16px;
}

/* Footer */
footer.docs-footer {
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 28px 0 20px;
  font-size: 13px;
  color: var(--docs-muted);
}

.docs-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 1100px) {
  .docs-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }
  .docs-toc-right { display: none; }
}

@media (max-width: 768px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar-left { display: none; }
  .docs-nav-links { display: none; }
  .docs-main-content { padding: 28px 20px; }
  .docs-main-content h1 { font-size: 26px; }
}
