/* Agent-authored components share the paper/green research workspace language. */
.rp-window { position:fixed; z-index:160; right:24px; bottom:24px; width:min(1040px,calc(100vw - 48px)); height:min(790px,calc(100dvh - 105px)); min-width:430px; min-height:400px; max-width:calc(100vw - 16px); max-height:calc(100dvh - 16px); display:flex; flex-direction:column; overflow:hidden; resize:both; color:#294235; background:#f5f7f1; border:1px solid #a5b8a4; border-radius:14px; box-shadow:0 18px 70px #20362a33,0 3px 12px #20362a14; container-type:inline-size; }
.rp-window[hidden] { display:none; }
.rp-window[data-expanded="true"] { inset:12px!important; width:calc(100vw - 24px)!important; height:calc(100dvh - 24px)!important; resize:none; }
.rp-window[data-expanded="true"] .rp-foot>span:last-child { visibility:hidden; }
.rp-window * { box-sizing:border-box; }
.rp-window button,.rp-window input,.rp-window select,.rp-window textarea { font:inherit; font-size:13px; }
.rp-window button { min-height:34px; padding:7px 11px; border:1px solid #bac8b7; border-radius:6px; color:#335740; background:#fffefb; cursor:pointer; }
.rp-window button:hover:not(:disabled) { background:#eaf0e5; border-color:#839f82; }
.rp-window button:disabled { opacity:.5; cursor:not-allowed; }
.rp-window :is(button,input,select,textarea,summary):focus-visible { outline:2px solid #386b4b; outline-offset:2px; }
.rp-window .rp-primary,.rp-window .rp-run { color:#fffefb; background:#315f46; border-color:#315f46; }
.rp-window .rp-primary:hover:not(:disabled),.rp-window .rp-run:hover:not(:disabled) { color:white; background:#244c36; }
.rp-heading { display:flex; flex-shrink:0; align-items:center; justify-content:space-between; gap:12px; background:#fffefb; padding:15px 20px 13px; border-bottom:1px solid #dfe6d9; }
.rp-drag-handle { flex:1; min-width:0; cursor:move; touch-action:none; display:flex; flex-direction:column; gap:3px; }
.rp-drag-handle strong { font-size:17px; font-weight:650; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rp-eyebrow { font-size:11px; font-weight:650; letter-spacing:1px; color:#587157; }
.rp-window-actions { display:flex; align-items:center; gap:7px; }
.rp-window-actions button { border-color:transparent; background:transparent; font-size:12px; }
.rp-toolbar { display:flex; flex-shrink:0; gap:8px; flex-wrap:wrap; align-items:center; padding:10px 20px; border-bottom:1px solid #dfe6d9; background:#fbfcf8; }
.rp-toolbar select { border:1px solid #c1cdba; color:#354e39; border-radius:6px; min-height:34px; padding:6px 9px; max-width:235px; background:#fffefb; }
.rp-toolbar select:first-child { flex:1; min-width:125px; }
.rp-toolbar .rp-primary { margin-left:auto; }
.rp-body { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; padding:22px; scrollbar-gutter:stable; }
.rp-intro { display:flex; justify-content:space-between; gap:20px; margin-bottom:19px; align-items:baseline; }
.rp-intro p { margin:0; font-size:14px; line-height:1.65; }
.rp-intro>span { flex-shrink:0; font-size:12px; color:#65735f; }
.rp-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:17px; align-items:start; }
.rp-card { min-width:0; background:#fffefb; border:1px solid #d9e2d3; border-radius:9px; overflow:hidden; padding:18px; }
.rp-analysis { grid-column:1/-1; }
.rp-card-heading { display:flex; align-items:center; gap:10px; margin-bottom:9px; }
.rp-card h3 { margin:0; font-size:16px; font-weight:650; }
.rp-kind { color:#507047; background:#edf2e7; border-radius:4px; padding:4px 6px; font-size:11px; white-space:nowrap; }
.rp-source { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:12px; }
.rp-window .rp-source-link,.rp-window .rp-link { border-color:transparent; background:transparent; min-height:28px; font-size:12px; padding:3px 0; text-align:left; overflow-wrap:anywhere; }
.rp-source-link:hover,.rp-link:hover { text-decoration:underline; }
.rp-controls { display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; border-bottom:1px solid #e7ece2; padding-bottom:15px; margin-bottom:13px; }
.rp-field { display:flex; flex-direction:column; gap:6px; flex:1; min-width:100px; font-size:12px; color:#586a55; }
.rp-field>span { font-weight:550; }
.rp-field :is(input:not([type=checkbox]),select,textarea) { background:#fffefb; border:1px solid #a9b9a2; color:#294235; width:100%; padding:9px; border-radius:6px; min-height:36px; }
.rp-field input[type=checkbox] { align-self:flex-start; width:18px; height:18px; accent-color:#315f46; margin:9px 0; }
.rp-analysis .rp-field { max-width:220px; }
.rp-result { min-width:0; }
.rp-empty-result { padding:35px 12px; margin:0; text-align:center; color:#6b7965; font-size:13px; background:linear-gradient(135deg,#f8faf5,#f0f5ed); border-radius:6px; line-height:1.7; }
.rp-metrics { display:flex; gap:32px; padding:3px 0 9px; }
.rp-metrics>div { display:flex; flex-direction:column; gap:5px; }
.rp-metrics span { color:#65735f; font-size:12px; }
.rp-metrics strong { font-size:24px; font-weight:600; font-variant-numeric:tabular-nums; }
.rp-chart { display:block; width:100%; max-height:380px; aspect-ratio:720/380; object-fit:contain; }
.rp-caption,.rp-limits { font-size:12px; line-height:1.7; color:#5c6c55; margin:8px 0; }
.rp-limits { border-left:2px solid #c7d4ba; padding-left:10px; }
.rp-result-actions,.rp-provenance { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.rp-provenance { border-top:1px solid #e8ece3; margin-top:12px; padding-top:8px; justify-content:space-between; font-size:11px; color:#62715e; }
.rp-table-scroll { overflow:auto; max-height:360px; }
.rp-table-scroll table { width:100%; border-collapse:collapse; font-size:12px; font-variant-numeric:tabular-nums; }
.rp-table-scroll th,.rp-table-scroll td { text-align:left; padding:10px 12px; border-bottom:1px solid #e7ece2; white-space:nowrap; max-width:280px; overflow:hidden; text-overflow:ellipsis; }
.rp-table-scroll th { background:#f2f6ec; color:#45613e; position:sticky; top:0; font-weight:600; }
.rp-table-scroll tr:nth-child(even) td { background:#fafbf7; }
.rp-table-footer { display:flex; flex-wrap:wrap; gap:7px; align-items:center; padding-top:12px; font-size:11px; color:#65715e; }
.rp-table-footer span { flex:1; min-width:140px; }
.rp-table-footer button { font-size:11px; padding:5px 7px; min-height:30px; }
.rp-hits { list-style:none; padding:0; margin:0; max-height:350px; overflow:auto; }
.rp-hits li+li { border-top:1px solid #e5eadf; margin-top:12px; padding-top:12px; }
.rp-hits blockquote { margin:0 0 8px; font-size:13px; line-height:1.7; white-space:pre-wrap; overflow-wrap:anywhere; }
.rp-note-text { font-size:14px; line-height:1.8; white-space:pre-wrap; overflow-wrap:anywhere; margin:14px 0; }
.rp-banner { display:flex; align-items:center; justify-content:space-between; gap:12px; background:#eef3e6; border:1px solid #d2dfc5; padding:12px 14px; border-radius:7px; margin:0 0 16px; font-size:13px; line-height:1.6; }
.rp-error { color:#8b3a30; background:#fff3ee; padding:10px 12px; border-radius:6px; font-size:13px; line-height:1.7; overflow-wrap:anywhere; }
.rp-error.rp-banner { border-color:#e9cbc1; }
.rp-composer { background:#fffefb; border:1px solid #bcccb4; border-radius:9px; padding:16px; margin-top:22px; }
.rp-composer textarea { resize:vertical; min-height:78px; max-height:240px; line-height:1.7; }
.rp-compose-footer { display:flex; gap:14px; align-items:flex-start; justify-content:space-between; margin-top:12px; }
.rp-materials { min-width:0; flex:1; font-size:12px; color:#54704a; }
.rp-materials summary { cursor:pointer; padding:8px 0; }
.rp-material-options { padding:5px 0; max-height:200px; overflow:auto; }
.rp-material-options label { display:flex; flex-direction:row; gap:8px; align-items:center; padding:5px 0; overflow-wrap:anywhere; }
.rp-material-options input { flex-shrink:0; width:auto; accent-color:#315f46; }
.rp-empty { padding:38px 16px 22px; text-align:center; max-width:660px; margin:auto; }
.rp-starter { padding:18px; border:1px solid #dfe6d9; border-radius:12px; background:#fff; }
.rp-starter h3 { margin:0 0 8px; font-size:16px; }
.rp-starter .rp-examples { justify-content:flex-start; margin:12px 0; }
.rp-starter-form { display:grid; gap:12px; max-width:620px; }
.rp-starter-form fieldset { min-width:0; border:1px solid #dfe6d9; border-radius:8px; padding:10px; }
.rp-empty h2 { margin:14px 0; font-size:25px; font-weight:600; letter-spacing:-.6px; }
.rp-empty p { margin:0 auto; max-width:520px; font-size:14px; line-height:1.9; color:#5f725b; }
.rp-examples { display:flex; justify-content:center; flex-wrap:wrap; gap:10px; margin-top:22px; }
.rp-foot { flex-shrink:0; display:flex; justify-content:space-between; gap:12px; font-size:11px; color:#60735a; padding:9px 18px; border-top:1px solid #dfe6d9; background:#fbfcf8; }
@container (max-width:700px) { .rp-grid { grid-template-columns:minmax(0,1fr); } .rp-intro { flex-direction:column; gap:5px; } .rp-toolbar { gap:6px; padding:9px 12px; } .rp-body { padding:14px; } .rp-card { padding:14px; } .rp-heading { padding:12px 14px; } .rp-window-actions button { font-size:11px; padding:5px; } .rp-drag-handle strong { font-size:15px; } .rp-metrics { gap:23px; } }
@media(max-width:700px) { .rp-window,.rp-window[data-expanded="true"] { inset:0!important; width:100vw!important; height:100dvh!important; min-width:0; min-height:0; max-width:none; max-height:none; border-radius:0; resize:none; } .rp-window button { min-height:44px; } .rp-window .rp-source-link,.rp-window .rp-link { min-height:32px; } .rp-toolbar select,.rp-field :is(input:not([type=checkbox]),select) { min-height:44px; } .rp-window input,.rp-window textarea { font-size:16px; } .rp-controls .rp-field { min-width:115px; } .rp-controls .rp-run { width:100%; } .rp-toolbar select { max-width:190px; } .rp-toolbar .rp-primary { margin-left:0; } .rp-heading { padding-top:max(12px,env(safe-area-inset-top)); } .rp-foot { padding-bottom:max(9px,env(safe-area-inset-bottom)); } .rp-foot>span:last-child { display:none; } .rp-banner { flex-wrap:wrap; } .rp-material-options label { min-height:44px; } .rp-window-actions button:first-child { display:none; } }
