.research-dialog { width: min(1060px, calc(100vw - 24px)); max-height: 92vh; }
:is(.research-dialog, .research-region) .dialog-content { overflow: auto; }
:is(.research-dialog, .research-region) pre, .review-detail pre { white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; }
:is(.research-dialog, .research-region) code { white-space: pre-wrap; overflow-wrap: anywhere; }
:is(.research-dialog, .research-region) select { max-width: 100%; margin: 10px 0; }
.revision-sides { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; margin: 12px 0; }
.revision-sides section { min-width: 0; }
.unified-diff { border: 1px solid var(--border, #dbe3d4); padding: 12px; font-size: 12px; line-height: 1.6; }
.unified-diff span { display: block; min-height: 1em; white-space: pre-wrap; }
.diff-add { background: #e9f5e6; color: #245131; }
.diff-remove { background: #faece8; color: #8d3428; }
@media (max-width: 700px) { .revision-sides { grid-template-columns: minmax(0,1fr); } }
.research-tabs { display:flex; flex-wrap:wrap; flex-shrink:0; gap:8px; margin:0; padding:10px 24px; background:#fff; border-bottom:1px solid var(--border,#dbe1dc); }
.research-tabs [aria-current=page] { background:var(--accent,#496a57); color:white; }
.research-content { overflow-wrap:anywhere; }
.research-content fieldset { border:0; padding:0; min-width:0; }
.research-form { display:grid; gap:14px; margin-top:16px; }
.research-evidence-map { padding:16px; background:#f6f6f2; border-radius:12px; }
.research-evidence-map h3 { margin:0; }
.research-evidence-map details { margin-top:10px; border:0; padding:8px 0; }
.research-evidence-map summary { font-weight:600; cursor:pointer; }
.research-evidence-map ul { list-style:none; padding-left:14px; margin-left:6px; border-left:2px solid #a2b3a5; }
.research-evidence-map li { display:grid; gap:6px; padding:8px 0; }
.research-evidence-map button { width:fit-content; max-width:100%; text-align:left; white-space:normal; }
.research-evidence-map small { color:var(--muted,#58665f); }
.research-source-tags { color:#385846; font-size:12px; }
.research-card:focus { outline:2px solid #496a57; outline-offset:2px; }
.research-form label,.research-card label { display:grid; gap:6px; font-size:13px; }
.research-form input,.research-form textarea,.research-form select { width:100%; min-width:0; box-sizing:border-box; }
.research-card { padding:16px; border:1px solid var(--border,#dbe1dc); border-radius:12px; margin:12px 0; }
.research-card button { margin:6px 6px 0 0; }
.research-card h4 { margin:0 0 8px; }
.research-card blockquote { border-left:3px solid #8da495; padding:8px 12px; margin:8px 0; white-space:pre-wrap; }
.research-form details { border:1px solid var(--border,#dbe1dc); padding:12px; border-radius:8px; }
.research-form details label { margin:12px 0; }
.research-warning { padding:12px; background:#fff4d9; color:#674b14; border-radius:8px; }
.research-operation { display:block; text-align:left; width:100%; margin:8px 0; white-space:normal; }
.research-events { padding-left:24px; }.research-events li { padding:10px 0; }
:is(.research-dialog, .research-region) button:focus-visible,:is(.research-dialog, .research-region) summary:focus-visible { outline:2px solid #46765a; outline-offset:3px; }
.explore-forms { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:16px; }
.explore-forms .research-card { margin:0; align-content:start; }
.explore-file-options { max-height:200px; overflow:auto; margin-top:10px; }
.research-form .explore-file-choice { display:flex; flex-direction:row; gap:8px; align-items:flex-start; }
.explore-file-choice span { min-width:0; }
.explore-file-choice input { width:auto; flex:none; margin-top:3px; }
.explore-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:16px 0; }
.explore-metrics div { padding:12px; border-radius:10px; background:#f2f6ef; }
.explore-metrics span { display:block; font-size:12px; }.explore-metrics strong { font-size:22px; }
.explore-chart { width:100%; height:auto; max-height:360px; background:#fcfdfb; border-radius:10px; }
.explore-chart text { fill:#53685a; font:12px sans-serif; }
.explore-hit textarea,.explore-analysis textarea { width:100%; box-sizing:border-box; margin-top:6px; }
.explore-actions { display:flex; flex-wrap:wrap; gap:6px; }
.explore-decision { border-left:3px solid #7e9d76; padding:10px; background:#f5f8f0; }
.explore-results { scroll-margin-top:12px; }.exploration fieldset legend { font-weight:600; }
.explore-metrics strong { white-space:nowrap; font-variant-numeric:tabular-nums; }
@media(max-width:700px) { .explore-forms { grid-template-columns:minmax(0,1fr); } .explore-metrics { gap:6px; }.explore-metrics div { padding:8px; }.explore-metrics strong { font-size:clamp(11px,3.4vw,18px); } }
@media(max-width:600px) { .research-dialog { width:calc(100vw - 20px); } .research-card { padding:12px; } .document-actions { flex-wrap:wrap; } .topbar .top-actions { gap:4px; } #research-open { padding:6px; } }
@media(max-width:360px) {
  .document-header { padding:10px 12px; gap:6px; }
  .document-actions { gap:4px; width:100%; justify-content:flex-end; }
  .document-actions button { padding-inline:6px; }
  .document-actions .ui-icon { display:none; }
  .workspace .topbar { flex-wrap:nowrap; padding:9px 10px; gap:6px; }
  .workspace .topbar .brand.compact { display:none; }
  .workspace .topbar .top-actions { gap:2px; }
  .workspace .topbar .product-views button { padding-inline:8px; }
}
.pdf-source-dialog { width: min(960px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); box-sizing: border-box; padding: 20px; overflow: auto; border: 1px solid #bbc9bc; border-radius: 12px; color: #253a2b; background: #fafcf9; }
.pdf-source-dialog h3, .pdf-source-dialog blockquote { overflow-wrap: anywhere; }
.pdf-source-dialog blockquote { white-space: pre-wrap; margin: 12px 0; padding: 12px; background: #eef3ed; }
.pdf-source-controls { display: flex; flex-wrap: wrap; gap: 8px; position: sticky; top: -20px; padding: 10px 0; background: #fafcf9; }
.pdf-source-frame { max-width: 100%; overflow: auto; background: #e1e7df; text-align: center; }
.pdf-source-frame canvas { height: auto; vertical-align: top; }
.pdf-source-controls select { max-width: 100%; padding: 8px; border: 1px solid #bbc9bc; border-radius: 6px; background: #fff; color: inherit; }

.hypothesis-editor > h3 { margin-bottom: 6px; }
.hypothesis-card { display: grid; gap: 12px; }
.hypothesis-card button { width: fit-content; max-width: 100%; }
.hypothesis-history { padding: 10px 0; border-bottom: 1px solid var(--border); }
.hypothesis-history:last-child { border: 0; }
:is(.research-dialog, .research-region) .impact-filter { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; }
:is(.research-dialog, .research-region) .impact-filter input { width: auto; margin: 0; }
.impact-chain { margin: 12px 0; padding: 4px 0 4px 16px; border-left: 2px solid #a2b3a5; }
.impact-experiment button { white-space: normal; }

.hypothesis-conditions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; }
.hypothesis-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.hypothesis-actions button { margin: 0; }
.research-tabs button[aria-current=page]:hover { background: var(--accent,#496a57); color: white; }
@media(max-width:700px) { .hypothesis-conditions { grid-template-columns: minmax(0,1fr); } }
