/* FHQ 文档页样式 - 继承落地页蓝白风格 */
.doc-body {
  background: var(--gray-50);
  min-height: 100vh;
}

.doc-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-200);
}
.doc-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.doc-header .logo { font-size: 1.125rem; }
.doc-header-nav { display: flex; align-items: center; gap: 20px; }
.doc-header-nav a {
  color: var(--gray-600);
  font-size: 0.875rem;
  font-weight: 500;
}
.doc-header-nav a:hover { color: var(--blue-600); }
.doc-header-nav a.active { color: var(--blue-600); font-weight: 600; }

.doc-layout {
  display: flex;
  max-width: 1280px;
  margin: 0 auto;
  padding: 84px 24px 48px;
  gap: 32px;
  align-items: flex-start;
}

/* Sidebar */
.doc-sidebar {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.doc-sidebar-inner {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px 0;
}
.doc-sidebar-title {
  padding: 0 20px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
}
.doc-nav { list-style: none; }
.doc-nav li a {
  display: block;
  padding: 8px 20px;
  font-size: 0.875rem;
  color: var(--gray-600);
  border-left: 3px solid transparent;
  transition: all 0.15s;
}
.doc-nav li a:hover {
  color: var(--blue-600);
  background: var(--blue-50);
}
.doc-nav li a.active {
  color: var(--blue-700);
  background: var(--blue-50);
  border-left-color: var(--blue-600);
  font-weight: 600;
}
.doc-nav-section {
  padding: 16px 20px 6px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-400);
}

/* Main content */
.doc-main {
  flex: 1;
  min-width: 0;
}
.doc-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-bottom: 24px;
}
.doc-breadcrumb a { color: var(--gray-500); }
.doc-breadcrumb a:hover { color: var(--blue-600); }
.doc-breadcrumb span { color: var(--gray-400); }

.doc-content {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 40px 48px;
}
.doc-content h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 12px;
  line-height: 1.3;
}
.doc-lead {
  font-size: 1.0625rem;
  color: var(--gray-500);
  margin-bottom: 32px;
  line-height: 1.7;
}
.doc-content h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-200);
}
.doc-content h2:first-of-type { margin-top: 0; }
.doc-content h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 28px 0 12px;
}
.doc-content p {
  margin-bottom: 16px;
  color: var(--gray-700);
  line-height: 1.75;
}
.doc-content ul, .doc-content ol {
  margin: 0 0 16px 24px;
  color: var(--gray-700);
  line-height: 1.75;
}
.doc-content li { margin-bottom: 6px; }
.doc-content li ul, .doc-content li ol { margin-top: 6px; margin-bottom: 6px; }

.doc-content code:not(pre code) {
  background: var(--gray-100);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-family: "Consolas", "Monaco", monospace;
  color: var(--blue-800);
}
.doc-content a { color: var(--blue-600); }
.doc-content a:hover { color: var(--blue-700); text-decoration: underline; }

/* Tables */
.doc-table-wrap { overflow-x: auto; margin-bottom: 24px; }
.doc-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.doc-content th, .doc-content td {
  padding: 10px 14px;
  border: 1px solid var(--gray-200);
  text-align: left;
}
.doc-content th {
  background: var(--blue-50);
  font-weight: 600;
  color: var(--gray-800);
}
.doc-content tr:nth-child(even) td { background: var(--gray-50); }

/* Code blocks */
.code-block {
  position: relative;
  margin: 16px 0 24px;
  background: var(--gray-900);
  border-radius: 8px;
  overflow: hidden;
}
.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.code-block-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
}
.code-block .btn-copy {
  position: static;
  transform: none;
  padding: 4px 12px;
  font-size: 0.6875rem;
}
.code-block pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
}
.code-block code {
  display: block;
  color: #a5f3fc;
  font-size: 0.8125rem;
  font-family: "Consolas", "Monaco", monospace;
  line-height: 1.6;
  white-space: pre;
  background: none;
  padding: 0;
}

/* Alert boxes */
.doc-alert {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 8px;
  margin: 20px 0;
  font-size: 0.875rem;
  line-height: 1.6;
}
.doc-alert-icon { font-size: 1.125rem; flex-shrink: 0; line-height: 1.4; }
.doc-alert-warning {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
}
.doc-alert-tip {
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  color: var(--blue-900);
}
.doc-alert-info {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
}
.doc-alert-danger {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}
.doc-alert strong { display: block; margin-bottom: 4px; }

/* Steps */
.doc-steps { counter-reset: doc-step; margin: 24px 0; }
.doc-step {
  position: relative;
  padding-left: 56px;
  margin-bottom: 32px;
}
.doc-step::before {
  counter-increment: doc-step;
  content: counter(doc-step);
  position: absolute;
  left: 0; top: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  color: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.doc-step h3 { margin-top: 4px; }

/* Doc cards (index hub) */
.doc-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 8px;
}
.doc-card {
  display: block;
  padding: 24px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}
.doc-card:hover {
  border-color: var(--blue-300);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  color: inherit;
}
.doc-card-icon { font-size: 1.75rem; margin-bottom: 12px; }
.doc-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0 0 8px;
}
.doc-card p {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin: 0;
  line-height: 1.5;
}

/* FAQ accordion-style */
.faq-item {
  border-bottom: 1px solid var(--gray-200);
  padding: 20px 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-q {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 10px;
}
.faq-a { font-size: 0.9375rem; color: var(--gray-600); line-height: 1.7; }
.faq-a p:last-child { margin-bottom: 0; }

/* TOC in-page */
.doc-toc {
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 32px;
}
.doc-toc-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--blue-800);
  margin-bottom: 10px;
}
.doc-toc ul { list-style: none; margin: 0; padding: 0; }
.doc-toc li { margin-bottom: 4px; }
.doc-toc a {
  font-size: 0.875rem;
  color: var(--blue-700);
}
.doc-toc a:hover { text-decoration: underline; }

/* Mobile sidebar toggle */
.doc-sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--blue-600);
  color: #fff;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
}

/* Footer */
.doc-footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 0.8125rem;
  color: var(--gray-500);
}
.doc-footer a { color: var(--blue-600); }

@media (max-width: 900px) {
  .doc-layout { flex-direction: column; padding-top: 76px; }
  .doc-sidebar {
    position: fixed;
    top: 60px; left: 0; bottom: 0;
    width: 280px;
    z-index: 150;
    background: rgba(0,0,0,0.4);
    padding: 0;
    max-height: none;
    transform: translateX(-100%);
    transition: transform 0.25s;
  }
  .doc-sidebar.open { transform: translateX(0); }
  .doc-sidebar-inner {
    width: 260px;
    height: 100%;
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
  }
  .doc-sidebar-toggle { display: flex; align-items: center; justify-content: center; }
  .doc-content { padding: 28px 24px; }
  .doc-cards { grid-template-columns: 1fr; }
  .doc-header-nav { display: none; }
}
