/* =====================================================================
   帮助中心 · 文章页样式 help-article.css
   统一文章模板：双栏布局 + 卡片式 scroll-spy 目录 + 平台 Tab + 正文排版
   ===================================================================== */

/* ---------- 文章页头 ---------- */
.art-head { background: linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%); padding: 40px 0 36px; }
.art-head .container { max-width: 1100px; }
.art-head__cat { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700;
  color: var(--brand); background: var(--brand-soft); padding: 5px 14px; border-radius: var(--radius-pill); }
.art-head__cat svg { width: 15px; height: 15px; flex-shrink: 0; }
.art-head h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.2; letter-spacing: -.01em; margin: 16px 0 0; }
.art-head__meta { margin-top: 14px; color: var(--ink-3); font-size: 14px; display: flex; flex-wrap: wrap; gap: 18px; }
.art-head__meta span { display: inline-flex; align-items: center; gap: 6px; }
.art-head__meta svg { width: 15px; height: 15px; }

/* ---------- 双栏布局 ---------- */
.art-layout { max-width: 1100px; display: grid; grid-template-columns: 260px 1fr; gap: 48px; align-items: start; }

/* ---------- 卡片式目录 + scroll-spy ---------- */
.art-toc { position: sticky; top: calc(var(--header-h) + 20px); }
.art-toc__card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 20px; box-shadow: var(--shadow); }
.art-toc__title { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.art-toc__list { list-style: none; display: grid; gap: 2px; }
.art-toc__list a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px;
  color: var(--ink-2); font-size: 14px; line-height: 1.4; text-decoration: none; transition: background .18s var(--ease), color .18s var(--ease); }
.art-toc__list a:hover { background: var(--bg-soft); color: var(--ink); }
.art-toc__num { flex-shrink: 0; width: 22px; height: 22px; border-radius: 7px; background: var(--bg-soft);
  color: var(--ink-3); font-size: 12px; font-weight: 700; display: grid; place-items: center; transition: all .18s var(--ease); }
.art-toc__list a.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.art-toc__list a.is-active .art-toc__num { background: var(--brand); color: #fff; }

/* ---------- 正文排版 ---------- */
.art-body { min-width: 0; }
.art-body section { scroll-margin-top: calc(var(--header-h) + 16px); }
.art-body h2 { font-size: 24px; margin: 40px 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); letter-spacing: -.01em; }
.art-body section:first-child h2 { margin-top: 0; }
.art-body h3 { font-size: 18.5px; margin: 28px 0 12px; color: var(--ink); }
.art-body h4 { font-size: 15.5px; margin: 20px 0 8px; color: var(--ink); }
.art-body p { color: var(--ink-2); line-height: 1.8; margin: 0 0 14px; font-size: 15.5px; }
.art-body ul, .art-body ol { margin: 0 0 16px; padding-left: 0; list-style: none; display: grid; gap: 9px; }
.art-body li { position: relative; padding-left: 26px; color: var(--ink-2); line-height: 1.75; font-size: 15.5px; }
.art-body ul > li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--brand); }
/* 有序列表计数器：在每个区块 / 平台面板内连续递增（可跨多个 ol） */
.art-body section, .ptabs__panel { counter-reset: li; }
.art-body ol > li { counter-increment: li; }
.art-body ol > li::before { content: counter(li); position: absolute; left: 0; top: 1px; width: 20px; height: 20px;
  border-radius: 6px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 700;
  display: grid; place-items: center; }
.art-body li ul, .art-body li ol { margin: 9px 0 0; }
.art-body a:not(.btn) { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.art-body strong, .art-body b { color: var(--ink); font-weight: 700; }
.art-body img { max-width: 100%; height: auto; border-radius: var(--radius-md, 12px); border: 1px solid var(--line);
  box-shadow: var(--shadow); margin: 8px 0 6px; display: block; }
.art-body figure { margin: 18px 0; }
.art-table-wrap { overflow-x: auto; margin: 18px 0; }
.art-body table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.art-body th, .art-body td { text-align: left; padding: 10px 14px; border: 1px solid var(--line); }
.art-body thead th { background: var(--bg-soft); color: var(--ink); font-weight: 700; }
.art-body tbody tr:nth-child(even) { background: var(--bg-soft); }
.art-body kbd { display: inline-block; padding: 2px 7px; font-size: 12.5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ink); background: #fff; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; }
.art-body figcaption { font-size: 13px; color: var(--ink-3); margin-top: 8px; text-align: center; }
.art-body hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }

/* ---------- 要点速览卡片 ---------- */
.art-takeaways { background: var(--blue-soft); border-radius: var(--radius-lg); padding: 26px 28px; margin: 0 0 28px; }
.art-takeaways h2 { border: 0; margin: 0 0 14px; padding: 0; font-size: 18px; display: flex; align-items: center; gap: 10px; color: var(--blue); }
.art-takeaways h2 svg { width: 22px; height: 22px; }
.art-takeaways ul { margin: 0; }
.art-takeaways li { color: var(--ink-2); }
.art-takeaways li::before { background: var(--blue) !important; }

/* ---------- 提示框 callout ---------- */
.art-note { display: flex; gap: 14px; padding: 16px 20px; border-radius: var(--radius-md, 12px);
  background: var(--brand-soft); border-left: 4px solid var(--brand); margin: 18px 0; }
.art-note svg { width: 20px; height: 20px; color: var(--brand); flex-shrink: 0; margin-top: 2px; }
.art-note p { margin: 0; font-size: 14.5px; }

/* ---------- 受众卡片 ---------- */
.art-audience { display: flex; gap: 14px; padding: 18px 22px; border-radius: var(--radius-md, 12px);
  border: 1px dashed var(--line); background: var(--bg-soft); margin: 0 0 24px; }
.art-audience svg { width: 22px; height: 22px; color: var(--brand); flex-shrink: 0; margin-top: 2px; }
.art-audience b { display: block; color: var(--ink); margin-bottom: 3px; font-size: 14.5px; }
.art-audience p { margin: 0; font-size: 14.5px; }

/* ---------- 平台 Tab 切换 ---------- */
.ptabs { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; margin: 18px 0 22px; }
.ptabs__nav { display: flex; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.ptabs__btn { flex: 1; border: 0; background: none; cursor: pointer; padding: 13px 16px; font-family: inherit;
  font-weight: 700; font-size: 14px; color: var(--ink-3); transition: all .2s var(--ease);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-bottom: 2px solid transparent; }
.ptabs__btn svg { width: 17px; height: 17px; }
.ptabs__btn:hover { color: var(--ink); }
.ptabs__btn.is-active { color: var(--brand); background: #fff; border-bottom-color: var(--brand); }
.ptabs__panel { display: none; padding: 22px 24px; animation: ptabFade .3s var(--ease); }
.ptabs__panel.is-active { display: block; }
@keyframes ptabFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ptabs__panel > :first-child { margin-top: 0; }
.ptabs__panel > :last-child { margin-bottom: 0; }

/* ---------- 反馈 ---------- */
.art-feedback { margin: 40px 0 0; padding: 28px; border-radius: var(--radius-lg); background: var(--bg-soft);
  text-align: center; border: 1px solid var(--line); }
.art-feedback b { font-size: 16px; color: var(--ink); }
.art-feedback__btns { display: inline-flex; gap: 12px; margin-top: 16px; }
.art-feedback__btns button { border: 1px solid var(--line); background: #fff; cursor: pointer; padding: 9px 22px;
  border-radius: var(--radius-pill); font-family: inherit; font-size: 14px; font-weight: 600; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 7px; transition: all .2s var(--ease); }
.art-feedback__btns button svg { width: 16px; height: 16px; }
.art-feedback__btns button:hover { border-color: var(--brand); color: var(--brand); }
.art-feedback__btns button.is-picked { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.art-feedback__thanks { margin-top: 14px; color: var(--ink-3); font-size: 14px; display: none; }
.art-feedback__thanks.is-show { display: block; }

/* ---------- 相关文章 + 支持 CTA ---------- */
.art-related { margin-top: 40px; }
.art-related h2 { font-size: 20px; border: 0; padding: 0; margin: 0 0 18px; }
.art-related__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.art-related__grid a { display: flex; align-items: center; gap: 12px; padding: 16px 18px; text-decoration: none;
  color: inherit; border: 1px solid var(--line); border-radius: var(--radius-md, 12px); background: #fff; transition: all .2s var(--ease); }
.art-related__grid a:hover { box-shadow: var(--shadow); border-color: transparent; }
.art-related__grid svg { width: 18px; height: 18px; color: var(--brand); flex-shrink: 0; }
.art-related__grid b { font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.5; }

.art-support { margin-top: 40px; padding: 28px 30px; border-radius: var(--radius-lg); background: var(--ink); color: #d1d5db;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.art-support > div { display: flex; flex-direction: column; justify-content: center; }
.art-support h3 { color: #fff; font-size: 18px; margin: 0 0 4px; }
.art-support p { margin: 0; font-size: 14px; color: #9ca3af; }

/* ---------- 分类页 · 文章列表卡片 ---------- */
.hc-cat-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.hc-art { display: flex; align-items: center; gap: 14px; padding: 20px 22px; text-decoration: none; color: inherit;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.hc-art:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.hc-art__icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: 11px; background: var(--brand-soft);
  color: var(--brand); display: grid; place-items: center; }
.hc-art__icon svg { width: 20px; height: 20px; }
.hc-art:nth-child(even) .hc-art__icon { background: var(--blue-soft); color: var(--blue); }
.hc-art__title { flex: 1; font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.5; }
.hc-art__arrow { flex-shrink: 0; color: var(--ink-3); }
.hc-art__arrow svg { width: 16px; height: 16px; }
.hc-art:hover .hc-art__arrow { color: var(--brand); }
@media (max-width: 720px) { .hc-cat-list { grid-template-columns: 1fr; } }

/* ---------- 移动端 ---------- */
@media (max-width: 920px) {
  .art-layout { grid-template-columns: 1fr; gap: 0; }
  .art-toc { position: static; margin-bottom: 28px; }
  .art-toc__card { padding: 18px; }
  .art-related__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .ptabs__btn { padding: 11px 8px; font-size: 13px; gap: 5px; }
  .ptabs__btn svg { width: 15px; height: 15px; }
  .ptabs__panel { padding: 18px 16px; }
  .art-support { padding: 22px; }
}
