/* ============================================================
   必一运动赛场 · 帮助中心（/help/）
   ============================================================ */

.page-faq {
  --faq-rail: 268px;
  --faq-gap: clamp(26px, 4.6vw, 58px);
}

/* ---------- 首屏 ---------- */
.page-faq .faq-hero {
  padding-top: clamp(20px, 5vw, 46px);
  padding-bottom: clamp(28px, 5vw, 52px);
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}

.page-faq .faq-hero::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: clamp(64px, 12vw, 148px);
  height: 2px;
  background: var(--orange);
}

.page-faq .faq-hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(29px, 6vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.012em;
  color: var(--white);
  margin: 14px 0 0;
  max-width: 24ch;
  text-wrap: balance;
}

.page-faq .faq-hero__lede {
  margin-top: 18px;
  max-width: 66ch;
  color: var(--muted);
  font-size: clamp(15.5px, 1.9vw, 18px);
  line-height: 1.75;
}

.page-faq .faq-topics {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-faq .faq-topics__item {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(16, 26, 51, 0.6);
  padding: 7px 12px;
}

.page-faq .faq-topics__item--data {
  color: var(--cyan);
  border-color: rgba(53, 240, 220, 0.35);
  background: rgba(16, 26, 51, 0.75);
}

/* ---------- 主体骨架 ---------- */
.page-faq .faq-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--faq-gap);
  align-items: start;
}

@media (min-width: 1024px) {
  .page-faq .faq-shell {
    grid-template-columns: var(--faq-rail) minmax(0, 1fr);
  }
}

/* ---------- 左侧问题目录 ---------- */
.page-faq .faq-toc {
  border-top: 2px solid var(--orange);
  padding-top: 14px;
  min-width: 0;
}

@media (min-width: 1024px) {
  .page-faq .faq-toc {
    position: sticky;
    top: calc(var(--bar-h) + 26px);
  }
}

.page-faq .faq-toc__title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}

.page-faq .faq-toc__list {
  list-style: none;
  margin: 0;
  padding: 0 0 8px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.page-faq .faq-toc__list::-webkit-scrollbar {
  display: none;
}

.page-faq .faq-toc__row {
  flex: none;
  scroll-snap-align: start;
}

@media (min-width: 1024px) {
  .page-faq .faq-toc__list {
    display: block;
    overflow: visible;
    padding-bottom: 0;
  }

  .page-faq .faq-toc__row {
    flex: none;
  }
}

.page-faq .faq-toc__link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 12px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  line-height: 1.4;
  white-space: nowrap;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

@media (min-width: 1024px) {
  .page-faq .faq-toc__link {
    white-space: normal;
  }
}

.page-faq .faq-toc__link:hover {
  color: var(--white);
  border-left-color: var(--orange-light);
  background: rgba(255, 106, 26, 0.06);
}

.page-faq .faq-toc__link:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.page-faq .faq-toc__link[aria-current="true"],
.page-faq .faq-toc__link.is-current {
  color: var(--white);
  border-left-color: var(--orange);
  background: rgba(255, 106, 26, 0.1);
}

.page-faq .faq-toc__idx {
  font-size: 12px;
  color: var(--cyan);
  flex: none;
  letter-spacing: 0.04em;
}

.page-faq .faq-toc__label {
  min-width: 0;
}

.page-faq .faq-toc__note {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

.page-faq .faq-toc__note a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(53, 240, 220, 0.4);
}

.page-faq .faq-toc__note a:hover {
  border-bottom-color: var(--cyan);
}

/* ---------- 右侧答案区 ---------- */
.page-faq .faq-body {
  display: grid;
  gap: clamp(34px, 5vw, 62px);
  min-width: 0;
}

.page-faq .faq-group {
  position: relative;
  min-width: 0;
  scroll-margin-top: calc(var(--bar-h) + 28px);
}

.page-faq .faq-group__head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 18px;
}

.page-faq .faq-group__kicker {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 10px;
}

.page-faq .faq-group__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.26;
  color: var(--white);
  margin: 0;
  letter-spacing: 0.01em;
}

.page-faq .faq-group__desc {
  margin: 12px 0 0;
  max-width: 60ch;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.72;
}

/* ---------- 折叠问答 ---------- */
.page-faq .faq-item {
  border: 1px solid var(--line-soft);
  background: rgba(16, 26, 51, 0.5);
  margin-bottom: 10px;
  transition: border-color 0.22s var(--ease), background 0.22s var(--ease);
}

.page-faq .faq-item:last-of-type {
  margin-bottom: 0;
}

.page-faq .faq-item:hover {
  border-color: var(--line);
}

.page-faq .faq-item[open] {
  background: var(--ink-800);
  border-color: rgba(255, 106, 26, 0.42);
}

.page-faq .faq-q {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 17px 20px;
  cursor: pointer;
  list-style: none;
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.55;
  transition: color 0.2s var(--ease);
}

.page-faq .faq-q::-webkit-details-marker {
  display: none;
}

.page-faq .faq-q::marker {
  content: "";
}

.page-faq .faq-q:hover {
  color: var(--orange-light);
}

.page-faq .faq-q:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: -2px;
}

.page-faq .faq-q__idx {
  flex: none;
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 0.06em;
}

.page-faq .faq-q__text {
  min-width: 0;
}

.page-faq .faq-q__mark {
  flex: none;
  margin-left: auto;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--orange);
  border-bottom: 2px solid var(--orange);
  transform: rotate(45deg);
  transform-origin: 60% 60%;
  transition: transform 0.26s var(--ease);
}

.page-faq .faq-item[open] .faq-q__mark {
  transform: rotate(-135deg);
  transform-origin: 40% 40%;
}

.page-faq .faq-a {
  border-top: 1px solid var(--line-soft);
  padding: 16px 20px 22px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.78;
  animation: faq-a-in 0.28s var(--ease) both;
}

.page-faq .faq-a p {
  margin: 0 0 0.85em;
}

.page-faq .faq-a p:last-child {
  margin-bottom: 0;
}

.page-faq .faq-a strong {
  color: var(--paper);
  font-weight: 600;
}

.page-faq .faq-a a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(53, 240, 220, 0.4);
}

.page-faq .faq-a a:hover {
  border-bottom-color: var(--cyan);
}

@keyframes faq-a-in {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 步骤 ---------- */
.page-faq .steps {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 14px;
}

.page-faq .steps--check {
  margin-bottom: 0;
}

.page-faq .steps__item {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.page-faq .steps__item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 30px;
  bottom: -12px;
  width: 1px;
  background: linear-gradient(to bottom, var(--line), rgba(34, 48, 92, 0));
}

.page-faq .steps__num {
  width: 26px;
  height: 26px;
  border: 1px solid var(--orange);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--orange);
  background: var(--ink-900);
  position: relative;
  z-index: 1;
}

.page-faq .steps__item p {
  margin: 0;
  padding-top: 3px;
  font-size: 15.5px;
  line-height: 1.72;
  color: var(--paper);
}

.page-faq .steps__item p a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(53, 240, 220, 0.4);
}

/* ---------- 图文并排 ---------- */
.page-faq .faq-with-figure {
  display: grid;
  gap: 20px;
}

@media (min-width: 760px) {
  .page-faq .faq-with-figure {
    grid-template-columns: minmax(0, 1fr) minmax(0, 288px);
    align-items: start;
  }
}

.page-faq .faq-figure {
  margin: 0;
  border: 1px solid var(--line);
  background: var(--ink-900);
  position: relative;
  overflow: hidden;
}

.page-faq .faq-figure::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 38px;
  height: 3px;
  background: var(--orange);
  z-index: 1;
}

.page-faq .faq-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;
  opacity: 0.92;
}

.page-faq .faq-figure__caption {
  display: block;
  padding: 9px 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ---------- 数据分组背景纹理 ---------- */
.page-faq .faq-group--data > .faq-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  margin: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.page-faq .faq-group--data > .faq-bg img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;
  opacity: 0.2;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, #000 22%, #000 62%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, #000 22%, #000 62%, rgba(0, 0, 0, 0) 100%);
}

.page-faq .faq-group--data > .faq-group__head,
.page-faq .faq-group--data > .faq-item {
  position: relative;
  z-index: 1;
}

/* ---------- 收尾 ---------- */
.page-faq .faq-outro {
  margin-top: 26px;
  border-top: 2px solid var(--orange);
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  justify-content: space-between;
  align-items: baseline;
}

.page-faq .faq-outro p {
  margin: 0;
  font-size: 15px;
  line-height: 1.72;
  color: var(--muted);
}

.page-faq .faq-outro a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(53, 240, 220, 0.4);
}

.page-faq .faq-outro a:hover {
  border-bottom-color: var(--cyan);
}

/* ---------- 返回顶部 ---------- */
.page-faq .faq-top {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: calc(clamp(14px, 3vw, 26px) + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--ink-800);
  color: var(--cyan);
  text-decoration: none;
  font-size: 18px;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease), visibility 0.24s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.page-faq .faq-top[data-visible],
.page-faq .faq-top[data-visible="true"] {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.page-faq .faq-top:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.page-faq .faq-top:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* ---------- 窄屏收口 ---------- */
@media (max-width: 560px) {
  .page-faq .faq-q {
    padding: 15px 16px;
    font-size: 15.5px;
    gap: 10px;
  }

  .page-faq .faq-a {
    padding: 14px 16px 20px;
  }

  .page-faq .faq-group__desc,
  .page-faq .faq-a,
  .page-faq .steps__item p {
    font-size: 15px;
  }

  .page-faq .faq-outro {
    flex-direction: column;
    gap: 8px;
  }
}

/* ---------- 降低动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  .page-faq .faq-a {
    animation: none;
  }

  .page-faq .faq-item,
  .page-faq .faq-toc__link,
  .page-faq .faq-q,
  .page-faq .faq-q__mark,
  .page-faq .faq-top {
    transition: none;
  }

  .page-faq .faq-top {
    transform: none;
  }
}
