.page-faq {
  --faq-panel: var(--grass);
  --faq-panel-2: var(--stand);
  background: var(--night);
  color: var(--score);
}

/* ---------- 页首 ---------- */
.page-faq .faq-head {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-bottom: clamp(34px, 6vw, 68px);
}

.page-faq .faq-head__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.page-faq .faq-head__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .22;
}

.page-faq .faq-head__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 90% at 12% 0%, rgba(43, 230, 200, .16), transparent 68%),
    linear-gradient(180deg, rgba(5, 19, 15, .4), var(--night) 88%);
}

.page-faq .faq-head__inner {
  position: relative;
}

.page-faq .faq-head__title {
  margin: 10px 0 0;
  font-size: clamp(38px, 6.6vw, 78px);
  line-height: 1.02;
  letter-spacing: -.02em;
}

.page-faq .faq-head__lede {
  margin-top: 18px;
  max-width: 62ch;
  color: var(--mute);
}

/* ---------- 控制台入口 ---------- */
.page-faq .faq-console-wrap {
  padding-block: clamp(20px, 3vw, 32px);
}

.page-faq .faq-console {
  position: relative;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background:
    linear-gradient(180deg, rgba(18, 58, 46, .8), rgba(11, 42, 34, .92)),
    repeating-linear-gradient(0deg, rgba(43, 230, 200, .05) 0 1px, transparent 1px 6px);
  overflow: hidden;
}

.page-faq .faq-console::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent 70%);
}

.page-faq .faq-cats {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.page-faq .faq-cat {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: rgba(5, 19, 15, .6);
  color: var(--score);
  text-decoration: none;
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease;
}

.page-faq .faq-cat::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--cyan);
  transform: scaleX(0) skewX(-24deg);
  transform-origin: left center;
  transition: transform .26s ease;
}

.page-faq .faq-cat:hover,
.page-faq .faq-cat:focus-visible {
  border-color: rgba(43, 230, 200, .6);
  transform: translateY(-2px);
}

.page-faq .faq-cat:hover::after,
.page-faq .faq-cat:focus-visible::after {
  transform: scaleX(1) skewX(-24deg);
}

.page-faq .faq-cat__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  border: 1px solid rgba(43, 230, 200, .4);
  background: var(--cyan-12);
  color: var(--cyan);
}

.page-faq .faq-cat__icon svg {
  width: 20px;
  height: 20px;
}

.page-faq .faq-cat__name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .01em;
}

.page-faq .faq-cat__count {
  margin-left: auto;
  color: var(--cyan-soft);
  font-size: 15px;
}

.page-faq .faq-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}

.page-faq .faq-filter__label {
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--mute);
  text-transform: uppercase;
}

.page-faq .faq-filter .chip {
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.page-faq .faq-filter .chip[aria-pressed="true"] {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--night);
}

.page-faq .faq-filter__count {
  margin-left: auto;
  color: var(--mute);
  font-size: 13px;
}

/* ---------- 主体两栏 ---------- */
.page-faq .faq-body {
  display: grid;
  gap: clamp(30px, 4vw, 48px);
  padding-block: clamp(28px, 5vw, 56px) clamp(56px, 8vw, 96px);
}

/* ---------- 问答分组 ---------- */
.page-faq .faq-group + .faq-group {
  margin-top: clamp(44px, 6vw, 74px);
}

.page-faq .faq-group__head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 6px 14px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.page-faq .faq-group__num {
  grid-row: span 2;
  font-size: 26px;
  color: var(--cyan);
  line-height: 1;
}

.page-faq .faq-group__title {
  margin: 0;
}

.page-faq .faq-group__sub {
  margin: 0;
  font-size: 14px;
  color: var(--mute);
}

/* 折叠问答 */
.page-faq .qa {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--faq-panel);
  transition: border-color .22s ease, background .22s ease;
}

.page-faq .qa + .qa {
  margin-top: 10px;
}

.page-faq .qa[open] {
  border-color: rgba(43, 230, 200, .55);
  background: var(--faq-panel-2);
}

.page-faq .qa[open]::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(43, 230, 200, .65);
}

.page-faq .qa__q {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

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

.page-faq .qa__q:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: var(--r-card);
}

.page-faq .qa__q::after {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin: 7px 2px 0 auto;
  border-right: 2px solid var(--cyan);
  border-bottom: 2px solid var(--cyan);
  transform: rotate(45deg);
  transition: transform .24s ease;
}

.page-faq .qa[open] .qa__q::after {
  transform: rotate(-135deg);
}

.page-faq .qa__title {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: .005em;
}

.page-faq .qa__a {
  padding: 0 18px 18px 46px;
  animation: faq-open .24s ease both;
}

@keyframes faq-open {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.page-faq .qa__a p {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--mute);
}

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

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

/* 编号步骤 */
.page-faq .qa__steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  counter-reset: faqstep;
}

.page-faq .qa__steps li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--mute);
}

.page-faq .qa__num {
  color: var(--cyan);
  font-size: 14px;
  line-height: 1.85;
}

/* 客户端配图 */
.page-faq .faq-figure {
  margin: 20px 0 0;
  border: 1px solid var(--line);
}

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

/* ---------- 侧栏 ---------- */
.page-faq .faq-aside {
  display: grid;
  gap: 16px;
  align-content: start;
}

.page-faq .faq-side {
  padding: 22px;
}

.page-faq .faq-side__title {
  margin: 0 0 10px;
  font-size: 18px;
}

.page-faq .faq-side__text {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.75;
}

.page-faq .faq-side .contact-row {
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}

.page-faq .faq-side .contact-row__value {
  color: var(--score);
  word-break: break-word;
}

.page-faq .faq-side__btn {
  display: inline-block;
  margin-top: 18px;
}

.page-faq .faq-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.page-faq .faq-links__a {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--score);
  font-size: 14px;
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.page-faq .faq-links__a:hover,
.page-faq .faq-links__a:focus-visible {
  border-color: var(--cyan);
  background: var(--cyan-12);
  transform: translateX(2px);
}

.page-faq .faq-totop {
  display: inline-block;
  margin-top: 16px;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--mute);
  text-decoration: none;
}

.page-faq .faq-totop:hover {
  color: var(--cyan);
}

/* ---------- 响应式 ---------- */
@media (min-width: 640px) {
  .page-faq .faq-cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .page-faq .faq-body {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }

  .page-faq .faq-aside {
    position: sticky;
    top: calc(var(--header-h) + 24px);
  }
}

@media (min-width: 1180px) {
  .page-faq .faq-body {
    grid-template-columns: minmax(0, 1fr) 348px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-faq .qa__a {
    animation: none;
  }

  .page-faq .faq-cat,
  .page-faq .faq-links__a,
  .page-faq .qa__q::after {
    transition: none;
  }
}
