/* 使用帮助：左边目录 + 中间正文 + 右边本页目录。颜色、字体沿用 site.css 的变量 */

.help-top { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.help-top .top__row { max-width: none; justify-content: flex-start; gap: 14px; }
.help-top__name { font-size: .9375rem; color: var(--fg-2); padding-left: 14px; border-left: 1px solid var(--line-2); line-height: 1.2; }
.help-top__name:hover { color: var(--fg); }
.help-top .top__actions { margin-left: auto; }
.help-menu { display: none; height: 34px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--s1); color: var(--fg); font-size: .875rem; cursor: pointer; }

.help-body { display: grid; grid-template-columns: 240px minmax(0, 1fr) 200px; gap: 40px; max-width: 1360px; margin: 0 auto; padding: 0 24px; }

.side { position: sticky; top: 64px; align-self: start; max-height: calc(100vh - 64px); overflow-y: auto; padding: 28px 0 40px; }
.side__g + .side__g { margin-top: 18px; }
.side__h { font-size: .75rem; font-weight: 500; color: var(--muted); padding: 0 10px 6px; }
.side a { display: block; padding: 5px 10px; border-radius: 8px; font-size: .9rem; color: var(--fg-2); line-height: 1.45; }
.side a:hover { background: var(--panel); color: var(--fg); }
.side a[aria-current="page"] { background: var(--panel); color: var(--fg); font-weight: 600; }

.toc { position: sticky; top: 64px; align-self: start; max-height: calc(100vh - 64px); overflow-y: auto; padding: 36px 0 40px; font-size: .8125rem; }
.toc__h { color: var(--muted); font-weight: 500; margin-bottom: 8px; }
.toc a { display: block; padding: 3px 0 3px 10px; border-left: 1px solid var(--line); color: var(--muted); line-height: 1.45; }
.toc a:hover { color: var(--fg); }
.toc a.is-active { color: var(--fg); border-left-color: var(--a2); }
.toc .toc__l3 { padding-left: 22px; }

/* 正文 */
.doc { min-width: 0; max-width: 760px; padding: 36px 0 72px; }
.doc__crumb { font-size: .8125rem; color: var(--muted); margin-bottom: 10px; }
.doc__crumb a { color: var(--fg-2); }
.doc__crumb a:hover { color: var(--fg); text-decoration: underline; }
.doc h1 { font-size: 2rem; line-height: 1.25; letter-spacing: -.02em; margin-bottom: 12px; }
.doc__lead { font-size: 1.0625rem; color: var(--fg-2); }
.doc h2 { font-size: 1.375rem; letter-spacing: -.01em; margin: 48px 0 14px; padding-top: 24px; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.doc h1 + h2, .doc .doc__lead + h2 { margin-top: 28px; padding-top: 0; border-top: 0; }
.doc h3 { font-size: 1.0625rem; margin: 30px 0 10px; scroll-margin-top: 80px; }
.doc h4 { font-size: 1rem; margin: 22px 0 8px; }
.doc p, .doc li { color: var(--fg-2); }
.doc p + p { margin-top: 10px; }
.doc p + ul, .doc p + ol, .doc ul + p, .doc ol + p { margin-top: 10px; }
.doc b { color: var(--fg); font-weight: 600; }
.doc a { color: var(--link); }
.doc a:hover { text-decoration: underline; }
.doc code { font-family: var(--mono); font-size: .875em; padding: 1px 5px; border-radius: 5px; background: var(--panel); }
.doc ul { list-style: disc; padding-left: 1.3em; }
.doc ol { list-style: decimal; padding-left: 1.4em; }
.doc li + li { margin-top: 5px; }
.doc li > ul, .doc li > ol { margin-top: 5px; }
.doc kbd { font-family: var(--font); font-size: .875em; padding: 1px 7px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; background: var(--s2); color: var(--fg); white-space: nowrap; }

.tbl { margin: 14px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.tbl table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); background: var(--panel-2); font-size: .8125rem; }
.tbl th, .tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td:first-child { white-space: nowrap; color: var(--fg); font-weight: 500; }

.tip { margin: 14px 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--tint-blue); font-size: .9375rem; color: var(--fg-2); }
.tip b { color: var(--fg); }
.tip--warn { background: var(--tint-yellow); }

.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; margin: 0 2px; border-radius: 999px; font-size: .75rem; font-weight: 500; line-height: 1; vertical-align: 2px; white-space: nowrap; }
.tag--new { background: var(--tint-green); color: var(--ok); }

.shot { margin: 18px 0 22px; }
.shot img { width: 100%; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 20px 50px -24px rgba(0, 0, 0, .8); }
.shot--narrow { max-width: 380px; }
.shot figcaption { margin-top: 8px; font-size: .8125rem; color: var(--muted); text-align: center; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 56px; }
.pager a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); color: var(--fg); font-weight: 500; }
.pager a:hover { border-color: var(--fg); text-decoration: none; }
.pager a span { display: block; font-size: .8125rem; font-weight: 400; color: var(--muted); margin-bottom: 2px; }
.pager__next { text-align: right; }

/* 帮助首页 */
.hub__start { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hub__start .btn { text-decoration: none; }
.hub__start .btn--dark, .hub__start .btn--dark:hover { color: var(--on); }
.hub__start .btn--line, .hub__start .btn--line:hover { color: var(--fg); }
.hub__note { margin-top: 18px; font-size: .875rem; color: var(--muted); }
.hub__g h2 { border-top: 0; padding-top: 0; margin-top: 40px; }
.hub__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hub__card { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-md); }
.doc .hub__card:hover { border-color: var(--fg); text-decoration: none; }
.hub__card b { display: block; color: var(--fg); margin-bottom: 4px; }
.hub__card span { display: block; font-size: .875rem; color: var(--muted); }

.help-foot { max-width: 1360px; padding-top: 0; }

@media (max-width: 1180px) {
  .help-body { grid-template-columns: 220px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 860px) {
  .help-body { display: block; padding: 0 16px; }
  .help-menu { display: inline-flex; align-items: center; }
  .help-top__name { display: none; }
  .side { display: none; position: fixed; inset: 64px 0 0; z-index: 20; max-height: none; padding: 20px 16px 40px; background: var(--bg); }
  .side.is-open { display: block; }
  .doc { padding-top: 24px; }
  .doc h1 { font-size: 1.625rem; }
  .hub__cards { grid-template-columns: minmax(0, 1fr); }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .tbl td:first-child { white-space: normal; }
}

/* 两步验证教程：身份验证器卡片、编号步骤、手机示意 */
.apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.app { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel-2); }
.app h3 { font-size: 1rem; margin-bottom: 4px; }
.app p { font-size: .875rem; color: var(--muted); }
.app__tag { display: inline-block; margin-bottom: 8px; padding: 1px 8px; border-radius: 999px; background: var(--tint-green); color: var(--ok); font-size: .75rem; font-weight: 500; }
.steps { counter-reset: step; }
.step { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; padding: 26px 0 26px 48px; }
.step + .step { border-top: 1px solid var(--line); }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 26px; width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: var(--on); font-size: .875rem; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.step--plain { grid-template-columns: minmax(0, 1fr); }
.phone { width: 240px; margin: 0 auto; padding: 12px; border-radius: 36px; background: #111; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.phone__screen { border-radius: 26px; background: var(--s2); padding: 18px 14px 22px; min-height: 300px; }
.phone__bar { width: 70px; height: 6px; border-radius: 6px; background: var(--line-2); margin: 0 auto 18px; }
.phone__title { font-size: .9375rem; font-weight: 600; margin-bottom: 12px; }
.otp { padding: 11px; border: 1px solid transparent; border-radius: 12px; background: var(--panel); }
.otp + .otp { margin-top: 8px; }
.otp__name { font-size: .8125rem; color: var(--fg-2); display: flex; justify-content: space-between; align-items: center; }
.otp__code { font-family: var(--mono); font-size: 1.625rem; letter-spacing: .08em; color: var(--fg); margin-top: 2px; }
.otp--hl { background: var(--tint-blue); border-color: var(--a2); }
.otp--dim .otp__name, .otp--dim .otp__code { color: #666; }
.otp--dim .otp__ring { opacity: .5; }
.otp__ring { width: 16px; height: 16px; border-radius: 50%; background: conic-gradient(var(--a2) 0 62%, var(--line-2) 62% 100%); }
.faq2 { margin-top: 8px; }
.faq2__item { padding: 20px 0; border-top: 1px solid var(--line); }
.faq2__item:first-child { border-top: 0; padding-top: 4px; }
.faq2__item ol { list-style: decimal; padding-left: 1.3em; color: var(--fg-2); margin-top: 6px; }
.faq2__item ol li + li { margin-top: 4px; }
.faq2__body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; }
.steps .shot { margin: 0; }
.steps .shot img { border: 0; border-radius: 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 28px rgba(0, 0, 0, .08); }
.step h3 { margin-top: 0; }
@media (max-width: 760px) {
  .apps { grid-template-columns: minmax(0, 1fr); }
  .step { grid-template-columns: minmax(0, 1fr); padding-left: 44px; gap: 18px; }
  .steps .shot { max-width: 320px; }
  .faq2__body { grid-template-columns: minmax(0, 1fr); }
  .faq2__body .shot { max-width: 280px; }
}
.tip code { word-break: break-all; }

/* ---------- AI 客服（右下角） ---------- */
.ai-fab { position: fixed; right: 22px; bottom: 22px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--grad); color: var(--on); font-weight: 700; font-size: .9375rem; cursor: pointer; box-shadow: 0 12px 30px -10px rgba(255, 90, 46, .55); transition: transform .15s ease; }
.ai-fab:hover { transform: translateY(-2px); }
.ai-fab.is-open { opacity: 0; pointer-events: none; }
.ai-fab__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--on); opacity: .8; }
.ai-panel { position: fixed; right: 22px; bottom: 22px; z-index: 61; width: min(400px, calc(100vw - 32px)); height: min(600px, calc(100vh - 100px)); display: flex; flex-direction: column; border-radius: 18px; background: var(--s1); border: 1px solid var(--line-2); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55); overflow: hidden; animation: pin .25s ease; }
.ai-panel__h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.ai-panel__h b { display: block; font-size: .9375rem; }
.ai-panel__h span { display: block; margin-top: 2px; font-size: .75rem; color: var(--muted); }
.ai-panel__x { width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.ai-panel__x:hover { background: var(--s2); color: var(--fg); }
.ai-panel__body { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.ai-msg { max-width: 92%; padding: 10px 13px; border-radius: 14px; font-size: .875rem; line-height: 1.7; }
.ai-msg p + p { margin-top: 6px; }
.ai-msg--bot { align-self: flex-start; background: var(--s2); color: var(--fg-2); border-bottom-left-radius: 4px; }
.ai-msg--me { align-self: flex-end; background: var(--grad); color: var(--on); border-bottom-right-radius: 4px; }
.ai-msg.is-wait { color: var(--muted); }
.ai-src { margin-top: 8px; font-size: .78rem; color: var(--muted); }
.ai-src a { color: var(--link); }
.ai-chips { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.ai-chip { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--s1); color: var(--fg-2); font-size: .8rem; cursor: pointer; }
.ai-chip:hover { border-color: var(--a2); color: var(--fg); }
.ai-panel__form { display: flex; gap: 8px; align-items: flex-end; padding: 12px 14px; border-top: 1px solid var(--line); }
.ai-panel__form textarea { flex: 1; resize: none; min-height: 40px; max-height: 120px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); color: var(--fg); font: inherit; font-size: .875rem; }
.ai-panel__form textarea:focus { outline: none; border-color: var(--a2); }
.ai-panel__foot { padding: 0 14px 12px; font-size: .7rem; color: var(--muted); line-height: 1.5; }
@media (max-width: 640px) { .ai-panel { right: 8px; bottom: 8px; height: calc(100vh - 80px); } .ai-fab { right: 14px; bottom: 14px; } }
