/* ===== AI 助手 / 知识åº?共用：条目详情弹窗（知识库报告纸风格，居中显示）===== */
.rc-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    /* 高于浮动助手对话面板(z-index:10000)，避免弹窗被遮挡 */
    z-index: 10002;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.22s ease;
}
.rc-modal-overlay.show {
    display: flex;
    opacity: 1;
}
.rc-modal {
    width: min(880px, 92vw);
    max-height: 88vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(148, 163, 184, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.94) translateY(12px);
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}
.rc-modal-overlay.show .rc-modal {
    transform: scale(1) translateY(0);
}

.rc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(248, 250, 252, 0.9);
    flex-shrink: 0;
}
.rc-modal-header-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rc-modal-badge {
    padding: 3px 9px; font-size: 10px; font-weight: 700;
    border-radius: 5px; background: rgba(79, 70, 229, 0.1); color: #4f46e5;
    flex-shrink: 0;
}
.rc-modal-title {
    font-size: 14px; font-weight: 700; color: #1e293b;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70vw;
}
.rc-modal-close {
    padding: 6px 10px; border-radius: 8px; border: none;
    background: transparent; color: #94a3b8; font-size: 20px; line-height: 1;
    cursor: pointer; transition: all 0.15s; flex-shrink: 0;
}
.rc-modal-close:hover { background: rgba(226, 232, 240, 0.9); color: #475569; }

.rc-modal-body {
    flex: 1; display: flex; overflow: hidden; min-height: 0;
}

/* 左侧：报告纸（命中分块正文） */
.rc-modal-paper-col {
    flex: 1; overflow-y: auto; padding: 24px;
    background: rgba(241, 245, 249, 0.5);
    display: flex; justify-content: center; align-items: flex-start;
}
.rc-paper {
    width: 100%; max-width: 560px; background: #fff;
    padding: 30px 32px; border-radius: 12px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(226, 232, 240, 0.7);
    min-height: 50vh; display: flex; flex-direction: column; justify-content: space-between;
}
.rc-paper-header { border-bottom: 1px solid rgba(79, 70, 229, 0.18); padding-bottom: 14px; margin-bottom: 20px; }
.rc-paper-meta {
    font-size: 10px; color: #4f46e5; letter-spacing: 2px;
    font-weight: 700; text-transform: uppercase; margin-bottom: 5px;
}
.rc-paper-title { font-size: 17px; font-weight: 700; color: #0f172a; line-height: 1.5; }
.rc-paper-content { flex: 1; font-size: 13.5px; line-height: 1.85; color: #475569; }
.rc-paper-content p { margin-bottom: 12px; }
.rc-paper-footer {
    border-top: 1px solid rgba(226, 232, 240, 0.7);
    padding-top: 14px; margin-top: 28px;
    font-size: 10px; color: #94a3b8; letter-spacing: 0.3px;
}

/* 右侧：AI 摘要侧栏 */
.rc-modal-sidebar {
    width: 270px; border-left: 1px solid rgba(226, 232, 240, 0.9);
    display: flex; flex-direction: column; background: rgba(248, 250, 252, 0.6);
    flex-shrink: 0;
}
.rc-sidebar-header {
    padding: 15px 16px; border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    background: #fff;
}
.rc-sidebar-title {
    font-size: 11px; font-weight: 700; color: #475569;
    text-transform: uppercase; letter-spacing: 1px;
    display: flex; align-items: center; gap: 6px;
}
.rc-sidebar-title::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: #4f46e5; display: inline-block;
}
.rc-sidebar-content {
    flex: 1; overflow-y: auto; padding: 16px;
    display: flex; flex-direction: column; gap: 14px;
    font-size: 12.5px; line-height: 1.75; color: #475569;
}
.rc-sidebar-content p { margin: 0; }
.rc-sidebar-footer {
    padding: 12px 16px; border-top: 1px solid rgba(226, 232, 240, 0.9);
    background: #fff;
}
.rc-download-btn {
    width: 100%; padding: 10px; background: #4f46e5; color: #fff;
    border: none; border-radius: 8px; font-size: 12px; font-weight: 600;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    cursor: pointer; text-decoration: none; transition: background 0.15s;
}
.rc-download-btn:hover { background: #4338ca; }

/* 加载 / 错误 / 占位æ€?*/
.rc-loading, .rc-muted { color: #94a3b8; font-size: 12.5px; }
.rc-error { color: #dc2626; font-size: 12.5px; line-height: 1.7; }

/* ===== AI 回答内：引用来源块（AI 用标记生成，可点击）===== */
.ai-cite-block {
    margin: 12px 0 4px; padding: 12px 14px;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 12px; font-size: 12.5px; line-height: 1.7;
}
.ai-cite-block-title {
    font-size: 12px; font-weight: 600; color: #64748b;
    margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px dashed rgba(203, 213, 225, 0.8);
}
.ai-cite-item {
    display: flex; align-items: baseline; gap: 8px;
    padding: 5px 7px; border-radius: 7px;
    color: #334155; cursor: default; transition: background 0.15s;
}
.ai-cite-item.clickable { cursor: pointer; }
.ai-cite-item.clickable:hover { background: rgba(79, 70, 229, 0.08); }
.ai-cite-item.clickable:hover .ai-cite-name { color: #4f46e5; }
.ai-cite-idx {
    flex-shrink: 0; font-weight: 700; color: #4f46e5;
    background: rgba(79, 70, 229, 0.12); border-radius: 5px;
    padding: 0 6px; font-size: 11px; min-width: 22px; text-align: center;
}
.ai-cite-name { color: inherit; }
.ai-cite-count {
    margin-left: auto; flex-shrink: 0; font-size: 10px; font-weight: 600;
    color: #6366f1; background: rgba(99, 102, 241, 0.12);
    border-radius: 10px; padding: 1px 7px; align-self: center;
}

/* 弹窗内：多命中分块折叠列è¡?+ 详情两栏 */
.rc-paper-content.rc-chunk-mode { display: flex; gap: 14px; padding: 0; }
.rc-chunk-list {
    width: 190px; flex-shrink: 0; overflow-y: auto; max-height: 56vh;
    border-right: 1px solid rgba(226, 232, 240, 0.8); padding-right: 10px;
    display: flex; flex-direction: column; gap: 6px;
}
.rc-chunk-item {
    padding: 9px 11px; border-radius: 9px; cursor: pointer;
    background: rgba(248, 250, 252, 0.8); border: 1px solid transparent;
    display: flex; flex-direction: column; gap: 3px; transition: all 0.15s;
}
.rc-chunk-item:hover { background: rgba(79, 70, 229, 0.07); }
.rc-chunk-item.active { background: rgba(79, 70, 229, 0.12); border-color: rgba(79, 70, 229, 0.35); }
.rc-chunk-idx {
    font-size: 10px; font-weight: 700; color: #4f46e5;
    background: rgba(79, 70, 229, 0.14); border-radius: 4px;
    padding: 0 5px; align-self: flex-start;
}
.rc-chunk-title {
    font-size: 12px; color: #334155; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rc-chunk-score { font-size: 10px; color: #94a3b8; }
.rc-chunk-detail { flex: 1; min-width: 0; }
.rc-chunk-detail p { margin: 0 0 12px; }

/* 窄屏：侧栏隐藏，报告纸占æ»?*/
@media (max-width: 640px) {
    .rc-modal-sidebar { display: none; }
    .rc-modal { width: 94vw; }
}

/* ===== ÃüÖзֿéÕýÎÄäÖȾÔöǿ ===== */
.rc-paper-content h1,.rc-paper-content h2,.rc-paper-content h3,.rc-paper-content h4,.rc-paper-content h5,.rc-paper-content h6 { color:#0f172a; line-height:1.5; margin:18px 0 8px; }
.rc-paper-content h2 { font-size:16px; font-weight:700; }
.rc-paper-content h3 { font-size:14.5px; font-weight:700; }
.rc-paper-content h4 { font-size:13.5px; font-weight:700; }
.rc-paper-content ul,.rc-paper-content ol { padding-left:22px; margin:6px 0 12px; }
.rc-paper-content li { margin:3px 0; }
.rc-paper-content code { background:#eef2f7; color:#4338ca; padding:1px 5px; border-radius:5px; font-size:12.5px; font-family:Consolas,Menlo,monospace; }
.rc-table { overflow-x:auto; margin:10px 0 14px; border:1px solid #e6eaf2; border-radius:10px; }
.rc-table table { width:100%; border-collapse:collapse; min-width:420px; font-size:13px; }
.rc-table th,.rc-table td { padding:7px 12px; border-right:1px solid #eef1f6; border-bottom:1px solid #f1f4f9; text-align:left; vertical-align:top; line-height:1.7; }
.rc-table th:last-child,.rc-table td:last-child { border-right:none; }
.rc-table thead th { background:#f6f8fb; font-weight:700; color:#0f172a; }
.rc-table tbody tr:last-child td { border-bottom:none; }