/* ============================================================
   帮助中心样式（黑金科技感）
   与站点 common/tfyun_header 配套，作用于 /help 系列页面
   ============================================================ */

:root {
  --help-gold: #ffb800;
  --help-gold-2: #ffd15c;
  --help-ink: #0d0f14;
  --help-ink-2: #14171f;
  --help-line: rgba(255, 255, 255, 0.08);
  --help-text: #e7e9ee;
  --help-muted: #9aa0ab;
}

/* ---------- Hero ---------- */
.help-hero {
  background: radial-gradient(1200px 400px at 20% -10%, rgba(255, 184, 0, 0.18), transparent 60%),
              linear-gradient(180deg, #0b0d12 0%, #12151d 100%);
  color: #fff;
  padding: 72px 0 60px;
  border-bottom: 1px solid var(--help-line);
}
.help-hero.help-hero-sm { padding: 40px 0 32px; }
.help-eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--help-gold);
  font-weight: 700;
  margin-bottom: 12px;
}
.help-hero h1 { font-size: 40px; font-weight: 800; margin: 0 0 12px; color: #fff; }
.help-hero p { font-size: 16px; color: var(--help-muted); margin: 0 0 28px; }

/* ---------- 搜索框 ---------- */
.help-search {
  display: flex; align-items: center; gap: 8px;
  max-width: 640px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--help-line);
  border-radius: 12px;
  padding: 8px 8px 8px 16px;
}
.help-search svg { color: var(--help-gold); flex: none; }
.help-search input {
  flex: 1; background: transparent; border: 0; outline: none;
  color: #fff; font-size: 15px; height: 40px;
}
.help-search input::placeholder { color: #6f7684; }
.help-search button {
  flex: none; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--help-gold), var(--help-gold-2));
  color: #221c00; font-weight: 700; font-size: 15px;
  padding: 0 24px; height: 40px; border-radius: 9px;
}
.help-search button:hover { filter: brightness(1.05); }

/* ---------- 首页产品卡片 ---------- */
.help-section { padding: 48px 0 64px; background: #f6f7fb; }
.help-section-title { font-size: 22px; font-weight: 700; color: #1a1d24; margin: 0 0 24px; }
.help-product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px;
}
.help-product-card {
  display: flex; align-items: center; gap: 16px;
  background: #fff; border: 1px solid #eceef3; border-radius: 14px;
  padding: 20px; text-decoration: none; transition: all .18s ease;
}
.help-product-card:hover {
  border-color: var(--help-gold); transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(20, 23, 31, 0.08);
}
.help-product-icon {
  width: 48px; height: 48px; flex: none; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1a1d24, #2a2f3a); color: var(--help-gold);
}
.help-product-icon svg { width: 24px; height: 24px; }
.help-product-info { flex: 1; }
.help-product-info h3 { font-size: 17px; font-weight: 700; color: #1a1d24; margin: 0 0 4px; }
.help-product-count { font-size: 13px; color: #8b909b; }
.help-product-arrow { color: #c4c8d2; flex: none; }
.help-product-card:hover .help-product-arrow { color: var(--help-gold); }
.help-source-note { margin-top: 28px; font-size: 13px; color: #a2a7b2; }

/* ---------- 搜索结果 ---------- */
.help-empty-tip { color: #6f7684; font-size: 15px; padding: 24px 0; }
.help-result-list { list-style: none; padding: 0; margin: 0; }
.help-result-list li { border-bottom: 1px solid #ececf0; }
.help-result-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 4px; text-decoration: none;
}
.help-result-title { color: #1a1d24; font-size: 15px; font-weight: 600; }
.help-result-list a:hover .help-result-title { color: #b8860b; }
.help-result-product { color: #8b909b; font-size: 13px; flex: none; }

/* ---------- 文档页布局 ---------- */
.help-doc-wrap { background: #fff; }
.help-doc-container {
  display: grid; grid-template-columns: 280px 1fr; gap: 32px;
  padding-top: 24px; padding-bottom: 56px; align-items: start;
}

/* 侧边栏 */
.help-sidebar {
  position: sticky; top: 16px;
  max-height: calc(100vh - 32px); overflow-y: auto;
  border-right: 1px solid #eef0f4; padding-right: 16px;
}
.help-sidebar-product { margin-bottom: 16px; }
.help-product-select {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid #e3e6ec; background: #f7f8fb; color: #1a1d24;
  font-size: 14px; font-weight: 600;
}

/* 文档树 */
.help-tree, .help-tree ul { list-style: none; margin: 0; padding: 0; }
.help-tree-root > .help-tree-group > .help-tree-group-title { font-weight: 700; color: #1a1d24; }
.help-tree-group-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 6px; font-size: 14px; color: #2c303a; cursor: pointer; border-radius: 8px;
}
.help-tree-group-title:hover { background: #f4f5f8; }
.help-tree-caret { transition: transform .18s ease; color: #b0b5bf; }
.help-tree-group.open > .help-tree-group-title .help-tree-caret { transform: rotate(90deg); }
.help-tree-sub { display: none; padding-left: 12px; border-left: 1px solid #eef0f4; margin-left: 6px; }
.help-tree-group.open > .help-tree-sub { display: block; }
.help-tree-item a {
  display: block; padding: 7px 8px; font-size: 13.5px; color: #5b616e;
  text-decoration: none; border-radius: 7px; line-height: 1.5;
}
.help-tree-item a:hover { background: #f4f5f8; color: #1a1d24; }
.help-tree-item.active a {
  background: linear-gradient(135deg, rgba(255,184,0,.16), rgba(255,209,92,.16));
  color: #97650a; font-weight: 700;
}
.help-tree-empty { color: #9aa0ab; font-size: 14px; }

/* 正文 */
.help-doc-main { min-width: 0; }
.help-breadcrumb { font-size: 13px; color: #8b909b; margin-bottom: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.help-breadcrumb a { color: #8b909b; text-decoration: none; }
.help-breadcrumb a:hover { color: var(--help-gold); }
.help-breadcrumb-path { color: #5b616e; }
.help-breadcrumb-light a, .help-breadcrumb-light span { color: #c7ccd6; }

.help-article-title { font-size: 28px; font-weight: 800; color: #12151d; margin: 0 0 12px; }
.help-article-meta { display: flex; gap: 16px; font-size: 13px; color: #9aa0ab; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid #eef0f4; }

/* 导入正文排版 */
.help-article-body { font-size: 15px; line-height: 1.85; color: #33373f; }
.help-article-body h1, .help-article-body h2, .help-article-body h3, .help-article-body h4 {
  color: #14171f; font-weight: 700; margin: 28px 0 12px; line-height: 1.4;
}
.help-article-body h2 { font-size: 21px; padding-left: 12px; border-left: 4px solid var(--help-gold); }
.help-article-body h3 { font-size: 18px; }
.help-article-body p { margin: 12px 0; }
.help-article-body ul, .help-article-body ol { padding-left: 24px; margin: 12px 0; }
.help-article-body li { margin: 6px 0; }
.help-article-body a { color: #b8860b; text-decoration: underline; word-break: break-all; }
.help-article-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 12px 0; border: 1px solid #eef0f4; }
.help-article-body table {
  border-collapse: collapse; width: 100% !important; margin: 16px 0; font-size: 14px; overflow-x: auto; display: block;
}
.help-article-body table td, .help-article-body table th {
  border: 1px solid #e3e6ec !important; padding: 8px 12px; text-align: left; vertical-align: top;
}
.help-article-body table tr:first-child td, .help-article-body table th {
  background: #f6f7fb !important; font-weight: 600; color: #1a1d24;
}
.help-article-body code { background: #f4f5f8; padding: 2px 6px; border-radius: 5px; font-size: 13px; color: #b8860b; }
.help-article-body pre { background: #14171f; color: #e7e9ee; padding: 16px; border-radius: 10px; overflow-x: auto; }

.help-article-source {
  margin-top: 36px; padding: 14px 16px; border-radius: 10px;
  background: #f7f8fb; border: 1px dashed #dfe2e9; color: #8b909b; font-size: 13px;
}
.help-article-source a { color: #b8860b; }

/* 上一篇/下一篇 */
.help-article-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; }
.help-article-nav a {
  display: flex; flex-direction: column; gap: 4px; max-width: 48%;
  padding: 14px 18px; border: 1px solid #eceef3; border-radius: 12px; text-decoration: none;
  transition: border-color .18s ease;
}
.help-article-nav a:hover { border-color: var(--help-gold); }
.help-nav-next { align-items: flex-end; text-align: right; margin-left: auto; }
.help-nav-label { font-size: 12px; color: #9aa0ab; }
.help-nav-title { font-size: 14px; font-weight: 600; color: #1a1d24; }

.help-doc-empty { padding: 40px 0; }
.help-doc-empty h1 { font-size: 26px; color: #14171f; }
.help-doc-empty p { color: #8b909b; }

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
  .help-doc-container { grid-template-columns: 1fr; }
  .help-sidebar {
    position: static; max-height: none; border-right: 0; padding-right: 0;
    border-bottom: 1px solid #eef0f4; padding-bottom: 16px; margin-bottom: 8px;
  }
  .help-hero h1 { font-size: 30px; }
}
@media (max-width: 576px) {
  .help-article-nav { flex-direction: column; }
  .help-article-nav a { max-width: 100%; }
  .help-nav-next { align-items: flex-start; text-align: left; }
}
