/* 帮助与联系（2026-10-07）：页头 + 本页目录（全页唯一的高光）→ 六组手风琴问答（正文栏宽）→ 联系区（六个主题邮件 + 可选中的邮箱地址 + 微信说明）。
   只用 tokens.css 的变量；无 JS。手风琴、按钮、面包屑沿用 components.css。 */
@layer pages {
  /* 本页目录：桌面四列文字块（7 项排成 4 + 3），触控 ≥48px；无图标、无序号 */
  .help-toc {
    margin-top: var(--space-8);
  }

  .help-toc ul {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-3);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .help-toc a {
    display: flex;
    align-items: center;
    min-height: 48px;
    height: 100%;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    box-shadow: var(--shadow-ring), var(--shadow-xs);
    font-size: var(--text-btn);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-sm);
    color: var(--color-text);
    text-decoration: none;
    transition: box-shadow var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
  }

  .help-toc a:hover {
    color: var(--color-brand-text);
    box-shadow: var(--shadow-ring-hover), var(--shadow-sm);
  }

  /* 问答组：组与组之间不再叠两份区块内边距 */
  .help-group + .help-group {
    padding-top: 0;
  }

  .help-group h2 + .accordion {
    margin-top: var(--space-6);
  }

  /* 从邮件或其他页面直达某一题时，标出这一题 */
  .help-group .accordion__item:target > .accordion__summary {
    color: var(--color-brand-text);
  }

  .help-group .accordion__content a {
    color: var(--color-link);
    text-decoration: underline;
  }

  /* 联系区 */
  .help-contact__lead {
    max-width: var(--measure);
    margin-top: var(--space-3);
    font-size: var(--text-body);
    line-height: var(--leading-body);
    color: var(--color-text-secondary);
  }

  .help-topics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--card-gap);
    margin: var(--space-8) 0 0;
    padding: 0;
    list-style: none;
  }

  .help-topic {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-5);
    padding: var(--card-pad);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-ring), var(--shadow-sm);
  }

  .help-topic__copy {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
  }

  .help-topic__title {
    font-size: var(--text-h4);
    line-height: var(--leading-h4);
    letter-spacing: var(--tracking-h4);
  }

  .help-topic__text,
  .help-topic__subject {
    font-size: var(--text-sm);
    line-height: var(--leading-sm);
    color: var(--color-text-secondary);
  }

  /* 可复制文本：点一下即整段选中（不用 JS 复制按钮） */
  .help-copy {
    -webkit-user-select: all;
    user-select: all;
    font-weight: var(--weight-semibold);
    color: var(--color-text);
    overflow-wrap: anywhere;
  }

  .help-address {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    max-width: var(--measure);
    margin-top: var(--space-10);
    font-size: var(--text-body);
    line-height: var(--leading-body);
    color: var(--color-text-secondary);
  }

  .help-address__mail {
    font-size: var(--text-h4);
    line-height: var(--leading-h4);
  }

  .help-address__wechat {
    margin-top: var(--space-4);
    font-size: var(--text-sm);
    line-height: var(--leading-sm);
  }

  @media (max-width: 1023.98px) {
    .help-toc ul {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (max-width: 767.98px) {
    .help-toc ul,
    .help-topics {
      grid-template-columns: minmax(0, 1fr);
    }
  }

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