/* ==========================================================================
   NextAI Code · API Reference
   Design system derived from design/DESIGN.md (Relate style reference)
   Palette: snow canvas + lavender wash + single royal-blue accent
   ========================================================================== */

:root {
  /* ---- Brand tokens (from design/variables.css) ---- */
  --color-snow-canvas: #fcfcfc;
  --color-lavender-wash: #f0f4fe;
  --color-midnight-ink: #020520;
  --color-graphite-body: #14141e;
  --color-slate-caption: #374151;
  --color-ash-helper: #6b7280;
  --color-stone-divider: #e2e8f0;
  --color-fog-surface: #f1f5f9;
  --color-royal-signal: #145aff;
  --color-cobalt-glow: #3b82f6;
  --color-mint-win: #16ca2e;
  --color-coral-lost: #f26052;
  --color-amber-pending: #ffa64d;
  --color-azure-focus: #0099ff;

  /* ---- Semantic mapping ---- */
  --bg-canvas: var(--color-snow-canvas);
  --bg-wash: var(--color-lavender-wash);
  --bg-nav: var(--color-snow-canvas);
  --bg-card: #ffffff;
  --bg-code: #f7f9fc;

  --border: var(--color-stone-divider);
  --border-subtle: #eef2f7;
  --border-strong: #cbd5e1;

  --text-primary: var(--color-midnight-ink);
  --text-body: var(--color-graphite-body);
  --text-secondary: var(--color-slate-caption);
  --text-tertiary: var(--color-ash-helper);

  --accent: var(--color-royal-signal);
  --accent-hover: #0f4ae0;
  --accent-soft: rgba(20, 90, 255, 0.06);
  --accent-ring: rgba(0, 153, 255, 0.18);

  /* ---- Type ---- */
  --font-sans: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, SFMono-Regular,
    Menlo, Consolas, monospace;

  /* ---- Shape ---- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 100px;

  --shadow-card: 0 1px 2px rgba(2, 5, 32, 0.04), 0 6px 24px -12px rgba(2, 5, 32, 0.08);
  --shadow-float: 0 1px 2px rgba(2, 5, 32, 0.04), 0 20px 50px -20px rgba(2, 5, 32, 0.12);

  /* ---- Layout ---- */
  --w-sidebar: 248px;
  --w-console: 560px;
  --w-content-max: 900px;
  --h-header: 60px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-canvas);
  color: var(--text-body);
  font-size: 16px;
  line-height: 1.63;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

::selection {
  background: rgba(20, 90, 255, 0.14);
}

/* ==========================================================================
   1. Platform Header — brand · search · console entry
   ========================================================================== */

header.platform-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--h-header);
  background: rgba(252, 252, 252, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  width: 26px;
  height: 26px;
  background: var(--accent);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.04em;
  user-select: none;
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.brand-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  background: var(--bg-wash);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  user-select: none;
  letter-spacing: 0.01em;
}

.header-aside {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-size: 13px;
  color: var(--text-tertiary);
  cursor: pointer;
  width: 244px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.search-trigger:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
  color: var(--text-secondary);
}

.kbd-shortcut {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--color-fog-surface);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  letter-spacing: -0.02em;
}

.btn-console {
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  background: var(--accent);
  text-decoration: none;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  transition: background 0.15s ease;
  white-space: nowrap;
  letter-spacing: -0.005em;
}

.btn-console:hover {
  background: var(--accent-hover);
  color: #ffffff;
}

.mobile-toggle-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   2. Layout grid — single nav tree, content, contextual rail
   ========================================================================== */

.viewport-grid {
  display: flex;
  min-height: calc(100vh - var(--h-header));
  width: 100%;
}

/* ==========================================================================
   3. Left navigation tree
   ========================================================================== */

aside.nav-pane {
  width: var(--w-sidebar);
  flex-shrink: 0;
  background: var(--bg-nav);
  border-right: 1px solid var(--border);
  position: sticky;
  top: var(--h-header);
  height: calc(100vh - var(--h-header));
  overflow-y: auto;
  padding: 36px 18px 28px;
}

.nav-group {
  margin-bottom: 32px;
}


.nav-group:last-child {
  margin-bottom: 0;
}

.nav-group-caption {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 0 12px;
  margin-bottom: 10px;
  user-select: none;
}

.nav-entry {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: background 0.12s ease, color 0.12s ease;
  line-height: 1.45;
  margin-bottom: 2px;
}

.nav-entry:hover {
  color: var(--text-primary);
  background: rgba(2, 5, 32, 0.035);
}

.nav-entry.active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 500;
}

.method-micro {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  padding: 2px 5px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  user-select: none;
  flex-shrink: 0;
}

.method-micro.post {
  background: var(--accent-soft);
  color: var(--accent);
}

.method-micro.get {
  background: rgba(22, 202, 46, 0.09);
  color: #0d9d24;
}

/* ==========================================================================
   4. Content column — generous rhythm, clear hierarchy
   ========================================================================== */

main.spec-pane {
  flex: 1;
  min-width: 0;
  padding: 64px 48px 140px;
  max-width: calc(100% - var(--w-sidebar) - var(--w-console));
  overflow-y: auto;
}

main.spec-pane > .spec-breadcrumb,
main.spec-pane > .article-body {
  max-width: var(--w-content-max);
  margin-left: auto;
  margin-right: auto;
}

/* 指南页面无右侧栏，正文独占剩余宽度 */
main.spec-pane.guide-mode {
  max-width: calc(100% - var(--w-sidebar));
}
.spec-breadcrumb {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* ---- Headings ---- */

.article-body h1 {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.033em;
  line-height: 1.12;
  color: var(--text-primary);
  margin: 0 0 20px;
}

.article-body h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.019em;
  line-height: 1.35;
  color: var(--text-primary);
  margin: 84px 0 24px;
}

.article-body h2:first-of-type {
  margin-top: 64px;
}

.article-body h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.45;
  color: var(--text-primary);
  margin: 48px 0 16px;
}

.article-body h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 36px 0 12px;
}

.article-body h2 + h3,
.article-body h2 + h4 {
  margin-top: 24px;
}

/* ---- Text ---- */

.article-body p {
  font-size: 16px;
  line-height: 1.72;
  color: var(--color-slate-caption);
  margin-bottom: 26px;
  max-width: 74ch;
}

.article-body hr {
  border: none;
  border-bottom: 1px solid var(--border);
  margin: 64px 0;
}

.article-body ul,
.article-body ol {
  padding-left: 22px;
  margin-bottom: 26px;
  color: var(--color-slate-caption);
  font-size: 16px;
  line-height: 1.72;
  max-width: 74ch;
}

.article-body li {
  margin-bottom: 9px;
}

.article-body li::marker {
  color: var(--border-strong);
}

.article-body strong {
  font-weight: 600;
  color: var(--text-primary);
}

.article-body blockquote {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 20px;
  margin: 30px 0;
  color: var(--color-slate-caption);
  font-size: 15px;
  line-height: 1.72;
  max-width: 74ch;
}

.article-body blockquote p {
  margin-bottom: 0;
  font-size: 15px;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin: 32px 0;
}

/* ---- Inline code ---- */

.article-body code:not(pre code) {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: -0.015em;
  background: var(--bg-code);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.article-body h1 code,
.article-body h2 code,
.article-body h3 code,
.article-body h4 code,
.article-body th code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* ==========================================================================
   5. Endpoint strip
   ========================================================================== */

.endpoint-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin: 0 0 40px;
  flex-wrap: wrap;
}

.endpoint-method {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  background: var(--accent);
  color: #ffffff;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.endpoint-method.get {
  background: var(--color-mint-win);
}

.endpoint-path {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text-primary);
  font-weight: 500;
  letter-spacing: -0.015em;
  flex: 1;
  word-break: break-all;
}

.endpoint-auth-badge {
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.endpoint-copy-btn {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}

.endpoint-copy-btn:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

/* ==========================================================================
   6. Parameter tables
   ========================================================================== */

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0 56px;
  font-size: 14.5px;
}

.article-body th {
  text-align: left;
  padding: 0 18px 12px 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.article-body td {
  padding: 20px 18px 20px 0;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--color-slate-caption);
  vertical-align: top;
  line-height: 1.6;
}

.article-body tbody tr:last-child td {
  border-bottom: none;
}

.article-body td:first-child {
  color: var(--text-primary);
}

.article-body td code:not(pre code) {
  font-size: 12.5px;
}

/* Badges */

.badge-required {
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  display: inline-block;
  white-space: nowrap;
}

.badge-optional {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-tertiary);
  background: transparent;
  padding: 2px 0;
  display: inline-block;
  white-space: nowrap;
}

/* ==========================================================================
   7. Step cards
   ========================================================================== */

.step-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 32px 0 56px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  transition: box-shadow 0.18s ease;
}

.step-card:hover {
  box-shadow: var(--shadow-card);
}

.step-card-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-pill);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.step-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.step-card-desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-slate-caption);
  margin: 0;
  max-width: none;
}

/* ==========================================================================
   8. FAQ lists
   ========================================================================== */

.faq-list {
  margin: 28px 0 56px;
}

.faq-list dt {
  font-weight: 600;
  font-size: 15.5px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-top: 32px;
  margin-bottom: 6px;
}

.faq-list dt:first-child {
  margin-top: 0;
}

.faq-list dd {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-slate-caption);
  margin-left: 0;
  max-width: 74ch;
}

/* ==========================================================================
   9. Inline code blocks
   ========================================================================== */

.code-block-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 28px 0 40px;
  overflow: hidden;
}

.code-block-header {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.code-lang-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

.code-copy-btn {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 12px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s ease, background 0.15s ease;
}

.code-copy-btn:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.code-copy-btn.copied {
  color: #0d9d24;
}

.code-block-wrapper pre {
  margin: 0;
  padding: 20px 20px;
  overflow-x: auto;
  background: var(--bg-code);
}

.code-block-wrapper pre code {
  background: transparent !important;
  padding: 0 !important;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.75;
  letter-spacing: -0.01em;
  color: var(--color-graphite-body);
}

/* ==========================================================================
   10. Right rail — code reference & outline (light surface)
   ========================================================================== */

aside.console-pane {
  width: var(--w-console);
  flex-shrink: 0;
  background: var(--bg-nav);
  border-left: 1px solid var(--border);
  position: sticky;
  top: var(--h-header);
  height: calc(100vh - var(--h-header));
  overflow-y: auto;
  padding: 36px 24px 56px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.console-module {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.module-toolbar {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.lang-tabs {
  display: flex;
  gap: 2px;
}

.lang-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: color 0.12s ease, background 0.12s ease;
}

.lang-tab-btn:hover {
  color: var(--text-primary);
}

.lang-tab-btn.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.btn-action-copy {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: color 0.12s ease, background 0.12s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-action-copy:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.btn-action-copy.copied {
  color: #0d9d24;
}

pre.code-surface {
  padding: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.75;
  letter-spacing: -0.01em;
  color: var(--color-graphite-body);
  overflow-x: auto;
  max-height: 360px;
  background: var(--bg-code);
  white-space: pre-wrap;
  word-break: break-word;
}


.resp-selector {
  display: flex;
  gap: 2px;
}

.resp-btn {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: color 0.12s ease, background 0.12s ease;
}

.resp-btn:hover {
  color: var(--text-primary);
}

.resp-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ==========================================================================
   12. Search modal
   ========================================================================== */

.search-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 5, 32, 0.32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
}

.search-modal-backdrop.open {
  display: flex;
}

.search-modal-box {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  width: 600px;
  max-width: calc(100vw - 32px);
  box-shadow: var(--shadow-float);
  overflow: hidden;
  animation: modalEnter 0.16s cubic-bezier(0, 0, 0.2, 1);
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-input-wrap {
  display: flex;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  color: var(--text-tertiary);
}

.search-input-field {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-primary);
  background: transparent;
}

.search-input-field::placeholder {
  color: var(--text-tertiary);
}

.search-results-list {
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  transition: background 0.12s ease, color 0.12s ease;
}

.search-result-item:hover,
.search-result-item.selected {
  background: var(--accent-soft);
  color: var(--text-primary);
}

.search-result-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.search-result-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--color-fog-surface);
  color: var(--text-tertiary);
}

.search-modal-footer {
  padding: 12px 22px;
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
}

.search-modal-footer .kbd-shortcut {
  background: transparent;
}

/* ==========================================================================
   13. Mobile drawer
   ========================================================================== */

.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 5, 32, 0.32);
  z-index: 90;
  display: none;
}

.mobile-drawer-backdrop.open {
  display: block;
}

.mobile-drawer-panel {
  width: 300px;
  max-width: 86vw;
  height: 100%;
  background: var(--bg-card);
  padding: 24px 20px;
  overflow-y: auto;
  position: absolute;
  left: 0;
  top: 0;
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ==========================================================================
   14. Responsive
   ========================================================================== */

@media (max-width: 1280px) {
  main.spec-pane {
    padding: 56px 56px 120px;
  }
}

@media (max-width: 1200px) {
  .viewport-grid {
    flex-direction: column;
  }

  aside.nav-pane {
    display: none;
  }

  main.spec-pane,
  main.spec-pane.guide-mode {
    max-width: 100%;
    padding: 48px 40px 120px;
  }

  aside.console-pane {
    width: 100%;
    height: auto;
    position: static;
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 40px 40px 64px;
  }

  aside.guide-toc-pane {
    width: 100%;
    height: auto;
    position: static;
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 40px;
  }

  .mobile-toggle-btn {
    display: flex;
  }

  .search-trigger {
    width: 180px;
  }
}

@media (max-width: 900px) {
  .article-body table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .article-body table td:last-child {
    white-space: normal;
    min-width: 220px;
  }
}
@media (max-width: 768px) {
  header.platform-header {
    padding: 0 18px;
  }

  main.spec-pane {
    padding: 36px 22px 96px;
  }

  aside.console-pane,
  aside.guide-toc-pane {
    padding: 36px 22px 64px;
  }

  .article-body h1 {
    font-size: 31px;
  }

  .article-body h2 {
    font-size: 20px;
    margin-top: 64px;
  }

  .endpoint-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .brand-name {
    white-space: nowrap;
  }

  .brand-label {
    display: none;
  }

  .search-trigger {
    width: 148px;
  }

  .search-trigger span:first-of-type {
    display: none;
  }

  /* 抽屉底部已有控制台入口，顶栏放不下时隐藏 */
  .header-aside .btn-console {
    display: none;
  }
}

.mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.mobile-drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-drawer-brand strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

.mobile-drawer-close {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-md);
  transition: color 0.15s ease;
}

.mobile-drawer-close:hover {
  color: var(--text-primary);
}

.mobile-drawer-foot {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 24px;
  text-align: center;
}
