/* assets/qa.css — 问答清单页私有样式 */

/* ========== 问答卡片 ========== */
.qa-intro {
  background: linear-gradient(135deg, var(--accent2-soft), var(--accent-soft));
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 1.5rem 1.8rem;
  margin-bottom: 2rem;
}
.qa-intro p {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}
.qa-intro .qa-tip {
  font-size: 0.86rem;
  color: var(--muted);
}
.qa-intro .qa-tip strong { color: var(--accent); }

/* 维度分组 */
.qa-dim-group {
  margin-bottom: 2.2rem;
}
.qa-dim-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--rule);
}
.qa-dim-num {
  font-family: 'InstrumentSerif', serif;
  font-size: 1.6rem;
  color: var(--accent);
  line-height: 1;
  min-width: 32px;
}
.qa-dim-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}
.qa-dim-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  margin-left: auto;
}

/* 单条问答 */
.qa-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease;
}
.qa-card:hover {
  box-shadow: 0 2px 8px rgba(42,38,34,0.08), 0 12px 32px rgba(42,38,34,0.06);
}

.qa-question {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 1rem 1.3rem;
  cursor: pointer;
  user-select: none;
}
.qa-q-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}
.qa-q-text {
  flex: 1;
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--ink);
  line-height: 1.6;
}
.qa-q-toggle {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.2s ease;
}
.qa-card.open .qa-q-toggle { transform: rotate(180deg); }

/* 答案对比区 */
.qa-answer-wrap {
  display: none;
  border-top: 1px solid var(--rule);
}
.qa-card.open .qa-answer-wrap { display: block; }

.qa-answer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
}
.qa-answer-cell {
  padding: 1rem 1.3rem;
  background: var(--surface);
}
.qa-answer-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}
.qa-answer-label.good {
  background: var(--accent2-soft);
  color: var(--accent2);
}
.qa-answer-label.bad {
  background: #FBEEEC;
  color: var(--warn);
}
.qa-answer-text {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink);
}
.qa-answer-text.bad { color: #5a3a36; }

/* 答案末尾要点 */
.qa-key-point {
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--rule);
  font-size: 0.82rem;
  color: var(--muted);
}
.qa-key-point strong { color: var(--accent); }

/* ========== 筛选栏 ========== */
.qa-filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.8rem;
  padding: 0.8rem 1rem;
  background: var(--bg2);
  border-radius: 10px;
  border: 1px solid var(--rule);
}
.qa-filter-chip {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.32rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.qa-filter-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.qa-filter-chip.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.qa-filter-chip .chip-count {
  font-size: 0.7rem;
  opacity: 0.7;
  margin-left: 0.2rem;
}

/* 搜索框 */
.qa-search-wrap {
  flex: 1;
  min-width: 180px;
  position: relative;
}
.qa-search {
  width: 100%;
  font-family: inherit;
  font-size: 0.86rem;
  padding: 0.4rem 0.9rem 0.4rem 2rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease;
}
.qa-search:focus { border-color: var(--accent); }
.qa-search-icon {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

/* 无结果提示 */
.qa-no-result {
  display: none;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}
.qa-no-result.show { display: block; }

/* ========== 使用说明 ========== */
.qa-usage {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent2);
  border-radius: 10px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.5rem;
}
.qa-usage h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent2);
  margin-bottom: 0.5rem;
}
.qa-usage ol {
  padding-left: 1.3rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
}
.qa-usage ol li { margin-bottom: 0.2rem; }

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .qa-answer-row {
    grid-template-columns: 1fr;
  }
  .qa-answer-cell {
    border-bottom: 1px solid var(--rule);
  }
  .qa-answer-cell:last-child { border-bottom: none; }
  .qa-filter-bar { flex-direction: column; }
  .qa-search-wrap { width: 100%; }
  .qa-dim-tag { display: none; }
}

@media print {
  .qa-filter-bar, .qa-q-toggle { display: none !important; }
  .qa-answer-wrap { display: block !important; }
  .qa-card { box-shadow: none; break-inside: avoid; }
}
