/* ===== 使用指南页 page-faq ===== */
.page-faq {
  --faq-pad-y: clamp(3rem, 7vw, 5.4rem);
  --faq-card: rgba(36, 21, 66, .72);
  display: block;
  background: var(--c-ink);
  color: var(--c-paper);
  overflow-x: clip;
}

/* --- 首屏 --- */
.page-faq .faq-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(1.6rem, 4vw, 2.4rem) 0 clamp(3rem, 7vw, 5rem);
  background:
    radial-gradient(140% 90% at 10% -12%, rgba(22, 225, 232, .22), transparent 58%),
    radial-gradient(110% 78% at 92% 6%, rgba(255, 122, 41, .18), transparent 56%),
    linear-gradient(168deg, var(--c-ink) 0%, var(--c-purple) 62%, var(--c-ink) 100%);
  border-bottom: 1px solid var(--line-cyan);
}

.page-faq .faq-hero::before {
  content: "18";
  position: absolute;
  right: -3vw;
  bottom: -3.5rem;
  z-index: -1;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(10rem, 32vw, 22rem);
  line-height: .78;
  letter-spacing: -.05em;
  color: transparent;
  -webkit-text-stroke: 2px rgba(22, 225, 232, .18);
  pointer-events: none;
  user-select: none;
}

.page-faq .faq-hero__inner {
  position: relative;
  z-index: 1;
}

.page-faq .faq-hero__title {
  margin: .9rem 0 1.1rem;
  max-width: 22ch;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 6.2vw, 3.7rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  text-shadow: 4px 4px 0 rgba(22, 225, 232, .2);
}

.page-faq .faq-hero__lead {
  max-width: 36em;
  margin: 0 0 1.6rem;
  font-size: clamp(1rem, 2.2vw, 1.1rem);
  line-height: 1.85;
  color: var(--c-mist);
}

.page-faq .faq-hero__lead a {
  color: var(--c-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-faq .faq-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .6rem;
}

/* --- 右侧章节浮标 --- */
.page-faq .faq-rail {
  display: none;
}

/* --- 章节通用 --- */
.page-faq .faq-section {
  padding: var(--faq-pad-y) 0;
}

.page-faq .faq-section--paper {
  background: var(--c-paper);
  color: var(--c-print);
}

.page-faq .faq-section--paper .eyebrow {
  color: rgba(20, 20, 43, .6);
}

.page-faq .faq-section--paper .faq-section__sub,
.page-faq .faq-section--paper .faq-syntax__body p {
  color: rgba(20, 20, 43, .78);
}

.page-faq .faq-section--paper .mono-chip {
  background: rgba(20, 20, 43, .07);
  color: var(--c-print);
  border-color: rgba(20, 20, 43, .24);
}

.page-faq .faq-section--deep {
  background: linear-gradient(180deg, var(--c-ink) 0%, var(--c-purple) 50%, var(--c-ink) 100%);
}

.page-faq .faq-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem .9rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.3rem);
}

.page-faq .faq-section__head--inline {
  margin-bottom: .9rem;
}

.page-faq .faq-section__head h2 {
  flex: 1 0 100%;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.55rem, 4.4vw, 2.5rem);
  line-height: 1.18;
  letter-spacing: -.01em;
}

.page-faq .faq-section__sub {
  max-width: 40em;
  margin: 0 0 1.8rem;
  line-height: 1.85;
  color: var(--c-mist);
}

.page-faq .faq-section__foot {
  max-width: 40em;
  margin: 1.6rem 0 0;
  padding-left: 1rem;
  border-left: 3px solid var(--c-orange);
  line-height: 1.8;
  color: var(--c-mist);
}

/* --- 三步上手 --- */
.page-faq .faq-steps {
  list-style: none;
  margin: 0 0 clamp(1.6rem, 4vw, 2.4rem);
  padding: 0;
  display: grid;
  gap: 1.2rem;
}

.page-faq .faq-step {
  position: relative;
  padding: 1.6rem 1.3rem 1.5rem;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--c-cyan);
  border-radius: var(--radius);
  background: linear-gradient(152deg, rgba(36, 21, 66, .95), rgba(14, 16, 48, .95));
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}

.page-faq .faq-step__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: .85rem;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--c-print);
  background: var(--c-cyan);
  border-radius: 8px;
  transform: rotate(-4deg);
}

.page-faq .faq-step h3 {
  margin: 0 0 .6rem;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.14rem;
  line-height: 1.4;
  color: var(--c-paper);
}

.page-faq .faq-step p {
  margin: 0 0 .9rem;
  line-height: 1.8;
  font-size: .96rem;
  color: var(--c-mist);
}

.page-faq .faq-step__link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .04em;
  color: var(--c-yellow);
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
  padding-bottom: 2px;
}

.page-faq .faq-step__link:hover,
.page-faq .faq-step__link:focus-visible {
  color: var(--c-orange);
}

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

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

/* --- 检索写法 --- */
.page-faq .faq-syntax {
  display: grid;
  gap: 1rem;
}

.page-faq .faq-syntax__row {
  display: grid;
  gap: .8rem;
  padding: 1.3rem 1.2rem;
  border: 1px solid rgba(20, 20, 43, .16);
  border-left: 4px solid var(--c-orange);
  border-radius: 10px;
  background: rgba(255, 255, 255, .55);
}

.page-faq .faq-syntax__key {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.page-faq .faq-syntax__idx {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: .82rem;
  color: var(--c-paper);
  background: var(--c-print);
  border-radius: 6px;
}

.page-faq .faq-syntax__key h3 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.06rem;
  color: var(--c-print);
}

.page-faq .faq-syntax__chips {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: .7rem;
}

.page-faq .faq-syntax__body p {
  margin: 0;
  line-height: 1.85;
  font-size: .95rem;
  color: rgba(20, 20, 43, .78);
}

.page-faq .faq-figure--right {
  margin-top: clamp(1.6rem, 4vw, 2.4rem);
}

/* --- 旧版本归档 --- */
.page-faq .faq-archive {
  margin-top: .5rem;
}

.page-faq .faq-archive__track {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.7rem;
  display: grid;
  gap: 1.3rem;
}

.page-faq .faq-archive__track::before {
  content: "";
  position: absolute;
  left: .4rem;
  top: .45rem;
  bottom: .45rem;
  width: 2px;
  background: linear-gradient(180deg, var(--c-cyan), rgba(22, 225, 232, .06));
}

.page-faq .faq-archive__node {
  position: relative;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--faq-card);
}

.page-faq .faq-archive__dot {
  position: absolute;
  left: -1.62rem;
  top: 1.5rem;
  width: .68rem;
  height: .68rem;
  border-radius: 50%;
  background: var(--c-cyan);
  box-shadow: 0 0 0 4px rgba(22, 225, 232, .16);
}

.page-faq .faq-archive__node h3 {
  margin: 0 0 .5rem;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--c-yellow);
}

.page-faq .faq-archive__node p {
  margin: 0;
  line-height: 1.8;
  font-size: .95rem;
  color: var(--c-mist);
}

.page-faq .faq-archive__note {
  max-width: 40em;
  margin: 1.8rem 0 0;
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--c-yellow);
  background: rgba(255, 228, 92, .08);
  border-radius: 0 8px 8px 0;
  line-height: 1.8;
  font-size: .95rem;
  color: var(--c-paper);
}

/* --- 大屏问答 --- */
.page-faq .faq-qa-list {
  display: grid;
  gap: .8rem;
}

.page-faq .faq-qa {
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--c-cyan);
  border-radius: 10px;
  background: var(--faq-card);
  overflow: hidden;
}

.page-faq .faq-qa__q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.15rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--c-paper);
}

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

.page-faq .faq-qa__q::after {
  content: "+";
  flex: none;
  font-family: var(--font-mono);
  font-size: 1.3rem;
  line-height: 1;
  color: var(--c-cyan);
  transition: transform .24s var(--ease);
}

.page-faq .faq-qa[open] .faq-qa__q::after {
  content: "−";
  transform: rotate(180deg);
}

.page-faq .faq-qa__q:hover {
  color: var(--c-yellow);
}

.page-faq .faq-qa__a {
  padding: 1rem 1.15rem 1.25rem;
  border-top: 1px dashed var(--line-cyan);
}

.page-faq .faq-qa__a p {
  margin: 0;
  max-width: 54em;
  line-height: 1.9;
  font-size: .95rem;
  color: var(--c-mist);
}

/* --- 联系客服 --- */
.page-faq .faq-support {
  position: relative;
  overflow: hidden;
  padding: clamp(1.6rem, 4.5vw, 2.8rem);
  border-radius: var(--radius);
  background: linear-gradient(140deg, var(--c-orange) 0%, rgba(255, 122, 41, .82) 55%, var(--c-yellow) 130%);
  color: var(--c-print);
}

.page-faq .faq-support::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(115deg, rgba(20, 20, 43, .06) 0 2px, transparent 2px 12px);
  pointer-events: none;
}

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

.page-faq .faq-support .eyebrow {
  color: rgba(20, 20, 43, .72);
}

.page-faq .faq-support h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.5rem, 4.2vw, 2.2rem);
  line-height: 1.2;
  color: var(--c-print);
}

.page-faq .faq-support > p {
  max-width: 42em;
  margin: 0 0 1.4rem;
  line-height: 1.85;
  color: rgba(20, 20, 43, .88);
}

.page-faq .faq-support > p a {
  color: var(--c-print);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-faq .faq-support__list {
  list-style: none;
  margin: 0 0 1.6rem;
  padding: 0;
  display: grid;
  gap: .7rem;
}

.page-faq .faq-support__list li {
  padding-left: .9rem;
  border-left: 2px solid rgba(20, 20, 43, .4);
  line-height: 1.75;
  font-size: .95rem;
  color: rgba(20, 20, 43, .9);
}

.page-faq .faq-support__k {
  display: inline-block;
  margin-right: .5rem;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .04em;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--c-print);
  color: var(--c-paper);
}

.page-faq .faq-support__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

/* --- 平板 --- */
@media (min-width: 700px) {
  .page-faq .faq-figure--right {
    margin-top: 0;
  }

  .page-faq .faq-syntax__row {
    grid-template-columns: minmax(0, 12rem) minmax(0, 1fr);
    align-items: start;
    gap: 1.5rem;
    padding: 1.5rem 1.4rem;
  }

  .page-faq .faq-archive__track {
    padding-left: 2rem;
  }

  .page-faq .faq-archive__dot {
    left: -1.92rem;
  }
}

/* --- 桌面 --- */
@media (min-width: 960px) {
  .page-faq .faq-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.6rem;
  }

  .page-faq .faq-step::after {
    content: "";
    position: absolute;
    top: 2.95rem;
    right: -2.4rem;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 9px solid var(--c-cyan);
  }

  .page-faq .faq-step:last-child::after {
    display: none;
  }

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

  .page-faq .faq-qa-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .page-faq .faq-rail {
    position: fixed;
    top: 50%;
    right: max(1rem, calc((100vw - var(--shell)) / 2 - 8.5rem));
    z-index: 5;
    display: grid;
    gap: .3rem;
    transform: translateY(-50%);
  }

  .page-faq .faq-rail__item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .6rem;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: .78rem;
    font-weight: 700;
    color: var(--c-mist);
    text-decoration: none;
    border: 1px solid transparent;
    transition: color .22s var(--ease), border-color .22s var(--ease), background .22s var(--ease);
  }

  .page-faq .faq-rail__item span {
    font-family: var(--font-mono);
    font-size: .72rem;
    color: var(--c-cyan);
  }

  .page-faq .faq-rail__item:hover,
  .page-faq .faq-rail__item:focus-visible {
    color: var(--c-paper);
    border-color: var(--line-cyan);
    background: rgba(22, 225, 232, .1);
  }
}

@media (min-width: 1280px) {
  .page-faq .faq-syntax {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
  }

  .page-faq .faq-syntax__row {
    grid-template-columns: minmax(0, 1fr);
    gap: .8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-faq .faq-qa__q::after,
  .page-faq .faq-rail__item {
    transition: none;
  }
}
</main>
