/* 帮助内容层。站点骨架与品牌视觉来自官网 site.css，本文件只补文档与嵌入模式。 */

.help-home-hero { padding-bottom: 112px; }
.help-home-hero .help-search-wrap { margin-top: 34px; }
.help-page-hero .lead { margin-right: auto; margin-left: auto; }

.help-category-grid .card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.help-category-grid .card-link { margin-top: auto; padding-top: 18px; }

.invite-hero { padding-bottom: 96px; }
.invite-hero .hero-actions { justify-content: center; margin-top: 30px; }

.invite-rewards { padding-top: 66px; }
.invite-reward-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.invite-reward-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}
.invite-reward-card > span { display: block; color: var(--blue); font-size: 13px; font-weight: 800; }
.invite-reward-card strong { display: block; margin-top: 9px; color: var(--ink); font-size: 26px; line-height: 1.3; }
.invite-reward-card p { margin: 12px 0 0; font-size: 14px; }

.invite-guide-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: start;
  gap: 54px;
}
.invite-guide-layout .article-toc p { margin: 18px 0 0; color: var(--muted); font-size: 12px; }
.section-heading-left { margin-bottom: 28px; text-align: left; }
.section-heading-left .section-copy { margin-left: 0; }
.invite-step-list { display: grid; gap: 14px; }
.invite-step {
  scroll-margin-top: 108px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}
.invite-step > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 16px;
  font-weight: 800;
}
.invite-step h3 { margin: 0; color: var(--ink); font-size: 19px; }
.invite-step p { margin: 7px 0 0; font-size: 14px; }

.invite-rules-layout { display: grid; grid-template-columns: .75fr 1.25fr; align-items: start; gap: 64px; }
.invite-rules-layout .section-copy { margin-left: 0; }
.invite-rule-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.invite-rule-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}
.invite-rule-list img { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 3px; }
.invite-rule-list span { color: var(--body); font-size: 14px; }
.invite-faq-list { margin-top: 30px; }

.help-doc-section { background: var(--surface); }

.help-doc-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 46px;
}

.help-sidebar {
  position: sticky;
  top: 104px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.help-sidebar > strong { display: block; margin-bottom: 12px; color: var(--ink); }
.help-sidebar nav { display: grid; gap: 5px; }
.help-sidebar nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 9px;
  color: var(--body);
  font-size: 14px;
}
.help-sidebar nav a:hover { color: var(--blue); background: var(--blue-soft); }
.help-sidebar nav span {
  min-width: 28px;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
.help-sidebar p { margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }

.help-doc-content { min-width: 0; }
.help-doc-content > .help-search-wrap { max-width: none; margin: 0 0 34px; }
.help-doc-group { scroll-margin-top: 108px; }
.help-doc-group + .help-doc-group { margin-top: 64px; }

.help-group-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.help-group-heading .eyebrow { margin-bottom: 5px; font-size: 13px; }
.help-group-heading h2 { margin: 0; color: var(--ink); font-size: 30px; line-height: 1.3; }
.help-group-heading > span { color: var(--muted); font-size: 13px; }
.help-rule-note { margin: -10px 0 22px; font-size: 14px; }

.help-entry-list, .help-task-list { display: grid; gap: 14px; }

.help-entry {
  scroll-margin-top: 108px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 8px 26px rgba(20, 61, 112, .055);
}
.help-entry h3 { margin: 0 0 8px; color: var(--ink); font-size: 19px; }
.help-entry p { margin: 9px 0 0; }
.help-entry ul, .help-entry ol { margin: 10px 0 0; padding-left: 24px; }
.help-entry li { margin: 5px 0; }
.summary { color: var(--ink); font-weight: 650; }
.summary.muted { color: var(--muted); font-weight: 400; }
.planned { opacity: .72; }
.badge {
  margin-left: 9px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #99620c;
  background: var(--amber-soft);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}
.anchor { margin-left: 8px; color: #b8c7d8; font-weight: 400; opacity: 0; }
.help-entry h3:hover .anchor, .anchor:focus-visible { opacity: 1; }

.note {
  margin-top: 14px !important;
  padding: 12px 14px;
  border-left: 3px solid var(--blue);
  border-radius: 0 10px 10px 0;
  background: var(--blue-soft);
  font-size: 14px;
}

.help-task-entry {
  scroll-margin-top: 108px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(20, 61, 112, .045);
  overflow: hidden;
}
.help-task-entry > summary {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 20px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.help-task-entry > summary::-webkit-details-marker { display: none; }
.help-task-entry > summary > span:first-child { min-width: 0; display: grid; }
.help-task-entry > summary strong { font-size: 16px; }
.help-task-entry > summary small { margin-top: 3px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.task-open-hint { margin-left: auto; color: var(--blue); font-size: 12px; font-weight: 700; white-space: nowrap; }
.help-task-entry[open] .task-open-hint { color: var(--muted); }
.help-task-body { padding: 0 20px 22px; border-top: 1px solid #edf2f7; }
.help-task-body p { margin: 14px 0 0; }
.help-task-body ul, .help-task-body ol { padding-left: 24px; }

.facts { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 13px; }
.facts th, .facts td { padding: 9px 10px; border-top: 1px solid #edf2f7; text-align: left; vertical-align: top; }
.facts th { width: 98px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.facts td { color: var(--ink); }

.help-faq-section { background: var(--surface); }
.help-bottom-actions { max-width: 860px; margin-right: auto; margin-left: auto; }

/* 客户端设置页已经提供“帮助文档 / 建议与问题”和板块页签，嵌入时只保留正文。 */
[data-embed="1"] .site-header,
[data-embed="1"] .site-footer,
[data-embed="1"] .skip-link,
[data-embed="1"] .help-features-hero { display: none; }
[data-embed="1"] body { background: transparent; font-size: 14px; }
[data-embed="1"] .help-doc-section { padding: 4px 0 24px; background: transparent; }
[data-embed="1"] .help-doc-layout.container { width: 100%; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; }
[data-embed="1"] .help-sidebar { top: 4px; padding: 14px; border-radius: 11px; box-shadow: none; }
[data-embed="1"] .help-entry { padding: 18px; border-radius: 11px; box-shadow: none; }
[data-embed="1"] .help-task-entry { border-radius: 11px; box-shadow: none; }
[data-embed="1"] .help-page-hero:not(.help-features-hero) { padding: 4px 0 14px; background: transparent; }
[data-embed="1"] .help-page-hero:not(.help-features-hero) .eyebrow,
[data-embed="1"] .help-page-hero:not(.help-features-hero) .display-title,
[data-embed="1"] .help-page-hero:not(.help-features-hero) .lead { display: none; }
[data-embed="1"] .help-page-hero .help-search-wrap { max-width: none; margin: 0; }
[data-embed="1"] .help-faq-section { padding: 0 0 24px; background: transparent; }
[data-embed="1"] .help-bottom-actions { display: none; }

/* ——— 版本说明页（/help/releases/）———
   内容由 site.js 在运行时从公开的更新记录取，这里只负责壳。分类色与徽标口径
   与客户端「设置 → 版本说明」对齐，只是按网页的字号重排了一遍。 */
.release-current-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.release-current-card {
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  text-align: center;
}
.release-current-card > span { display: block; color: var(--muted); font-size: 13px; }
.release-current-card > strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.release-current-card > small { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }
/* 取不到 / 还没有记录时，上面那格是空的，说明文字就是这一段。 */
.release-status { margin: 22px 0 0; color: var(--muted); font-size: 14px; text-align: center; }
[data-release-notes][data-state="ready"] .release-status { display: none; }

.release-way-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 34px 0 0; padding: 0; list-style: none; }
.release-way-list li { padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.release-way-list span { display: block; color: var(--ink); font-size: 15px; font-weight: 650; }
.release-way-list p { margin: 7px 0 0; color: var(--body); font-size: 14px; }

.release-note-list { display: grid; gap: 14px; }
.release-note {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}
/* 展开历史后标出分界，否则「当前版本」和历史会糊成一条流。 */
.release-note.history-lead { margin-top: 24px; }
.release-note.history-lead::before {
  content: '历史版本';
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .5px;
}
.release-note[data-status="history"] { background: var(--surface); box-shadow: none; }
.release-note-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.release-note-head > b { color: var(--blue); font-size: 17px; font-variant-numeric: tabular-nums; }
.release-note-head > time { margin-left: auto; color: var(--muted); font-size: 13px; }
.release-note-surface { padding: 3px 10px; border-radius: 999px; color: #5c6b7c; background: #eff2f5; font-size: 12px; }
.release-note-badge { padding: 3px 10px; border-radius: 999px; font-size: 12px; }
.release-note-badge.current { color: #2f76c7; background: var(--blue-soft); }
.release-note-group { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.release-note-group > em {
  align-self: start;
  padding: 3px 6px;
  border-radius: 6px;
  color: #2f76c7;
  background: var(--blue-soft);
  font-size: 12px;
  font-style: normal;
  text-align: center;
}
.release-note-group[data-kind="fix"] > em { color: #a4622a; background: #fbf1e7; }
.release-note-group[data-kind="improvement"] > em { color: #5c6b7c; background: #eff2f5; }
.release-note-group ul { margin: 0; padding-left: 20px; color: var(--body); font-size: 14px; line-height: 1.8; }
.release-note-group li { margin: 3px 0; }
.release-history-actions { margin-top: 26px; text-align: center; }

@media (max-width: 900px) {
  .help-doc-layout { grid-template-columns: 1fr; gap: 26px; }
  .help-sidebar { position: static; }
  .help-sidebar nav { grid-template-columns: repeat(2, 1fr); }
  [data-embed="1"] .help-doc-layout.container { grid-template-columns: 1fr; }
  .invite-reward-grid { grid-template-columns: 1fr; }
  .invite-guide-layout, .invite-rules-layout { grid-template-columns: 1fr; gap: 32px; }
  .invite-guide-layout .article-toc { position: static; }
  .release-current-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 正文行内链接（`[文字](目标)` 记号渲染而来）。默认样式在深色页头上看不出是链接，
   这里显式给色和下划线——帮助里的链接是给人点的，不是装饰。 */
.help-entry a, .article a:not(.button):not(.card-link), .faq-answer a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.help-entry a:hover, .article a:not(.button):not(.card-link):hover, .faq-answer a:hover {
  color: var(--blue-dark);
}

/* 正文截图。撑满正文列、按原比例缩放，说明压在图下方。 */
.help-shot { margin: 18px 0 0; }
.help-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(20, 61, 112, .06);
}
.help-shot figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* —— 版本对比页 —— */
/* 类名必须带 -table 后缀：主站 site.css 已占用 `.compare`（双栏对比卡片的 grid），撞名会被它改显示模式。 */
.compare-table-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}
.compare-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 14px; }
.compare-table col.compare-table-label { width: 26%; }
.compare-table th, .compare-table td { padding: 15px 22px; text-align: left; vertical-align: top; }
.compare-table thead th {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}
.compare-table thead th:first-child { font-size: 13px; font-weight: 500; }
.compare-table thead th:last-child { color: var(--blue); }
.compare-table tbody tr + tr th, .compare-table tbody tr + tr td { border-top: 1px solid #edf2f7; }
.compare-table tbody th { color: var(--ink); font-weight: 500; line-height: 1.55; }
.compare-table td { color: var(--body); line-height: 1.6; }
.compare-table td:last-child { color: var(--ink); font-weight: 600; background: rgba(18, 104, 243, .045); }
.compare-table thead th:last-child { background: rgba(18, 104, 243, .045); }

.edition-groups { display: grid; gap: 12px; margin-bottom: 22px; }
/* 一组一行：组名在左、任务药丸在右换行。卡片网格会被最高的卡撑出大片空白，不用网格。 */
.edition-group {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 6px 20px;
  align-items: start;
  padding: 16px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}
.edition-group h3 { display: flex; align-items: baseline; gap: 8px; margin: 5px 0 0; color: var(--ink); font-size: 14px; white-space: nowrap; }
.edition-group h3 span { color: var(--muted); font-size: 12px; font-weight: 500; }
.edition-group ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.edition-group a {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--body);
  font-size: 13px;
  line-height: 1.4;
}
.edition-group a:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.edition-prose { max-width: 760px; }

@media (max-width: 900px) {
  .edition-group { grid-template-columns: 110px minmax(0, 1fr); gap: 6px 14px; padding: 14px 16px; }
}

@media (max-width: 640px) {
  .help-home-hero { padding-bottom: 76px; }
  .help-entry { padding: 20px 18px; }
  .help-task-entry > summary { min-height: 68px; padding: 12px 16px; }
  .help-task-body { padding: 0 16px 18px; }
  .help-sidebar nav { grid-template-columns: 1fr; }
  .help-group-heading h2 { font-size: 26px; }
  .facts th { width: 86px; white-space: normal; }
  .task-open-hint { display: none; }
  .invite-hero { padding-bottom: 76px; }
  .invite-hero .hero-actions { display: grid; }
  .invite-hero .hero-actions .button { width: 100%; }
  .invite-reward-card { padding: 24px 22px; }
  .invite-step { grid-template-columns: 38px minmax(0, 1fr); gap: 14px; padding: 20px 18px; }
  .invite-step > span { width: 38px; height: 38px; border-radius: 12px; }
  .invite-rule-list li { padding: 15px; }
  .release-current-grid, .release-way-list { grid-template-columns: 1fr; gap: 12px; }
  /* 手机上四张竖卡片要滚很久。改成一行一条：名称在左、版本在右，日期另起一行。 */
  .release-current-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 2px 14px;
    padding: 16px 18px;
    text-align: left;
  }
  .release-current-card > span { font-size: 14px; }
  .release-current-card > strong { margin-top: 0; font-size: 22px; }
  .release-current-card > small { grid-column: 1 / -1; margin-top: 0; }
  .release-note { padding: 20px 18px; }
  .release-note-head > time { margin-left: 0; flex-basis: 100%; }
  .release-note-group { grid-template-columns: 1fr; gap: 8px; }
  .release-note-group > em { justify-self: start; }
  .release-history-actions .button { width: 100%; }
  .edition-group { grid-template-columns: 1fr; gap: 8px; }
  .edition-group h3 { margin-top: 0; }
  /* 手机上列不再硬挤：卡片内横向滚动，保住列对齐与可读性。 */
  .compare-table-wrap { overflow-x: auto; }
  .compare-table { min-width: 600px; }
}
