/* Research is one continuous inspector, sized to the visible workspace. */
@media(min-width:1001px){
 .predictions-page .research-panel{height:calc(100dvh - var(--research-top,24px) - 24px);max-height:none;min-height:320px}
 .predictions-page .research-panel>[data-inspector-pane]{flex:1;min-height:0}
 .predictions-page .research-panel .research-content{height:100%;gap:16px;padding:22px 22px 20px}
 .predictions-page .research-findings{flex:0 1 auto;max-height:42%;overflow:auto}
 .predictions-page .research-allocation{display:flex;flex:1 1 120px;min-height:48px;max-height:none;justify-content:center;border:0;padding:0;container-type:size}
 .predictions-page .research-allocation-chart{width:min(100cqh,100cqw,260px);height:min(100cqh,100cqw,260px);min-width:48px;min-height:48px}
 .predictions-page .research-allocation-chart strong{font-size:clamp(17px,17cqh,38px);letter-spacing:-1px}
 .predictions-page .research-allocation-chart small{display:block;font-size:10px}
 .predictions-page .research-content:has(.reasoning-disclosure[open]) .research-findings{flex:1;max-height:none}
 .predictions-page .research-content:has(.reasoning-disclosure[open]) .research-allocation{flex:0 0 72px}
 .predictions-page .research-content:has(.reasoning-disclosure[open]) .research-allocation-chart strong{font-size:18px;letter-spacing:-.4px}
 .predictions-page .research-content:has(.reasoning-disclosure[open]) .research-allocation-chart small{display:none}
 .predictions-page .research-decision{flex:none}
 .predictions-page .research-options{padding:28px 22px;justify-content:space-between;gap:28px}
 .predictions-page .research-preference-visuals{display:flex;flex:1;flex-direction:column;justify-content:space-evenly;gap:28px}
}
.research-allocation-chart svg{stroke-width:4}
.research-allocation-chart .allocation-ring-value{stroke:var(--sub);stroke-linecap:round}
.research-allocation-chart:hover .allocation-ring-value{stroke:var(--ink)}
.predictions-page .research-result>strong{font-size:23px;line-height:1.35;font-weight:450;letter-spacing:-.5px}
.predictions-page .research-result>span{font-size:10px}
.predictions-page .research-decision .research-budget>span{font-size:11px}
.predictions-page .research-decision .research-budget>strong{font-size:25px;letter-spacing:-.6px}
.predictions-page .research-panel-footer{background:var(--bg);border-top-color:var(--line-soft)}
@media(min-width:1001px) and (max-height:700px){
 .predictions-page .research-panel .research-content{padding:14px 18px;gap:10px}
 .predictions-page .research-result>strong{font-size:20px}
 .predictions-page .research-findings{max-height:40%}
 .predictions-page .research-budget+.secondary{margin-top:12px}
 .predictions-page .research-cash{margin:8px 0 12px}
 .predictions-page .research-panel-footer{min-height:42px;padding:10px 18px}
 .predictions-page .research-allocation-chart small{display:none}
}
@media(max-width:1000px){
 .predictions-page .research-allocation{border:0;justify-content:center;padding:8px 0}
 .predictions-page .research-allocation-chart{width:146px}
 .predictions-page .research-allocation-chart strong{font-size:29px}
}

/* The account book and manager share a baseline and a restrained surface hierarchy. */
.portfolio-page>.page-heading{margin-bottom:22px}
.portfolio-page>.account-summary{margin-bottom:22px}
.account-summary .portfolio-summary-tabs{background:transparent;border-bottom-color:var(--line-soft)}
.account-summary-body{padding-top:26px;padding-bottom:26px}
.portfolio-page .account-funds>div{border-color:var(--line-soft);border-radius:10px}
.portfolio-page .account-funds>div>span{color:var(--muted)}
.portfolio-page .portfolio-book{background:var(--bg)}
.portfolio-page .portfolio-book-tabs{background:var(--paper);border-bottom:1px solid var(--line-soft)}
.portfolio-page .portfolio-book .empty-state{gap:22px}
.portfolio-page .portfolio-transaction{padding:19px 0}
.portfolio-manager-heading{border-bottom:0}
.portfolio-manager-title{font-size:24px;font-weight:450;letter-spacing:-.65px}
.portfolio-manager-content{padding-top:24px;padding-bottom:28px}
.portfolio-manager-footer{background:var(--bg)}
.portfolio-manager-actions{margin-top:24px}

/* Main chat takes its rhythm from the grnxai chat workspace. */
.conversation-layout.with-conversations{grid-template-columns:208px minmax(0,1fr)}
.conversation-sidebar{background:color-mix(in srgb,var(--paper) 52%,var(--bg));padding:20px 12px;border-right:1px solid var(--line-soft)}
.conversation-sidebar-heading{padding:0 9px 17px}
.conversation-sidebar-heading h2{font-size:15px;font-weight:550;color:var(--ink);margin:0}
.conversation-create{display:flex;align-items:center;gap:10px;width:100%;min-height:38px;padding:9px 11px;font-size:12px;text-align:left;border-radius:8px;background:var(--paper);border:1px solid var(--line-soft)}
.conversation-create>.icon{width:15px;height:15px;color:var(--sub)}
.conversation-section-label{font-size:10px;color:var(--muted);padding:26px 10px 10px}
#conversation-list{gap:3px}
#conversation-list>button{min-height:38px;font-size:12px;padding:10px 11px;border-radius:8px}
#conversation-list>button.selected{background:var(--selected)}
.conversation-stage .chat-titlebar{flex:none;height:58px;min-height:58px;padding:0 22px;border:0;gap:9px}
.chat-titlebar .chat-title-identity{gap:18px}
.chat-titlebar .chat-title-identity h1{max-width:230px;font-size:11px!important;color:var(--muted);font-weight:400}
.chat-titlebar .model-picker-trigger{font-size:14px;font-weight:500;max-width:220px;padding:6px 2px}
.conversation-stage.is-empty .chat-titlebar h1{display:none}
.conversation-layout.with-conversations .chat-titlebar>[data-chat-sidebar]{display:none}
.conversation-stage .live-messages{padding:24px max(30px,calc((100% - 744px)/2)) 32px;overscroll-behavior:contain;overflow-anchor:none}
.conversation-stage .live-message{margin:0 0 28px;border:0;background:transparent;padding:0;font-size:14px;line-height:1.75}
.conversation-stage .live-message>span{display:none}
.conversation-stage .live-message.user{width:fit-content;max-width:82%;margin-left:auto;background:var(--paper);border-radius:19px;padding:12px 18px}
.conversation-stage .live-message.user>p{margin:0;line-height:1.65;white-space:pre-wrap}
.conversation-stage .live-message.assistant{padding:6px 0 12px}
.conversation-stage .markdown-body{font-size:14px;line-height:1.8;overflow-wrap:anywhere}
.conversation-stage .markdown-body> :first-child{margin-top:0}
.conversation-stage .live-chat-form{width:calc(100% - 60px);max-width:744px;margin:0 auto 20px!important;padding:16px 17px 12px!important;border-radius:23px!important;box-shadow:0 5px 24px #00000008;transition:border-color .16s}
.conversation-stage .live-chat-form:focus-within{border-color:var(--sub)}
.conversation-stage .live-chat-form textarea{min-height:57px;max-height:180px;padding:0 3px 10px!important;font-size:15px!important;line-height:1.6;resize:none;border:0;outline:0;box-shadow:none}
.conversation-stage .composer-controls{display:flex;align-items:center;justify-content:space-between;margin-top:7px}
.conversation-stage .composer-controls select{max-width:70%;min-height:30px;padding:5px 26px 5px 5px;font-size:11px;background-color:transparent;color:var(--muted)}
.conversation-stage .composer-controls>.primary{width:34px;height:34px;min-height:34px;border-radius:50%;padding:0;display:grid;place-items:center}
.conversation-stage .composer-controls>.primary>.icon{width:19px;height:19px;transform:rotate(-45deg)}
.chat-start-actions{display:none}
.conversation-stage.is-empty{display:grid;grid-template-columns:minmax(0,1fr);justify-content:stretch;grid-template-rows:58px minmax(50px,1fr) auto auto minmax(30px,1.25fr);padding:0;gap:0;overflow:auto}
.conversation-stage.is-empty:after{content:''}
.conversation-stage.is-empty .chat-titlebar{grid-row:1}
.conversation-stage.is-empty .live-messages{order:initial;grid-row:2;display:flex;align-items:flex-end;min-height:0;padding:24px 30px 27px;max-width:none;margin:0;width:100%;overflow:visible}
.conversation-stage.is-empty .chat-welcome{min-height:0;padding:0;max-width:none;margin:0;text-align:center;display:block}
.conversation-stage.is-empty .chat-welcome h2{display:block;font-size:clamp(25px,2.5vw,35px);line-height:1.25;font-weight:450;letter-spacing:-1px;margin:0;text-align:center}
.conversation-stage.is-empty .live-chat-form{order:initial;grid-row:3;margin:0 auto!important;width:calc(100% - 60px);max-width:744px}
.conversation-stage.is-empty .live-chat-form textarea{min-height:68px}
.conversation-stage.is-empty .chat-start-actions{grid-row:4;display:flex;flex-wrap:wrap;justify-content:center;gap:8px;padding:18px 20px 0}
.chat-start-actions>*{display:inline-flex;align-items:center;gap:8px;padding:9px 13px;border:1px solid var(--line-soft);border-radius:20px;font-size:11px;color:var(--muted)}
.chat-start-actions .icon{width:13px;height:13px}
.chat-start-actions>*:hover{background:var(--paper);color:var(--ink);border-color:var(--line)}

/* Home uses quiet headers, continuous rows, and clear actions. */
.home-grid{gap:22px}
.home-widget{padding:22px;border-radius:13px}
.home-widget>header{margin-bottom:20px}
.home-widget h2{font-size:12px;letter-spacing:.05px;color:var(--muted)}
.home-widget[data-home-widget=research]{padding:24px 26px}
.home-widget[data-home-widget=research].wide .home-research{gap:10px 28px}
.home-widget[data-home-widget=research].wide .home-research>strong{font-size:26px;font-weight:450;line-height:1.3;letter-spacing:-.65px}
.home-research>span{margin-top:0}
.home-manager-actions{gap:18px}
.home-manager-actions>.primary{font-size:12px;min-height:39px;border-radius:8px}
.home-manager-actions>.text-link{font-size:11px;color:var(--muted)}
.home-widget[data-home-widget=agents],.home-widget[data-home-widget=activity]{background:var(--bg)}
.home-rows>a{border:0;min-height:61px;padding:12px 4px;border-radius:7px;transition:background .15s}
.home-rows>a:hover{background:var(--hover)}
.home-rows .company-logo{width:28px;height:28px;border-radius:8px}
.home-rows>a>.icon:last-child{width:14px;height:14px}
.home-rows small{font-size:10px;margin-top:5px}
.home-balance>div:first-child>strong{font-size:39px;line-height:1.2;margin:10px 0 14px}
.home-funds{gap:15px 25px}
.home-funds>div:not(.home-allocation){padding-top:16px;border-top:1px solid var(--line-soft)}
.home-funds strong{font-size:19px;letter-spacing:-.3px}
.home-card-link{margin-top:18px;padding:10px 0 0}
@media(max-width:1100px){
 .conversation-layout.with-conversations{grid-template-columns:1fr}
 .conversation-layout.with-conversations .conversation-stage{display:none}
 .conversation-sidebar{padding:20px}
 .conversation-sidebar-heading{padding-bottom:20px}
}
@media(max-width:760px){
 .conversation-stage .chat-titlebar{padding:0 13px;height:54px;min-height:54px}
 .chat-titlebar .chat-title-identity{gap:0}
 .chat-titlebar .chat-title-identity h1{display:none}
 .chat-titlebar .model-picker-trigger{font-size:12px;max-width:185px}
 .conversation-stage .live-messages{padding:20px 18px 24px}
 .conversation-stage .live-chat-form,.conversation-stage.is-empty .live-chat-form{width:calc(100% - 28px);padding:14px!important;border-radius:20px!important;margin-bottom:12px!important}
 .conversation-stage .live-chat-form textarea{font-size:16px!important}
 .conversation-stage.is-empty{grid-template-rows:54px minmax(60px,1fr) auto auto minmax(30px,1.25fr)}
 .conversation-stage.is-empty .live-messages{padding:20px 20px 23px}
 .conversation-stage.is-empty .chat-welcome h2{font-size:26px}
 .conversation-stage.is-empty .chat-start-actions{padding-top:7px;gap:6px}
 .chat-start-actions>*{font-size:10px;padding:9px 10px}
 .home-grid{gap:18px}
 .home-widget,.home-widget[data-home-widget=research]{padding:20px}
 .home-widget[data-home-widget=research].wide .home-research>strong{font-size:23px}
 .home-widget[data-home-widget=research].wide .home-manager-actions{margin-top:18px}
}
@media(prefers-reduced-motion:reduce){.conversation-stage .live-chat-form,.home-rows>a{transition:none}}
@media(min-width:1001px){
 .predictions-page .research-content:not(:has(.reasoning-disclosure[open])) .research-findings{flex:none;max-height:none}
}
@media(min-width:1001px) and (max-height:700px){
 .predictions-page .research-content:has(.reasoning-disclosure[open]) .research-allocation{display:none}
}
@media(max-width:760px){
 .prediction-toolbar .research-toggle{width:36px;min-width:36px;padding:9px}
 .prediction-toolbar .research-toggle>span{display:none}
 .prediction-toolbar>div{gap:8px}
}
@media(min-width:1001px){
 .predictions-page .research-content.is-running:not(:has(.reasoning-disclosure[open])) .research-allocation{display:flex}
}
@media(min-width:1001px) and (max-height:540px){
 .predictions-page .research-panel{min-height:0}
 .predictions-page .research-panel>[data-inspector-pane="overview"]{overflow-y:auto}
 .predictions-page .research-panel .research-content{flex:none;height:auto;overflow:visible}
 .predictions-page .research-findings{overflow:visible}
 .predictions-page .research-allocation{flex:0 0 64px}
}
