/* 公开站帮助中心：对齐会员端 HelpView / HelpArticleDetailView */

.help-page,
.help-detail-page {
  width: min(var(--console-max), calc(100% - 40px));
  margin-inline: auto;
  margin-block: 0;
  min-width: 0;
  box-sizing: border-box;
}

.help-page {
  padding-bottom: 48px;
  background: var(--surface);
}

.help-detail-page {
  padding: 8px 8px 48px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.help-hero {
  position: relative;
  padding: 48px 20px 40px;
  background: linear-gradient(180deg, var(--accent-soft) 0%, color-mix(in srgb, var(--accent-soft) 35%, var(--surface)) 100%);
  overflow: hidden;
}

.help-hero__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background-image:
    linear-gradient(115deg, transparent 40%, color-mix(in srgb, var(--brand) 8%, transparent) 40%, transparent 70%),
    linear-gradient(295deg, transparent 30%, color-mix(in srgb, var(--brand) 6%, transparent) 30%, transparent 65%),
    radial-gradient(circle at 12% 80%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 28%),
    radial-gradient(circle at 88% 20%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 32%);
  pointer-events: none;
}

.help-hero__inner {
  position: relative;
  width: 100%;
  z-index: 1;
}

.help-search {
  display: flex;
  align-items: stretch;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
  background: var(--surface);
}

.help-search__input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 18px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  outline: none;
}

.help-search__input::placeholder {
  color: var(--muted);
}

.help-search__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 108px;
  padding: 0 22px;
  border: 0;
  background: var(--btn-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.help-search__btn:hover {
  background: var(--btn-primary-hover);
}

.help-quick {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.help-quick__inner {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}

.help-quick__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 18px;
  border-right: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.help-quick__item:last-child {
  border-right: 0;
}

.help-quick__item:hover {
  background: var(--surface-muted);
}

.help-quick__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  font-size: 20px;
}

.help-quick__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.help-quick__text strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}

.help-quick__text span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.help-main {
  margin: 28px auto 0;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.help-side {
  position: sticky;
  top: 72px;
  padding: 4px 0 16px;
}

.help-side__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.help-side__title {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  color: var(--ink);
}

.help-side__toggle {
  display: none;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.help-side__search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  margin-bottom: 14px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
  color: var(--muted);
}

.help-side__search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  outline: none;
}

.help-side__empty {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.help-nav__block + .help-nav__block {
  margin-top: 2px;
}

.help-nav__cat--all {
  margin-bottom: 6px;
}

.help-nav__cat {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.help-nav__cat i,
.help-nav__cat-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  text-align: center;
  color: var(--brand);
  font-size: 15px;
}

.help-nav__cat-icon {
  object-fit: contain;
}

.help-nav__cat:hover {
  background: var(--surface-muted);
}

.help-nav__cat.is-active {
  background: var(--accent-soft);
  color: var(--brand);
}

.help-content__head {
  margin-bottom: 18px;
}

.help-content__head h2 {
  margin: 0;
  padding-left: 12px;
  border-left: 4px solid var(--brand);
  font-size: 20px;
  font-weight: 750;
  line-height: 1.35;
  color: var(--ink);
}

.help-content__empty {
  margin: 24px 0;
  color: var(--muted);
  font-size: 14px;
}

.help-group__panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 8px 8px 12px;
}

.help-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.help-pager__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.help-pager__btn:hover:not(.is-disabled) {
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
  color: var(--brand);
  background: var(--accent-soft);
}

.help-pager__btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.help-pager__info {
  min-width: 72px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.help-article-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.help-article-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
}

.help-article-card:hover {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--brand) 18%, var(--line));
  transform: translateY(-1px);
}

.help-article-card:hover .help-article-card__title {
  color: var(--brand);
}

.help-article-card__cover {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.help-article-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.help-article-card__placeholder {
  font-size: 20px;
  color: var(--muted);
}

.help-article-card__body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 2px;
}

.help-article-card__title {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.help-article-card__summary {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.help-article-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.help-article-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

/* 详情 */
.help-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--muted);
}

.help-crumb a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.help-crumb a:hover {
  color: var(--brand);
}

.help-crumb__current {
  color: var(--ink);
  font-weight: 600;
}

.help-empty {
  margin: 48px 0;
  text-align: center;
  color: var(--ink);
}

.help-empty i {
  font-size: 36px;
  color: var(--muted);
}

.help-empty p {
  margin: 12px 0 0;
  font-size: 16px;
  font-weight: 600;
}

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

.help-side-panels {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 16px;
}

.help-side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px 16px 12px;
}

.help-side-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.help-side-card__title i {
  color: var(--brand);
  font-size: 13px;
}

.help-side-card__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.help-side-card__list li + li {
  border-top: 1px solid var(--line);
}

.help-side-card__link {
  display: block;
  padding: 10px 2px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  word-break: break-word;
}

.help-side-card__link:hover,
.help-side-card__link.is-current {
  color: var(--brand);
}

.help-side-card__link.is-current {
  font-weight: 700;
}

.help-article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  min-width: 0;
}

.help-article__head {
  padding: 28px 28px 22px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 5%, var(--surface)) 0%, var(--surface) 100%);
}

.help-article__meta {
  margin-bottom: 14px;
}

.help-article__pub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.help-article__pub time {
  font-weight: 600;
  color: var(--ink-soft);
}

.help-article__title {
  margin: 0 0 12px;
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 750;
  line-height: 1.3;
  color: var(--ink);
  word-break: break-word;
}

.help-article__summary {
  margin: 0;
  max-width: 46em;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.help-article__divider {
  height: 1px;
  margin: 0 28px;
  background: var(--line);
}

.help-article__body {
  padding: 24px 28px 8px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.help-article__body.prose h1,
.help-article__body.prose h2,
.help-article__body.prose h3 {
  margin: 1.4em 0 0.55em;
  line-height: 1.35;
  color: var(--ink);
}

.help-article__body.prose h2 { font-size: 1.25em; }
.help-article__body.prose h3 { font-size: 1.1em; }
.help-article__body.prose p { margin: 0 0 1em; }
.help-article__body.prose ul,
.help-article__body.prose ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
}
.help-article__body.prose a {
  color: var(--brand);
  text-underline-offset: 2px;
}
.help-article__body.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1em 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.help-article__body.prose blockquote {
  margin: 1em 0;
  padding: 10px 14px;
  border-left: 3px solid var(--brand);
  background: var(--surface-muted);
}
.help-article__body.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 14px;
  display: block;
  overflow-x: auto;
}
.help-article__body.prose th,
.help-article__body.prose td {
  border: 1px solid var(--line);
  padding: 8px 10px;
}
.help-article__body.prose th { background: var(--surface-muted); }
.help-article__body.prose code {
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--surface-muted);
}
.help-article__body.prose pre {
  overflow-x: auto;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface-muted);
  border: 1px solid var(--line);
}

.help-article__foot {
  padding: 8px 28px 28px;
}

.help-article-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.help-pager__link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
  text-decoration: none;
  color: var(--ink);
}

.help-pager__link:hover:not(.help-pager__link--disabled) {
  border-color: var(--brand);
  background: var(--accent-soft);
}

.help-pager__link--next {
  text-align: right;
  align-items: flex-end;
}

.help-pager__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.help-pager__title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
}

.help-pager__link:hover:not(.help-pager__link--disabled) .help-pager__label,
.help-pager__link:hover:not(.help-pager__link--disabled) .help-pager__title {
  color: var(--brand);
}

.help-pager__link--disabled {
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.72;
}

@media (max-width: 1024px) {
  .help-quick__inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .help-quick__item {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .help-article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .help-detail-layout {
    grid-template-columns: 1fr;
  }
  .help-side-panels {
    position: static;
    order: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .help-article { order: 1; }
}

@media (max-width: 768px) {
  .help-page,
  .help-detail-page {
    width: calc(100% - 24px);
  }
  .help-hero { padding: 28px 16px 24px; }
  .help-search { flex-direction: column; }
  .help-search__btn { min-height: 44px; width: 100%; }
  .help-quick__inner { grid-template-columns: 1fr; }
  .help-main {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
    padding: 0 16px;
  }
  .help-side {
    position: static;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
  }
  .help-side__toggle { display: inline-flex; }
  .help-side.is-collapsed .help-side__body { display: none; }
  .help-side:not(.is-collapsed) .help-side__body { margin-top: 14px; }
  .help-article-grid { grid-template-columns: 1fr; }
  .help-detail-page { padding: 4px 0 32px; }
  .help-side-panels { grid-template-columns: 1fr; }
  .help-article__head,
  .help-article__body,
  .help-article__foot { padding-left: 16px; padding-right: 16px; }
  .help-article__divider { margin-inline: 16px; }
  .help-article-pager { grid-template-columns: 1fr; }
  .help-pager__link--next { text-align: left; align-items: flex-start; }
}
