/* SmithAPI 开发者文档中心样式表
 * 纯原生 CSS（零框架依赖），严格对齐：
 * - 极简纯白 / 深板岩双主题骨架、73px 顶栏、左侧粘性导航、右侧本篇目录与暗色代码块
 * - 三轴分段控制面板、四格连接要素卡片与三列错误码排查网格
 */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #f8fafb;
  --panel-strong: #f1f5f7;
  --text: #172b34;
  --muted: #687c85;
  --quiet: #70838b;
  --border: #e5ecef;
  --teal: #0d8177;
  --teal-hover: #0a6d64;
  --teal-soft: #eaf8f4;
  --hover: #f0f7f5;
  --danger: #bd4f2f;
  --code-bg: #15252e;
  --code-text: #e6f4f2;
  --code-border: #233742;
  --shadow: 0 14px 44px rgba(23, 56, 58, 0.08);
  --card-shadow: 0 4px 18px rgba(20, 125, 116, 0.07);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111c23;
  --panel: #17252e;
  --panel-strong: #1e303a;
  --text: #e3edf1;
  --muted: #a2b4bd;
  --quiet: #8ea3ae;
  --border: #2a3a43;
  --teal: #60d5be;
  --teal-hover: #7de1cd;
  --teal-soft: #163b37;
  --hover: #1b322f;
  --danger: #f08a6c;
  --code-bg: #0c161c;
  --code-text: #e6f4f2;
  --code-border: #1e313c;
  --shadow: 0 14px 44px rgba(0, 0, 0, 0.34);
  --card-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
}

/* 极细低存在感滚动条，消除深色模式下刺眼粗白条 */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(128, 148, 158, 0.26) transparent;
}

*::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(128, 148, 158, 0.28);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(13, 129, 119, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

img,
svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.theme-switching *,
.theme-switching *::before,
.theme-switching *::after {
  transition: none !important;
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
}

/* ==================== 顶部粘性导航栏 ==================== */
.docs-app {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.docs-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 73px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1512px;
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.mobile-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  flex-shrink: 0;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--panel);
  flex-shrink: 0;
}

.brand-titles {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.brand-name {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.5px;
  color: var(--text);
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.brand-sep {
  width: 1px;
  height: 21px;
  background: var(--border);
  margin: 0 2px;
}

.brand-section {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: 8px;
}

.header-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 73px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.16s ease;
  white-space: nowrap;
}

.header-link:hover {
  color: var(--text);
}

.header-link.active {
  color: var(--teal);
  font-weight: 600;
}

.header-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--teal);
  border-radius: 2px 2px 0 0;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tutorial-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 7px 10px;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.tutorial-search:focus-within {
  border-color: var(--teal);
  background: var(--bg);
}

.tutorial-search-icon {
  color: var(--muted);
  flex-shrink: 0;
}

.tutorial-search input {
  width: 160px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
}

.tutorial-search input::placeholder {
  color: var(--quiet);
}

.tutorial-search kbd {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  color: var(--quiet);
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 4px;
  padding: 1px 5px;
  line-height: 1.3;
  flex-shrink: 0;
}

.search-clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
  flex-shrink: 0;
}

.icon-btn:hover {
  color: var(--teal);
  border-color: var(--teal);
}

.header-home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--teal) 32%, var(--border));
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.header-home-btn:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

:root[data-theme="dark"] .header-home-btn:hover {
  color: #091715;
}

.sidebar-home-btn {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  height: 34px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--teal) 30%, var(--border));
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 12px;
  font-weight: 600;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.sidebar-home-btn:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

:root[data-theme="dark"] .sidebar-home-btn:hover {
  color: #091715;
}

.studio-cta-banner {
  margin: 18px 0 22px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--teal) 28%, var(--border));
  background: linear-gradient(135deg, var(--teal-soft), var(--panel));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.studio-cta-banner strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.studio-cta-banner p {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.studio-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 15px;
  border-radius: 9px;
  background: var(--teal);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.16s ease;
}

.studio-cta-btn:hover {
  background: var(--teal-hover);
}

:root[data-theme="dark"] .studio-cta-btn {
  color: #091715;
}

.icon-sun {
  display: none;
}

:root[data-theme="dark"] .icon-sun {
  display: block;
}

:root[data-theme="dark"] .icon-moon {
  display: none;
}

/* ==================== 外层三栏 / 两栏主栅格 ==================== */
.docs-layout {
  max-width: 1512px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  min-height: calc(100vh - 73px);
}

.docs-layout.has-toc {
  grid-template-columns: 248px minmax(0, 1fr) 186px;
}

@media (min-width: 1600px) {
  .docs-layout {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }
}

/* ==================== 左侧固定侧边栏 ==================== */
.docs-sidebar {
  position: sticky;
  top: 73px;
  height: calc(100vh - 73px);
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid var(--border);
  padding: 18px 12px 16px 16px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.sidebar-top-link {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-top-link:hover {
  background: var(--hover);
  color: var(--text);
}

.sidebar-top-link.active {
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 650;
}

.nav-group {
  margin-top: 9px;
  min-width: 0;
}

.nav-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px 4px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--text);
  white-space: nowrap;
}

.nav-group-icon {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.nav-group-icon img,
.nav-group-icon svg {
  width: 17px;
  height: 17px;
  object-fit: contain;
  border-radius: 4px;
}

:root[data-theme="dark"] .icon-invert-dark {
  filter: invert(1) brightness(1.1);
}

:root[data-theme="light"] .icon-theme-dark {
  display: none !important;
}

:root[data-theme="dark"] .icon-theme-light {
  display: none !important;
}

:root[data-theme="dark"] .icon-logo-surface {
  background: #ffffff;
  border-radius: 50%;
  padding: 1px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  min-height: 31px;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-link:hover {
  background: var(--hover);
  color: var(--text);
}

.sidebar-link.active {
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 600;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 16px;
  min-width: 0;
}

.sidebar-note {
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 11.5px;
  line-height: 1.55;
  min-width: 0;
}

.sidebar-note strong {
  display: block;
  font-size: 12px;
  color: var(--text);
  margin-bottom: 4px;
}

.sidebar-note p {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.sidebar-note code {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--panel-strong);
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-all;
}

.sidebar-footer {
  margin-top: 12px;
  padding: 6px 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--quiet);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
  flex-shrink: 0;
}

:root[data-theme="dark"] .status-dot {
  background: #4ade80;
}

/* ==================== 中间正文区域 ==================== */
.docs-main {
  min-width: 0;
  padding: 32px 54px 48px;
}

.tutorial-article {
  max-width: 900px;
  margin: 0 auto;
}

/* ==================== 右侧 Sticky 目录栏 ==================== */
.tutorial-toc {
  width: 180px;
  position: sticky;
  top: 95px;
  align-self: start;
  padding: 4px 18px 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toc-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--border);
  padding-left: 12px;
}

.toc-item {
  display: block;
  text-align: left;
  padding: 4px 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  transition: color 0.14s ease;
}

.toc-item:hover {
  color: var(--text);
}

.toc-item.active {
  color: var(--teal);
  font-weight: 600;
}

.toc-top-link {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tutorial-toc-toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 16px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
}

.tutorial-mobile-toc {
  display: none;
  margin-bottom: 20px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
}

.tutorial-mobile-toc.open {
  display: block;
}

.tutorial-mobile-toc .toc-list {
  border-left: 0;
  padding-left: 0;
}

/* ==================== 文档首页（999555999 + Claude/OpenAI 编辑美学） ==================== */
@keyframes docsFadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gatewayFlowDash {
  from {
    stroke-dashoffset: 36;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes gatewayRingPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(13, 129, 119, 0.22);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(13, 129, 119, 0);
  }
}

.docs-animate-in {
  animation: docsFadeUp 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.docs-home-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(356px, 1.04fr);
  gap: 24px;
  align-items: center;
  padding: 14px 0 30px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 14px;
}

.hero-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

.docs-home-hero h1 {
  margin: 0;
  font-size: clamp(32px, 3.2vw, 44px);
  line-height: 1.24;
  font-weight: 750;
  letter-spacing: -1.2px;
  color: var(--text);
}

.docs-home-hero h1 .accent-mark {
  color: var(--teal);
}

.hero-lead {
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 480px;
}

.hero-cta-row {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 9px;
  background: var(--teal);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.16s ease;
}

:root[data-theme="dark"] .btn-primary {
  color: #091d1a;
}

.btn-primary:hover {
  background: var(--teal-hover);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.btn-secondary:hover {
  border-color: var(--teal);
  background: var(--panel);
}

.hero-caption {
  margin-top: 12px;
  font-size: 12px;
  color: var(--quiet);
}

.hero-flow-card {
  position: relative;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(155deg, var(--teal-soft) 0%, var(--bg) 68%, var(--panel) 100%);
  padding: 16px 16px 13px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-flow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 11px;
  margin-bottom: 11px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.hero-flow-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--teal);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 999px;
}

.hero-flow-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.08fr);
  align-items: center;
  gap: 7px;
}

.hero-flow-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.flow-path-base {
  fill: none;
  stroke: var(--border);
  stroke-width: 1.5;
}

.flow-path-pulse {
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-dasharray: 6 30;
  animation: gatewayFlowDash 2.2s linear infinite;
  opacity: 0.85;
}

.flow-path-pulse.delay-1 {
  animation-delay: -0.7s;
}

.flow-path-pulse.delay-2 {
  animation-delay: -1.4s;
}

.hero-flow-col {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.flow-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  white-space: nowrap;
  min-width: 0;
}

.flow-chip img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  border-radius: 3px;
  flex-shrink: 0;
}

.flow-chip-proto {
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  padding: 5px 6px;
}

.flow-proto-tag {
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 1px 5px;
  border-radius: 4px;
  flex-shrink: 0;
}

.hero-flow-hub {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 4px;
}

.hub-core {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  border: 1.5px solid var(--teal);
  background: var(--bg);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: gatewayRingPulse 2.8s ease-in-out infinite;
}

.hub-core img {
  width: 100%;
  height: 100%;
  border-radius: 9px;
  object-fit: cover;
}

.hub-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  white-space: nowrap;
}

.hero-flow-foot {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
}

.hero-flow-foot-left {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* Claude/OpenAI 博客风文章顶部编辑插画横幅 & 官方品牌头标 */
.editorial-banner {
  margin: 18px 0 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.editorial-banner img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

:root[data-theme="dark"] .editorial-banner img {
  filter: brightness(0.9) contrast(1.03);
}

.editorial-banner figcaption {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.article-brand-strip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 5px 11px 5px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
}

.article-brand-logos {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.article-brand-logos img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 5px;
}

.article-brand-lockup {
  height: 36px !important;
  width: auto !important;
  border-radius: 6px !important;
}

:root[data-theme="dark"] .article-brand-lockup-lightbg {
  background: #ffffff;
  padding: 3px 6px;
  border-radius: 6px !important;
}

/* B站保姆级视频教程卡片区 */
.video-guide-strip {
  margin: 26px 0 22px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
}

.video-guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.video-guide-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.video-guide-title img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.video-guide-note {
  font-size: 12px;
  color: var(--muted);
}

.video-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.video-guide-grid.single-col {
  grid-template-columns: minmax(0, 1fr);
}

.video-guide-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.video-guide-card:hover {
  border-color: var(--teal);
  box-shadow: var(--card-shadow);
  transform: translateY(-1px);
}

.video-guide-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
}

.video-up-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.video-duration-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--panel-strong);
  color: var(--text);
  flex-shrink: 0;
}

.video-guide-card h4 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.5;
  color: var(--text);
}

.video-guide-cta {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .docs-animate-in,
  .flow-path-pulse,
  .hub-core {
    animation: none !important;
  }
}

/* 四步横向引导条 */
.tutorial-journey {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  margin: 18px 0 26px;
  overflow: hidden;
}

.journey-item {
  padding: 18px 20px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  transition: background 0.16s ease;
}

.journey-item:last-child {
  border-right: 0;
}

.journey-item:hover {
  background: var(--panel);
}

.journey-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--teal);
}

.journey-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

/* 推荐快速入口大面板 */
.tutorial-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 38px;
}

.featured-kicker {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 8px;
}

.tutorial-featured h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.tutorial-featured p {
  margin: 10px 0 18px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

.featured-preview {
  border-radius: 12px;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  padding: 18px;
  color: var(--code-text);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
}

.featured-preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
}

.featured-preview-row + .featured-preview-row {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.featured-preview-label {
  font-family: var(--font-sans);
  font-size: 11px;
  color: #8fa6b2;
  flex-shrink: 0;
}

.featured-preview-val {
  color: #7ee3cf;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 客户端三列卡片网 */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-kicker {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 4px;
}

.section-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 750;
  color: var(--text);
}

.section-aside {
  font-size: 13px;
  color: var(--muted);
}

.tutorial-client-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 42px;
}

.tutorial-client-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.tutorial-client-card:hover {
  border-color: var(--teal);
  box-shadow: var(--card-shadow);
  transform: translateY(-1px);
}

.client-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  overflow: hidden;
}

.client-icon-wrap img,
.client-icon-wrap svg {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 5px;
}

.tutorial-client-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.tutorial-client-card p {
  margin: 6px 0 14px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  flex: 1;
}

.card-link-cta {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 排错关键词标签 */
.troubleshoot-sec {
  margin-bottom: 40px;
}

.troubleshoot-sec h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.troubleshoot-sec p {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
}

.troubleshoot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.tag-chip:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-soft);
}

/* 最近更新与页面底部 */
.recent-sec h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.recent-list {
  border-top: 1px solid var(--border);
}

.recent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  transition: color 0.15s ease, background 0.15s ease;
}

.recent-row:hover {
  color: var(--teal);
}

.recent-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--quiet);
  flex-shrink: 0;
}

/* ==================== 内页文章排版 & 999555999 组件 ==================== */
.article-heading {
  margin-bottom: 24px;
}

.article-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 10px;
}

.article-heading h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: -0.6px;
  color: var(--text);
}

.article-summary {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

.article-meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--quiet);
}

.tutorial-block-note {
  background: var(--teal-soft);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 18px 0 22px;
}

.tutorial-block-note h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.tutorial-block-note p {
  margin: 6px 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
}

.tutorial-prose h2 {
  margin: 34px 0 14px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  scroll-margin-top: 90px;
}

.tutorial-step-number {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tutorial-prose h3 {
  margin: 24px 0 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  scroll-margin-top: 90px;
}

.tutorial-prose p {
  margin: 12px 0;
  font-size: 14px;
  line-height: 1.85;
  color: var(--text);
}

.tutorial-prose ul,
.tutorial-prose ol {
  margin: 10px 0 14px;
  padding-left: 20px;
}

.tutorial-prose li {
  margin: 6px 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
}

.tutorial-prose code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--panel-strong);
  color: var(--text);
  padding: 2px 6px;
  border-radius: 4px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tutorial-prose pre,
.tutorial-prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  overflow-wrap: normal;
  word-break: normal;
}

.tutorial-prose blockquote {
  margin: 16px 0;
  padding: 2px 0 2px 16px;
  border-left: 3px solid var(--teal);
  color: var(--muted);
  font-size: 13.5px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 14px 0 18px;
}

.tutorial-prose table,
.tutorial-block-note table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
  font-size: 13px;
}

.tutorial-prose th,
.tutorial-prose td,
.tutorial-block-note th,
.tutorial-block-note td {
  padding: 7px 11px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.tutorial-prose th,
.tutorial-block-note th {
  background: var(--panel);
  font-weight: 600;
  color: var(--text);
}

/* 操作系统 / 协议切换标签 */
.tutorial-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 12px;
}

.tutorial-tab-btn {
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

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

.tutorial-tab-btn.active {
  background: var(--teal-soft);
  color: var(--teal);
  border-color: var(--teal);
}

/* 暗色代码块（附顶部标签栏与复制按钮） */
.docs-code-block {
  margin: 14px 0 18px;
  border-radius: 10px;
  border: 1px solid var(--code-border);
  background: var(--code-bg);
  overflow: hidden;
}

.docs-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #93aab5;
}

.docs-code-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #60d5be;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.15s ease;
}

.docs-code-copy:hover {
  background: rgba(96, 213, 190, 0.16);
}

.docs-code-block pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--code-text);
  white-space: pre;
}

/* ==================== 麦讯风格：三轴交互控制台 & 四格卡片 & 三列错误码 ==================== */
.docs-control-panel {
  display: grid;
  grid-template-columns: 1.55fr 0.72fr 1.25fr;
  align-items: start;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  padding: 16px 18px;
  margin-top: 18px;
}

.docs-control-group > p {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.docs-segmented-control {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--panel);
}

.docs-segmented-control button {
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.docs-segmented-control button:hover {
  color: var(--teal);
}

.docs-segmented-control button.active {
  background: var(--bg);
  color: var(--teal);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.docs-fact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.docs-fact-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  padding: 14px;
}

.docs-fact-card > p {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.docs-fact-card h3 {
  margin: 7px 0 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
  color: var(--text);
}

.docs-fact-card span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.docs-tutorial-card,
.docs-errors-card {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  overflow: hidden;
}

.docs-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.docs-card-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.7px;
  color: var(--teal);
}

.docs-card-header h2 {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 750;
  color: var(--text);
}

.docs-card-sub {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.docs-mode-pill {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--teal);
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
}

.docs-card-body {
  padding: 10px 22px 22px;
}

.docs-step {
  display: flex;
  gap: 14px;
  padding: 18px 0;
}

.docs-step + .docs-step {
  border-top: 1px solid var(--border);
}

.docs-step-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

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

.docs-step-main h3 {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.docs-step-main > p {
  margin: 6px 0 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
}

.docs-step-note {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 9px;
  background: var(--teal-soft);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.6;
}

.docs-error-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 20px 22px;
}

.docs-error-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  padding: 16px;
}

.docs-error-card strong {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: var(--danger);
}

.docs-error-card h3 {
  margin: 8px 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.docs-error-card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}

/* ==================== 一键脚本与 CC Switch 持久化组件适配 ==================== */
.qsw-card {
  margin: 20px 0 26px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  padding: 22px;
}

.qsw-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.qsw-kicker {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.7px;
  color: var(--teal);
  margin-bottom: 4px;
}

.qsw-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  color: var(--text);
}

.qsw-sub {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.qsw-key-row {
  display: block;
  margin-bottom: 16px;
}

.qsw-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.qsw-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
}

.qsw-input:focus {
  border-color: var(--teal);
}

.qsw-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.qsw-pane {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  padding: 16px;
  min-width: 0;
}

.qsw-pane-title {
  margin: 0 0 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.qsw-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.qsw-tab {
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.qsw-tab.is-active {
  background: var(--teal-soft);
  color: var(--teal);
  border-color: var(--teal);
}

.qsw-cmd-box {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 9px;
  background: var(--code-bg);
  color: var(--code-text);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.qsw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qsw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.qsw-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.qsw-btn-primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

:root[data-theme="dark"] .qsw-btn-primary {
  color: #091d1a;
}

.qsw-btn-primary:hover {
  background: var(--teal-hover);
  color: #ffffff;
}

:root[data-theme="dark"] .qsw-btn-primary:hover {
  color: #091d1a;
}

.qsw-status {
  margin: 12px 0 0;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 12.5px;
  font-weight: 600;
}

.qsw-status[data-tone="warn"] {
  background: rgba(189, 79, 47, 0.12);
  color: var(--danger);
}

/* ==================== 内联搜索结果视图 ==================== */
.search-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.search-bar-head-left {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.search-bar-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.search-bar-sub {
  font-size: 12px;
  color: var(--muted);
}

.search-exit-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

.tutorial-result {
  display: block;
  width: 100%;
  text-align: left;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.tutorial-result:hover h3 {
  color: var(--teal);
}

.tutorial-result-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 4px;
}

.tutorial-result h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.tutorial-result p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

/* ==================== 极简底部 ==================== */
.tutorial-footer {
  margin-top: 44px;
  padding: 26px 0 12px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--quiet);
  line-height: 1.75;
}

.tutorial-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin-bottom: 8px;
}

.tutorial-footer-links a:hover {
  color: var(--teal);
}

.mobile-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(12, 22, 28, 0.45);
}

.mobile-scrim.open {
  display: block;
}

/* ==================== 响应式断点（严格匹配 999555999 + 麦讯） ==================== */
@media (max-width: 1250px) {
  .docs-layout {
    grid-template-columns: 236px minmax(0, 1fr);
  }
  .docs-layout.has-toc {
    grid-template-columns: 232px minmax(0, 1fr) 172px;
  }
  .docs-main {
    padding: 28px 36px 40px;
  }
}

@media (max-width: 1200px) {
  .docs-layout,
  .docs-layout.has-toc {
    grid-template-columns: 228px minmax(0, 1fr);
  }
  .tutorial-toc {
    display: none;
  }
  .tutorial-toc-toggle {
    display: flex;
  }
  .tutorial-client-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .docs-control-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .docs-fact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .docs-error-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .header-links {
    display: none;
  }
  .docs-main {
    padding: 24px 28px 36px;
  }
}

@media (max-width: 900px) {
  .tutorial-search input {
    width: 120px;
  }
  .qsw-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .docs-header {
    height: 64px;
  }
  .header-inner {
    padding: 0 16px;
    gap: 10px;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .brand-sub,
  .brand-sep,
  .brand-section,
  .tutorial-search kbd {
    display: none;
  }
  .docs-layout,
  .docs-layout.has-toc {
    grid-template-columns: minmax(0, 1fr);
    min-height: calc(100vh - 64px);
  }
  .docs-sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    width: 256px;
    height: calc(100vh - 64px);
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow);
  }
  .docs-sidebar.open {
    transform: translateX(0);
  }
}

@media (max-width: 760px) {
  .docs-home-hero {
    grid-template-columns: 1fr;
    padding-top: 4px;
  }
  .hero-flow-card {
    display: none;
  }
  .video-guide-grid {
    grid-template-columns: 1fr;
  }
  .tutorial-journey {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .journey-item:nth-child(2) {
    border-right: 0;
  }
  .journey-item:nth-child(1),
  .journey-item:nth-child(2) {
    border-bottom: 1px solid var(--border);
  }
  .tutorial-featured {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px;
  }
  .tutorial-featured > * {
    min-width: 0;
  }
  .featured-preview-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .featured-preview-val {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .article-heading h1 {
    font-size: 26px;
  }
  .tutorial-search input {
    width: 96px;
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .docs-main {
    padding: 20px 18px 32px;
  }
  .docs-control-panel,
  .docs-fact-grid,
  .docs-error-grid {
    grid-template-columns: 1fr;
  }
  .docs-segmented-control {
    width: 100%;
    overflow-x: auto;
  }
  .docs-segmented-control button {
    flex: 1 0 auto;
  }
  .docs-card-header {
    flex-direction: column;
  }
  .qsw-head {
    flex-direction: column;
  }
}

@media (max-width: 540px) {
  .header-inner {
    padding: 0 12px;
    gap: 8px;
  }
  .docs-header .brand-titles {
    display: none;
  }
  .header-actions {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
    gap: 6px;
  }
  .tutorial-search {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 170px;
  }
  .tutorial-search input {
    width: 100%;
    min-width: 48px;
  }
  .header-home-btn {
    padding: 0 9px;
    font-size: 12px;
  }
  .header-home-btn svg {
    display: none;
  }
}

@media (max-width: 420px) {
  .tutorial-client-grid {
    grid-template-columns: 1fr;
  }
}
