/* Report-specific assistant. Works in light/dark themes and on small screens. */
.report-chat-backdrop{z-index:200;align-items:center}
.report-chat-backdrop.hidden{display:none!important}
.report-chat-window{display:flex;flex-direction:column;width:min(96vw,820px);height:min(87vh,790px);max-height:calc(100dvh - 24px);overflow:hidden;border:1px solid var(--line);border-radius:20px;background:var(--surface);box-shadow:0 24px 90px rgba(0,0,0,.35);color:var(--text)}
.report-chat-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 20px 8px;border-bottom:1px solid var(--line)}
.report-chat-heading h2{font-size:18px;margin:0;letter-spacing:-.02em;line-height:1.3}
.report-chat-close{border:1px solid var(--line);background:var(--bg);color:var(--text);border-radius:9px;min-width:32px;width:32px;height:32px;font-size:23px;line-height:1;cursor:pointer}
.report-chat-details{border-bottom:1px solid var(--line);font-size:11px;color:var(--muted);background:var(--bg)}
.report-chat-details summary{cursor:pointer;padding:5px 20px;font-weight:650;line-height:1.5;list-style:revert;list-style-position:inside}
.report-chat-details summary:hover{text-decoration:underline}
.report-chat-details summary:focus-visible{outline:2px solid var(--brand);outline-offset:-2px}
.report-chat-description{margin:0;padding:5px 20px 0;line-height:1.5}
.report-chat-privacy{font-size:11px;color:var(--muted);line-height:1.5;margin:0;padding:7px 20px 12px}
.report-chat-disclaimer{margin:0;border-top:1px solid var(--line);padding:8px 20px 11px;color:var(--muted);font-size:10.5px;line-height:1.4;background:var(--bg)}
.report-chat-disclaimer strong{color:var(--text);font-weight:700}
.report-chat-messages{flex:1;min-height:120px;overflow:auto;padding:20px 23px;display:flex;flex-direction:column;gap:14px;overscroll-behavior:contain}
.report-chat-bubble{max-width:min(94%,690px);border:1px solid var(--line);border-radius:15px;padding:12px 15px;font-size:14px;line-height:1.58;overflow-wrap:break-word}
.report-chat-bubble[data-role="assistant"]{background:var(--bg);align-self:flex-start}
.report-chat-bubble[data-role="user"]{background:color-mix(in srgb,var(--brand) 10%,var(--surface));align-self:flex-end;border-color:color-mix(in srgb,var(--brand) 30%,var(--line))}
.report-chat-bubble[data-role="system"]{background:var(--bg);color:var(--muted);align-self:stretch;font-size:12px}
.report-chat-bubble-label{font-size:10px;letter-spacing:.04em;font-weight:800;color:var(--muted);margin-bottom:5px}
.report-chat-suggestions{display:flex;flex-wrap:wrap;gap:7px;padding:8px 23px}
.report-chat-suggestions button{border:1px solid var(--line);background:var(--bg);color:var(--text);border-radius:999px;padding:8px 10px;font-size:11px;cursor:pointer}
.report-chat-suggestions button:hover{border-color:var(--brand)}
.report-chat-form{display:flex;align-items:flex-end;gap:10px;padding:9px 23px}
.report-chat-form textarea{flex:1;width:100%;min-width:0;min-height:52px;max-height:126px;resize:vertical;padding:10px 12px;border:1px solid var(--line);background:var(--bg);color:var(--text);border-radius:11px;font:inherit;font-size:14px;line-height:1.5}
.report-chat-form button{flex-shrink:0;min-width:90px;min-height:45px}
.report-chat-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:2px 23px 13px;color:var(--muted);font-size:11px}
.report-chat-footer .text-action{font-size:12px;white-space:nowrap}
.report-chat-backdrop .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media(max-width:620px){.report-chat-backdrop{padding:0}.report-chat-window{width:100vw;height:100dvh;max-height:100dvh;border-radius:0;border:0}.report-chat-heading{padding:9px 14px 7px}.report-chat-heading h2{font-size:17px}.report-chat-details summary{padding:5px 14px}.report-chat-description{padding:5px 14px 0}.report-chat-privacy{padding:7px 14px 11px}.report-chat-disclaimer{padding:7px 14px 10px;font-size:10px}.report-chat-messages{padding:12px 14px}.report-chat-suggestions{padding:6px 14px}.report-chat-form{padding:8px 14px}.report-chat-footer{padding:2px 14px 11px}.result-heading-actions{flex-wrap:wrap;gap:6px}}
@media print{#reportChatModal,#openReportChat{display:none!important}}


/* AI answers: clear visual hierarchy and safe, responsive Markdown. */
.report-chat-bubble .report-chat-content{white-space:normal;min-width:0}
.report-chat-bubble[data-role="user"] .report-chat-content,
.report-chat-bubble[data-role="system"] .report-chat-content{white-space:pre-wrap}
.report-chat-content> :first-child{margin-top:0!important}
.report-chat-content> :last-child{margin-bottom:0!important}
.report-chat-content p{margin:0 0 10px;line-height:1.65}
.report-chat-content h3{font-size:15px;font-weight:750;line-height:1.4;letter-spacing:-.01em;margin:16px 0 7px;color:var(--text)}
.report-chat-content h4{font-size:14px;font-weight:750;line-height:1.4;margin:13px 0 6px;color:var(--text)}
.report-chat-content ul,.report-chat-content ol{margin:6px 0 12px;padding-left:22px}
.report-chat-content li{padding-left:2px;margin:4px 0;line-height:1.6}
.report-chat-content strong{font-weight:750;color:var(--text)}
.report-chat-content em{font-style:italic}
.report-chat-content code{font-size:.92em;background:color-mix(in srgb,var(--text) 8%,transparent);padding:1px 4px;border-radius:4px;overflow-wrap:anywhere}
.report-chat-content hr{border:0;border-top:1px solid var(--line);margin:14px 0}
.report-chat-content blockquote{border-left:3px solid var(--brand);padding:5px 0 5px 12px;margin:9px 0 12px;color:var(--muted)}
.report-chat-table-scroll{overflow-x:auto;max-width:100%;margin:10px 0 14px;border:1px solid var(--line);border-radius:9px}
.report-chat-table-scroll table{width:100%;border-collapse:collapse;font-size:12px;line-height:1.5;white-space:normal}
.report-chat-table-scroll th,.report-chat-table-scroll td{padding:9px 11px;vertical-align:top;border-bottom:1px solid var(--line);text-align:left;min-width:78px;overflow-wrap:normal}
.report-chat-table-scroll th{font-weight:750;background:color-mix(in srgb,var(--text) 6%,var(--bg));white-space:nowrap}
.report-chat-table-scroll tr:last-child td{border-bottom:0}
.report-chat-table-scroll td.numeric,.report-chat-table-scroll th.numeric{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
@media(max-width:620px){.report-chat-bubble{max-width:100%}.report-chat-table-scroll th,.report-chat-table-scroll td{padding:8px 9px}}
