/* ─────────────────────────────────────────────────────────────────────────
 * FAQ — prototype-v2 SoT: user-portal/faq/index.html inline <style>
 *   ADR 0016: max-width 768 미디어 쿼리 사용 (mobile-first 재작성은 후속).
 * ──────────────────────────────────────────────────────────────────────── */

.faq-container { max-width: 1100px; margin: 0 auto 60px; /* UI-22 — 상단 여백은 portal-main 만 */ padding: 0 var(--container-padding); }
@media (min-width: 768px) {
  .faq-container { margin: 0 auto 80px; }
}

.faq-header { margin-bottom: 20px; text-align: center; }
.faq-header h1 { font-size: 24px; font-weight: 800; color: var(--text-main); display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
@media (min-width: 768px) {
  .faq-header h1 { font-size: 32px; }
}
.faq-header h1 .ver { background: linear-gradient(135deg,#0071cd,#005aa8); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; letter-spacing: 0.4px; }
.faq-header p { color: var(--text-secondary); margin-top: 10px; font-size: 13px; }
@media (min-width: 768px) {
  .faq-header p { font-size: 14px; }
}

.faq-search { max-width: 560px; margin: 16px auto; position: relative; }
.faq-search input { width: 100%; background: var(--bg-surface); border: 1px solid var(--glass-border); border-radius: 99px; padding: 12px 44px 12px 20px; font-size: 16px; color: var(--text-main); transition: all 0.2s; font-family: inherit; box-sizing: border-box; }
.faq-search input::placeholder { color: var(--text-muted); }
.faq-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0,113,205,0.12); }
.faq-search .clear-s { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); cursor: pointer; font-size: 13px; background: none; border: none; }

.trust-strip { background: linear-gradient(135deg,#0f172a 0%, #0f2d5c 50%, #1e3a5f 100%); color: #fff; border-radius: 16px; padding: 18px 20px; margin: 20px 0 24px; position: relative; overflow: hidden; box-shadow: 0 8px 24px -8px rgba(15,23,42,0.45); }
.trust-strip::after { content: ''; position: absolute; top: -80px; right: -80px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(103,232,249,0.18) 0%, transparent 70%); }
.trust-strip h3 { font-size: 13px; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; position: relative; z-index: 1; }
.trust-strip h3 i { color: #67e8f9; }
.trust-strip .ts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; position: relative; z-index: 1; }
@media (min-width: 768px) {
  .trust-strip { padding: 22px 26px; }
  .trust-strip .ts-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}
.ts-cell { background: rgba(255,255,255,0.05); border: 1px solid rgba(103,232,249,0.18); border-radius: 10px; padding: 12px 14px; text-align: center; }
.ts-cell .val { font-size: 20px; font-weight: 800; color: #67e8f9; line-height: 1.1; }
.ts-cell.green .val { color: #86efac; }
.ts-cell.yellow .val { color: #fde047; }
.ts-cell .lbl { font-size: 11px; opacity: 0.85; margin-top: 4px; line-height: 1.4; }
.ts-foot { font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 12px; position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.ts-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.ts-badge { background: rgba(103,232,249,0.12); color: #cffafe; border: 1px solid rgba(103,232,249,0.22); font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }

.hot-section { margin-bottom: 20px; }
.hot-title { font-size: 12px; font-weight: 800; color: var(--primary); letter-spacing: 0.5px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.hot-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) {
  .hot-grid { grid-template-columns: repeat(2, 1fr); }
}
.hot-item { background: linear-gradient(135deg, #fff7ed, #ffedd5); border: 1px solid #fed7aa; border-radius: 12px; padding: 14px 16px; font-size: 13px; font-weight: 700; color: #7c2d12; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; transition: all 0.2s; }
.hot-item:hover { transform: translateY(-2px); box-shadow: 0 6px 18px -6px rgba(234,88,12,0.25); }
.hot-item .ht { background: #f97316; color: #fff; font-size: 9px; font-weight: 800; padding: 2px 7px; border-radius: 4px; flex-shrink: 0; }
[data-theme="dark"] .hot-item { background: rgba(234,88,12,0.12); border-color: rgba(234,88,12,0.3); color: #fed7aa; }

.faq-tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; justify-content: center; }
/* 모바일: 한 줄 + 가로 스와이프는 공통 .chip-scroll-row(components.css) — 사이트 보정만 */
@media (max-width: 767px) {
  .faq-tabs { justify-content: flex-start; padding-bottom: 2px; }
}
.faq-tab { padding: 6px 12px; border-radius: 99px; background: var(--bg-surface); border: 1px solid var(--glass-border); color: var(--text-secondary); font-weight: 700; font-size: 12px; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px; }
@media (min-width: 768px) {
  .faq-tab { padding: 8px 18px; font-size: 13px; }
}
.faq-tab .new-tag { background: linear-gradient(135deg,#0071cd,#005aa8); color: #fff; font-size: 9px; font-weight: 800; padding: 1px 6px; border-radius: 3px; letter-spacing: 0.3px; }
.faq-tab.active { background: var(--primary); color: white; border-color: var(--primary); }
.faq-tab.active .new-tag { background: rgba(255,255,255,0.25); }

.faq-list-section-title { font-size: 12px; font-weight: 800; color: var(--text-muted); letter-spacing: 0.5px; margin: 6px 0 10px 4px; }
/* ul 기본 스타일 리셋 — 전역 리셋이 없어 기본 padding(40px)이 남으면 목록 전체가
   섹션 라벨보다 오른쪽으로 밀려 축이 어긋나 보인다 */
.faq-list { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.faq-item { background: var(--bg-surface); border-radius: 14px; border: 1px solid var(--glass-border); overflow: hidden; box-shadow: var(--glass-shadow); }
.faq-question { padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: background 0.2s; gap: 10px; }
@media (min-width: 768px) {
  .faq-question { padding: 18px 24px; gap: 12px; }
}
.faq-question:hover { background: var(--bg-darker); }
.faq-q-text { font-size: 14px; font-weight: 700; color: var(--text-main); display: flex; gap: 12px; align-items: flex-start; line-height: 1.5; flex: 1 1 auto; min-width: 0; }
@media (min-width: 768px) {
  .faq-q-text { font-size: 15px; gap: 14px; }
}
.faq-q-text::before { content: 'Q'; font-size: 18px; color: var(--primary); font-weight: 900; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.faq-q-meta { display: flex; gap: 6px; align-items: center; margin-left: 8px; flex-shrink: 0; }
.q-cat-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px; background: var(--bg-darker); color: var(--text-muted); white-space: nowrap; }
.faq-chevron { transition: transform 0.3s; }
.faq-item.active .faq-chevron { transform: rotate(180deg); }
.faq-answer { padding: 0 18px; max-height: 0; overflow: hidden; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); background: var(--bg-darker); }
@media (min-width: 768px) {
  .faq-answer { padding: 0 24px; }
}
.faq-item.active .faq-answer { padding: 18px; max-height: 800px; border-top: 1px solid var(--bg-muted); }
@media (min-width: 768px) {
  .faq-item.active .faq-answer { padding: 20px 24px 24px; }
}
.faq-a-content { font-size: 14px; line-height: 1.8; color: var(--text-secondary); display: flex; gap: 14px; }
.faq-a-content::before { content: 'A'; font-size: 18px; color: var(--text-dim); font-weight: 900; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.faq-a-body { flex: 1; }
.faq-a-body p + p { margin-top: 10px; }
.faq-a-body ul { margin: 8px 0 0 18px; }
.faq-a-body ul li { margin-bottom: 4px; }
.faq-a-body code { background: var(--bg-muted); padding: 1px 6px; border-radius: 4px; font-size: 12px; color: var(--text-main); }
.faq-a-actions { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--glass-border); display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; gap: 8px; }
.faq-rate { display: flex; gap: 6px; align-items: center; }
.faq-rate button { background: none; border: 1px solid var(--glass-border); color: var(--text-muted); border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 11px; font-weight: 700; transition: all 0.2s; font-family: inherit; }
.faq-rate button:hover { color: var(--primary); border-color: var(--primary); }
.faq-rate button.up.on { background: #dcfce7; color: #16a34a; border-color: #86efac; }
.faq-rate button.down.on { background: var(--bg-accent-red); color: var(--danger); border-color: #fca5a5; }
[data-theme="dark"] .faq-rate button.up.on { background: rgba(34,197,94,0.18); color: #86efac; }
[data-theme="dark"] .faq-rate button.down.on { background: rgba(239,68,68,0.18); color: #fca5a5; }

.faq-empty { text-align: center; padding: 48px 0; color: var(--text-muted); font-size: 14px; }
.faq-empty i.empty-icon { font-size: 40px; display: block; margin-bottom: 16px; opacity: 0.3; }
.faq-empty .ce-actions { margin-top: 16px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.faq-empty .ce-actions button { font-family: inherit; background: var(--primary); color: #fff; border: none; border-radius: 8px; padding: 8px 16px; font-weight: 700; font-size: 12px; cursor: pointer; }
.faq-empty .ce-actions button.outline { background: transparent; color: var(--text-main); border: 1px solid var(--glass-border); }

.expert-panel { background: var(--bg-surface); border: 1px solid var(--glass-border); border-radius: 14px; padding: 20px; margin-top: 24px; }
@media (min-width: 768px) {
  .expert-panel { padding: 22px 24px; margin-top: 32px; }
}
.expert-panel-h { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.expert-panel-h h3 { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; color: var(--text-main); }
@media (min-width: 768px) {
  .expert-panel-h h3 { font-size: 16px; }
}
.expert-panel-h h3 i { color: var(--primary); }
.expert-panel-h .pp { font-size: 11px; color: var(--text-muted); background: var(--bg-darker); padding: 4px 10px; border-radius: 99px; }
.expert-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) {
  .expert-grid { grid-template-columns: repeat(3, 1fr); }
}
.expert-cell { background: var(--bg-darker); padding: 12px 14px; border-radius: 10px; }
.expert-cell .ec-title { font-size: 12px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.expert-cell .ec-score { font-size: 20px; font-weight: 800; color: var(--primary); }
.expert-cell.warn .ec-score { color: #ea580c; }
[data-theme="dark"] .expert-cell.warn .ec-score { color: #fdba74; }
.expert-cell .ec-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.expert-note { font-size: 12px; color: var(--text-secondary); margin-top: 12px; line-height: 1.7; padding: 10px 14px; background: var(--bg-darker); border-radius: 8px; }
.expert-note strong { color: var(--text-main); }

mark.faq-highlight { background: #fef08a; color: #713f12; padding: 0 2px; border-radius: 2px; }
