/* ============================================================
   FAQ 问答库列表模板 · 附属样式（配合 list.css 使用）
   仅承载问答手风琴区块；页头/导航/Banner/页面标签/分页/页脚均复用 list.css。
   版式：绿色 Q 标 + 问题行（可折叠） + 缩进的 A 标答案正文
   ============================================================ */
/* ---- 问答列表容器 ---- */
.fq-list{display:block;margin:0;padding:0}
.fq-list:empty{display:none}
.fq-list:empty + .nl-empty{display:block}

/* ---- 单条问答（原生 details，答案内容始终在 DOM 内，便于搜索引擎/AI 抓取）---- */
.fq-item{
  border:1px solid #e7ecea;
  border-radius:14px;
  margin:0 0 16px;
  overflow:hidden;
  transition:border-color .2s ease,box-shadow .2s ease;
}
.fq-item:first-child{margin-top:4px}
.fq-item:last-child{margin-bottom:0}
.fq-item[open]{border-color:color-mix(in srgb,var(--nl-primary) 26%,#e7ecea);box-shadow:0 10px 26px -18px rgba(37,99,235,.45)}
.fq-item:hover{border-color:color-mix(in srgb,var(--nl-primary) 32%,#e7ecea)}

/* 问题行：Q 标 + 问题文本 + 折叠箭头（隐藏浏览器默认 marker） */
.fq-item__q{
  align-items:center;
  background:#fbfdfc;
  cursor:pointer;
  display:flex;
  gap:14px;
  list-style:none;
  padding:18px 22px;
}
.fq-item__q::-webkit-details-marker{display:none}
.fq-item__q::marker{content:""}
.fq-item[open] .fq-item__q{background:#f3f9f6}
.fq-item__q-mark{
  align-items:center;
  background:var(--nl-primary);
  border-radius:9px;
  color:#fff;
  display:flex;
  flex:0 0 28px;
  font-size:15px;
  font-weight:700;
  height:28px;
  justify-content:center;
  line-height:1;
}
.fq-item__q-text{
  color:#111827;
  flex:1;
  font-size:17px;
  font-weight:600;
  line-height:1.6;
  min-width:0;
}
.fq-item[open] .fq-item__q-text{color:var(--nl-primary)}
.fq-item__toggle{
  border-right:2px solid #9ca3af;
  border-bottom:2px solid #9ca3af;
  flex:0 0 auto;
  height:9px;
  margin-right:4px;
  transform:rotate(45deg);
  transition:transform .2s ease;
  width:9px;
}
.fq-item[open] .fq-item__toggle{transform:rotate(-135deg)}

/* 答案区：A 标 + 富文本正文 */
.fq-item__a{
  align-items:flex-start;
  border-top:1px dashed #e7ecea;
  display:flex;
  gap:14px;
  padding:18px 22px 22px;
}
.fq-item__a-mark{
  align-items:center;
  background:color-mix(in srgb,var(--nl-primary) 12%,#fff);
  border-radius:9px;
  color:var(--nl-primary);
  display:flex;
  flex:0 0 28px;
  font-size:15px;
  font-weight:700;
  height:28px;
  justify-content:center;
  line-height:1;
}
.fq-item__a-body{
  color:#4b5563;
  flex:1;
  font-size:15px;
  line-height:1.85;
  min-width:0;
  overflow-wrap:break-word;
  word-break:break-word;
}
/* 答案富文本归一：段落/列表/图片/表格/引用/代码 */
.fq-item__a-body > :first-child{margin-top:0}
.fq-item__a-body > :last-child{margin-bottom:0}
.fq-item__a-body p{margin:0 0 12px}
.fq-item__a-body ul,.fq-item__a-body ol{margin:0 0 12px;padding-left:22px}
.fq-item__a-body li{margin:4px 0}
.fq-item__a-body h2,.fq-item__a-body h3,.fq-item__a-body h4{
  color:#111827;
  font-size:16px;
  font-weight:600;
  line-height:1.6;
  margin:18px 0 10px;
}
.fq-item__a-body img{border-radius:10px;height:auto;margin:10px 0;max-width:100%}
.fq-item__a-body a{color:var(--nl-primary);text-decoration:none}
.fq-item__a-body a:hover{text-decoration:underline}
.fq-item__a-body table{border-collapse:collapse;margin:12px 0;width:100%}
.fq-item__a-body th,.fq-item__a-body td{border:1px solid #e7ecea;font-size:14px;padding:8px 12px;text-align:left}
.fq-item__a-body th{background:#f8fafc;font-weight:600}
.fq-item__a-body blockquote{
  border-left:3px solid color-mix(in srgb,var(--nl-primary) 40%,#fff);
  color:#6b7280;
  margin:12px 0;
  padding:4px 0 4px 14px;
}
.fq-item__a-body code{
  background:#f3f5f4;
  border-radius:5px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:13px;
  padding:2px 6px;
}
.fq-item__a-body pre{
  background:#f8fafc;
  border-radius:10px;
  margin:12px 0;
  overflow-x:auto;
  padding:14px 16px;
}
.fq-item__a-body pre code{background:none;padding:0}

/* ---- 窄屏适配 ---- */
@media (max-width:768px){
  .fq-item__q{gap:10px;padding:14px 16px}
  .fq-item__q-text{font-size:16px}
  .fq-item__a{gap:10px;padding:14px 16px 18px}
  .fq-item__q-mark,.fq-item__a-mark{flex-basis:24px;font-size:13px;height:24px}
}

/* ============================ 返回顶部 ============================ */
/* 固定右侧，滚动超过一屏由脚本加 is-show 淡入；主题色跟随 --pd-primary */
.yb-gotop{align-items:center;background:var(--pd-primary,#2563eb);border:0;border-radius:50%;bottom:32px;box-shadow:0 8px 20px rgba(37,99,235,.28);color:#fff;cursor:pointer;display:flex;height:46px;justify-content:center;opacity:0;pointer-events:none;position:fixed;right:24px;transform:translateY(10px);transition:opacity .25s ease,transform .25s ease,background .25s ease;width:46px;z-index:90}
.yb-gotop.is-show{opacity:1;pointer-events:auto;transform:translateY(0)}
.yb-gotop:hover{background:var(--pd-primary-deep,#1e40af)}
.yb-gotop:focus-visible{outline:2px solid rgba(37,99,235,.45);outline-offset:2px}
.yb-gotop svg{height:20px;width:20px}
@media (max-width:768px){
  .yb-gotop{bottom:20px;height:42px;right:14px;width:42px}
}
