/* Research is a readable document, with the audit trail available on demand. */
.research-workspace{--research-muted:#62666c;--research-line:#e4e6e9;padding-top:24px;padding-bottom:44px}
.research-workspace .preparation-progress{border:0;border-bottom:1px solid var(--research-line);border-radius:0;padding:0 0 22px;margin-bottom:30px;background:transparent}
.research-workspace .preparation-progress ol{gap:20px}
.research-workspace .preparation-progress li{border:0;border-top:2px solid #dfe1e5;padding:10px 0 0;font-size:14px;font-weight:500;background:none}
.research-workspace .preparation-progress li.current{border-color:var(--red);color:#242424;background:none}
.research-workspace .preparation-progress li.approved{border-color:#47765a}
.research-workspace .preparation-progress small{font-size:12px;color:var(--research-muted);margin-top:6px}
.research-heading{margin:0 0 30px}
.research-kicker{font-size:12px;font-weight:600;color:var(--research-muted);margin:0 0 10px;letter-spacing:.05em}
.research-heading h2{font-size:28px;line-height:1.3;letter-spacing:-.025em;font-weight:600;margin:0;overflow-wrap:anywhere}
.research-report{margin:0 0 32px;line-height:1.75;overflow-wrap:anywhere}
.research-report>h3,.collection-results>h3{font-size:22px;font-weight:600;line-height:1.35;margin:0 0 16px}
.research-prose{font-size:16px;line-height:1.75}
.research-prose p{margin:0 0 16px}
.research-prose h2,.research-prose h3{font-size:21px;font-weight:600;line-height:1.4;margin:28px 0 12px}
.research-prose h4{font-size:17px;margin:22px 0 10px}
.research-prose ul,.research-prose ol{padding-left:24px}.research-prose li{margin:8px 0}
.research-prose a{color:#a52222;text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}
.research-prose table{font-size:14px}.research-prose blockquote{margin:16px 0;padding-left:18px;border-left:2px solid var(--research-line)}
.research-report>.secondary{margin-top:12px}
.research-notice{padding:14px 18px;border-left:3px solid #b19b64;background:#faf8f2;line-height:1.6;font-size:14px;color:#5c5137;margin:18px 0}
.research-workspace .checkpoint{max-width:none;border:1px solid var(--research-line);background:#fff;border-radius:12px;padding:24px;margin:24px 0;font-size:15px}
.research-workspace .checkpoint>h3{font-size:20px;font-weight:600;line-height:1.4;margin-top:0}
.research-workspace .checkpoint p{line-height:1.65}
.research-workspace .checkpoint .decision-actions{gap:10px;margin-top:16px}
.research-workspace .checkpoint textarea{width:100%;min-height:84px;border:1px solid #d7dadd;border-radius:8px;padding:12px;margin-top:8px;font-size:15px}
.research-workspace .checkpoint .primary,.research-workspace .checkpoint .secondary{min-height:44px;white-space:normal;line-height:1.4;text-align:left}
.research-workspace .checkpoint-provenance{font-size:12px;margin-top:22px;color:var(--research-muted)}
.research-workspace .collection-readiness{border:0;border-left:3px solid #b19b64;background:#faf8f2;border-radius:0;padding:14px 18px;font-size:14px}
.research-workspace .collection-readiness[data-status=ready]{border-color:#47765a;background:#f5f8f5}
.collection-results{margin:24px 0;min-width:0;line-height:1.65;color:#282a2d}
.research-result-meta{font-size:13px;color:var(--research-muted,#62666c);margin:8px 0 16px}
.research-coverage-note{font-size:13px;padding:12px 0;border-bottom:1px solid var(--research-line,#e4e6e9);color:var(--research-muted,#62666c)}
.research-workspace details>summary,.collection-results details>summary{cursor:pointer;min-height:44px;padding:12px 0;line-height:1.45;font-weight:500}
.research-workspace details>summary:focus-visible{outline:2px solid var(--red);outline-offset:3px}
.research-workspace .research-evidence-panel>summary{font-size:17px;border-top:1px solid var(--research-line);border-bottom:1px solid var(--research-line)}
.collection-question{border-top:1px solid var(--research-line,#e4e6e9);padding:28px 0;overflow-wrap:anywhere}
.collection-question h4{font-size:20px;line-height:1.4;margin:0 0 12px;font-weight:600}
.collection-question .collection-answer{font-size:16px;line-height:1.75;white-space:pre-wrap;margin:14px 0 20px}
.collection-question>.fine{font-size:12px;color:#62666c}
.collection-evidence{margin:8px 0}
.collection-evidence>summary{font-size:14px;color:#62666c}
.collection-source{padding:16px 0;margin:0;border:0;border-top:1px solid #eff0f2;border-radius:0;background:transparent}
.collection-source h5{font-size:15px;line-height:1.5;margin:0 0 4px;font-weight:600}
.collection-source>.text-link{font-size:12px;text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}
.collection-source>.fine{font-size:12px;color:#6a6d72;margin:6px 0}
.collection-findings{padding-left:22px;font-size:15px;line-height:1.7;margin:12px 0}
.collection-findings>li{padding-left:4px;margin:0 0 14px}
.collection-findings>li>p{margin:6px 0}.collection-findings>li::marker{color:#777}
.collection-claim-check{font-size:12px;color:#62666c}
.collection-claim-check>summary{min-height:34px!important;padding:6px 0!important;font-weight:400!important}
.collection-claim-check .fine{font-size:12px;margin:6px 0;color:#62666c}
.collection-limitations{font-size:13px;line-height:1.6;color:#62666c;border:0;padding:8px 0 0}
.collection-limitations>strong{font-weight:500}.collection-limitations p{margin:6px 0}
.collection-gaps{padding:0 14px;border-left:2px solid #d8c8a4;margin-top:16px;background:#fcfaf6;font-size:14px}
.collection-gaps ul{margin:0 0 14px;padding-bottom:10px}.collection-gaps li{margin:12px 0}.collection-gaps p{margin:4px 0}
.research-coverage,.research-scope,.research-execution{font-size:13px;color:#62666c;border-top:1px solid var(--research-line,#e4e6e9);margin:16px 0 0}
.research-scope input{max-width:100%;padding:10px;border:1px solid #d7dadd;border-radius:7px;display:block;margin:10px 0}
.research-history,.research-support{border-top:1px solid var(--research-line);margin:24px 0 0;padding-top:8px;color:#62666c;font-size:14px}
.research-history>summary,.research-support>summary{font-size:14px}
.research-history[open]>summary,.research-support[open]>summary{margin-bottom:20px}
.research-history .message{font-size:15px;line-height:1.65}.research-history .message-label{font-size:14px}
.research-history .checkpoint{background:#fafafa}.research-files .file-card{padding:14px;border-radius:10px}
.research-workspace .source-documents{font-size:13px}.research-workspace .source-documents h3{font-size:17px}
.research-workspace .source-document{padding:12px 0;border-top:1px solid var(--research-line);overflow-wrap:anywhere}
.research-workspace .source-document p{font-size:13px;margin:6px 0}
@media(max-width:760px){
 .research-workspace{padding:20px 16px 32px}.research-heading{margin-bottom:24px}.research-heading h2{font-size:23px}
 .research-workspace .preparation-progress{padding-bottom:18px;margin-bottom:24px}.research-workspace .preparation-progress ol{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
 .research-workspace .preparation-progress li{font-size:12px}.research-workspace .preparation-progress small{font-size:11px}
 .research-prose{font-size:16px}.research-report>h3,.collection-results>h3{font-size:20px}.collection-question h4{font-size:18px}
 .research-workspace .checkpoint{padding:18px 14px}.research-workspace .checkpoint-passport{grid-template-columns:1fr;gap:4px}.research-workspace .checkpoint-passport dd{margin-bottom:12px}
 .research-workspace .decision-actions{flex-direction:column;align-items:stretch}.research-workspace .decision-actions button{width:100%}
 .collection-question{padding:24px 0}.collection-source{padding:14px 0}.collection-question .collection-answer{font-size:16px}
}
/* brief-v3: the brief is the document; link checks sit under it, quietly. */
.research-report>.research-link-checks{font-size:13px;color:var(--research-muted);margin:14px 0 0;line-height:1.55}
.research-report>details.research-link-checks{border-top:1px solid var(--research-line);margin-top:10px}
.research-report>details.research-link-checks>summary{min-height:36px;padding:8px 0;font-weight:400}
.research-report>details.research-link-checks li{overflow-wrap:anywhere;margin:6px 0}
/* The research screen is a document: use the width a document needs. The production
   theme sets --chat-width for the chat; research widens it and the composer with it. */
.messages.research-workspace{--chat-width:1180px}
.chat-view:has(.messages.research-workspace) .compose-wrap{max-width:calc(1180px + 64px)}
.research-prose table{width:100%;table-layout:auto}
/* Brief tables: the chat table breaks words anywhere, which lets the browser squeeze a
   label column to one character per line. Break only between words in the brief; only
   links whose text is an address may break anywhere, so a long address still fits. */
.research-prose .md-table td{overflow-wrap:break-word;hyphens:manual}
.research-prose .md-table a{overflow-wrap:break-word}
.research-prose .md-table a.md-url{overflow-wrap:anywhere}
.research-prose .md-table th:first-child,.research-prose .md-table td:first-child{min-width:9em}
.research-prose .md-table td:first-child{font-weight:500}
.research-prose .md-table[data-columns="4"] th:nth-child(1){width:17%}
.research-prose .md-table[data-columns="4"] th:nth-child(2){width:35%}
.research-prose .md-table[data-columns="4"] th:nth-child(3){width:24%}
.research-prose .md-table[data-columns="4"] th:nth-child(4){width:24%}
.research-report .research-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
.research-workspace .checkpoint .stage-export{margin-top:14px}
/* Stage 3: the analysis is the main document; scripts and outputs fold under it. */
.research-report.research-analysis{margin-bottom:24px}
details.research-report{padding:18px 22px;border:1px solid var(--research-line,#dedee2);border-radius:14px;margin:18px 0}
details.research-report>summary{cursor:pointer;font-weight:600;font-size:17px}
.research-runs{margin-top:16px}.research-runs>summary{cursor:pointer;font-weight:600}
.research-run{margin:10px 0 10px 12px;padding-left:12px;border-left:2px solid var(--research-line,#dedee2)}
.research-run>summary{cursor:pointer}
.research-code{max-height:360px;overflow:auto;padding:12px 14px;border-radius:10px;background:#f5f5f6;font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
