.page-faq {
  --faq-access: var(--orange);
  --faq-devices: var(--cyan);
  --faq-data: var(--basket);
  --faq-topics: var(--tennis);
  --faq-first: var(--green);
  --faq-cat: var(--orange);
  padding: clamp(22px, 4vw, 44px) 0 clamp(56px, 8vw, 96px);
}

.page-faq .faq-shell {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- 首屏 ---------- */
.page-faq .faq-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 3.5vw, 36px) 0 clamp(26px, 4vw, 44px);
  border-bottom: 1px solid var(--ink-700);
}

.page-faq .faq-hero::after {
  content: "";
  position: absolute;
  top: -10%;
  right: 0;
  width: min(300px, 46%);
  height: 118%;
  background: linear-gradient(135deg, transparent 46%, var(--accent-soft) 46%, rgba(43, 230, 224, 0.08) 100%);
  clip-path: polygon(28% 0, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
  z-index: 0;
}

.page-faq .faq-hero > * {
  position: relative;
  z-index: 1;
}

.page-faq .faq-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.6vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 12px 0 0;
  max-width: 22ch;
  color: var(--paper);
}

.page-faq .faq-hero__lead {
  margin: 18px 0 0;
  max-width: 60ch;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.4vw, 1.0625rem);
  line-height: 1.78;
}

.page-faq .faq-hero__facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  margin: clamp(22px, 3vw, 32px) 0 0;
  padding: 0;
  background: var(--ink-700);
  border: 1px solid var(--ink-700);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

.page-faq .faq-hero__fact {
  background: var(--ink-900);
  padding: 13px 16px;
}

.page-faq .faq-hero__fact dt {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}

.page-faq .faq-hero__fact dd {
  margin: 6px 0 0;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.9375rem;
  color: var(--paper);
}

@media (min-width: 640px) {
  .page-faq .faq-hero__facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- 分类标签条 ---------- */
.page-faq .faq-tabs {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 0;
  margin: 0 0 clamp(18px, 3vw, 32px);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: rgba(6, 11, 24, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ink-700);
}

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

.page-faq .faq-tabs__item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--ink-700);
  background: var(--ink-900);
  color: var(--muted);
  font-size: 0.875rem;
  white-space: nowrap;
  text-decoration: none;
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  transition: color 200ms var(--ease), border-color 200ms var(--ease), background 200ms var(--ease);
}

.page-faq .faq-tabs__item:hover,
.page-faq .faq-tabs__item:focus-visible {
  color: var(--paper);
  background: var(--ink-800);
  border-color: var(--cyan);
}

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

.page-faq .faq-tabs__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.page-faq .faq-tabs__dot--access { background: var(--faq-access); }
.page-faq .faq-tabs__dot--devices { background: var(--faq-devices); }
.page-faq .faq-tabs__dot--data { background: var(--faq-data); }
.page-faq .faq-tabs__dot--topics { background: var(--faq-topics); }
.page-faq .faq-tabs__dot--first { background: var(--faq-first); }

/* ---------- 分组 ---------- */
.page-faq .faq-group {
  scroll-margin-top: 74px;
  padding: clamp(22px, 3.6vw, 38px) 0;
  border-top: 1px solid var(--ink-700);
}

.page-faq .faq-group:first-of-type {
  border-top: none;
  padding-top: 8px;
}

.page-faq .faq-group--access { --faq-cat: var(--faq-access); }
.page-faq .faq-group--devices { --faq-cat: var(--faq-devices); }
.page-faq .faq-group--data { --faq-cat: var(--faq-data); }
.page-faq .faq-group--topics { --faq-cat: var(--faq-topics); }
.page-faq .faq-group--first { --faq-cat: var(--faq-first); }

.page-faq .faq-group__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding-left: 14px;
  border-left: 3px solid var(--faq-cat);
}

.page-faq .faq-group__idx {
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.page-faq .faq-group__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--paper);
}

.page-faq .faq-group__lead {
  margin: 14px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.78;
}

.page-faq .faq-group__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(18px, 3vw, 32px);
  margin-top: clamp(16px, 2.6vw, 26px);
}

.page-faq .faq-group__list {
  margin-top: clamp(14px, 2.4vw, 22px);
  border-top: 1px solid var(--ink-700);
}

.page-faq .faq-group__layout .faq-group__list {
  margin-top: 0;
}

@media (min-width: 900px) {
  .page-faq .faq-group__layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr);
    align-items: start;
  }

  .page-faq .faq-group__layout--flip {
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
  }

  .page-faq .faq-group__layout--flip .faq-figure {
    order: -1;
  }

  .page-faq .faq-group__list--wide {
    max-width: 78ch;
  }
}

/* ---------- 折叠问答 ---------- */
.page-faq .faq-item {
  border-bottom: 1px solid var(--ink-700);
}

.page-faq .faq-item__q {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 2px;
  cursor: pointer;
  list-style: none;
  color: var(--paper);
  font-size: clamp(0.9375rem, 1.4vw, 1.0625rem);
  line-height: 1.6;
  transition: color 180ms var(--ease);
}

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

.page-faq .faq-item__q:hover,
.page-faq .faq-item__q:focus-visible {
  color: var(--cyan);
}

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

.page-faq .faq-item__dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 0.55em;
  border-radius: 50%;
  background: var(--faq-cat);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--faq-cat) 14%, transparent);
}

.page-faq .faq-item__text {
  flex: 1 1 auto;
}

.page-faq .faq-item__icon {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-top: 0.34em;
  color: var(--faq-cat);
  transition: transform 260ms var(--ease);
}

.page-faq .faq-item[open] .faq-item__icon {
  transform: rotate(45deg);
}

.page-faq .faq-item__body {
  padding: 0 2px 20px 21px;
}

.page-faq .faq-item[open] .faq-item__body {
  animation: faq-body-in 340ms var(--ease) both;
}

@keyframes faq-body-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-faq .faq-item__para {
  margin: 0;
  color: #C8D2E3;
  font-size: 0.9375rem;
  line-height: 1.8;
  max-width: 66ch;
}

.page-faq .faq-item__note {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-left: 2px solid var(--ink-700);
  background: rgba(18, 32, 60, 0.5);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.75;
  max-width: 66ch;
}

/* ---------- 步骤条 ---------- */
.page-faq .faq-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-faq .faq-steps__item {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding-bottom: 14px;
  color: #C8D2E3;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.page-faq .faq-steps__item:last-child {
  padding-bottom: 0;
}

.page-faq .faq-steps__item::before {
  content: "";
  position: absolute;
  left: 14.5px;
  top: 34px;
  bottom: 2px;
  width: 1px;
  background: linear-gradient(180deg, var(--faq-cat), transparent);
  opacity: 0.55;
}

.page-faq .faq-steps__item:last-child::before {
  display: none;
}

.page-faq .faq-steps__mark {
  width: 30px;
  height: 30px;
  color: var(--faq-cat);
}

/* ---------- 配图 ---------- */
.page-faq .faq-figure {
  margin: 0;
}

.page-faq .faq-figure__frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ink-700);
  background: linear-gradient(150deg, var(--ink-800), var(--ink-950));
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
}

.page-faq .faq-figure__frame::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 84px;
  height: 3px;
  background: var(--faq-cat);
}

.page-faq .faq-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  opacity: 0.88;
}

.page-faq .faq-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.65;
}

/* ---------- 人工通道 ---------- */
.page-faq .faq-help {
  margin-top: clamp(32px, 5vw, 60px);
}

.page-faq .faq-help__panel {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 4.4vw, 56px);
  background: var(--ink-900);
  border: 1px solid var(--ink-700);
  clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 30px 100%, 0 calc(100% - 30px));
}

.page-faq .faq-help__panel::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -8%;
  width: min(380px, 52%);
  height: 160%;
  background: linear-gradient(200deg, rgba(255, 91, 35, 0.16), transparent 62%);
  clip-path: polygon(34% 0, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

.page-faq .faq-help__panel > * {
  position: relative;
  z-index: 1;
}

.page-faq .faq-help__title {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--paper);
  max-width: 20ch;
}

.page-faq .faq-help__lead {
  margin: 16px 0 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.8;
}

.page-faq .faq-help__contacts {
  list-style: none;
  margin: clamp(22px, 3vw, 32px) 0 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--ink-700);
  border: 1px solid var(--ink-700);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

.page-faq .faq-help__contacts li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 14px 16px;
  background: var(--ink-900);
}

@media (min-width: 640px) {
  .page-faq .faq-help__contacts li {
    grid-template-columns: 116px minmax(0, 1fr);
    align-items: baseline;
    gap: 16px;
  }
}

.page-faq .faq-help__k {
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.page-faq .faq-help__v {
  color: var(--paper);
  font-size: 0.9375rem;
  line-height: 1.6;
  word-break: break-word;
}

.page-faq .faq-help__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(22px, 3vw, 32px);
}

.page-faq .faq-help__actions .btn {
  text-decoration: none;
}

@media (max-width: 480px) {
  .page-faq .faq-group__head {
    padding-left: 11px;
    border-left-width: 3px;
  }

  .page-faq .faq-steps__item {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 10px;
  }

  .page-faq .faq-steps__mark {
    width: 26px;
    height: 26px;
  }

  .page-faq .faq-steps__item::before {
    left: 12.5px;
    top: 30px;
  }

  .page-faq .faq-help__actions .btn {
    flex: 1 1 100%;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-faq .faq-item[open] .faq-item__body {
    animation: none;
  }

  .page-faq .faq-item__icon,
  .page-faq .faq-tabs__item {
    transition: none;
  }
}
</main>
