.page-faq {
  --faq-cut: 22px;
  --faq-shadow: 0 14px 40px rgba(8, 16, 32, .08);
  background: var(--c-light);
  color: var(--c-ink);
  font-family: var(--font-body);
  overflow-x: hidden;
}

/* ===== 首屏手册封面 ===== */
.faq-hero {
  background:
    linear-gradient(rgba(176, 196, 222, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(176, 196, 222, .07) 1px, transparent 1px),
    radial-gradient(900px 420px at 88% -20%, rgba(30, 58, 138, .85), transparent),
    var(--c-deep);
  background-size: 42px 42px, 42px 42px, auto, auto;
  color: var(--c-white);
  border-bottom: 1px solid var(--c-line);
  padding: 40px 0 48px;
  overflow: hidden;
}

.faq-hero__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.faq-hero__kicker {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .24em;
  color: var(--c-lime);
}

.faq-hero__kicker::before {
  content: "";
  width: 36px;
  height: 2px;
  background: var(--c-orange);
}

.faq-hero__coord {
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: .12em;
  color: var(--c-dim);
  white-space: nowrap;
}

.faq-hero__title {
  margin: 0 0 16px;
  max-width: 15em;
  font-family: var(--font-heading);
  font-size: clamp(32px, 6vw, 56px);
  font-style: italic;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.06;
  color: var(--c-white);
}

.faq-hero__lead {
  margin: 0 0 28px;
  max-width: 47em;
  font-size: 16px;
  line-height: 1.85;
  color: var(--c-dim);
}

.faq-search {
  display: flex;
  align-items: stretch;
  max-width: 680px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(176, 196, 222, .30);
  border-radius: 2px;
}

.faq-search__tag {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  background: rgba(200, 255, 0, .08);
  color: var(--c-lime);
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .08em;
  white-space: nowrap;
}

.faq-search__input {
  flex: 1;
  min-width: 0;
  padding: 13px 12px;
  border: 0;
  background: transparent;
  color: var(--c-white);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
}

.faq-search__input::placeholder {
  color: rgba(176, 196, 222, .55);
}

.faq-search__shortcut {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  background: var(--c-orange);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  white-space: nowrap;
}

/* ===== 功能主题索引 ===== */
.faq-topics {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 28px;
  margin-bottom: 40px;
}

.faq-topics__media {
  margin: 0;
  position: relative;
  border: 1px solid var(--c-line);
  background: var(--c-deep);
}

.faq-topics__media::after {
  content: "FAQ / INDEX";
  position: absolute;
  top: 10px;
  right: 12px;
  color: rgba(176, 196, 222, .8);
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: .12em;
}

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

.faq-topics__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.faq-topic {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px;
  padding: 16px 14px 14px;
  background: var(--c-white);
  border: 1px solid #e3eaf4;
  box-shadow: 0 6px 18px rgba(8, 16, 32, .04);
  color: var(--c-ink);
  text-decoration: none;
  transition: border-color .25s var(--ease-out), box-shadow .25s var(--ease-out);
}

.faq-topic::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--c-orange);
  transform: scaleX(.3);
  transform-origin: left;
  transition: transform .35s var(--ease-out);
}

.faq-topic:hover::before,
.faq-topic:focus-visible::before {
  transform: scaleX(1);
}

.faq-topic:hover,
.faq-topic:focus-visible {
  border-color: var(--c-line);
  box-shadow: 0 10px 26px rgba(8, 16, 32, .08);
}

.faq-topic:focus-visible {
  outline: 2px solid var(--c-lime);
  outline-offset: 2px;
}

.faq-topic__idx {
  align-self: flex-start;
  margin-bottom: 4px;
  padding: 1px 7px;
  background: var(--c-lime);
  color: var(--c-dark);
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .06em;
}

.faq-topic strong {
  font-family: var(--font-heading);
  font-size: 20px;
  line-height: 1.2;
}

.faq-topic em {
  font-style: normal;
  font-size: 13px;
  color: var(--c-soft);
}

/* ===== 手册正文 ===== */
.faq-manual {
  padding: 0 0 64px;
}

.faq-manual__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 26px;
}

.faq-manual__chapters {
  min-width: 0;
}

.faq-chapter {
  position: relative;
  margin-bottom: 26px;
  background:
    linear-gradient(135deg, transparent var(--faq-cut), var(--c-white) var(--faq-cut)) top right / 100% 100% no-repeat,
    var(--c-white);
  border: 1px solid #e3eaf4;
  box-shadow: var(--faq-shadow);
  scroll-margin-top: calc(var(--header-h) + 14px);
}

.faq-chapter:last-child {
  margin-bottom: 0;
}

.faq-chapter__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid #e9eef6;
  background: rgba(245, 247, 250, .55);
}

.faq-chapter__index {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--c-deep);
  color: var(--c-lime);
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 700;
  font-size: 18px;
}

.faq-chapter__heading {
  flex: 1 1 auto;
  min-width: 0;
}

.faq-chapter__title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.1;
  color: var(--c-ink);
}

.faq-chapter__note {
  margin: 5px 0 0;
  font-size: 13px;
  color: var(--c-soft);
}

.faq-chapter__more {
  margin-left: auto;
  color: var(--c-deep);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--c-lime);
  padding-bottom: 2px;
  white-space: nowrap;
}

.faq-chapter__more:hover {
  color: var(--c-orange);
  border-bottom-color: var(--c-orange);
}

.faq-chapter__items {
  padding: 4px 0;
}

.faq-item {
  border-bottom: 1px dashed #dde6f1;
}

.faq-item:last-child {
  border-bottom: 0;
}

.faq-item__q {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 17px 20px;
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.4;
  color: var(--c-ink);
  transition: background .18s ease;
}

.faq-item__q:hover {
  background: #eef3fa;
}

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

.faq-item__q::after {
  content: "+";
  margin-left: auto;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  color: var(--c-orange);
  transition: transform .25s var(--ease-out);
}

.faq-item[open] > .faq-item__q::after {
  transform: rotate(45deg);
}

.faq-item__num {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--c-deep);
  color: var(--c-lime);
  font-family: var(--font-heading);
  font-size: 14px;
  font-style: italic;
  font-weight: 700;
}

.faq-item__a {
  padding: 0 20px 22px;
  color: var(--c-soft);
  font-size: 15px;
  line-height: 1.85;
}

.faq-item__a p {
  margin: 0 0 12px;
}

.faq-item__a p:last-child {
  margin-bottom: 0;
}

.faq-item__a .btn {
  margin-top: 14px;
}

.faq-img {
  width: 800px;
  margin-top: 14px;
  border: 1px solid #dfe7f2;
  background: var(--c-light);
}

/* ===== 右侧快捷导航 ===== */
.faq-tracker {
  display: none;
  position: sticky;
  top: calc(var(--header-h) + 22px);
  padding: 20px 16px 16px;
  background: var(--c-deep);
  color: var(--c-white);
  border: 1px solid rgba(58, 90, 140, .5);
}

.faq-tracker__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(176, 196, 222, .20);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .18em;
}

.faq-tracker__head em {
  font-style: normal;
  color: var(--c-lime);
  font-size: 11px;
  letter-spacing: .2em;
}

.faq-tracker__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.faq-tracker__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  color: var(--c-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px dashed rgba(58, 90, 140, .5);
  transition: color .2s ease;
}

.faq-tracker__link i {
  flex: none;
  width: 10px;
  height: 10px;
  border: 2px solid var(--c-lime);
  border-radius: 50%;
  transition: background .2s ease, box-shadow .2s ease;
}

.faq-tracker__link span {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 700;
}

.faq-tracker__link:hover,
.faq-tracker__link:focus-visible {
  color: var(--c-white);
  outline: none;
}

.faq-tracker__link:hover i,
.faq-tracker__link:focus-visible i {
  background: var(--c-lime);
  box-shadow: 0 0 0 4px rgba(200, 255, 0, .16);
}

.faq-tracker__foot {
  display: block;
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--c-orange);
  color: var(--c-white);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  transition: transform .2s var(--ease-out), background .2s ease;
}

.faq-tracker__foot:hover {
  background: var(--c-deep);
  border: 1px solid var(--c-orange);
  transform: translateY(-2px);
}

@media (min-width: 768px) {
  .faq-topics {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 22px;
  }

  .faq-topics__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .faq-topic {
    padding: 20px 18px 16px;
  }
}

@media (min-width: 992px) {
  .faq-hero {
    padding: 52px 0 60px;
  }

  .faq-manual__layout {
    grid-template-columns: minmax(0, 1fr) 236px;
    gap: 28px;
  }

  .faq-tracker {
    display: block;
  }

  .faq-chapter__head {
    padding: 24px 26px 20px;
  }

  .faq-chapter__title {
    font-size: 26px;
  }

  .faq-item__q {
    padding: 18px 24px;
  }

  .faq-item__a {
    padding: 0 24px 24px 66px;
  }

  .faq-item__a p {
    max-width: 64ch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-faq * {
    transition: none !important;
  }
}
