/* 帮助中心共用版式：面包屑、侧栏、主区、列表、入口卡片（总览 / 活动 / 指南 / 公告共用） */
.tt-help {
  background: var(--bg-page);
  padding-block: 32px var(--section-y);
}

.tt-help-wrap {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* 面包屑 */
.tt-help-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  font: var(--t-body);
  color: var(--text-3);
}

.tt-help-crumbs li + li::before {
  content: '/';
  margin-inline: 8px;
  color: var(--text-3);
  opacity: 0.6;
}

.tt-help-crumbs a {
  color: var(--primary-text);
  text-decoration: none;
}

.tt-help-crumbs a:hover {
  text-decoration: underline;
}

.tt-help-crumbs [aria-current='page'] span {
  color: var(--text-2);
}

/* 两栏骨架：手机上侧栏变成横向滚动的标签条。
 * 单列也要写成 minmax(0, 1fr) 并给侧栏 min-width: 0，否则不换行的标签条会把整页撑宽 */
.tt-help-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.tt-help-side,
.tt-help-main {
  min-width: 0;
}

.tt-help-side-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 4px;
  scrollbar-width: none;
  scroll-snap-type: none;
}

.tt-help-side-list::-webkit-scrollbar {
  display: none;
}

.tt-help-side-list > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-2);
  font: var(--t-control);
  text-decoration: none;
  white-space: nowrap;
  scroll-snap-align: none;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.tt-help-side-list a:hover {
  color: var(--primary-text);
}

.tt-help-side-list a[aria-current] {
  background: var(--primary-soft);
  color: var(--primary-text);
  font-weight: 600;
}

@media (min-width: 900px) {
  .tt-help-grid {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
  }

  .tt-help-side {
    position: sticky;
    top: calc(var(--header-h) + 16px);
  }

  .tt-help-side-list {
    flex-direction: column;
    gap: 2px;
    overflow: visible;
    padding: 0;
  }

  .tt-help-side-list > a {
    border-radius: var(--radius-md);
    background: transparent;
    white-space: normal;
  }

  .tt-help-side-list a:hover {
    background: var(--hover-overlay);
  }

  .tt-help-side-list a[aria-current] {
    background: var(--primary-soft);
  }
}

/* 标题区 */
.tt-help-head {
  margin-bottom: 28px;
}

.tt-help-head h1 {
  margin: 0 0 8px;
  font: var(--t-display-small);
  color: var(--text-1);
  text-wrap: balance;
}

.tt-help-head p {
  margin: 0;
  max-width: 62ch;
  font: var(--t-lead);
  color: var(--text-2);
}

.tt-help-head .tt-help-meta {
  margin-top: 10px;
}

.tt-help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

/* 区块 */
.tt-help-block {
  margin-top: 36px;
}

.tt-help-block > h2 {
  margin: 0 0 14px;
  font: var(--t-headline);
  color: var(--text-1);
}

.tt-help-block > h2 small {
  margin-left: 6px;
  font: var(--t-body);
  color: var(--text-3);
}

/* 入口卡片 */
.tt-help-entries {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tt-help-entry {
  display: block;
  height: 100%;
  padding: var(--card-pad);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-e1);
  color: inherit;
  text-decoration: none;
  transition: box-shadow var(--dur) var(--ease);
}

@media (hover: hover) {
  a.tt-help-entry:hover {
    box-shadow: var(--shadow-e2);
  }
}

.tt-help-entry-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary-text);
}

.tt-help-entry h2 {
  margin: 14px 0 6px;
  font: var(--t-title);
  color: var(--text-1);
}

.tt-help-entry p {
  margin: 0 0 12px;
  font: var(--t-body-secondary);
  color: var(--text-2);
}

.tt-help-entry > span:last-child {
  font: var(--t-body-strong);
  color: var(--primary-text);
}

.tt-help-entry.is-static > p:last-child {
  margin-bottom: 0;
}

@media (min-width: 640px) {
  .tt-help-entries {
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
  }
}

/* 文章 / 公告列表 */
.tt-help-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-e1);
  overflow: hidden;
}

.tt-help-list > li { position: relative; }
.tt-help-list > li + li { border-top: 0; }
.tt-help-list > li + li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 18px;
  right: 0;
  height: var(--hairline);
  background: transparent;
  box-shadow: inset 0 var(--hairline) 0 var(--border);
  pointer-events: none;
}

.tt-help-list a {
  display: grid;
  gap: 4px;
  padding: 14px 18px;
  color: inherit;
  text-decoration: none;
}

.tt-help-list a:hover {
  background: var(--hover-overlay);
}

.tt-help-list strong {
  font: var(--t-title);
  color: var(--text-1);
}

.tt-help-list a:hover strong {
  color: var(--primary-text);
}

.tt-help-list small {
  font: var(--t-body);
  color: var(--text-3);
}

.tt-help-meta {
  font: var(--t-caption);
  color: var(--text-3);
}

/* 步骤 */
.tt-help-steps {
  margin: 0;
  padding-left: 22px;
  font: var(--t-prose);
  color: var(--text-2);
}

.tt-help-note {
  margin: 16px 0 0;
  font: var(--t-body);
  color: var(--text-3);
}

/* 下载引导 */
.tt-help-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding: var(--card-pad);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-e1);
}

.tt-help-cta h2 {
  margin: 0 0 4px;
  font: var(--t-headline);
  color: var(--text-1);
}

.tt-help-cta p {
  margin: 0;
  font: var(--t-body-secondary);
  color: var(--text-2);
}

@media (prefers-reduced-motion: reduce) {
  .tt-help-entry {
    transition: none;
  }
}

.tt-help [hidden] {
  display: none !important;
}
