.qa-view { height: 100%; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr); gap: 0; overflow: hidden; animation: fadeUp 240ms var(--ease) both; }
.qa-layout { height: 100%; min-height: 0; display: grid; grid-template-columns: 330px minmax(0, 1fr) 395px; gap: 14px; overflow: hidden; }
.left-column, .right-column { height: 100%; min-height: 0; overflow: hidden; }
.left-column { display: grid; grid-template-rows: minmax(0, 1fr); }
.right-column { display: grid; grid-template-rows: minmax(0, 1.12fr) minmax(0, .86fr) minmax(0, .82fr); gap: 12px; }
.side-panel, .info-panel { min-height: 0; padding: 16px 20px; overflow: hidden; }
.conversation-list, .info-panel { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.side-panel header, .info-panel header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.side-panel h3, .info-panel h3 { display: inline-flex; align-items: center; gap: 8px; color: #0f172a; font-size: 17px; font-weight: 850; }
.outline-action, .info-panel header button { height: 34px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #d8e3ed; border-radius: 8px; background: #fff; color: var(--theme-primary-active); font-size: 13px; font-weight: 750; white-space: nowrap; }
.outline-action { padding: 0 12px; }
.info-panel header button { border: 0; color: #64748b; }
.session-scroll, .top-question-list, .similar-scroll { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.session-scroll { display: grid; align-content: start; gap: 4px; padding-right: 4px; }
.session-row { width: 100%; min-height: 48px; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: #334155; text-align: left; }
.session-row.active, .session-row:hover { background: var(--theme-primary-light-9); color: var(--theme-primary-active); }
.session-row span { color: var(--theme-primary); }
.session-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 700; }
.session-row time { color: #94a3b8; font-size: 12px; }
.chat-panel { height: 100%; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; }
.message-stream { min-height: 0; display: grid; align-content: start; gap: 16px; padding: 16px 18px 8px; overflow-y: auto; scrollbar-width: thin; }
.talk-row { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: start; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 999px; color: #fff; font-size: 15px; font-weight: 850; }
.user-avatar { background: linear-gradient(135deg, #26364d, #61748a); }
.assistant-avatar { background: var(--theme-primary); font-size: 20px; }
.talk-content header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.talk-content header strong { color: #334155; font-size: 14px; font-weight: 800; }
.talk-content header time { color: #94a3b8; font-size: 12px; }
.user-question { display: inline-block; margin: 0; padding: 9px 16px; border-radius: 8px; background: var(--theme-primary-light-9); color: #334155; font-size: 14px; line-height: 1.5; }
.answer-card, .agent-answer-markdown { max-width: 760px; border: 1px solid #dce5ef; border-radius: 10px; background: #fff; color: #334155; box-shadow: 0 8px 24px rgba(15, 23, 42, .04); }
.answer-card { display: grid; gap: 10px; padding: 13px 18px; }
.answer-card.compact { gap: 10px; }
.answer-card h4 { margin: 0 0 5px; color: var(--theme-primary-active); font-size: 13px; font-weight: 850; }
.answer-card p, .answer-card ul { margin: 0; font-size: 14px; line-height: 1.58; }
.answer-card ul { padding-left: 18px; }
.answer-card footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; color: #64748b; font-size: 12px; }
.answer-card footer button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #64748b; }
.answer-card footer button:hover { background: #f1f5f9; color: var(--theme-primary-active); }
.agent-answer-content { max-width: 760px; display: grid; gap: 10px; }
.agent-answer-markdown { padding: 12px 16px; overflow-x: auto; font-size: 14px; }
.agent-answer-markdown :deep(h1),
.agent-answer-markdown :deep(h2),
.agent-answer-markdown :deep(h3),
.agent-answer-markdown :deep(h4),
.agent-answer-markdown :deep(p),
.agent-answer-markdown :deep(ul),
.agent-answer-markdown :deep(ol),
.agent-answer-markdown :deep(blockquote),
.agent-answer-markdown :deep(pre) { margin: 0; }
.agent-answer-markdown :deep(h1) { font-size: 18px; }
.agent-answer-markdown :deep(h2) { font-size: 16px; }
.agent-answer-markdown :deep(h3),
.agent-answer-markdown :deep(h4) { font-size: 14px; }
.agent-answer-markdown :deep(h1),
.agent-answer-markdown :deep(h2),
.agent-answer-markdown :deep(h3),
.agent-answer-markdown :deep(h4) { color: #0f172a; line-height: 1.35; }
.agent-answer-markdown :deep(p),
.agent-answer-markdown :deep(li) { line-height: 1.65; }
.agent-answer-markdown :deep(ul),
.agent-answer-markdown :deep(ol) { padding-left: 22px; }
.agent-answer-markdown :deep(blockquote) { padding: 10px 12px; border-left: 4px solid var(--theme-primary-soft-strong); border-radius: 0 10px 10px 0; background: var(--theme-primary-light-9); color: #475569; }
.agent-answer-markdown :deep(strong) { color: #0f172a; }
.agent-answer-markdown :deep(code) { padding: 2px 6px; border-radius: 6px; background: #e2e8f0; font-size: 12px; }
.agent-answer-markdown :deep(pre) { overflow-x: auto; padding: 12px; border-radius: 10px; background: #0f172a; color: #e2e8f0; }
.agent-answer-markdown :deep(pre code) { padding: 0; background: transparent; color: inherit; }
.agent-answer-markdown :deep(a) { color: var(--theme-primary-active); text-decoration: underline; }
.agent-answer-markdown :deep(table) { width: auto; max-width: 100%; border: 1px solid #dce5ef; border-radius: 10px; border-collapse: collapse; background: #fff; box-shadow: 0 8px 24px rgba(15, 23, 42, .04); font-size: 13px; }
.agent-answer-markdown :deep(th),
.agent-answer-markdown :deep(td) { padding: 10px 12px; border-bottom: 1px solid #e2e8f0; text-align: left; white-space: nowrap; }
.agent-answer-markdown :deep(th) { background: var(--theme-primary-light-9); color: #0f172a; font-weight: 800; }
.agent-answer-markdown :deep(td) { color: #334155; font-weight: 650; }
.agent-answer-markdown :deep(tbody tr:last-child td) { border-bottom: 0; }
.agent-detail-block { max-width: 760px; margin-top: 10px; display: grid; gap: 8px; }
.agent-detail-block > strong { color: #0f172a; font-size: 12px; font-weight: 820; }
.agent-citation-disclosure { overflow: hidden; border: 1px solid #dce5ef; border-radius: 10px; background: #fff; }
.agent-citation-disclosure summary { min-height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 12px; color: #0f172a; cursor: pointer; list-style: none; }
.agent-citation-disclosure summary::-webkit-details-marker { display: none; }
.agent-citation-disclosure summary strong { font-size: 12px; font-weight: 820; }
.agent-citation-disclosure summary span { color: #64748b; font-size: 12px; font-weight: 720; }
.agent-citation-disclosure summary i { margin-left: auto; color: #64748b; transition: transform .18s ease; }
.agent-citation-disclosure[open] summary { border-bottom: 1px solid #eef2f7; }
.agent-citation-disclosure[open] summary i { transform: rotate(180deg); }
.agent-citation-disclosure .agent-citation-list { padding: 10px; }
.agent-detail-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.agent-risk-chip, .agent-action-chip { min-height: 28px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 760; }
.agent-risk-chip { background: #fff1f2; color: #be123c; }
.agent-action-chip { background: #eff6ff; color: #1d4ed8; }
.agent-citation-list { display: grid; gap: 8px; }
.agent-citation-card { padding: 10px 12px; border: 1px solid #dce5ef; border-radius: 10px; background: #f8fbff; }
.agent-citation-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.agent-citation-card header span { color: #0f172a; font-size: 13px; font-weight: 760; }
.agent-citation-card header small { color: #64748b; font-size: 11px; }
.agent-citation-card p { margin: 0; color: #334155; font-size: 12px; line-height: 1.6; }
.agent-draft-card { max-width: 760px; margin-top: 10px; padding: 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: linear-gradient(180deg, #ffffff, #f8fafc); }
.agent-draft-card header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.agent-draft-card header strong { color: #0f172a; font-size: 13px; font-weight: 800; }
.agent-draft-card header span { color: #b45309; font-size: 12px; font-weight: 760; }
.agent-draft-card pre { margin: 0; white-space: pre-wrap; word-break: break-word; color: #334155; font-size: 12px; line-height: 1.65; font-family: inherit; }
.composer-wrap { border-top: 1px solid #eef2f7; padding: 10px 14px 12px; background: #fff; }
.prompt-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; overflow-x: auto; }
.prompt-toolbar span { flex: 0 0 auto; color: #64748b; font-size: 13px; font-weight: 800; }
.prompt-toolbar button { height: 34px; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; border: 1px solid #dce5ef; border-radius: 8px; background: #fff; color: #334155; font-size: 13px; font-weight: 750; }
.prompt-toolbar button i { color: var(--theme-primary); }
.prompt-toolbar .icon-refresh { width: 34px; padding: 0; justify-content: center; }
.composer { min-height: 64px; display: grid; grid-template-columns: minmax(0, 1fr) 48px; align-items: center; gap: 10px; padding: 8px; border: 1px solid #cbd8e5; border-radius: 8px; background: linear-gradient(180deg, #fff, #fbfdff); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease; }
.composer:focus-within { border-color: rgba(var(--theme-primary-rgb), .58); background: #fff; box-shadow: 0 0 0 3px var(--theme-focus-ring), 0 10px 24px rgba(15, 23, 42, .06); }
.composer textarea { height: 48px; min-height: 48px; resize: none; border: 0; padding: 5px 8px; background: transparent; color: #0f172a; font-size: 14px; line-height: 1.55; }
.composer textarea::placeholder { color: #94a3b8; }
.composer textarea:focus { outline: none; }
.send-button { width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 8px; background: var(--theme-primary); color: #fff; font-size: 20px; box-shadow: 0 8px 18px var(--theme-primary-shadow); transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease; }
.send-button:hover { background: var(--theme-primary-hover); box-shadow: 0 10px 22px rgba(var(--theme-primary-rgb), .24); }
.send-button:active { transform: scale(.96); }
.send-button:disabled { background: #94a3b8; box-shadow: none; transform: none; }
.hot-top-panel h3 i { color: #ef4444; }
.top-question-list { display: grid; align-content: start; gap: 8px; padding-right: 4px; }
.top-question-list button { min-height: 42px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 14px; align-items: center; gap: 10px; padding: 0 8px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; color: #334155; text-align: left; }
.top-question-list button:hover { border-color: rgba(var(--theme-primary-rgb), .32); color: var(--theme-primary-active); }
.top-question-list strong { color: var(--theme-primary); font-size: 13px; font-weight: 850; font-variant-numeric: tabular-nums; }
.top-question-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 750; }
.top-question-list i { color: #94a3b8; }
.similar-panel { display: grid; }
.similar-scroll { display: grid; align-content: start; padding-right: 4px; }
.similar-row { min-height: 46px; display: grid; grid-template-columns: minmax(0, 1fr) 48px 14px; align-items: center; gap: 10px; border: 0; border-top: 1px solid #eef2f7; background: transparent; color: #334155; text-align: left; }
.similar-row:first-child { border-top: 0; }
.similar-row span { min-width: 0; display: inline-flex; align-items: center; gap: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 700; }
.similar-row span i { color: #64748b; font-size: 17px; }
.similar-row strong { height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--theme-primary-light-9); color: var(--theme-primary-active); font-size: 13px; font-weight: 850; }
.similar-row > i { color: #94a3b8; }
.semantic-debug-panel { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.semantic-debug-body { min-height: 0; display: grid; grid-template-rows: auto auto auto auto minmax(0, 1fr); gap: 12px; }
.semantic-debug-input { display: grid; gap: 8px; }
.semantic-debug-input span { color: #334155; font-size: 13px; font-weight: 800; }
.semantic-debug-input textarea { min-height: 98px; resize: vertical; padding: 12px 13px; border: 1px solid #d7e0ea; border-radius: 10px; background: linear-gradient(180deg, #ffffff, #f7fbff); color: #0f172a; font-size: 13px; line-height: 1.6; }
.semantic-debug-input textarea:focus { outline: none; border-color: rgba(var(--theme-primary-rgb), .48); box-shadow: 0 0 0 3px var(--theme-focus-ring); }
.semantic-debug-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.semantic-chip { min-height: 30px; padding: 0 10px; border: 1px solid #d8e3ed; border-radius: 999px; background: #f8fbff; color: #334155; font-size: 12px; font-weight: 760; text-align: left; }
.semantic-chip:hover { border-color: rgba(var(--theme-primary-rgb), .32); background: var(--theme-primary-light-9); color: var(--theme-primary-active); }
.semantic-debug-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.semantic-parse-btn { min-height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border: 0; border-radius: 9px; background: var(--theme-gradient-primary); color: #fff; font-size: 13px; font-weight: 800; box-shadow: 0 10px 20px var(--theme-primary-shadow); }
.semantic-parse-btn:disabled { background: #cbd5e1; box-shadow: none; }
.semantic-inline-meta { color: #64748b; font-size: 12px; }
.semantic-debug-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fff1f2; color: #be123c; font-size: 12px; line-height: 1.55; }
.semantic-result-stack { min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 12px; overflow: hidden; }
.semantic-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.semantic-result-card { min-height: 64px; display: grid; align-content: space-between; gap: 8px; padding: 12px; border: 1px solid #dce5ef; border-radius: 10px; background: linear-gradient(180deg, #ffffff, #f8fbff); }
.semantic-result-card span { color: #64748b; font-size: 12px; font-weight: 700; }
.semantic-result-card strong { color: #0f172a; font-size: 14px; font-weight: 850; word-break: break-word; }
.semantic-field-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.semantic-field-list section { min-height: 72px; padding: 12px; border-radius: 10px; background: #f8fafc; }
.semantic-field-list h4, .semantic-json-block h4 { margin: 0 0 6px; color: var(--theme-primary-active); font-size: 12px; font-weight: 850; letter-spacing: .02em; }
.semantic-field-list p { margin: 0; color: #334155; font-size: 12px; line-height: 1.6; word-break: break-word; }
.semantic-json-block { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.semantic-json-block pre { min-height: 0; margin: 0; padding: 12px; overflow: auto; border-radius: 10px; background: #0f172a; color: #d7f7ea; font-size: 11px; line-height: 1.55; }
@media (max-width: 1480px) { .qa-layout { grid-template-columns: 300px minmax(0, 1fr) 360px; } }
@media (max-width: 1280px) {
  .qa-layout { grid-template-columns: 1fr; overflow-y: auto; }
  .left-column, .right-column { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
}
@media (max-width: 760px) {
  .left-column, .right-column { grid-template-columns: 1fr; }
  .composer { grid-template-columns: minmax(0, 1fr) 48px; }
  .semantic-result-grid, .semantic-field-list { grid-template-columns: 1fr; }
}
