/* ============ 问题排查页 · page-faq ============ */

.page-faq {
  background: var(--green);
  color: var(--paper);
  padding-bottom: clamp(48px, 6vw, 92px);
}

.page-faq img {
  display: block;
  max-width: 100%;
  height: auto;
}

.page-faq a:focus-visible,
.page-faq summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- 首屏 ---------- */

.faq-hero {
  padding-top: clamp(24px, 3.4vw, 44px);
}

.faq-hero .breadcrumb {
  margin-bottom: clamp(20px, 2.6vw, 34px);
}

.faq-hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(28px, 4.9vw, 54px);
  line-height: 1.14;
  letter-spacing: -0.012em;
  margin: 0 0 clamp(16px, 2vw, 24px);
  color: var(--paper);
  max-width: 820px;
}

.faq-hero__lede {
  max-width: 72ch;
  margin: 0 0 clamp(26px, 3.2vw, 40px);
  color: var(--mist);
}

.faq-hero__facts {
  list-style: none;
  margin: 0 0 clamp(26px, 3.2vw, 42px);
  padding: clamp(18px, 2.2vw, 26px) 0 0;
  border-top: 1px solid rgba(169, 192, 180, 0.22);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(16px, 2vw, 30px);
}

.faq-hero__facts li {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.faq-hero__facts .figure-num {
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1;
  color: var(--gold);
}

.faq-hero__fact-label {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--mist);
}

.faq-hero__media {
  margin: 0;
}

/* ---------- 锚点跳转条 ---------- */

.faq-toc {
  position: sticky;
  top: calc(var(--topbar-h) + 6px);
  z-index: 8;
  margin: clamp(28px, 3.8vw, 52px) 0 clamp(18px, 2.6vw, 32px);
  background: rgba(21, 80, 65, 0.86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(169, 192, 180, 0.2);
  border-bottom: 1px solid rgba(169, 192, 180, 0.2);
}

.faq-toc__inner {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 11px var(--gutter);
  display: flex;
  align-items: center;
  gap: 14px;
}

.faq-toc__label {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--gold);
  white-space: nowrap;
}

.faq-toc__list {
  list-style: none;
  margin: 0;
  padding: 2px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.faq-toc__list a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid rgba(244, 162, 97, 0.3);
  border-radius: 999px;
  color: var(--mist);
  font-size: 13.5px;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.22s var(--ease), background-color 0.22s var(--ease), border-color 0.22s var(--ease);
}

.faq-toc__list a:hover,
.faq-toc__list a:focus-visible {
  color: var(--green-deep);
  background: var(--gold);
  border-color: var(--gold);
}

.faq-toc__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  opacity: 0.85;
}

/* ---------- 章节容器 ---------- */

.faq-sections {
  display: grid;
  gap: clamp(18px, 2.6vw, 32px);
}

.faq-block {
  background: var(--paper);
  color: var(--green-deep);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 40px);
  display: grid;
  gap: clamp(18px, 2.6vw, 34px);
  scroll-margin-top: calc(var(--topbar-h) + 96px);
}

.faq-block__idx {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--red);
  margin-bottom: 0;
}

.faq-block__idx::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 12px;
  border-radius: 2px;
  background: var(--red);
}

.faq-block__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(20px, 2.5vw, 27px);
  line-height: 1.28;
  margin: 18px 0 12px;
  color: var(--green-deep);
}

.faq-block__intro {
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
  color: var(--moss);
}

.faq-block__items {
  display: grid;
  align-content: start;
}

/* ---------- 折叠问答 ---------- */

.fold {
  border-bottom: 1px solid var(--sand);
}

.fold:first-child {
  border-top: 1px solid var(--sand);
}

.fold__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 17px 2px;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s var(--ease);
}

.fold__head::-webkit-details-marker {
  display: none;
}

.fold__head::marker {
  content: "";
}

.fold__idx {
  flex: 0 0 auto;
  min-width: 14px;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: rgba(8, 42, 31, 0.4);
  transition: color 0.22s var(--ease);
}

.fold[open] .fold__idx {
  color: var(--red);
}

.fold__q {
  flex: 1 1 auto;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(15.5px, 1.7vw, 17px);
  line-height: 1.55;
  color: var(--green-deep);
  transition: color 0.2s var(--ease);
}

.fold__head:hover .fold__q {
  color: var(--moss);
}

.fold__mark {
  flex: 0 0 auto;
  position: relative;
  width: 21px;
  height: 21px;
  margin-top: 2px;
  border-radius: 50%;
  border: 1px solid rgba(29, 53, 87, 0.28);
  transition: background-color 0.22s var(--ease), border-color 0.22s var(--ease);
}

.fold__mark::before,
.fold__mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--night);
  transform: translate(-50%, -50%);
  transition: background-color 0.22s var(--ease), opacity 0.22s var(--ease);
}

.fold__mark::before {
  width: 9px;
  height: 1.5px;
}

.fold__mark::after {
  width: 1.5px;
  height: 9px;
}

.fold[open] .fold__mark {
  background: var(--red);
  border-color: var(--red);
}

.fold[open] .fold__mark::before,
.fold[open] .fold__mark::after {
  background: var(--paper);
}

.fold[open] .fold__mark::after {
  opacity: 0;
}

.fold__body {
  display: grid;
  gap: 16px;
  padding: 2px 2px 24px;
}

.fold[open] .fold__body {
  animation: faq-fold-in 0.28s var(--ease) both;
}

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

.fold__aside {
  border-left: 3px solid var(--gold);
  padding-left: 13px;
}

.fold__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--red);
  margin-bottom: 6px;
}

.fold__aside p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--moss);
}

/* ---------- 步骤清单 ---------- */

.step-list {
  counter-reset: faqstep;
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 15px;
}

.step-list::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 34px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, rgba(244, 162, 97, 0.55), rgba(244, 162, 97, 0));
}

.step-list > li {
  counter-increment: faqstep;
  position: relative;
  padding-left: 46px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--green-deep);
}

.step-list > li::before {
  content: counter(faqstep, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 2px;
  width: 32px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--gold);
  color: var(--green-deep);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* ---------- 转人工 ---------- */

.faq-help {
  margin-top: clamp(34px, 4.4vw, 62px);
  scroll-margin-top: calc(var(--topbar-h) + 96px);
}

.faq-help__grid {
  display: grid;
  gap: clamp(22px, 3vw, 42px);
  align-items: center;
}

.faq-help__idx {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 12px;
}

.faq-help__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(23px, 3.2vw, 36px);
  line-height: 1.22;
  margin: 0 0 14px;
  color: var(--paper);
}

.faq-help__lede {
  margin: 0 0 20px;
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.85;
  color: var(--mist);
}

.faq-help__facts {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.faq-help__facts li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--paper);
}

.faq-help__facts li::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-top: 10px;
  border-radius: 50%;
  background: var(--red);
}

.faq-help__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.faq-help__mail {
  margin: 16px 0 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--gold-shallow);
}

.faq-help__media {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(169, 192, 180, 0.22);
}

/* ---------- 后续入口 ---------- */

.faq-next {
  margin-top: clamp(32px, 4.2vw, 56px);
}

.faq-next__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.25;
  color: var(--paper);
  margin: 0 0 18px;
}

.faq-next__cards {
  display: grid;
  gap: 16px;
}

.faq-next__card {
  display: block;
  padding: clamp(20px, 2.6vw, 28px);
  text-decoration: none;
  color: var(--paper);
  transition: transform 0.24s var(--ease), border-color 0.24s var(--ease);
}

.faq-next__card:hover {
  transform: translateY(-3px);
}

.faq-next__card h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.4;
  margin: 10px 0 8px;
  color: var(--paper);
}

.faq-next__card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--mist);
}

/* ---------- 断点 ---------- */

@media (min-width: 720px) {
  .faq-next__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 760px) {
  .fold__body {
    grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
    gap: 30px;
    align-items: start;
    padding-bottom: 28px;
  }
}

@media (min-width: 900px) {
  .faq-block {
    grid-template-columns: minmax(200px, 0.32fr) minmax(0, 1fr);
    gap: clamp(28px, 4vw, 56px);
  }

  .faq-help__grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fold[open] .fold__body {
    animation: none;
  }

  .page-faq * {
    transition-duration: 0.01ms;
  }
}
