/* The result is a readable working document, with controls around its edges. */
.results #result {color:#363d49;overflow-wrap:anywhere}
.results > .section-title {align-items:center;gap:16px;padding-bottom:20px;border-bottom:1px solid #e9e7e2}
.results #resultStatus {letter-spacing:0;padding:4px 9px;line-height:1.5;border-radius:999px}
.results .report-document {white-space:normal;font-size:14px;line-height:1.9;margin:26px 0 30px}
.report-document > :first-child {margin-top:0}
.report-document :is(h2,h3,h4,h5,h6) {color:#4b2428;font-family:inherit;font-weight:600;line-height:1.45;letter-spacing:-.4px;margin:30px 0 12px}
.report-document h2 {font-size:23px}
.report-document h3 {font-size:18px}
.report-document :is(h4,h5,h6) {font-size:15px}
.report-document p {font-size:inherit;line-height:inherit;margin:12px 0;color:inherit}
.report-document :is(ul,ol) {padding-left:24px;margin:14px 0}
.report-document li {padding-left:4px;margin:7px 0}
.report-document li::marker {color:#72575a}
.report-document strong {font-weight:600;color:#252c39}
.report-document code {background:#f0efeb;border-radius:4px;padding:2px 5px;font-size:.9em;overflow-wrap:anywhere}
.report-table {width:100%;overflow:auto;border:1px solid #dedfe3;border-radius:10px;margin:22px 0;scrollbar-width:thin}
.report-table:focus-visible {outline:3px solid #315bc4;outline-offset:3px}
.report-table table {width:100%;border-collapse:collapse;min-width:420px;font-size:13px;line-height:1.7}
.report-table th {color:#363d49;background:#edf1f8;font-weight:600}
.report-table :is(th,td) {text-align:left;padding:12px 16px;border-bottom:1px solid #e5e6e9;vertical-align:top}
.report-table tr:last-child td {border-bottom:0}
.report-table tbody tr:nth-child(even) {background:#fafaf8}
.results .metrics {gap:12px;margin:24px 0}
.results .metric {background:#f1f4fa;border:1px solid #dce3f0;padding:18px;border-radius:12px}
.results .metric strong {color:#264a91;line-height:1.3}
.results .metric span {color:#566173;font-size:13px;line-height:1.7}
.results .conversation {padding:16px 18px;margin:20px 0;border:1px solid #e2dfd9;border-radius:10px;background:#faf9f6}
.results details > summary {cursor:pointer;min-height:32px;font-size:13px;line-height:1.8;color:#626b78}
.results summary:focus-visible {outline:3px solid #315bc4;outline-offset:4px;border-radius:3px}
.results .conversation .report {font-size:13px;line-height:1.8;max-height:280px;overflow:auto}
.results .trace {margin:20px 0;border-top:1px solid #e9e7e2;padding-top:15px;font-size:13px;line-height:1.9;color:#626b78}
.results .trace > div {padding:5px 0;overflow-wrap:anywhere}
.results .error {background:#fbefef;color:#8a3038;border:1px solid #e8c6cb;border-radius:10px;padding:18px;font-size:13px;line-height:1.8;margin:20px 0}
.results #result > .actions {border-top:1px solid #e9e7e2;padding-top:20px;gap:10px;display:flex;flex-wrap:wrap;align-items:flex-start}
.results #result > .actions > :is(a,button),.results #result > .actions .download-control > button {display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 16px;font-size:14px;line-height:22px;border-radius:var(--button-radius,999px);margin:0}
.results #downloadReport{display:flex;flex-direction:column;align-items:flex-start}
.results .download-control > [role=status]:empty{display:none}
.results #result > .actions [data-delete-result] {margin-left:auto;color:#88545a}
.results .spinner {border-top-color:#315bc4;width:24px;height:24px;margin:26px 0 16px}
.results .spinner + p {font-size:15px;font-weight:600}
.results .interactive-chart {background:#fff;border-color:#dedfe3;border-radius:12px;box-shadow:none}
.results .chart-heading h3 {color:#4b2428;font-size:18px}
.results .chart-insight {background:#edf1f8;color:#3f506a}
.results .reply-form {border-top:1px solid #e9e7e2;margin-top:24px;padding-top:22px}
.reply-form label {display:block;font-size:14px;color:var(--ink);font-weight:600;margin-bottom:8px}
.reply-form textarea {display:block;width:100%;min-height:110px;padding:16px;background:#fff;border:1px solid var(--field-border);border-radius:var(--control-radius);font-size:14px;line-height:1.7}
.reply-form>button{margin-top:14px;min-height:44px}
.reply-form textarea:focus-visible {outline:3px solid #315bc4;outline-offset:3px}
@media(max-width:600px) {
 .results .report-document { font-size:13px; }
 .report-document h2 { font-size:20px; }
 .results .metrics { grid-template-columns:1fr; }
 .results #result > .actions [data-delete-result] { margin-left:0; }
 .report-table :is(th,td) { padding:10px 12px; }
}
@media(prefers-reduced-motion:reduce) { .results .interactive-chart,.results .chart-bar { animation:none!important; } }
/* Detail uses the dashboard frame, typography, and controls. */
body.viewing-report .grid{max-width:none;margin:0}
body.viewing-report .results{margin:0;width:100%;padding:26px 28px;background:#fff;border:1px solid #dce3f0;border-radius:16px;box-shadow:0 2px 7px #243c6c05}
body.viewing-report .results h2{color:#252c39;font-size:var(--title-size);font-weight:400;letter-spacing:-.5px}
body.viewing-report .results .report-document{max-width:900px;font-size:14px;line-height:1.85;margin:26px 0}
body.viewing-report .report-document :is(h2,h3,h4,h5,h6){color:#29394f;font-weight:600;letter-spacing:-.3px}
body.viewing-report .report-document h2{font-size:20px}
body.viewing-report .results>.section-title{border-color:#e4eaf4}
body.viewing-report .composer{width:100%;max-width:none;margin:20px 0 0;border-radius:16px;border-color:#dce3f0;padding:22px 28px;box-shadow:0 2px 7px #243c6c05}
body.viewing-report .composer .reply-form{margin:0;padding:0;border:0}
body.viewing-report .composer textarea{font-family:inherit;font-size:14px;background:#fff;border:1px solid var(--field-border);border-radius:var(--control-radius);min-height:110px;padding:16px}
body.viewing-report .composer .compose-mode{color:#526685;margin-bottom:14px}
body.viewing-report .composer .actions button,body.viewing-report #replySend{font-family:inherit;font-size:13px;border-radius:22px;padding:10px 18px}
body.viewing-report .results #resultStatus{color:#526b91;background:#edf2fc;letter-spacing:0}
@media(max-width:600px){body.viewing-report .results,body.viewing-report .composer{padding:20px 16px}body.viewing-report .results .section-title{flex-wrap:wrap}}
body.viewing-report #result{min-height:0}body.viewing-report .results{min-height:0}body.viewing-report .results #result>.actions{margin-bottom:0}
/* Detail shares the product control and typography contract. */
body.viewing-report .composer textarea,.reply-form textarea{border-color:var(--field-border);font-size:14px;background:#fff}
body.viewing-report .composer .actions button,body.viewing-report #replySend,.results #result>.actions button{border-radius:var(--button-radius,999px);font-size:14px}
.results #resultStatus{font-size:13px!important}.results .metric span,.results .metric small{font-size:13px;color:var(--muted)}.results .metric strong{font-size:clamp(20px,2.5vw,26px);font-variant-numeric:tabular-nums}
.results #result>.actions [data-delete-result]{color:var(--error);border:1px solid var(--error);background:#fff}
.report-question{margin:24px 0;padding:0;background:transparent;border:0;border-radius:0}
body.viewing-report .results .conversation .report{font-size:14px;white-space:normal}.results .conversation .report-document{margin:12px 0}.report-document a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.results .chart-table table{min-width:420px}.results .chart-table td,.results .chart-table th{overflow-wrap:normal}.results .metric strong{white-space:nowrap;overflow-wrap:normal;max-width:100%;overflow-x:auto}
@media(max-width:480px){.results .metric strong{font-size:18px}}

/* Agent artwork stays inside the report, with real status text outside the canvas. */
.work-orb{position:relative;width:min(100%,560px);margin:12px auto 0;min-height:210px}
.work-orb-canvas{display:block;width:100%;height:210px}
.work-orb-motion{position:absolute;right:0;bottom:0;display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:50%;background:transparent;color:#315bc4;font-size:18px}
.work-orb-motion:hover{background:#e8eefb}
.work-orb-status{text-align:center;font-weight:600}

.int-banner{position:fixed;bottom:8px;left:50%;transform:translateX(-50%);z-index:200;padding:6px 12px;border:1px solid #b5c6ef;border-radius:20px;background:#edf2ff;color:#25468e;font:12px Poppins,sans-serif;pointer-events:none;white-space:nowrap}
/* A quiet report canvas with an adjacent, permission-checked history rail. */
.report-history-layout{min-width:0;display:grid;grid-template-columns:minmax(0,1fr);gap:20px}
body:not(.viewing-report) .report-history-layout{display:none}
.report-history-layout.history-open{grid-template-columns:minmax(0,3fr) minmax(280px,1fr)}
.report-history-control{position:relative;display:inline-flex;margin-left:10px;vertical-align:middle}
.report-history-control button{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;padding:8px;color:var(--muted)}
.history-tooltip{display:none;position:absolute;right:0;top:calc(100% + 8px);width:max-content;max-width:240px;padding:9px 12px;background:var(--ink);color:white;border-radius:10px;font-size:12px;z-index:50;white-space:normal}
.report-history-control:hover .history-tooltip,.report-history-control:focus-within .history-tooltip{display:block}
.report-history-rail{min-width:0;align-self:start;position:sticky;top:20px;max-height:calc(100dvh - 40px);overflow:auto;background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px;animation:history-enter .2s ease}
.history-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}.history-heading h2{font-size:17px;margin:0}.history-heading button{width:36px;height:36px;padding:8px;border-radius:50%}
.history-content{font-size:13px;line-height:1.7;overflow-wrap:anywhere}.history-content details{border-top:1px solid var(--line);padding:12px 0}.history-content summary{cursor:pointer;font-weight:600;padding:5px 0}.history-content time{display:block;color:var(--muted);font-size:12px}.history-content article{border-bottom:1px solid var(--line);padding:12px 0}.history-content .report-document{font-size:13px}.history-content .report-document h2{font-size:17px}.history-version-preview{max-height:420px;overflow:auto}.history-message textarea{width:100%;min-height:100px;font:inherit;border:1px solid var(--field-border);border-radius:12px;padding:10px}.history-message>div{display:flex;flex-wrap:wrap;gap:8px}.history-message button{font-size:12px;padding:8px 12px}.history-message label{font-size:13px}
@keyframes history-enter{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:none}}
@media(max-width:1000px){.report-history-layout.history-open{grid-template-columns:minmax(0,1fr)}.report-history-rail{position:fixed;inset:12px 12px 12px auto;width:min(380px,calc(100vw - 24px));max-height:none;z-index:80;box-shadow:0 15px 60px #18294530}}
@media(prefers-reduced-motion:reduce){.report-history-rail{animation:none}}
@media print{.report-history-rail,.report-history-control{display:none!important}.report-history-layout.history-open{display:block}}

.report-status-actions{display:flex;align-items:center;flex-shrink:0;gap:0}

/* Conversation stays with its report; history is a navigable index. */
.report-history-layout{width:100%;max-width:none;grid-column:1/-1}
body.viewing-report .results .report-document{max-width:none}
.report-history-control{margin:0 10px 0 0}
.report-discussion{margin-top:24px;border-top:1px solid var(--line);padding-top:16px}
.report-comment{padding:16px 20px;margin:12px 0;background:#f6f8fc;border:1px solid var(--line);border-radius:14px;scroll-margin-top:24px;overflow-wrap:anywhere}
.report-comment:focus{outline:2px solid var(--accent);outline-offset:3px}
.report-comment time{display:block;font-size:12px;color:var(--muted)}
.report-comment .report-document{margin:10px 0!important}
.history-conversation-link{display:block;width:100%;text-align:left;white-space:normal;background:transparent;color:var(--ink);border:0;border-bottom:1px solid var(--line);border-radius:0;padding:12px 0;font-size:13px;line-height:1.7;overflow-wrap:anywhere}
#replyNote{margin:14px 0 0 10px}

/* Notes follow the composer; prompts live only in the history conversation. */
.reply-form .report-discussion{margin-top:28px;padding-top:24px;border-top:1px solid var(--line)}
.report-discussion h3{font-size:16px;font-weight:600;margin:0 0 14px}
.history-content summary{display:flex;align-items:center;justify-content:space-between;gap:10px;list-style:none}
.history-content summary::-webkit-details-marker{display:none}
.history-content summary::marker{content:''}
.history-content summary>span:first-child{min-width:0;flex:1}
.history-chevron{display:flex;flex:0 0 16px;transition:transform .2s ease}
.history-chevron svg{width:16px;height:16px}
.history-content details[open]>summary .history-chevron{transform:rotate(180deg)}
.history-content .history-version-child{margin:12px 0 0 14px;padding:12px;border:1px solid var(--line);border-left:3px solid #dce5fa;border-radius:10px;background:#f8faff}
.history-content .history-version-child>summary{font-size:12px;font-weight:500}
.history-message-preview{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12px;font-weight:400;color:var(--muted);margin-top:5px}
.history-conversation-entry[open] .history-message-preview{display:none}
.history-conversation-entry .report-document{margin:12px 0}
.history-report-link,.report-comment button{font-size:12px;padding:6px 0;margin-top:8px}
@media(prefers-reduced-motion:reduce){.history-chevron{transition:none}}

.inline-report-editor{padding:0;margin:0}
.inline-report-editor .editor-header-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 12px}
.inline-report-editor .editor-title-group{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.inline-report-editor h3{font-size:16px;font-weight:600;margin:0;color:var(--ink,#252c39)}
.inline-report-editor .editor-dirty-pill{display:inline-flex;align-items:center;padding:3px 10px;border-radius:999px;background:#edf2fc;color:#315bc4;font-size:11px;font-weight:500}
.inline-report-editor [contenteditable]{min-height:320px;padding:32px 40px;border:1px solid #dce4f2;border-radius:18px;background:#fff;box-shadow:0 1px 3px rgba(37,44,57,.05),0 10px 28px rgba(37,44,57,.04);outline-offset:2px;overflow-wrap:anywhere}
.inline-report-editor .actions{display:flex;gap:8px;margin:0;align-items:center}
.inline-report-editor .editor-header-bar .actions button{min-height:36px;padding:8px 16px;font-size:13px}
.inline-report-editor [role=status]{font-size:13px;color:var(--muted)}
@media(max-width:480px){.report-status-actions{max-width:100%;flex-shrink:1;flex-wrap:wrap;gap:4px}.report-status-actions .report-history-control{margin:0}.report-status-actions .report-history-control button{width:32px;min-width:32px;height:32px;min-height:32px;padding:7px}.report-status-actions #resultStatus{font-size:12px!important;padding:6px 8px}}

/* Compact notes use the same quiet type as the conversation input. */
.reply-form .report-comment{padding:10px 14px;margin:10px 0;border-radius:12px;background:#f8faff;font-size:14px;color:var(--muted)}
.report-comment>summary{display:flex;align-items:center;gap:10px;cursor:pointer;list-style:none;min-height:36px}
.report-comment>summary::-webkit-details-marker{display:none}
.report-comment>summary::marker{content:''}
.note-avatar{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:50%;background:#e5edfc;color:#526685;font-size:11px;font-weight:600}
.note-identity{flex:1;min-width:0}.note-identity strong{display:block;font-size:14px;font-weight:600;color:var(--ink);overflow-wrap:anywhere}.note-identity time{font-size:11px}
.note-toggle{display:flex;align-items:center;justify-content:center;flex:0 0 28px;width:28px;height:28px;border-radius:50%;color:var(--muted);transition:transform .22s ease}
.note-toggle svg{width:16px;height:16px}.report-comment[open]>.note-toggle,.report-comment[open]>summary .note-toggle{transform:rotate(180deg)}
.reply-form .report-comment .report-document{font-size:14px;line-height:1.7;color:var(--muted);margin:8px 0 2px 40px!important}
.report-comment>summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:8px}
@media(max-width:480px){.reply-form .report-comment .report-document{margin-left:0!important}}
@media(prefers-reduced-motion:reduce){.note-toggle{transition:none}}

/* One disclosure controls the full Notes section, not individual comments. */
.notes-section>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:36px;font-size:16px;font-weight:600;color:var(--ink);cursor:pointer;list-style:none;margin-bottom:8px}
.notes-section>summary::-webkit-details-marker{display:none}.notes-section>summary::marker{content:''}
.notes-section[open]>summary .note-toggle{transform:rotate(180deg)}
.notes-section>summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:8px}
.note-header{display:flex;align-items:center;gap:10px;min-height:36px}

/* Shared report history, reversible versions and text-linked notes. */
.history-version-action{display:block;margin:10px 0 0;font:inherit;font-size:12px;white-space:normal}
.version-changes{margin-top:12px}.version-changes>strong{display:block;font-size:12px;margin-top:8px}.version-changes ins,.version-changes del{display:block;padding:8px 10px;border-radius:8px;white-space:pre-wrap;overflow-wrap:anywhere;font:inherit}.version-changes ins{background:#e9efff;color:#234ba8;text-decoration:none;border-left:3px solid #315bc4}.version-changes del{background:#fff1f2;color:#8b3241;text-decoration:line-through;border-left:3px solid #aa4656}
.version-preview-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;margin-bottom:20px;border:1px solid var(--line);border-radius:14px;background:#f5f7fc;font-size:13px}.version-preview-banner button{font-size:12px;padding:8px 12px}.version-document-preview{min-width:0}.version-document-preview>.report-document{margin:0}
.selection-note-action{position:fixed;z-index:100;min-height:40px;padding:10px 16px;border-radius:999px;font:inherit;font-size:12px;box-shadow:0 5px 24px #172c5726}.selection-note-action[hidden]{display:none!important}
.note-selection-context{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0;padding:10px 14px;border:1px solid var(--line);border-left:3px solid var(--accent);border-radius:12px;color:var(--muted);font-size:12px}.note-selection-context>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.note-selection-context button{flex-shrink:0;font-size:12px;padding:4px}
.report-comment .note-reference{display:block;max-width:100%;text-align:left;margin:8px 0 8px 40px;padding:8px 12px;border:0;border-left:3px solid var(--accent);border-radius:0;background:#edf2ff;color:#315bc4;font:inherit;font-size:12px;overflow-wrap:anywhere;white-space:normal}.note-reference-highlight{background:#e9efff;outline:2px solid #315bc4;outline-offset:3px;border-radius:4px}.anchor-status{font-size:13px;color:var(--muted)}
@media(max-width:480px){.version-preview-banner{align-items:flex-start;flex-direction:column}.report-comment .note-reference{margin-left:0}.note-selection-context{align-items:flex-start;flex-direction:column}.note-selection-context>span{max-width:100%}}
@media print{.selection-note-action,.version-preview-banner,.note-selection-context{display:none!important}}

/* Mini Google Docs-style document tools in Expecza's palette and geometry. */
.report-format-toolbar{display:flex;align-items:center;gap:1px;flex-wrap:wrap;padding:5px 8px;border:1px solid var(--border,#dce4f2);border-radius:24px;background:#f1f5fc;box-shadow:0 2px 10px rgba(37,44,57,.06);position:sticky;top:10px;z-index:6;margin:0 0 14px}
.report-format-toolbar .format-divider{width:1px;height:18px;background:#cfd9ec;margin:0 3px;flex:none}
.report-format-toolbar .format-button,.report-format-toolbar summary{display:inline-flex;align-items:center;justify-content:center;min-width:28px;min-height:30px;padding:4px 5px;border:0;border-radius:8px;background:transparent;color:#344054;font:500 12px/1.2 Poppins,sans-serif;cursor:pointer;gap:3px;transition:background-color .12s ease,color .12s ease}
.report-format-toolbar .format-button:hover:not(:disabled),.report-format-toolbar summary:hover{background:#e3ebfb;color:#315bc4}
.report-format-toolbar .format-button[aria-pressed=true],.report-format-toolbar .format-menu[open]>summary{background:#dce7ff;color:#254ab3}
.report-format-toolbar .format-button:disabled{opacity:.38;cursor:default}
.report-format-toolbar .ui-icon{width:16px;height:16px;flex:none}.report-format-toolbar .format-menu{position:relative;margin:0;border:0;padding:0}.format-menu>summary{list-style:none}.format-menu>summary::-webkit-details-marker{display:none}
.format-menu-arrow{display:inline-flex;align-items:center;opacity:.7}.format-menu-arrow .ui-icon{width:13px;height:13px}
.format-size-stepper{display:inline-flex;align-items:center;gap:1px;background:#fff;border:1px solid #d4ddeb;border-radius:8px;padding:1px}
.format-size-step{display:inline-flex;align-items:center;justify-content:center;width:22px;height:26px;padding:0;border:0;border-radius:6px;background:transparent;color:#344054;cursor:pointer}
.format-size-step:hover:not(:disabled){background:#eef3ff;color:#315bc4}
.format-size-step:disabled{opacity:.35;cursor:default}
.format-size-step .ui-icon{width:13px;height:13px}
.format-size-menu>summary{min-width:28px;min-height:26px;padding:2px 4px;border-radius:6px;font-variant-numeric:tabular-nums}
.format-size-menu .format-menu-arrow{display:none}
.format-menu-options{position:absolute;top:calc(100% + 6px);left:0;min-width:160px;max-height:280px;overflow:auto;z-index:8;background:#fff;border:1px solid #dce4f2;border-radius:14px;padding:6px;box-shadow:0 10px 28px rgba(37,44,57,.14)}
.format-menu-options button{display:flex;align-items:center;gap:8px;width:100%;text-align:left;background:transparent;border:0;border-radius:8px;padding:8px 10px;color:#252c39;font:400 13px/1.35 Poppins,sans-serif;cursor:pointer}
.format-menu-options button:hover,.format-menu-options button:focus-visible{background:#eef3ff;color:#315bc4}
.format-menu-options button.is-active{background:#eef3ff;color:#315bc4;font-weight:600}
.format-menu-options button.is-active:not(.colour-swatch)::after{content:'✓';font-size:12px;font-weight:600;color:#315bc4;margin-left:auto}
.format-style-menu .style-opt-h2{font-size:17px;font-weight:600;line-height:1.25}
.format-style-menu .style-opt-h3{font-size:15px;font-weight:600;line-height:1.3}
.format-style-menu .style-opt-h4{font-size:13px;font-weight:600;line-height:1.3}
.format-style-menu .style-opt-blockquote{font-style:italic;color:#45536a;border-left:3px solid #315bc4;padding-left:10px;border-radius:0 8px 8px 0}
.format-table-picker{min-width:0;width:max-content;padding:10px}
.table-picker-label{font-size:12px;font-weight:500;color:#45536a;margin-bottom:8px;text-align:center}
.table-picker-grid{display:grid;grid-template-columns:repeat(6,20px);gap:4px}
.table-picker-grid .table-picker-cell{display:block;width:20px;height:20px;padding:0;border:1px solid #cbd5e7;border-radius:4px;background:#fff}
.table-picker-grid .table-picker-cell.is-hot,.table-picker-grid .table-picker-cell:hover,.table-picker-grid .table-picker-cell:focus-visible{background:#dce7ff;border-color:#315bc4}
.editor-table-bar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:6px 10px;margin:-6px 0 12px;background:#f8faff;border:1px solid #dce4f2;border-radius:14px;font-size:12px}
.editor-table-bar .table-bar-label{font-weight:600;color:#315bc4;padding:0 6px 0 2px}
.editor-table-bar .table-bar-btn{border:1px solid #dce4f2;background:#fff;color:#344054;border-radius:8px;padding:4px 10px;font:500 12px/1.3 Poppins,sans-serif;cursor:pointer}
.editor-table-bar .table-bar-btn:hover{background:#eef3ff;border-color:#b7caef;color:#315bc4}
.editor-table-bar .table-bar-btn.is-danger:hover{background:#fff1f2;border-color:#f1bcc4;color:#a42b3b}
.editor-find-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 12px;margin:-6px 0 12px;background:#fff;border:1px solid #dce4f2;border-radius:16px;box-shadow:0 6px 20px rgba(37,44,57,.08)}
.editor-find-bar input{flex:1 1 130px;min-width:100px;width:auto;padding:7px 11px;border:1px solid #cbd5e7;border-radius:10px;font-size:13px}
.editor-find-bar .find-match-count{font-size:12px;color:#626b78;font-variant-numeric:tabular-nums;min-width:44px;text-align:center}
.editor-find-bar button{min-height:32px;padding:6px 12px;font-size:12px}
.rich-report-editor{min-height:320px;padding:32px 40px;border:1px solid #dce4f2;border-radius:18px;background:#fff;box-shadow:0 1px 3px rgba(37,44,57,.05),0 10px 28px rgba(37,44,57,.04);outline-offset:2px;overflow-wrap:anywhere;transition:border-color .16s ease,box-shadow .16s ease}
.rich-report-editor:focus,.rich-report-editor:focus-visible{border-color:#a8bee8;box-shadow:0 0 0 3px rgba(49,91,196,.12),0 8px 24px rgba(37,44,57,.05);outline:none}
.rich-report-editor table{table-layout:auto;width:100%}.rich-report-editor td:focus,.rich-report-editor th:focus{outline:2px solid #315bc4;outline-offset:-2px}
.editor-status-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:8px 6px 2px;font-size:12px;color:#626b78;font-variant-numeric:tabular-nums}
.editor-shortcut-hint{color:#7c8798;font-size:11px}
.report-document figcaption{font-size:13px;color:#626b78;line-height:1.6;margin:8px 0 18px}.report-document blockquote{border-left:3px solid #315bc4;padding-left:18px;margin:16px 0}.editor-link-form{display:flex;gap:10px;align-items:end;flex-wrap:wrap;padding:12px;border:1px solid #dce4f2;border-radius:16px;background:#fff;box-shadow:0 6px 20px rgba(37,44,57,.08);margin:-6px 0 12px}.editor-link-form label{flex:1;min-width:150px;font-size:13px}.editor-link-form input{width:100%;margin-top:5px}.editor-link-form [role=status]{width:100%;font-size:13px}
.selection-share-action{position:fixed;z-index:40;padding:9px 14px;font:500 13px Poppins,sans-serif;border-radius:999px;box-shadow:0 4px 20px #252c3920}.selection-share-action[hidden]{display:none}
.excerpt-share-dialog{width:min(540px,calc(100vw - 32px));max-height:calc(100dvh - 48px);overflow:auto;border:1px solid #dce4f2;border-radius:24px;padding:24px;color:#252c39;background:#fff;font-family:Poppins,sans-serif}.excerpt-share-dialog::backdrop{background:#252c3955}.excerpt-share-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}.excerpt-share-heading h2{font-size:20px;margin:0}.excerpt-share-dialog blockquote{margin:20px 0;padding:16px;background:#f6f8fc;border-radius:14px;max-height:160px;overflow:auto;font-size:14px;white-space:pre-wrap}.excerpt-share-dialog input,.excerpt-share-dialog textarea{width:100%;box-sizing:border-box;padding:12px 14px;font:400 14px Poppins,sans-serif}.excerpt-share-dialog label{display:block;margin:16px 0 8px;font-size:14px}.excerpt-share-dialog ul{padding:0;list-style:none}.excerpt-share-dialog li{padding:12px 0;border-bottom:1px solid #dce4f2;overflow-wrap:anywhere}.excerpt-share-dialog p{font-size:13px;color:#626b78}.excerpt-share-dialog button{font-family:inherit}.excerpt-share-dialog .actions{gap:10px;flex-wrap:wrap}
@media(max-width:600px){.rich-report-editor,.inline-report-editor [contenteditable]{padding:18px}.report-format-toolbar{top:4px;border-radius:18px;padding:6px}.report-format-toolbar .format-divider{display:none}.report-format-toolbar .format-button,.report-format-toolbar summary{min-height:36px;min-width:36px}.format-menu-options{max-width:200px}.editor-shortcut-hint{display:none}.excerpt-share-dialog{padding:18px}}
@media(prefers-reduced-motion:reduce){.report-format-toolbar .format-button,.report-format-toolbar summary,.rich-report-editor{transition:none}}
.report-mention-options{display:flex;flex-direction:column;gap:3px;max-width:100%;max-height:240px;overflow:auto;padding:8px;border:1px solid #dce4f2;border-radius:16px;background:#fff;margin:8px 0;box-shadow:0 6px 20px #252c3914}.report-mention-options small{padding:5px 8px;color:#626b78;font-size:12px}.report-mention-options button{padding:9px 12px;border:0;border-radius:10px;text-align:left;background:transparent;color:#252c39;overflow-wrap:anywhere;font:400 13px Poppins,sans-serif}.report-mention-options button:hover,.report-mention-options .mention-active{background:#eef3ff;color:#315bc4}

/* Selected-passage actions remain beside the text, in both reading and editing. */
.report-selection-tools{position:fixed;z-index:110;display:flex;align-items:center;gap:4px;padding:5px;background:#fff;border:1px solid var(--line,#dce4f2);border-radius:999px;box-shadow:0 6px 24px #252c3924;max-width:calc(100vw - 16px)}
.report-selection-tools[hidden],.report-selection-tools [hidden]{display:none!important}
.report-selection-tools button{position:relative;display:grid;place-items:center;width:40px;height:40px;min-width:40px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--ink,#252c39);box-shadow:none}
.report-selection-tools button:hover,.report-selection-tools button:focus-visible{color:#315bc4;background:#eef3ff}
.report-selection-tools .ui-icon{width:19px;height:19px}
.report-selection-tools .selection-action-tooltip{position:absolute;top:calc(100% + 12px);left:50%;transform:translateX(-50%);white-space:nowrap;background:#252c39;color:#fff;font:400 12px Poppins,sans-serif;border-radius:8px;padding:6px 9px;visibility:hidden;pointer-events:none}
.report-selection-tools button:hover .selection-action-tooltip,.report-selection-tools button:focus-visible .selection-action-tooltip{visibility:visible}
.report-selection-tools button:first-child .selection-action-tooltip{left:0;transform:none}
.report-selection-tools button:last-of-type .selection-action-tooltip{left:auto;right:0;transform:none}
.selection-save-hint{font:400 11px Poppins,sans-serif;color:#566176;max-width:100px;padding-right:8px}
@media print{.report-selection-tools{display:none!important}}

.excerpt-share-dialog .recipient-field{border:1px solid #858b94;border-radius:16px;padding:8px;display:flex;flex-wrap:wrap;gap:6px;align-items:center;min-height:52px}
.excerpt-share-dialog .recipient-field:focus-within{outline:2px solid #315bc4;outline-offset:2px}
.excerpt-share-dialog .recipient-chips{display:contents}
.excerpt-share-dialog .recipient-field input{flex:1 1 180px;min-width:100px;width:auto;padding:8px;border:0;outline:none;box-shadow:none;background:transparent}
.recipient-chip{display:inline-flex;align-items:center;gap:6px;min-width:0;max-width:100%;padding:4px 5px 4px 12px;border:1px solid #dce4f2;border-radius:999px;background:#eef3ff;color:#252c39;font:400 13px Poppins,sans-serif}
.recipient-chip>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.excerpt-share-dialog .recipient-chip button{display:grid;place-items:center;flex:none;width:28px;height:28px;min-width:28px;padding:0;border:0;border-radius:50%;background:transparent;color:#566176}
.recipient-chip button:hover{background:#dce6fb}.recipient-chip .ui-icon{width:14px;height:14px}
.excerpt-link-result{position:relative;margin:20px 0}.excerpt-share-dialog .excerpt-link-result input{padding:14px 56px 14px 16px;border:1px solid #858b94;border-radius:16px;background:#fff;min-width:0;text-overflow:ellipsis}
.excerpt-share-dialog .excerpt-copy-button{position:absolute;right:6px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:40px;height:40px;min-width:40px;padding:0;border:0;border-radius:50%;background:transparent;color:#315bc4}
.excerpt-copy-button:hover{background:#eef3ff}.excerpt-copy-button .ui-icon{width:19px;height:19px}
.excerpt-share-item{border-top:1px solid #dce4f2;padding:16px 0}.excerpt-share-item p{overflow-wrap:anywhere}.excerpt-share-dialog .excerpt-share-item blockquote{margin:0 0 8px}.excerpt-shares-list h3{font-size:14px;font-weight:600;margin-top:24px}

.excerpt-recipient-list{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 14px}.excerpt-recipient-list .recipient-chip{padding:7px 12px}

/* Passage access uses the report-history disclosure pattern. */
.excerpt-shares-list>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;list-style:none;cursor:pointer;padding:16px 0;font-size:16px;font-weight:600;color:var(--ink,#252b38)}
.excerpt-shares-list>summary::-webkit-details-marker{display:none}
.excerpt-shares-list>summary::marker{content:""}
.excerpt-shares-list[open]>summary .history-chevron{transform:rotate(180deg)}
.excerpt-shares-list>summary:focus-visible{outline:2px solid #315bc4;outline-offset:3px;border-radius:8px}
.excerpt-shares-list .excerpt-share-item blockquote{font-size:14px;line-height:1.6;overflow-wrap:anywhere}

.excerpt-share-dialog .recipient-chip select{font:inherit;font-size:12px;color:inherit;background:transparent;border:0;border-radius:999px;min-height:32px;width:auto;padding:4px 22px 4px 8px;flex-shrink:0}
.excerpt-share-dialog .recipient-chip small{font-size:11px;font-weight:400;color:var(--muted,#626b78)}
.excerpt-share-dialog .recipient-chips .recipient-chip{max-width:100%;flex-wrap:wrap}
.excerpt-share-heading>.icon-button{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;padding:8px;border:0;border-radius:50%;background:transparent;color:inherit;cursor:pointer;flex-shrink:0}
.excerpt-share-heading>.icon-button:hover{background:#eef2ff}
.excerpt-share-heading>.icon-button:focus-visible{outline:2px solid #315bc4;outline-offset:2px}

.excerpt-access-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.excerpt-access-actions button{margin:0}.excerpt-recipient-list .recipient-chip select{max-width:120px;min-width:0}

/* Keep recipient identity and access distinct without a heavy focus ring. */
.excerpt-share-dialog .recipient-chip select{border-left:1px solid #d4ddeb;border-radius:0;min-height:24px;height:24px;min-width:0;width:auto;field-sizing:content;font-size:11px;font-weight:400;color:#626b78;padding:0 8px;margin-left:2px;outline:none;box-shadow:none}
.excerpt-share-dialog .recipient-chip select:focus{outline:none;box-shadow:none}
.excerpt-share-dialog .recipient-chip select:focus-visible{background-color:#e0e8fa;outline:1px solid #a9b9dc;outline-offset:1px;border-radius:4px}
.excerpt-share-dialog .recipient-field:focus-within{outline:1px solid #c2cde2;outline-offset:1px}

.format-palette .format-menu-options{display:none;grid-template-columns:repeat(4,32px);gap:8px;padding:12px;min-width:0;width:max-content}.format-palette[open] .format-menu-options{display:grid}.format-palette .colour-swatch{width:32px;height:32px;padding:0;border:1px solid #252c3926;border-radius:8px;background:var(--swatch);box-shadow:inset 0 0 0 2px #fff;transition:transform .12s ease}.format-palette .colour-swatch:hover,.format-palette .colour-swatch:focus-visible{background:var(--swatch);transform:scale(1.08);outline:2px solid #a9b9dc;outline-offset:2px}.format-palette .palette-clear{grid-column:1/-1;text-align:center;font-size:12px}.format-palette summary{position:relative}.format-palette summary>.ui-icon:first-child{border-bottom:3px solid var(--active-colour,#315bc4);padding-bottom:2px;height:22px}.format-menu-options button .ui-icon{vertical-align:middle;margin-right:8px}@media(prefers-reduced-motion:reduce){.format-palette .colour-swatch{transition:none}}

.passage-change-mark{background:#dce8ff;color:inherit;font-weight:inherit;font-style:inherit;border-bottom:2px solid #315bc4;cursor:pointer;border-radius:4px;padding:1px 3px}.passage-change-mark:hover{background:#c8dbff}.passage-change-mark:focus-visible{outline:2px solid #315bc4;outline-offset:3px}.passage-review-panel{position:fixed;z-index:1100;box-sizing:border-box;width:max-content;max-width:calc(100vw - 16px);padding:10px 12px;border:1px solid #dce3f0;border-radius:14px;background:#fff;box-shadow:0 6px 24px #23304a1a;font-family:inherit;font-size:12px;text-align:left}.passage-review-panel[hidden]{display:none}.passage-review-panel>strong{display:block;font-size:12px;font-weight:600;color:#53627d}.passage-review-panel .passage-review-actions{margin-top:6px;gap:6px}.passage-review-panel .passage-review-actions button{min-height:32px;padding:6px 10px;line-height:18px}.passage-review-panel [role="alert"]{max-width:240px;margin:4px 0;font-size:12px}.passage-review-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:12px}.passage-review-actions button{display:inline-flex;align-items:center;gap:6px;font-size:12px;padding:8px 12px}.passage-review-actions svg{width:16px;height:16px}.excerpt-shares-list>summary{padding:16px 0;display:flex;align-items:center;justify-content:space-between;gap:12px}.excerpt-share-heading{gap:16px;margin-bottom:16px}.excerpt-share-heading h2{margin:0}

/* Google Docs-inspired Share & Access dialog in Expecza's brand style. */
.report-access-dialog{width:min(520px,calc(100vw - 24px));max-width:520px;padding:24px;border:1px solid #dce4f2;border-radius:20px;background:#fff;box-shadow:0 18px 48px rgba(37,44,57,.16)}
.access-dialog-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}
.access-dialog-title{margin:0;font-size:19px;font-weight:600;line-height:1.35;color:var(--ink,#252c39);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.access-dialog-header .icon-button{width:34px;height:34px;min-width:34px;min-height:34px;border-radius:50%;flex:none}
.access-add-bar{display:flex;align-items:center;gap:8px;margin:0 0 20px}
.access-add-bar input{flex:1;min-width:0;min-height:44px;padding:10px 14px;border:1.5px solid #cbd5e7;border-radius:12px;font-size:14px;background:#fff;transition:border-color .14s ease,box-shadow .14s ease}
.access-add-bar input:focus{border-color:#315bc4;box-shadow:0 0 0 3px rgba(49,91,196,.14);outline:none}
.access-add-bar button{flex:none;min-height:44px;padding:10px 16px}
.access-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 10px}
.access-section-head h3,.access-section-title{margin:0;font-size:14px;font-weight:600;color:var(--ink,#252c39)}
.access-section-title{margin:18px 0 10px}
.access-passages-link{font-size:12px;color:#315bc4;padding:4px 8px;min-height:0}
.access-people{display:grid;gap:2px;margin:0 0 6px;max-height:240px;overflow:auto}
.access-person{display:flex;align-items:center;gap:12px;min-width:0;padding:8px 4px;border:0;border-radius:12px;transition:background-color .12s ease}
.access-person:hover{background:#f7f9fd}
.access-avatar{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;color:#fff;font-size:12px;font-weight:600;flex:none}
.access-identity{flex:1;min-width:0;display:grid;gap:1px}
.access-identity strong{font-size:13px;font-weight:600;color:var(--ink,#252c39);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.access-email{font-size:12px;color:var(--muted,#626b78);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.access-role-static{font-size:13px;color:var(--muted,#626b78);padding-right:6px;flex:none}
.access-row-controls{display:inline-flex;align-items:center;gap:4px;flex:none}
.access-row-controls select{width:auto;min-width:96px;min-height:34px;padding:5px 28px 5px 10px;border:1px solid transparent;border-radius:8px;background:transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23566173' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;appearance:none;-webkit-appearance:none;font-size:13px;font-weight:500;color:var(--ink,#252c39);cursor:pointer}
.access-row-controls select:hover,.access-row-controls select:focus-visible{background-color:#eef3ff;border-color:#d4ddeb}
.access-remove-btn{width:30px;height:30px;min-width:30px;min-height:30px;border-radius:50%;color:#626b78}
.access-remove-btn:hover{background:#fff0f1;color:#a32f3c}
.access-general-row{display:flex;align-items:center;gap:12px;padding:6px 4px}
.access-general-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:#eef2f8;color:#45536a;flex:none}
.access-general-icon.is-public{background:#edf7f0;color:#216344}
.access-general-icon .ui-icon{width:18px;height:18px}
.access-general-copy{flex:1;min-width:0;display:grid;gap:2px}
.access-mode-select{width:fit-content;max-width:100%;min-height:32px;padding:4px 28px 4px 8px;margin-left:-8px;border:1px solid transparent;border-radius:8px;background:transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23252c39' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;appearance:none;-webkit-appearance:none;font-size:14px;font-weight:600;color:var(--ink,#252c39);cursor:pointer}
.access-mode-select:hover,.access-mode-select:focus-visible{background-color:#eef3ff;border-color:#d4ddeb}
.access-general-sub{margin:0;font-size:12px;color:var(--muted,#626b78);line-height:1.45}
.access-notice{margin:10px 0 0;min-height:0}.access-notice:empty{display:none}
.access-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:20px;padding-top:16px;border-top:1px solid #edf0f6;flex-wrap:wrap}
.access-copy-link{display:inline-flex;align-items:center;gap:8px;color:#315bc4;border-color:#c6d6f2}
.access-copy-link .ui-icon{width:16px;height:16px}
.editor-recovery{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.editor-recovery[hidden]{display:none}.editor-recovery button{font-size:12px}.remote-change-mark{background:#e5edff;color:inherit;font-weight:inherit;font-style:inherit;border-bottom:1px solid #315bc4;border-radius:3px;padding:1px 2px;cursor:pointer}.editor-dirty-pill{white-space:nowrap}.editor-header-bar .actions{margin:0}
@media(max-width:480px){.report-access-dialog{padding:18px}.access-add-bar{flex-wrap:wrap}.access-add-bar input{flex-basis:100%}.access-footer{flex-direction:column-reverse;align-items:stretch}.access-footer button{justify-content:center}}
/* Save status and completion stay in reach while editing long documents. */
.inline-report-editor .editor-header-bar,.excerpt-page #editor .editor-header-bar{position:sticky;top:0;z-index:11;background:var(--surface,#fff);padding:12px 0;gap:12px}
.excerpt-page #editor .editor-header-bar .actions{margin:0;gap:8px}
.excerpt-page #editor .editor-header-bar h3{margin:0;font-size:16px}
.excerpt-page #editor .report-editor-toolbar{top:68px}
.editor-recovery{display:flex;flex-wrap:wrap;gap:8px;margin-block:12px}
.editor-recovery[hidden]{display:none}
.review-other-changes{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 12px}.review-other-changes button{font-size:13px;padding:6px 10px}
.inline-report-editor .report-format-toolbar{top:var(--editor-header-height,72px)}
body.editing-report #result>.actions,body.editing-report #sharedActions{display:none}

/* Keep recovery beside save status, and leave short mobile documents unobscured. */
.editor-header-bar .editor-recovery,.editor-header-bar #notice,.editor-header-bar .editor-save-notice{flex-basis:100%;margin:0}
.editor-header-bar #notice:empty{display:none}
.passage-review-panel{max-width:min(320px,calc(100vw - 16px));overflow-wrap:anywhere}
.passage-review-panel .passage-review-actions [role="alert"]{flex-basis:100%;max-width:none}
@media(max-width:800px),(max-width:1000px) and (max-height:500px){
 .inline-report-editor .editor-header-bar,.excerpt-page #editor .editor-header-bar{top:64px}
 .inline-report-editor .report-format-toolbar,.excerpt-page #editor .report-format-toolbar{position:relative;top:auto}
}

/* Live collaboration presence, audio call bar, passage notes and shared AI responses. */
.report-status-actions{gap:6px}
.report-status-actions>.icon-button{width:36px;height:36px;min-width:36px;min-height:36px;border-radius:50%;padding:7px}
.collab-avatar-stack{display:inline-flex;align-items:center;padding-right:4px}
.collab-avatar{position:relative;display:inline-grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--avatar-bg,#315bc4);color:#fff;font-size:11px;font-weight:600;letter-spacing:.3px;box-shadow:0 0 0 2px #fff;cursor:default;user-select:none;transition:transform .14s ease}
.collab-avatar+.collab-avatar{margin-left:-7px}
.collab-avatar:hover,.collab-avatar:focus-visible{z-index:5;transform:translateY(-1px);outline:2px solid #315bc4;outline-offset:2px}
.collab-avatar.is-editing{box-shadow:0 0 0 2px #fff,0 0 0 4px #315bc4}
.collab-avatar.is-editing::after{content:'';position:absolute;right:-1px;bottom:-1px;width:9px;height:9px;border-radius:50%;background:#315bc4;border:2px solid #fff}
.collab-avatar.is-in-call{box-shadow:0 0 0 2px #fff,0 0 0 4px #216344}
.collab-avatar.is-in-call::after{content:'';position:absolute;right:-1px;bottom:-1px;width:9px;height:9px;border-radius:50%;background:#216344;border:2px solid #fff}
.collab-avatar-more{background:#e4ebfc;color:#315bc4;font-size:11px}
.collab-avatar-tip{position:absolute;top:calc(100% + 8px);left:50%;transform:translateX(-50%);white-space:nowrap;padding:5px 9px;border-radius:8px;background:#252c39;color:#fff;font:400 11px/1.3 Poppins,sans-serif;pointer-events:none;opacity:0;visibility:hidden;transition:opacity .12s ease;z-index:20;box-shadow:0 4px 14px rgba(37,44,57,.2)}
.collab-avatar:hover .collab-avatar-tip,.collab-avatar:focus-visible .collab-avatar-tip{opacity:1;visibility:visible}
.collab-call-trigger.is-in-call{background:#edf7f0;color:#216344}
.excerpt-compact-wrap{margin:0 0 10px;padding:10px 14px;border-radius:12px;background:#f6f8fc;border:1px solid #e3e9f5;border-left:3px solid #315bc4}
.excerpt-share-dialog .excerpt-compact-quote{margin:0;font:400 13px/1.55 Poppins,sans-serif;color:#252c39;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.excerpt-share-dialog .excerpt-compact-quote.is-expanded{display:block;-webkit-line-clamp:unset;overflow:visible}
.excerpt-expand-btn{padding:4px 0 0;min-height:0;font-size:12px;color:#315bc4}
.excerpt-show-all{margin-top:12px;width:100%;justify-content:center;font-size:13px}
.collab-call-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:10px 14px;margin:0 0 14px;border:1px solid #c9d9f5;border-radius:14px;background:#f4f8ff;font-size:13px;color:var(--ink,#252c39)}
.collab-call-info{display:inline-flex;align-items:center;gap:8px;font-weight:500;min-width:0;overflow-wrap:anywhere}
.collab-call-dot{width:8px;height:8px;border-radius:50%;background:#216344;flex:none;box-shadow:0 0 0 3px #d7efe0}
.collab-call-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.collab-call-actions button{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:6px 12px;font-size:12px}
.collab-call-actions .ui-icon{width:15px;height:15px}
.collab-call-error{flex-basis:100%;font-size:12px;color:var(--error,#a32f3c)}
.collab-live-pill{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;margin:0 0 12px;border-radius:999px;background:#edf2fc;color:#315bc4;font-size:12px;font-weight:500;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.note-passage-badge{display:inline-block;margin:4px 0 2px;padding:2px 8px;border-radius:999px;background:#e4ebfc;color:#315bc4;font-size:11px;font-weight:500}
.note-passage-quote{cursor:default}
.shared-ai-section{margin-bottom:18px}
.shared-ai-section>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:36px;font-size:16px;font-weight:600;color:var(--ink,#252c39);cursor:pointer;list-style:none;margin-bottom:8px}
.shared-ai-section>summary::-webkit-details-marker{display:none}
.shared-ai-section>summary::marker{content:''}
.shared-ai-section[open]>summary .note-toggle{transform:rotate(180deg)}
.shared-ai-card{padding:14px 16px;margin:10px 0;border:1px solid #dce4f2;border-radius:14px;background:#fff}
.shared-ai-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:13px;margin-bottom:6px}
.shared-ai-head strong{font-weight:600;color:var(--ink,#252c39);min-width:0;overflow-wrap:anywhere}
.shared-ai-head span{font-size:11px;padding:2px 8px;border-radius:999px;background:#edf2fc;color:#315bc4;flex-shrink:0;white-space:nowrap}
.shared-ai-prompt{font-size:13px;color:var(--muted,#626b78);margin:0 0 10px;min-width:0;overflow-wrap:anywhere}
.shared-ai-answer .report-document{margin:8px 0 10px;font-size:14px}
.shared-ai-apply{min-height:34px;padding:6px 14px;font-size:12px;margin-top:6px}
@media(max-width:600px){.report-status-actions{flex-wrap:wrap}.collab-call-bar{flex-direction:column;align-items:flex-start}}
@media(prefers-reduced-motion:reduce){.collab-avatar,.collab-avatar-tip{transition:none}}
@media print{.collab-avatar-stack,.collab-call-trigger,.collab-call-bar,.collab-live-pill,.shared-ai-apply,.passage-review-panel,.agent-review-notes{display:none!important}}

/* Template theme tokens applied to rendered reports when a funder/brand template is uploaded. */
.report-document.has-template-theme{font-family:var(--tpl-font,Poppins,sans-serif);font-size:var(--tpl-body-size,14px);line-height:var(--tpl-line-height,1.9);color:var(--tpl-body-color,#363d49)}
body.viewing-report .report-document.has-template-theme :is(h2,h3,h4,h5,h6),.report-document.has-template-theme :is(h2,h3,h4,h5,h6){color:var(--tpl-heading-color,#29394f);font-family:var(--tpl-heading-font,var(--tpl-font,Poppins,sans-serif))}
.report-document.has-template-theme a{color:var(--tpl-accent-color,#315bc4)}
.report-document.has-template-theme .report-table th{background:var(--tpl-table-header-bg,#edf1f8)}
.report-document.has-template-theme .report-table,.report-document.has-template-theme .report-table :is(th,td){border-color:var(--tpl-table-border,#e5e6e9)}

/* Private agent review notes & evidence gaps — visually separated from the clean final report. */
.agent-review-notes{margin:20px 0 24px;padding:14px 18px;border:1px solid #e7d9b5;border-left:4px solid #b67d1b;border-radius:14px;background:#fffbf2}
.agent-review-notes>summary{display:flex;align-items:center;gap:10px;flex-wrap:wrap;cursor:pointer;list-style:none;font-size:14px;font-weight:600;color:#5c400c}
.agent-review-notes>summary::-webkit-details-marker{display:none}
.agent-review-notes>summary small{font-size:12px;font-weight:400;color:#7a6333;margin-right:auto}
.agent-review-notes>summary .ui-icon{width:16px;height:16px;color:#7a6333;transition:transform .16s ease}
.agent-review-notes[open]>summary .ui-icon{transform:rotate(180deg)}
.agent-review-notes .report-document{margin:14px 0 4px;font-size:13px;color:#4a3f2b}
.excerpt-share-dialog .excerpt-recipient-list.access-people{display:grid;gap:2px;margin:4px 0 10px}
.excerpt-share-dialog .access-add-bar{margin:8px 0 12px}
.excerpt-share-dialog .excerpt-access-actions{justify-content:space-between;margin-top:8px}

.call-picker{width:min(420px,calc(100% - 32px));max-height:80vh;overflow:auto}
.call-picker form{display:grid;gap:10px}
.call-picker :is(h2,p){margin:0}
.call-picker label{display:flex;align-items:center;gap:12px;min-height:44px;padding:6px 10px;border-bottom:1px solid #dde3ed;overflow-wrap:anywhere}
.call-picker input[type=checkbox]{width:18px;height:18px;flex:none;margin:0;accent-color:#315bc4}
.call-picker .actions{justify-content:flex-end}

#shareDialog{width:min(480px,calc(100% - 24px));padding:20px;max-height:calc(100dvh - 32px);overflow:auto}
#shareDialog .section-title{align-items:center;margin:0 0 12px}
#shareDialog h2,#shareDialog legend,#shareDialog label{margin:0}
#shareDialog fieldset{min-width:0;border:0;margin:0;padding:0}
#shareDialog legend,#shareDialog label{display:block;padding:0;font-size:13px;font-weight:600}
#shareDialog .share-person{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;margin:6px 0}
#shareDialog .share-email-chip{width:fit-content;max-width:100%;display:flex;align-items:center;min-width:0;border:1px solid #d4deef;border-radius:18px;background:#f2f5fb;padding-inline:10px 2px}
#shareDialog .share-email-chip input{field-sizing:content;width:auto;max-width:100%;min-width:0;min-height:38px;margin:0;border:0;background:transparent;padding:4px 0;font:inherit;font-size:13px}
#shareDialog .share-email-chip button{flex:none;display:grid;place-items:center;min-width:32px;width:32px;height:32px;padding:0;border:0;background:transparent}
#shareDialog select{appearance:none;margin:0;min-height:38px;padding:6px 32px 6px 10px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23566173' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;font-size:13px}
#shareDialog .share-person select{width:112px}
#shareDialog #shareMode{width:100%;margin-top:5px}
#shareDialog #addPerson{color:#315bc4;padding:6px 0;margin:0 0 12px}
#shareDialog .actions{margin:15px 0 0;gap:6px}
#shareDialog #createShare{margin-left:auto}
#shareDialog #shareNotice{margin:8px 0 0;font-size:13px}
#shareDialog #shareNotice:empty{display:none}
@media(max-width:480px){#shareDialog{padding:16px}#shareDialog .share-email-chip button{min-width:44px;min-height:44px}#shareDialog .share-person select{width:105px}}

#shareDialog .share-entry{border:1px solid #a9b4c8;border-radius:12px;background:white;margin:7px 0;padding:1px 10px}
#shareDialog .share-entry:focus-within{border-color:#315bc4}
#shareDialog .share-entry #addPerson{margin:0;padding:8px 2px;width:100%;min-height:40px;border:0;border-radius:0;outline:0;box-shadow:none;background:transparent;color:var(--ink)}
#shareDialog .share-email-text{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#shareDialog #sharePeople{margin-bottom:14px}
@keyframes island-morph{from{opacity:.65;transform:scale(.94)}to{opacity:1;transform:scale(1)}}
.collab-call-bar.collab-dynamic-island:not([hidden]){position:relative;display:inline-flex;flex-wrap:nowrap;width:fit-content;max-width:100%;margin:0;border:1px solid #c6d6f2;border-radius:999px;padding:3px 6px 3px 5px;background:#f2f6ff;flex-direction:row;align-items:center;justify-content:flex-start;gap:6px;box-shadow:0 2px 10px rgba(49,91,196,.12);animation:island-morph .2s cubic-bezier(.22,1,.36,1)}
.collab-call-bar.collab-dynamic-island.is-ringing{border-color:#216344;background:#f1fbf5;box-shadow:0 2px 12px rgba(33,99,68,.16)}
.collab-call-bar.collab-dynamic-island .collab-call-error{position:absolute;top:calc(100% + 8px);right:0;z-index:40;display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:220px;max-width:min(340px,calc(100vw - 24px));padding:8px 12px;border:1px solid #f1cdd1;border-radius:12px;background:#fff8f8;color:#8f2230;font:400 12px/1.4 Poppins,sans-serif;box-shadow:0 8px 24px rgba(37,44,57,.14);white-space:normal}
.collab-call-bar.collab-dynamic-island .collab-call-error.is-reconnecting{border-color:#c6d6f2;background:#f4f8ff;color:#274a9e}
.collab-call-error-actions{display:inline-flex;align-items:center;gap:4px;flex:none}
.collab-call-error-actions .secondary{min-height:26px;padding:2px 10px;font-size:11px;border-radius:999px}
.collab-call-error-actions .icon-button{width:26px;height:26px;min-width:26px;min-height:26px;padding:0;color:inherit}
.collab-call-info{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:500;white-space:nowrap}
.call-island-avatars{display:inline-flex;align-items:center}
.call-initial{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;color:#fff;font-size:11px;font-weight:600;box-shadow:0 0 0 2px #f2f6ff}
.call-initial+.call-initial{margin-left:-6px}
.call-initial-more{background:#dce7ff;color:#315bc4}
.call-wave{display:flex;align-items:center;gap:2px;height:18px;padding:0 2px}
.call-wave i{display:block;width:3px;height:14px;border-radius:2px;background:#315bc4}
.collab-call-actions{display:inline-flex;align-items:center;gap:4px}
.collab-call-actions [data-call-control=mute],.collab-call-actions [data-call-control=leave],.collab-call-actions [data-call-control=dismiss]{display:grid;place-items:center;width:30px;height:30px;min-width:30px;min-height:30px;padding:0;border-radius:50%}
.collab-call-actions [data-call-control=join]{display:inline-flex;align-items:center;gap:4px;min-height:30px;padding:4px 10px;border-radius:999px;font-size:12px}
@media(prefers-reduced-motion:reduce){.collab-call-bar.collab-dynamic-island:not([hidden]){animation:none}}
@media(pointer:coarse){.collab-call-actions [data-call-control]{min-width:38px;min-height:38px}}
/* Calls: hang-up and decline are solid red so they never read as another neutral control. */
.collab-call-actions button.danger:is([data-call-control=leave],[data-call-control=dismiss]){background:#c6283a;border:1px solid #c6283a;color:#fff}
.collab-call-actions button.danger:is([data-call-control=leave],[data-call-control=dismiss]):hover{background:#a01d2d;border-color:#a01d2d;color:#fff}
.collab-call-actions button.danger:is([data-call-control=leave],[data-call-control=dismiss]):focus-visible{outline:2px solid #c6283a;outline-offset:2px}
.incoming-calls{position:fixed;top:max(16px,env(safe-area-inset-top));right:max(16px,env(safe-area-inset-right));left:auto;z-index:300;width:min(340px,calc(100vw - 32px));display:grid;gap:8px}
.incoming-call{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;padding:12px 14px;border:1px solid #c6d6f2;border-radius:16px;background:#fff;color:var(--ink,#252c39);box-shadow:0 10px 35px rgba(36,60,108,.18);font:400 14px/1.4 Poppins,sans-serif}
.incoming-call p{margin:0;min-width:0;overflow-wrap:anywhere;flex:1 1 120px}
.incoming-call [data-call-control=notify]{flex-basis:100%;font-size:12px}
.incoming-call .collab-call-actions [data-call-control]{min-width:40px;min-height:40px}
.call-notification-setting:not([hidden]){display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin:0 0 14px}
.call-notification-setting .hint{margin:0;flex:1 1 220px}
@media print{.incoming-calls{display:none!important}}

.report-progress-steps{list-style:none;padding:0;margin:8px auto;max-width:32em;text-align:center;color:var(--muted);font-size:13px}
.report-progress-steps:empty{display:none}
.report-progress-steps li{margin:4px 0}
.reader-reminder{text-align:center}
