/* ==========================================================================
 * 畅学村 公用 FAQ（点击展开）— 首页「问明白」、购买规则、真实数据口径共用
 * 结构：ol.v3-asks.v4-faq[data-cxc-faq] > li > b(编号) + div > h3 > button.v4-faq__q + div.v4-faq__a > p…
 * 加载顺序：… → polish → faq（在页面自己的 v4 样式之前）
 * ========================================================================== */

/* ---------- 08 先把这几件事问明白：点击展开（FAQ） ----------
 * 版式不变（左编号 + 竖线 + 白卡），问题行是按钮，右侧 +／− 图标；答案用 grid-template-rows 0fr→1fr 平滑展开。 */
.v4-faq li { cursor: pointer; align-items: start; }
.v4-faq li > b { align-self: center; }
.v4-faq h3 { margin: 0; }
.v4-faq__q {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  width: 100%; min-height: 44px; padding: 0; border: 0; background: none;
  font: inherit; font-size: var(--fs-h3); font-weight: 700; line-height: 1.45; color: var(--v3-ink);
  text-align: left; cursor: pointer;
}
.v4-faq__q:focus-visible { outline: 2px solid #F59B3D; outline-offset: 4px; border-radius: 8px; }
.v4-faq__q i {
  position: relative; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  background: #FFF1E0; transition: background-color 0.25s ease, transform 0.3s ease;
}
.v4-faq__q i::before, .v4-faq__q i::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px;
  border-radius: 2px; background: #C2560E; transition: transform 0.3s ease;
}
.v4-faq__q i::after { transform: rotate(90deg); }
.v4-faq__a { display: grid; grid-template-rows: 1fr; }
.v4-faq__a > p { overflow: hidden; min-height: 0; margin: 4px 0 0; }
.v4-faq.is-faq .v4-faq__a { grid-template-rows: 0fr; transition: grid-template-rows 0.32s ease; }
.v4-faq.is-faq .v4-faq__a > p { margin-top: 0; transition: margin-top 0.32s ease; }
.v4-faq.is-faq li.is-open .v4-faq__a { grid-template-rows: 1fr; }
.v4-faq.is-faq li.is-open .v4-faq__a > p { margin-top: 6px; }
.v4-faq.is-faq li.is-open .v4-faq__q i { background: #F59B3D; transform: rotate(180deg); }
.v4-faq.is-faq li.is-open .v4-faq__q i::before, .v4-faq.is-faq li.is-open .v4-faq__q i::after { background: #fff; }
.v4-faq.is-faq li.is-open .v4-faq__q i::after { transform: rotate(0deg); }
.v4-faq.is-faq li.is-open { box-shadow: inset 0 0 0 1.5px #FFD8AE, 0 8px 22px rgba(242, 134, 46, 0.08); }
@media (max-width: 760px) {
  .v4-faq__q { font-size: 17px; }
  .v4-faq__q i { width: 26px; height: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .v4-faq.is-faq .v4-faq__a, .v4-faq.is-faq .v4-faq__a > p, .v4-faq__q i, .v4-faq__q i::before, .v4-faq__q i::after { transition: none; }
}

/* 首次收起不播过渡（faq.js 两帧后移除 .is-faq-init） */
.v4-faq.is-faq-init .v4-faq__a, .v4-faq.is-faq-init .v4-faq__a > *, .v4-faq.is-faq-init .v4-faq__q i, .v4-faq.is-faq-init .v4-faq__q i::before, .v4-faq.is-faq-init .v4-faq__q i::after { transition: none !important; }

/* ---------- 多段答案（购买规则「退款规则」等）：答案外再包一层 .v4-faq__body ---------- */
.v4-faq__a > .v4-faq__body { overflow: hidden; min-height: 0; margin: 4px 0 0; }
.v4-faq.is-faq .v4-faq__a > .v4-faq__body { margin-top: 0; transition: margin-top 0.32s ease; }
.v4-faq.is-faq li.is-open .v4-faq__a > .v4-faq__body { margin-top: 6px; }
.v4-faq__body p { margin: 0 0 6px; font-size: var(--fs-body); line-height: 1.75; color: var(--v3-ink-2); }
.v4-faq__body p:last-child { margin-bottom: 0; }
.v4-faq__a > p { line-height: 1.75; }
.v4-faq .v3-formula { margin: 8px 0; padding: 10px 14px; border-radius: 10px; background: #FFF5EA; color: #8A3D06; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .v4-faq.is-faq .v4-faq__a > .v4-faq__body { transition: none; } }

/* ---------- 去掉直角描边 ----------
 * v7.css 给 .v3-rules li / .v3-cum > div / .v3-rating > div 等加了 1px outline，这些元素没有圆角 → 一圈直角黑框。
 * FAQ 卡片自己有圆角白底，不需要；真实数据页的累计数字 / 评分块也不要外框。 */
.v4-faq li { outline: 0; }
[data-page="data"] .v3-cum > div,
[data-page="data"] .v3-rating > div { outline: 0; }

/* ---------- 购买规则 / 真实数据：FAQ 列表与下一块之间留白 ---------- */
.v3-sec .v4-faq, .v3-block .v4-faq { margin-bottom: 8px; }
#method .v4-faq { margin-bottom: 36px; }

