.page-faq {
  --faq-line: rgba(47, 227, 200, 0.22);
  --faq-cut: 14px;
  display: block;
  background: var(--ink);
  color: var(--text);
}

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

.page-faq .faq-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(26px, 5vw, 52px) 0 clamp(36px, 5vw, 66px);
  border-bottom: 1px solid var(--faq-line);
}

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

.page-faq .faq-hero__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
}

.page-faq .faq-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(95% 130% at 8% 0%, rgba(16, 68, 58, 0.94) 0%, rgba(7, 22, 19, 0) 64%),
    linear-gradient(180deg, rgba(7, 22, 19, 0.55) 0%, rgba(7, 22, 19, 0.9) 58%, var(--ink) 100%);
}

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

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

.page-faq .faq-hero__title {
  margin: 0 0 18px;
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 64px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.012em;
}

.page-faq .faq-hero__lead {
  margin: 0;
  max-width: 64ch;
  font-size: 16px;
  line-height: 1.72;
  color: var(--muted);
}

/* ---------- 关键词筛选条 ---------- */

.page-faq .faq-filter {
  position: sticky;
  top: 0;
  z-index: 6;
  padding: 10px 0;
  background: rgba(7, 22, 19, 0.93);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--faq-line);
}

.page-faq .faq-filter__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.page-faq .faq-filter__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.page-faq .chip {
  cursor: pointer;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* ---------- 主布局 ---------- */

.page-faq .faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  padding-top: clamp(26px, 4vw, 52px);
  padding-bottom: clamp(48px, 7vw, 96px);
}

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

/* ---------- 左侧分类树 ---------- */

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

.page-faq .faq-tree__label {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-faq .faq-tree__list {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0 0 4px;
  list-style: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.page-faq .faq-tree__list li {
  flex: 0 0 auto;
}

.page-faq .faq-tree__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 11px;
  font-size: 14px;
  line-height: 1.3;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border-left: 2px solid transparent;
  transition: color var(--r-fast) var(--ease), background var(--r-fast) var(--ease), border-color var(--r-fast) var(--ease);
}

.page-faq .faq-tree__link:hover,
.page-faq .faq-tree__link:focus-visible {
  color: var(--text);
  background: rgba(47, 227, 200, 0.07);
}

.page-faq .faq-tree__link[data-active] {
  color: var(--cyan);
  background: rgba(47, 227, 200, 0.1);
  border-left-color: var(--cyan);
}

.page-faq .faq-tree__count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan-dim);
}

/* ---------- 问答分组 ---------- */

.page-faq .faq-group {
  margin: 0 0 44px;
  scroll-margin-top: 92px;
}

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

.page-faq .faq-group__head {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 5px;
  align-items: baseline;
  padding: 0 0 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--faq-line);
}

.page-faq .faq-group__head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 4px;
  background-image: repeating-linear-gradient(90deg, var(--cyan-dim) 0 1px, transparent 1px 14px);
  opacity: 0.5;
  pointer-events: none;
}

.page-faq .faq-group__idx {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--orange);
}

.page-faq .faq-group__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 3.4vw, 32px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.005em;
}

.page-faq .faq-group__desc {
  grid-column: 2;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- 问答条目 ---------- */

.page-faq .faq-item {
  position: relative;
  margin: 0 0 10px;
  background: var(--panel);
  clip-path: polygon(
    var(--faq-cut) 0,
    100% 0,
    100% calc(100% - var(--faq-cut)),
    calc(100% - var(--faq-cut)) 100%,
    0 100%,
    0 var(--faq-cut)
  );
  transition: background var(--r-base) var(--ease);
}

.page-faq .faq-item[open] {
  background: linear-gradient(140deg, rgba(16, 68, 58, 0.92) 0%, var(--panel) 74%);
}

.page-faq .faq-item[open]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--cyan);
}

.page-faq .faq-item[data-filtered-out] {
  display: none;
}

.page-faq .faq-item__q {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 10px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

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

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

.page-faq .faq-item__q::after {
  content: "+";
  justify-self: end;
  font-family: var(--font-mono);
  font-size: 17px;
  line-height: 1;
  color: var(--cyan);
  transition: transform var(--r-base) var(--ease), color var(--r-base) var(--ease);
}

.page-faq .faq-item[open] .faq-item__q::after {
  transform: rotate(45deg);
  color: var(--orange);
}

.page-faq .faq-item__num {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--cyan-dim);
  transition: color var(--r-base) var(--ease);
}

.page-faq .faq-item[open] .faq-item__num {
  color: var(--orange);
}

.page-faq .faq-item__text {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
}

.page-faq .faq-item__a {
  padding: 0 18px 18px;
}

.page-faq .faq-item__a p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--muted);
}

.page-faq .faq-item__a a,
.page-faq .filter-empty a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(47, 227, 200, 0.42);
}

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

/* ---------- 场馆配图 ---------- */

.page-faq .faq-figure {
  margin: 4px 0 16px;
  background: var(--panel);
  overflow: hidden;
  clip-path: polygon(
    var(--faq-cut) 0,
    100% 0,
    100% calc(100% - var(--faq-cut)),
    calc(100% - var(--faq-cut)) 100%,
    0 100%,
    0 var(--faq-cut)
  );
}

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

.page-faq .faq-figure figcaption {
  padding: 12px 16px 15px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- 筛选空态 ---------- */

.page-faq .filter-empty {
  margin: 10px 0 0;
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  background: rgba(14, 38, 32, 0.72);
  border-left: 2px solid var(--orange);
}

/* ---------- 桌面端布局 ---------- */

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

  .page-faq .faq-tree {
    position: sticky;
    top: 78px;
    align-self: start;
  }

  .page-faq .faq-tree__list {
    flex-direction: column;
    gap: 2px;
    padding: 0;
    overflow: visible;
  }

  .page-faq .faq-tree__list li {
    flex: 1 1 auto;
  }

  .page-faq .faq-group {
    margin-bottom: 56px;
  }
}

@media (min-width: 1180px) {
  .page-faq .faq-hero__title {
    max-width: 20ch;
  }

  .page-faq .faq-item__q {
    padding: 18px 22px;
  }

  .page-faq .faq-item__a {
    padding: 0 22px 20px;
  }
}

/* ---------- 降低动效 ---------- */

@media (prefers-reduced-motion: reduce) {
  .page-faq .faq-item,
  .page-faq .faq-item__q::after,
  .page-faq .faq-item__num,
  .page-faq .faq-tree__link {
    transition: none;
  }
}
