/* ============================================================
   帮助中心样式（文章页 + 帮助首页专用组件）
   依赖站点全局 assets/css/style.css
   ============================================================ */

/* ---------- 文章页布局 ---------- */
.help-layout {
  display: grid; grid-template-columns: 264px 1fr; gap: 28px;
  align-items: start; padding: 56px 0 80px;
}
.help-side { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 16px; }
.help-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.help-card > h4 { font-size: 13px; color: var(--muted); letter-spacing: 2px; margin-bottom: 12px; font-weight: 600; }
.help-toc a {
  display: block; padding: 6px 0 6px 12px; font-size: 14px; color: var(--ink-2);
  border-left: 2px solid var(--line); transition: color .2s, border-color .2s;
}
.help-toc a:hover, .help-toc a.active { color: var(--blue-600); border-left-color: var(--blue-500); }
.help-rel a {
  display: block; padding: 9px 0; font-size: 13.5px; color: var(--ink-2);
  border-bottom: 1px dashed var(--line); transition: color .2s;
}
.help-rel a:last-child { border-bottom: 0; }
.help-rel a:hover { color: var(--blue-600); }
.help-back a {
  display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--blue-600);
}
.help-back a:hover { color: var(--blue-500); }
.help-back svg { width: 16px; height: 16px; }

/* ---------- 文章主体 ---------- */
.help-main { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 40px 44px; }
.help-main h2 {
  font-size: 21px; color: var(--navy-2); border-left: 4px solid var(--blue-500);
  padding-left: 12px; margin: 36px 0 14px; scroll-margin-top: calc(var(--header-h) + 24px);
}
.help-main h2:first-child { margin-top: 0; }
.help-main h3 { font-size: 16.5px; color: var(--ink); margin: 20px 0 10px; }
.help-main p { margin: 10px 0; font-size: 15px; color: var(--ink-2); }
.help-main b { color: var(--navy-2); }

.help-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.help-meta span {
  background: var(--blue-50); color: var(--blue-700); border: 1px solid var(--blue-100);
  border-radius: 6px; padding: 3px 10px; font-size: 12.5px;
}

ol.steps { counter-reset: step; list-style: none; margin: 12px 0; }
ol.steps li { position: relative; padding: 7px 0 7px 42px; counter-increment: step; font-size: 15px; color: var(--ink-2); }
ol.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 8px; width: 26px; height: 26px;
  background: var(--grad-2); color: #fff; border-radius: 50%; text-align: center;
  line-height: 26px; font-size: 13px; font-weight: 700;
}
ul.tips { list-style: none; margin: 10px 0; }
ul.tips li { position: relative; padding: 5px 0 5px 22px; font-size: 15px; color: var(--ink-2); }
ul.tips li::before {
  content: ""; position: absolute; left: 4px; top: 13px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--blue-400);
}

.help-note { border-radius: 10px; padding: 12px 16px; margin: 14px 0; font-size: 14px; line-height: 1.8; }
.help-note.ok { background: #E9F9F0; border-left: 4px solid #0B9E5C; color: #0B6A45; }
.help-note.warn { background: #FFF7E8; border-left: 4px solid #E8930C; color: #8A5A10; }
.help-note.danger { background: #FDEEEE; border-left: 4px solid #E24A4A; color: #A03030; }
.help-note b { color: inherit; }

.kv { background: var(--blue-50); border-radius: 8px; padding: 10px 14px; margin: 10px 0; font-size: 14px; }
.kv b { color: var(--blue-700); }

/* ---------- 上一篇 / 下一篇 ---------- */
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 26px; }
.prevnext a {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; font-size: 14px; color: var(--ink-2); min-height: 64px;
  display: flex; flex-direction: column; justify-content: center;
  transition: border-color .2s, box-shadow .2s;
}
.prevnext a:hover { border-color: var(--blue-400); box-shadow: var(--shadow-sm); }
.prevnext a:empty { visibility: hidden; }
.prevnext .dir { font-size: 11px; color: var(--muted); letter-spacing: 1px; margin-bottom: 4px; }
.prevnext a.next { text-align: right; align-items: flex-end; }

/* ---------- 帮助中心首页组件 ---------- */
.hc-search { display: flex; justify-content: center; margin: 26px auto 0; max-width: 640px; position: relative; }
.hc-search input {
  width: 100%; padding: 15px 24px 15px 52px; border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; font: inherit; font-size: 15px; outline: none;
  box-shadow: 0 8px 24px rgba(18, 13, 56, .10); transition: border-color .2s, box-shadow .2s;
}
.hc-search input:focus { border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(139, 92, 246, .16); }
.hc-search svg { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }

.hc-cats { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 28px 0 4px; }
.hc-cats button {
  padding: 9px 24px; border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; color: var(--ink-2); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.hc-cats button:hover { border-color: var(--blue-400); color: var(--blue-600); }
.hc-cats button.active { background: var(--grad-2); color: #fff; border-color: transparent; box-shadow: 0 8px 22px rgba(124, 58, 237, .3); }

.hc-group { margin-top: 44px; }
.hc-group > h3 {
  font-size: 19px; color: var(--navy-2); margin-bottom: 18px;
  padding-left: 12px; border-left: 4px solid var(--blue-500);
}
.hc-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.hc-item {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px;
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.hc-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--blue-100); }
.hc-item h4 { font-size: 16px; color: var(--navy-2); margin-bottom: 8px; }
.hc-item > p { font-size: 13px; color: var(--muted); margin-bottom: 14px; flex: 1; }
.hc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.hc-tags i {
  font-style: normal; font-size: 11.5px; background: var(--blue-50);
  color: var(--blue-700); border-radius: 999px; padding: 2px 10px;
}
.hc-updated { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.hc-empty { display: none; text-align: center; color: var(--muted); padding: 70px 0 30px; font-size: 15px; }
.hc-count { text-align: center; color: var(--muted); font-size: 13px; margin-top: 26px; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .help-layout { grid-template-columns: 1fr; padding: 40px 0 64px; }
  .help-side { position: static; grid-template-columns: 1fr 1fr; }
  .help-main { padding: 28px 24px; }
  .hc-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .help-side { grid-template-columns: 1fr; }
  .hc-list { grid-template-columns: 1fr; }
  .prevnext { grid-template-columns: 1fr; }
  .help-main { padding: 22px 18px; }
}
