/* 帮助中心页面（v1/help、c1/help），路径 /help */

/**
 * 必须与 v1 相同使用「.tp-v1-market.landing-wrap」同一元素，才会应用 v1-landing.css 中的
 * --tp-v1-content-max（顶栏左右留白与内容宽度）及 .landing-cta-header 渐变等。
 * 下面覆盖整页背景，保留帮助区渐变而非营销站底纹。
 */
.landing-wrap.landing-wrap--help.tp-v1-market {
  background: linear-gradient(165deg, #e8ecff 0%, #eef2ff 36%, #f5f3ff 70%, #f8fafc 100%);
}

.help-site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 帮助站页脚使用 v1 landingFooterMain（仅 .landing-footer），不含营销横幅 landing-banner-cta */

/* —— 无障碍与通用 —— */
.help-skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 10000;
  padding: 10px 16px;
  background: #312e81;
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.help-skip-link:focus {
  left: 16px;
}

.help-hero-kicker {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6366f1;
}

.help-search-block {
  width: 100%;
  max-width: min(1080px, 94vw);
  margin-left: auto;
  margin-right: auto;
}

.landing-wrap--help .help-hero-search-col .help-search-block {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.help-hot-keywords-wrap {
  margin-top: 12px;
}

.help-hot-keywords__intro {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #64748b;
}

.help-hot-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.help-hot-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 6px 12px;
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: #4338ca;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.help-hot-chip:hover {
  background: #fff;
  border-color: rgba(79, 70, 229, 0.45);
  color: #312e81;
}

/* 与 v1 首页模型列表区一致：landing-search-wrap + landing-search-input；右侧主按钮同 landing-btn-dark */
.help-search-v1-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}

.landing-wrap--help .help-landing-search-wrap {
  flex: 1 1 220px;
  min-width: 0;
  margin-bottom: 0;
  max-width: none;
}

.landing-wrap--help .help-landing-search-wrap .landing-search-input {
  padding-right: 42px;
}

.landing-wrap--help .help-landing-search-wrap .help-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

.landing-wrap--help .help-landing-search-wrap .help-search-clear:hover {
  color: #64748b;
  background: rgba(15, 23, 42, 0.05);
}

.landing-wrap--help .help-search-submit {
  flex: 0 0 auto;
  align-self: stretch;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .help-search-v1-row {
    flex-direction: column;
  }

  .landing-wrap--help .help-search-submit {
    width: 100%;
    justify-content: center;
  }
}

.help-alert {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.help-alert--warn {
  background: rgba(254, 243, 199, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #92400e;
}

.help-section-inner {
  max-width: var(--tp-v1-content-max, min(1120px, 100%));
  margin: 0 auto;
  padding: 0 24px 8px;
  box-sizing: border-box;
}

.help-section-head {
  margin-bottom: 16px;
}

.help-section-title {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.help-section-sub {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.help-popular {
  padding: 8px 0 20px;
}

.help-popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.help-popular-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(99, 102, 241, 0.12);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
  min-height: 100px;
}
.help-popular-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 10px 28px rgba(79, 70, 229, 0.1);
}

.help-popular-card__cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6366f1;
}

.help-popular-card__title {
  font-weight: 700;
  font-size: 15px;
  color: #0f172a;
  line-height: 1.35;
}

.help-popular-card__sum {
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 首页：分类卡片 3×3，与 v1 内容宽 --tp-v1-content-max 对齐 */
.help-category-stack {
  padding: 8px 0 16px;
}

.landing-wrap--help .help-section-inner--cat-grid {
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}

.help-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 16px;
  width: 100%;
}

@media (max-width: 900px) {
  .help-cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
  }
}

@media (max-width: 520px) {
  .help-cat-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.help-cat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 118px;
  padding: 16px 18px;
  border-radius: 14px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(99, 102, 241, 0.12);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.help-cat-card:hover {
  border-color: rgba(99, 102, 241, 0.32);
  box-shadow: 0 10px 28px rgba(79, 70, 229, 0.1);
  transform: translateY(-1px);
}

.help-cat-card:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.55);
  outline-offset: 2px;
}

.help-cat-card__tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6366f1;
  background: rgba(238, 242, 255, 0.95);
  border: 1px solid rgba(129, 140, 248, 0.25);
}

.help-cat-card__title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: #0f172a;
}

.help-cat-card__desc {
  font-size: 13px;
  line-height: 1.45;
  color: #64748b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.help-results-stack {
  padding: 4px 0 48px;
}

.help-browse {
  padding: 4px 0 24px;
}

.help-browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.help-browse-card {
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.help-browse-card__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.help-browse-card__name {
  font-weight: 700;
  font-size: 15px;
  color: #0f172a;
}

.help-browse-card__count {
  font-size: 13px;
  color: #64748b;
}

.help-browse-card__btn {
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: rgba(238, 242, 255, 0.8);
  color: #4338ca;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.help-browse-card__btn:hover {
  background: rgba(224, 231, 255, 0.95);
}

.help-results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 8px;
}

.help-results-meta {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

.help-results-panel {
  min-width: 0;
}

.help-results-loading {
  padding: 16px;
  color: #64748b;
  font-size: 14px;
}

.help-result-card {
  display: block;
}

.help-result-card__cat {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #6366f1;
  margin-bottom: 4px;
}

.help-search-mark {
  background: rgba(250, 204, 21, 0.35);
  padding: 0 2px;
  border-radius: 2px;
}

.help-tree-cat--pulse {
  animation: helpTreePulse 1s ease 1;
}

@keyframes helpTreePulse {
  0%,
  100% {
    background: transparent;
  }
  40% {
    background: rgba(129, 140, 248, 0.25);
    border-radius: 6px;
  }
}

/* —— 文章页：工具栏、双栏、相关、反馈 —— */
.help-article-toolbar-sticky {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(180deg, rgba(243, 246, 252, 0.96) 0%, rgba(243, 246, 252, 0.88) 100%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.help-article-toolbar {
  max-width: var(--tp-v1-content-max, min(1120px, 100%));
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.help-toolbar-btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}
.help-toolbar-btn:hover {
  border-color: rgba(99, 102, 241, 0.4);
  color: #4338ca;
}

.help-article-inner--split {
  display: block;
}

@media (min-width: 1024px) {
  .help-article-inner--split.help-article-inner--has-toc {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 40px;
    align-items: start;
  }
}

@media (max-width: 1023px) {
  .help-doc-toc {
    display: none !important;
  }
}

.help-doc-toc {
  position: sticky;
  top: 96px;
  padding: 12px 0 16px;
  border-left: 1px solid rgba(15, 23, 42, 0.08);
  padding-left: 16px;
}

.help-doc-toc-title {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.help-doc-toc-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.help-doc-toc-link {
  font-size: 13px;
  color: #64748b;
  text-decoration: none;
  line-height: 1.35;
  padding: 4px 0;
  border-left: 2px solid transparent;
  margin-left: -18px;
  padding-left: 16px;
}
.help-doc-toc-link:hover {
  color: #4338ca;
}
.help-doc-toc-link.is-active {
  color: #4338ca;
  font-weight: 600;
  border-left-color: #6366f1;
}
.help-doc-toc-link--h3 {
  padding-left: 28px;
  font-size: 12px;
}

.help-related {
  padding: 32px 24px 48px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.5);
}

.help-related-inner {
  max-width: min(880px, 100%);
  margin: 0 auto;
}

.help-related-title {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.help-related-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.help-related-link {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.06);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.help-related-link:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.08);
}

.help-related-link-title {
  font-weight: 600;
  color: #0f172a;
}

.help-related-link-cat {
  font-size: 12px;
  color: #94a3b8;
}

.help-article-feedback {
  margin-top: 40px;
  padding: 20px;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.help-feedback-q {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: #334155;
}

.help-feedback-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.help-feedback-thanks {
  margin: 0;
  font-size: 14px;
  color: #059669;
}

.help-missing-wrap {
  max-width: min(880px, 100%);
  margin: 0 auto;
  padding: 24px;
}

@media print {
  .help-print-root .landing-header,
  .help-article-toolbar-sticky,
  .landing-back-top,
  .landing-banner-cta,
  .landing-footer,
  .help-doc-toc,
  .help-article-feedback,
  .help-related {
    display: none !important;
  }
  .help-print-root {
    background: #fff !important;
  }
  .help-article-inner--split {
    display: block !important;
  }
  .tp-help-prose a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 11px;
    color: #64748b;
  }
}
