/* Restrained workspace system: content first, progressive disclosure. */
:is(.home-page,.portfolio-page,.predictions-page){max-width:1480px;margin-inline:auto}
:is(.home-page,.portfolio-page,.predictions-page) h1{font-weight:500;letter-spacing:-1px}
:is(.home-page,.portfolio-page,.predictions-page) button:focus-visible,
.research-disclosure>summary:focus-visible{outline:2px solid var(--sub);outline-offset:4px}
/* Chat occupies the available application viewport. */
.app-shell:has(.conversation-page)>.topbar{display:none}
.app-shell:has(.conversation-page)>main{padding:0;min-height:0}
.page.conversation-page{width:100%;max-width:none!important;height:100dvh!important;margin:0!important;padding:0!important;border:0;border-radius:0;background:var(--bg)}
.conversation-page .conversation-layout{position:relative;overflow:hidden;grid-template-columns:minmax(0,1fr)}
.conversation-page .conversation-layout.with-conversations{grid-template-columns:232px minmax(0,1fr)}
.conversation-page .conversation-sidebar{background:var(--paper);border-right:1px solid var(--line-soft);padding:22px 12px;min-width:0}
.conversation-page .conversation-sidebar[hidden]{display:none}
.conversation-page .conversation-stage{display:flex;min-width:0;height:100%;overflow:hidden}
.conversation-page .conversation-stage.is-empty{display:grid}
.conversation-page .chat-titlebar{height:66px;min-height:66px;border-bottom:1px solid var(--line-soft);padding:0 28px}
.conversation-page .chat-titlebar>[data-chat-sidebar]{display:grid!important}
.conversation-page .chat-title-identity h1{font-size:12px!important}
.conversation-page .live-messages{padding:32px max(28px,calc((100% - 780px)/2))}
.conversation-page .live-chat-form{border-radius:16px!important;box-shadow:none;max-width:780px;margin-bottom:24px!important}
.conversation-page .live-chat-form textarea{font-size:15px!important}
.conversation-page .chat-welcome h2{font-weight:450;font-size:34px;letter-spacing:-1px}
.conversation-page .conversation-create{background:transparent;border-color:var(--line);border-radius:7px}
.conversation-page .chat-start-actions>*{border:0;border-radius:6px;font-size:12px}
/* Portfolio is a balance and a book. Research lives on Predictions. */
.portfolio-page>.simple-balance{display:flex;justify-content:space-between;align-items:center;gap:40px;padding:28px 0 38px;margin:0;border:0;border-bottom:1px solid var(--line);background:transparent;border-radius:0}
.simple-balance-total>span{display:block;color:var(--muted);font-size:12px}
.simple-balance-total>.balance-value{display:block;font-size:58px;font-weight:450;letter-spacing:-2.3px;line-height:1.15;margin:12px 0}
.simple-balance-total>.simple-balance-caption{font-size:11px}
.simple-balance-stats{display:flex;gap:56px;padding-right:20px}
.simple-balance-stats>div{min-width:140px}
.simple-balance-stats>div>span{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:12px;min-height:30px}
.simple-balance-stats>div>strong{display:block;font-size:28px;font-weight:450;letter-spacing:-.8px;margin-top:8px;font-variant-numeric:tabular-nums}
.simple-balance-stats .icon-button{height:24px;width:24px;background:var(--paper);border-radius:5px}
.simple-balance-stats .icon{width:13px;height:13px}
.portfolio-review-bar{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:21px 0;margin:0 0 20px;border-bottom:1px solid var(--line-soft);font-size:12px}
.portfolio-review-label{display:flex;align-items:center;gap:12px;color:var(--sub)}
.portfolio-review-label>.icon{width:16px;height:16px;color:var(--muted)}
.portfolio-review-bar>a{display:flex;align-items:center;gap:12px;font-size:12px;white-space:nowrap}
.portfolio-review-bar>a>.icon{width:14px;height:14px}
.portfolio-page .portfolio-workspace{display:block;border:0;border-radius:0;background:transparent;overflow:visible}
.portfolio-page .portfolio-workspace .portfolio-book{background:transparent;border:0;min-height:0}
.portfolio-page .portfolio-workspace .portfolio-book-tabs{padding:0 0 18px;border-bottom:1px solid var(--line);gap:8px}
.portfolio-page .portfolio-workspace .portfolio-book .holdings-section{padding:0}
.portfolio-page .portfolio-workspace .holding-row{min-height:88px;padding:22px 0}
.portfolio-page .portfolio-workspace .holding-asset strong{font-size:14px}
.portfolio-page .portfolio-workspace .holding-row>span>strong{font-size:14px}
.portfolio-page .portfolio-workspace .holdings-head{padding:18px 0}
.portfolio-page .portfolio-workspace .portfolio-ledger{padding:0}
/* Predictions inspector: small, independent sections, no wall of text. */
.predictions-page .prediction-layout.has-research{grid-template-columns:minmax(0,1fr) 300px;gap:32px}
.predictions-page #research-panel.minimal-research{border:0;border-left:1px solid var(--line);border-radius:0;background:transparent;padding:0 0 0 24px;height:auto;max-height:calc(100dvh - 48px);overflow:auto;display:block;scrollbar-width:thin}
.predictions-page #research-panel.minimal-research[hidden]{display:none}
.predictions-page #research-panel .research-panel-header{padding:0;min-height:32px;margin-bottom:24px}
.predictions-page #research-panel .research-panel-header>h2{font-size:12px;font-weight:500;letter-spacing:0;color:var(--muted)}
.outlook-summary{padding:0 0 24px}
.outlook-summary>span{font-size:11px;color:var(--muted)}
.outlook-summary>h3{font-size:26px;font-weight:450;line-height:1.25;letter-spacing:-.8px;margin:10px 0 0}
.research-counts{display:flex;gap:24px;margin-top:22px;font-size:12px;color:var(--muted)}
.research-counts>span{display:flex;align-items:baseline;gap:7px}
.research-counts b{font-size:22px;font-weight:450;color:var(--ink)}
.research-disclosure{border-top:1px solid var(--line-soft)}
.research-disclosure>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;list-style:none;cursor:pointer;padding:18px 0;font-size:12px;color:var(--sub);user-select:none}
.research-disclosure>summary::-webkit-details-marker{display:none}
.disclosure-end{display:flex;align-items:center;gap:12px;color:var(--muted)}
.disclosure-end>b{font-size:11px;font-weight:400}
.disclosure-end>.icon{width:13px;height:13px;transition:transform .15s}
.research-disclosure[open]>summary .disclosure-end>.icon{transform:rotate(90deg)}
.research-disclosure-body{padding:0 0 18px}
.predictions-page #research-panel .decision-trades{margin:0}
.predictions-page #research-panel .decision-trade{padding:10px 0;border:0}
.predictions-page #research-panel .decision-trade small{font-size:10px}
.predictions-page #research-panel .decision-trade>span:not(.decision-trade-value)>small{display:none}
.predictions-page #research-panel .decision-reports{border:0;padding:0;margin:0}
.predictions-page #research-panel .decision-reports>button{padding:10px 0;font-size:11px}
.predictions-page #research-panel .decision-allocation{border:0;padding:0;margin:0}
.predictions-page #research-panel .decision-allocation>header{display:none}
.predictions-page #research-panel .decision-dock{border:0;padding:0;margin:0;background:transparent}
.predictions-page #research-panel .decision-budget>strong{font-size:24px}
.predictions-page #research-panel .manager-strategy{margin:0;border:0;padding:0}
.predictions-page #research-panel .manager-strategy>header>span{display:none}
.predictions-page #research-panel .manager-strategy>div{gap:18px;margin-top:18px}
.predictions-page #research-panel .manager-strategy b{font-size:20px}
.research-empty{font-size:12px;line-height:1.6;color:var(--muted);margin:0}
.research-quick-actions{display:flex;justify-content:space-between;gap:16px;border-top:1px solid var(--line);padding:20px 0 4px}
.research-quick-actions :is(a,button){display:flex;align-items:center;gap:8px;font-size:11px;color:var(--muted)}
.research-quick-actions .icon{width:14px;height:14px}
/* Home: editorial hierarchy, broad surfaces, aligned financial rows. */
.home-page>.page-heading{align-items:end;margin-bottom:30px}
.home-heading>span{display:block;font-size:12px;color:var(--muted);margin-bottom:12px}
.home-page .home-heading h1{font-size:38px;letter-spacing:-1.3px;font-weight:450;line-height:1.15}
.home-shortcuts{display:flex;border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin:0 0 32px;gap:0}
.home-shortcuts>a{display:flex;align-items:center;gap:12px;flex:1;min-width:0;padding:20px 24px;font-size:12px;color:var(--sub)}
.home-shortcuts>a:first-child{padding-left:0}
.home-shortcuts>a+a{border-left:1px solid var(--line-soft)}
.home-shortcuts>a>.icon{width:16px;height:16px;color:var(--muted)}
.home-shortcuts>a>.icon:last-child{margin-left:auto;width:13px;height:13px}
.home-shortcuts>a:hover{color:var(--ink)}
.home-page .home-grid{gap:24px;grid-template-columns:repeat(2,minmax(0,1fr))}
.home-page .home-widget{border:1px solid var(--line-soft);border-radius:8px;padding:26px 28px;background:var(--paper);min-width:0;box-shadow:none}
.home-page .home-widget.wide{grid-column:1/-1}
.home-page .home-widget>header{margin-bottom:26px;min-height:24px}
.home-page .home-widget h2{font-size:12px;font-weight:500;color:var(--muted);letter-spacing:0}
.home-page .home-panel-open{background:transparent;width:25px;height:25px}
.home-page .home-widget[data-home-widget=portfolio]{background:var(--paper);padding:28px 32px}
.home-page .home-widget[data-home-widget=portfolio] .home-balance{gap:40px;min-height:160px;justify-content:space-between}
.home-page .home-balance>div:first-child>span{font-size:12px;color:var(--muted)}
.home-page .home-balance>div:first-child>strong{font-size:52px;letter-spacing:-1.8px;font-weight:450;line-height:1.12;margin:14px 0 20px}
.home-page .home-balance>div:first-child>a{font-size:11px;color:var(--muted)}
.home-page .home-widget.wide .home-funds{width:38%;align-self:center;min-width:220px}
.home-page .home-funds>div:not(.home-allocation){border:0;padding:0}
.home-page .home-funds strong{font-size:23px;font-weight:450}
.home-page .home-allocation{height:5px;margin-top:12px}
.home-page .home-widget[data-home-widget=research]{background:transparent;border:1px solid var(--line);padding:26px 28px}
.home-page .home-research{min-height:156px;display:flex;flex-direction:column;align-items:start;gap:12px}
.home-page .home-research>strong,.home-page .home-widget[data-home-widget=research].wide .home-research>strong{font-size:28px;letter-spacing:-.7px;font-weight:450;max-width:420px;line-height:1.25}
.home-page .home-research>span{font-size:11px;color:var(--muted)}
.home-page .home-manager-actions{margin-top:auto;padding-top:18px;width:100%}
.home-page .home-manager-actions>.primary{width:auto;min-width:160px;justify-content:space-between;border-radius:6px;font-size:12px}
.home-page .home-rows>a{padding:15px 0;border-radius:0;border-top:1px solid var(--line-soft);min-height:68px}
.home-page .home-rows>a:first-child{border-top:0;padding-top:0}
.home-page .home-rows strong{font-size:13px;font-weight:500}
.home-page .home-rows small{font-size:11px;margin-top:5px}
.home-page .home-price strong{font-variant-numeric:tabular-nums;font-size:15px}
.home-page .home-rows .company-logo{width:32px;height:32px;border-radius:8px}
.home-page .home-widget[data-home-widget=agents],.home-page .home-widget[data-home-widget=activity]{background:transparent;border:0;border-top:1px solid var(--line);border-radius:0;padding:24px 0}
.home-page .home-chart-widget{min-height:300px}
@media(max-width:1100px){
 .conversation-page .conversation-layout.with-conversations{grid-template-columns:210px minmax(0,1fr)}
 .conversation-page .conversation-layout.with-conversations .conversation-stage{display:flex}
 .conversation-page .conversation-layout.with-conversations .conversation-stage.is-empty{display:grid}
 .simple-balance-stats{gap:28px;padding:0}
 .predictions-page .prediction-layout.has-research{grid-template-columns:minmax(0,1fr) 270px;gap:24px}
}
@media(max-width:1000px){
 .predictions-page .prediction-layout.has-research{grid-template-columns:minmax(0,1fr)}
 .predictions-page #research-panel.minimal-research{position:static;max-height:none;border:1px solid var(--line);border-radius:8px;padding:24px;grid-row:1}
}
@media(max-width:760px){
 .app-shell:has(.conversation-page)>.topbar{display:flex}
 .page.conversation-page{height:calc(100dvh - 135px - env(safe-area-inset-bottom))!important}
 .conversation-page .conversation-layout.with-conversations{grid-template-columns:minmax(0,1fr)}
 .conversation-page .conversation-sidebar{position:absolute;left:0;top:0;bottom:0;width:min(280px,80%);z-index:5;border-right:1px solid var(--line);box-shadow:16px 0 36px #0003}
 .conversation-page .chat-titlebar{height:54px;min-height:54px;padding:0 16px}
 .conversation-page .chat-title-identity h1{display:none}
 .conversation-page .live-messages{padding:24px 18px}
 .conversation-page .live-chat-form{width:calc(100% - 32px);margin-bottom:14px!important;border-radius:14px!important}
 .conversation-page .live-chat-form textarea{font-size:16px!important}
 .conversation-page .conversation-stage.is-empty .live-chat-form{width:calc(100% - 32px)}
 .conversation-page .chat-start-actions{padding:14px 8px 0;gap:0}
 .conversation-page .chat-start-actions>*{font-size:10px;padding:8px}
 .portfolio-page>.simple-balance{display:block;padding:12px 0 28px}
 .simple-balance-total>.balance-value{font-size:48px}
 .simple-balance-stats{gap:24px;margin-top:30px;justify-content:space-between}
 .simple-balance-stats>div{min-width:0;flex:1}
 .simple-balance-stats>div>strong{font-size:25px}
 .simple-balance-stats>div>span{font-size:11px}
 .portfolio-review-bar{padding:18px 0;gap:12px;font-size:11px}
 .portfolio-review-bar>a{font-size:11px;gap:5px}
 .portfolio-review-label{gap:7px}
 .portfolio-review-label>.icon{display:none}
 .portfolio-page .portfolio-workspace .holding-row{min-height:80px;padding:18px 0}
 .home-page>.page-heading{align-items:start;gap:20px;flex-wrap:wrap}
 .home-page .home-heading h1{font-size:32px}
 .home-page .home-heading>span{font-size:11px}
 .home-page .home-actions{gap:8px}
 .home-page .home-actions>button{font-size:11px;padding:9px 11px}
 .home-shortcuts{margin-bottom:24px}
 .home-shortcuts>a{font-size:11px;line-height:1.5;padding:16px 10px;gap:7px}
 .home-shortcuts>a>.icon{display:none}
 .home-page .home-grid{grid-template-columns:minmax(0,1fr);gap:20px}
 .home-page .home-widget,.home-page .home-widget[data-home-widget=portfolio],.home-page .home-widget[data-home-widget=research]{padding:22px}
 .home-page .home-widget.wide{grid-column:auto}
 .home-page .home-balance>div:first-child>strong{font-size:44px}
 .home-page .home-widget[data-home-widget=portfolio] .home-balance{flex-direction:column;gap:28px}
 .home-page .home-widget.wide .home-funds{width:100%;min-width:0}
 .home-page .home-research>strong{font-size:26px}
}
@media(prefers-reduced-motion:reduce){.disclosure-end>.icon{transition:none}}

.home-page .home-funds>div:not(.home-allocation){background:transparent;border:0;border-radius:0;padding:0;min-height:0}
.home-page .home-widget[data-home-widget=research].wide .home-research{display:grid;grid-template-columns:1fr auto;min-height:110px;align-items:center;gap:12px 28px}
.home-page .home-widget[data-home-widget=research].wide .home-research>strong{grid-column:1;grid-row:1}
.home-page .home-widget[data-home-widget=research].wide .home-research>span{grid-column:1;grid-row:2}
.home-page .home-widget[data-home-widget=research].wide .home-manager-actions{grid-column:2;grid-row:1/3;margin:0;padding:0}
@media(max-width:760px){.home-page .home-widget[data-home-widget=research].wide .home-research{display:flex;min-height:150px}}
/* Portfolio performance is part of the balance, not a separate dashboard tile. */
.portfolio-page>.simple-balance{display:block;padding:18px 0 24px;overflow:visible}
.portfolio-hero-header{display:flex;align-items:center;justify-content:space-between;gap:32px}
.simple-balance-total>.simple-balance-caption{display:block;position:static!important;margin:0;line-height:1.5}
.portfolio-performance{margin-top:32px;min-width:0}
.performance-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:12px}
.performance-legend{display:flex;align-items:center;gap:22px;font-size:11px;color:var(--muted)}
.performance-legend>span{display:flex;gap:7px;align-items:center}
.performance-legend i{height:2px;width:16px;background:#a5bdd3;display:block}
.performance-legend>span+span i{background:none;border-top:1px dashed var(--muted)}
.performance-ranges{display:flex;gap:3px}
.performance-ranges>button{padding:7px 10px;border-radius:5px;font-size:11px;color:var(--muted)}
.performance-ranges>button[aria-pressed=true]{background:var(--paper);color:var(--ink)}
.performance-plot{position:relative;height:260px;min-width:0}
#portfolio-performance-canvas{position:absolute;inset:0}
#portfolio-performance-canvas>svg{display:block;overflow:hidden}
.portfolio-chart-grid{stroke:var(--line-soft);stroke-width:1;vector-effect:non-scaling-stroke}
.portfolio-chart-label{fill:var(--muted);font:10px -apple-system,BlinkMacSystemFont,sans-serif}
.portfolio-chart-value{stroke:#a5bdd3;stroke-width:2;fill:none;vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round}
.portfolio-chart-deposits{stroke:var(--muted);stroke-width:1;stroke-dasharray:4 4;fill:none;vector-effect:non-scaling-stroke}
.performance-message{position:absolute;inset:0;display:grid;place-items:center;color:var(--muted);font-size:12px;pointer-events:none}
.performance-message[hidden]{display:none}
.performance-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;color:var(--muted);font-size:10px;min-height:28px;padding-top:8px}
.performance-footer>[data-performance-hover]{font-variant-numeric:tabular-nums;color:var(--sub)}
/* A compact outlook card with action first, secondary information one click away. */
.predictions-page .prediction-layout.has-research{grid-template-columns:minmax(0,1fr) 304px;gap:28px}
.predictions-page #research-panel.outlook-panel{display:block;height:auto;max-height:calc(100dvh - 48px);overflow:auto;border:1px solid var(--line-soft);border-radius:12px;background:var(--paper);padding:22px;scrollbar-width:thin}
.predictions-page #research-panel.outlook-panel[hidden]{display:none}
.predictions-page #research-panel.outlook-panel .research-panel-header{padding:0;margin:0 0 20px;min-height:24px}
.predictions-page #research-panel.outlook-panel .research-panel-header>h2{font-size:13px;color:var(--ink)}
.outlook-tabs{display:flex;padding:3px;background:var(--bg);border-radius:7px;gap:3px;margin-bottom:24px}
.outlook-tabs>button{flex:1;padding:8px;font-size:11px;border-radius:5px;color:var(--muted)}
.outlook-tabs>button[aria-pressed=true]{background:var(--selected);color:var(--ink)}
[data-outlook-pane][hidden]{display:none!important}
.outlook-status>span{font-size:10px;color:var(--muted)}
.outlook-status>h3{font-size:25px;line-height:1.25;letter-spacing:-.7px;font-weight:450;margin:9px 0 8px}
.outlook-status>p{font-size:12px;color:var(--muted);margin:0;line-height:1.5}
.outlook-action{margin:24px 0}
.outlook-action>button{display:flex;justify-content:space-between;align-items:center;width:100%;min-height:39px;font-size:12px;padding:10px 12px;border-radius:6px}
.outlook-action .icon{width:15px;height:15px}
.outlook-capital{display:flex;align-items:center;gap:18px;padding:22px 0 6px;border-top:1px solid var(--line-soft)}
.outlook-ring{position:relative;display:grid;place-items:center;width:78px;height:78px;flex:none;border-radius:50%;background:conic-gradient(#9eb6cb var(--invested),var(--line) 0)}
.outlook-ring:before{content:'';position:absolute;inset:5px;background:var(--paper);border-radius:50%}
.outlook-ring>span{position:relative;font-size:17px;font-weight:450;letter-spacing:-.5px}
.outlook-capital>div+div{display:flex;flex-direction:column;gap:7px;min-width:0}
.outlook-capital>div>span:not(:only-child){font-size:11px;color:var(--muted)}
.outlook-capital strong{font-size:21px;font-weight:450;letter-spacing:-.5px}
.outlook-capital small{font-size:10px;color:var(--muted)}
.predictions-page #research-panel .outlook-trades .decision-trades{margin:18px 0 0}
.predictions-page #research-panel .outlook-trades .decision-trade{padding:11px 0;border:0}
.predictions-page #research-panel .outlook-trades .decision-trade>span:not(.decision-trade-value)>small{display:none}
.predictions-page #research-panel.outlook-panel .research-quick-actions{padding:20px 0 0;margin-top:22px;border-top:1px solid var(--line-soft)}
.predictions-page #research-panel.outlook-panel .decision-reports{margin:0 0 20px;border:0;padding:0}
.predictions-page #research-panel.outlook-panel .decision-reports>button{font-size:11px;padding:12px 0}
.predictions-page #research-panel.outlook-panel .decision-dock{margin:0;padding:0;background:transparent;border:0}
.predictions-page #research-panel.outlook-panel .manager-strategy{margin:0;padding:0;border:0}
.predictions-page #research-panel.outlook-panel .manager-strategy>header>span{display:none}
.outlook-progress{margin:20px 0}
@media(max-width:1000px){
 .predictions-page .prediction-layout.has-research{grid-template-columns:minmax(0,1fr)}
 .predictions-page #research-panel.outlook-panel{position:static;max-height:none;grid-row:1}
}
@media(max-width:760px){
 .portfolio-hero-header{display:block}
 .performance-toolbar{align-items:start;flex-wrap:wrap;gap:14px}
 .performance-legend{font-size:10px;gap:15px}
 .performance-ranges{margin-left:auto}
 .performance-plot{height:220px}
 .performance-footer{align-items:start;flex-direction:column;gap:5px}
 .simple-balance-total>.balance-value{font-size:44px}
}

/* Secondary context is available on demand; avoid stacked status bands. */
.portfolio-page>.simple-balance{border-bottom:0;padding-bottom:20px}
.performance-footer{min-height:18px;padding-top:0;justify-content:flex-end;position:relative}
.performance-info{margin-right:auto;position:relative;font-size:11px}
.performance-info>summary{cursor:pointer;list-style:none;color:var(--muted);font-size:15px;padding:4px;line-height:1}
.performance-info>summary::-webkit-details-marker{display:none}
.performance-info>div{position:absolute;z-index:8;left:0;bottom:28px;width:min(320px,75vw);padding:14px 16px;background:var(--paper);border:1px solid var(--line);border-radius:8px;color:var(--sub);line-height:1.6;box-shadow:0 8px 30px #0003}
.home-shortcuts{border:0;margin-bottom:24px}
.home-shortcuts>a+a{border:0}
.home-page .home-widget[data-home-widget=agents],.home-page .home-widget[data-home-widget=activity]{border-top:0}
.portfolio-page .portfolio-workspace .portfolio-book-tabs{border-bottom:0;padding-bottom:10px}
.predictions-page .prediction-portfolio{border-bottom:0}
.predictions-page #research-panel.outlook-panel .research-quick-actions{border:0;padding-top:12px;margin-top:18px}
.predictions-page #research-panel.outlook-panel .outlook-capital{border:0;padding-top:12px}

/* Compact application rail, with labels available on hover and keyboard focus. */
@media(min-width:761px){
 :root{--shell-rail:76px}
 .rail.icon-rail{width:76px;padding:18px 12px 16px;display:flex;flex-direction:column;align-items:center;background:var(--soft);border:0;overflow:visible;z-index:60}
 .icon-rail .rail-logo{display:grid;place-items:center;width:44px;height:44px;flex:none;margin:0 0 28px;font-size:26px;letter-spacing:-1px;font-weight:600;color:var(--ink);border-radius:13px;background:var(--selected)}
 .icon-rail nav{display:flex;flex-direction:column;align-items:center;width:100%;gap:9px;margin:0}
 .icon-rail nav>a,.icon-rail .rail-bottom>button{position:relative;display:grid;place-items:center;width:48px;height:48px;min-height:48px;flex:none;padding:0;border:0;border-radius:14px;color:var(--muted);background:transparent}
 .rail.icon-rail nav>a .icon,.rail.icon-rail nav>a.active .icon,.rail.icon-rail .rail-bottom>button>.icon{display:block;width:24px;height:24px;flex:none;margin:0;stroke-width:1.75;shape-rendering:geometricPrecision;transform:none;filter:none;transition:none}
 .rail.icon-rail nav>a.active,.rail.icon-rail .rail-bottom>button[aria-current=page]{background:color-mix(in srgb,var(--ink) 8%,var(--soft));color:var(--ink);box-shadow:none}
 .rail.icon-rail nav>a:not(.active):hover,.rail.icon-rail .rail-bottom>button:not([aria-current=page]):hover{background:var(--hover);color:var(--ink)}
 .icon-rail nav>a:focus-visible,.icon-rail .rail-bottom>button:focus-visible{outline:2px solid var(--sub);outline-offset:3px}
 .icon-rail .rail-tooltip{position:absolute;z-index:80;left:calc(100% + 14px);top:50%;transform:translateY(-50%);background:var(--elevated);color:var(--ink);font-size:12px;line-height:1.4;font-weight:400;padding:8px 12px;border:1px solid var(--line);border-radius:7px;box-shadow:0 4px 15px #0003;white-space:nowrap;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .12s}
 .icon-rail :is(a,button):is(:hover,:focus-visible)>.rail-tooltip{visibility:visible;opacity:1}
 .icon-rail .rail-bottom{display:flex;flex-direction:column;align-items:center;gap:9px;padding:16px 0 0;margin-top:auto;width:100%;border:0}
 .icon-rail .rail-bottom .profile{display:grid;place-items:center;width:32px;height:32px;border:1px solid var(--line);border-radius:50%;background:var(--bg);font-size:12px;font-weight:500}
 .app-shell{margin-left:76px}
 .topbar{height:54px;border-bottom:0;padding:0 34px}
 .desktop-account-switch{display:block}
 .desktop-account-switch .account-switcher{border:0;background:transparent;color:var(--sub);font-size:12px;padding:8px 0;min-height:30px;gap:10px}
 .desktop-account-switch .account-switcher>.icon{width:13px;height:13px;color:var(--muted)}
 .page:not(.conversation-page){padding-top:24px}
}
@media(min-width:761px) and (max-height:720px){
 .rail.icon-rail{padding-top:12px;padding-bottom:10px}
 .icon-rail .rail-logo{margin-bottom:14px;width:38px;height:38px;font-size:23px}
 .icon-rail nav{gap:5px}
 .icon-rail nav>a,.icon-rail .rail-bottom>button{width:42px;height:42px;min-height:42px;border-radius:12px}
 .icon-rail .rail-bottom{gap:5px;padding-top:10px}
}
@media(max-width:760px){.desktop-account-switch{display:none}}

/* Keep navigation centred independently of legacy labelled-sidebar rules. */
@media(min-width:761px){
 .rail.icon-rail nav>a,.rail.icon-rail .rail-bottom>button{display:flex;align-items:center;justify-content:center;gap:0;margin:0}
 .rail.icon-rail .rail-tooltip{display:block}
}
/* The instrument is a stationary workspace; only the chart view pans. */
body:has(.market-terminal-page){height:100dvh;overflow:hidden;overscroll-behavior:none}
.app-shell:has(.market-terminal-page){height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.app-shell:has(.market-terminal-page)>.topbar{flex:none}
.app-shell:has(.market-terminal-page)>main{flex:1;min-height:0;display:flex;overflow:hidden}
.page.market-terminal-page{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;height:100%;max-width:none;padding:0!important;overflow:hidden}
.market-terminal-page .market-instrument{flex:none;min-height:0;padding:14px 24px;gap:16px}
.market-terminal-page .chart-terminal{display:flex;flex-direction:column;flex:1;min-height:0;height:auto;margin:0;border-radius:0}
.market-terminal-page .terminal-workarea{flex:1;min-height:0;height:auto;overflow:hidden}
.market-terminal-page .terminal-canvas{height:100%;min-height:0;flex:1}
.market-terminal-page :is(.terminal-toolbar,.terminal-legend,.terminal-footer,.drawing-inspector){flex:none}
.market-terminal-page .terminal-drawbar{min-height:0;overflow-y:auto;scrollbar-width:none}
.market-terminal-page .instrument-context{flex:none;padding:8px 24px;margin:0;font-size:11px}
@media(max-width:760px){
 .app-shell:has(.market-terminal-page){height:calc(100dvh - 74px)}
 .market-terminal-page .market-instrument{padding:10px 14px;gap:8px}
 .market-terminal-page .market-instrument h1{font-size:17px}
 .market-terminal-page .market-instrument-actions{gap:4px}
 .market-terminal-page .market-instrument-actions button{padding:6px 8px;min-height:28px;font-size:10px}
 .market-terminal-page .terminal-legend{min-height:0;padding:5px 10px}
}
/* Compact progress, with one stage list and one cancellation control. */
.run-status{padding:0;background:transparent;border:0;border-radius:0}
.run-status .run-status-top{display:flex;align-items:center;gap:9px;min-width:0}
.run-status .run-status-top strong{font-size:12px;font-weight:500;line-height:1.5;flex:1}
.run-status .run-status-top time{font-size:11px;white-space:nowrap;color:var(--muted);margin-left:auto}
.run-status .run-detail{font-size:11px;margin:8px 0;color:var(--muted)}
.run-status .ai-stages{display:grid;grid-template-columns:1fr;gap:0;list-style:none;padding:0;margin:16px 0 0}
.run-status .ai-stages li{display:flex;align-items:center;gap:10px;min-height:30px;padding:0;font-size:11px;color:var(--muted);position:relative}
.run-status .ai-stages li:before,.run-status .ai-stages li:after{display:none}
.run-status .ai-stages li>span{display:block;position:static;width:6px;height:6px;flex:none;margin:0;border:0;border-radius:50%;background:var(--line)}
.run-status .ai-stages li.current{color:var(--ink)}
.run-status .ai-stages li.current>span{background:var(--green);box-shadow:0 0 0 4px color-mix(in srgb,var(--green) 12%,transparent)}
.run-status .ai-stages li.done>span{background:var(--sub)}
.run-status .run-cancel{font-size:11px;margin-top:12px;padding:4px 0;color:var(--muted)}
.outlook-panel .outlook-status>h3{font-size:22px}
.full-analysis-modal .analysis-live-header{padding:18px 20px;background:var(--soft);border:0;border-radius:10px;margin:0 0 24px}
.full-analysis-modal .analysis-live-header .ai-stages{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:12px}
.full-analysis-modal .analysis-live-header .run-cancel{display:none}
.full-analysis-modal .analysis-report-tabs{display:flex;gap:18px;border-bottom:1px solid var(--line-soft);padding:0 0 10px;margin-bottom:20px}
.full-analysis-modal .analysis-report-tabs>button{padding:6px 0;background:transparent;border-radius:0;font-size:12px;color:var(--muted)}
.full-analysis-modal .analysis-report-tabs>button[aria-pressed=true]{color:var(--ink);box-shadow:0 2px var(--ink)}
.full-analysis-modal .analysis-report-body{font-size:13px;line-height:1.8;max-width:72ch;margin:0 auto}
.full-analysis-modal .report-empty{padding:36px 0;color:var(--muted);font-size:13px;text-align:center}
@media(max-width:600px){.full-analysis-modal .analysis-live-header .ai-stages{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Final surface refinements, deliberately scoped away from Investigations. */
@media(min-width:761px){
 .rail.icon-rail nav>a,.rail.icon-rail .rail-bottom>button{box-shadow:none;transform:none;-webkit-tap-highlight-color:transparent;user-select:none;transition:background-color .12s ease}
 .rail.icon-rail :is(a,button):focus:not(:focus-visible){outline:none}
 .rail.icon-rail nav>a.active:hover{background:color-mix(in srgb,var(--ink) 8%,var(--soft))}
 .rail.icon-rail .rail-tooltip{transition:opacity .12s ease;transition-delay:.2s}
}
:is(.home-page,.portfolio-page,.predictions-page,.stocks-page,.record-page,.preferences-page)>.page-heading{gap:20px;margin-bottom:26px}
:is(.portfolio-page,.predictions-page,.stocks-page,.record-page,.preferences-page)>.page-heading h1{font-size:28px;line-height:1.2;letter-spacing:-.8px;font-weight:500}
:is(.home-page,.portfolio-page,.predictions-page,.stocks-page,.record-page,.preferences-page,.market-terminal-page,.conversation-page) :is(.primary,.secondary){min-height:36px;border-radius:8px;box-shadow:none;font-size:12px;padding:9px 13px;gap:8px}
:is(.home-page,.portfolio-page,.predictions-page,.stocks-page,.record-page,.preferences-page,.market-terminal-page,.conversation-page) :is(.primary,.secondary):active:not(:disabled){transform:none}
:is(.home-page,.portfolio-page,.predictions-page,.stocks-page,.record-page,.preferences-page) :is(.heading-actions,.page-actions){gap:8px}
:is(.home-page,.portfolio-page,.predictions-page,.stocks-page) :is(.balance-value,.stock-price,.prediction-total,.home-price,.simple-balance-stats strong){font-variant-numeric:tabular-nums}
.home-page .home-grid{gap:20px}
.home-page .home-widget:not([data-home-widget=agents]):not([data-home-widget=activity]){border-color:var(--line-soft);border-radius:12px;padding:24px}
.home-page .home-widget>header{margin-bottom:20px}
.home-page .home-widget[data-home-widget=portfolio] .home-balance{min-height:132px}
.home-page .home-widget[data-home-widget=research]{background:var(--paper)}
.home-page .home-research{min-height:140px}
.home-page .home-research>strong{font-size:25px;line-height:1.3}
.home-page .home-shortcuts{margin-bottom:20px}
.home-page .home-shortcuts>a{padding-block:14px}
.portfolio-page>.simple-balance{padding-top:12px}
.portfolio-page .simple-balance-stats>div>strong{font-size:26px}
.portfolio-page .portfolio-workspace .holding-row{min-height:72px;padding:16px 10px;border-color:var(--line-soft);border-radius:6px}
.portfolio-page .portfolio-workspace .holdings-head{padding:14px 10px;font-size:10px;color:var(--muted);border-color:var(--line-soft)}
.portfolio-page .portfolio-book-tabs>button{border-radius:7px;padding:8px 12px;min-height:34px}
.predictions-page .analysis-table th{font-size:10px;font-weight:500;color:var(--muted)}
.predictions-page .analysis-table td{padding-block:15px;border-color:var(--line-soft)}
.predictions-page #research-panel.outlook-panel{border-color:var(--line-soft);padding:20px;border-radius:12px}
.predictions-page .outlook-tabs{margin-bottom:20px}
.predictions-page .outlook-action{margin:20px 0}
.predictions-page .outlook-status>h3{letter-spacing:-.5px;line-height:1.3}
.stocks-page .company-controls{gap:10px;margin-bottom:18px}
.stocks-page .company-controls .search-box{min-height:38px;border-radius:8px}
.stocks-page .company-controls>.secondary{min-height:38px}
.stocks-page .sector-tabs{gap:4px;margin-bottom:20px}
.stocks-page .sector-tabs>button{border-radius:7px;padding:7px 10px}
.stocks-page .stocks-table-head{font-size:10px;font-weight:500;color:var(--muted);border-color:var(--line-soft)}
.stocks-page .stock-row{border-color:var(--line-soft);border-radius:6px}
.record-page .activity-toolbar{gap:12px;margin-bottom:24px}
.record-page .activity-filters{gap:4px}
.record-page .activity-filters>button{border-radius:7px;padding:8px 11px}
.record-page .activity-entry{border-color:var(--line-soft)}
.record-page .activity-entry>summary{border-radius:8px;padding-block:16px}
.record-page .activity-day>h2{font-size:11px;font-weight:500;color:var(--muted);margin-bottom:12px}
.preferences-page .preferences-list{max-width:760px}
.preferences-page .preference-list-group{margin-bottom:32px}
.preferences-page .preference-section-title{font-size:11px;font-weight:500;color:var(--muted);margin-bottom:12px}
.preferences-page .preference-item{border-color:var(--line-soft);border-radius:8px}
.conversation-page .conversation-sidebar{padding:20px 12px}
.conversation-page .chat-titlebar{border-bottom-color:var(--line-soft)}
.conversation-page .live-chat-form{border:1px solid var(--line);border-radius:12px!important;background:var(--paper)}
.conversation-page .live-chat-form:focus-within{border-color:var(--muted);box-shadow:none}
.conversation-page .live-message{line-height:1.75}
.conversation-page .chat-start-actions>*{padding:9px 12px;border-radius:8px}
.market-terminal-page .terminal-toolbar{gap:10px}
.market-terminal-page .terminal-toolbar button,.market-terminal-page .terminal-drawbar button{border-radius:6px}
.market-terminal-page .terminal-legend{color:var(--sub)}
@media(max-width:760px){
 :is(.portfolio-page,.predictions-page,.stocks-page,.record-page,.preferences-page)>.page-heading h1{font-size:24px}
 .home-page .home-widget:not([data-home-widget=agents]):not([data-home-widget=activity]){padding:20px}
 .portfolio-page .portfolio-workspace .holding-row{padding-inline:0}
 .market-terminal-page .market-instrument-actions :is(.primary,.secondary){min-height:28px;padding:6px 8px;font-size:10px}
}
@media(prefers-reduced-motion:reduce){.rail.icon-rail nav>a,.rail.icon-rail .rail-bottom>button,.rail.icon-rail .rail-tooltip{transition:none}}

/* Desktop workspaces fill the window; content panes own their scrolling. */
@media(min-width:761px){
 body:has(:is(.home-page,.portfolio-page,.predictions-page,.stocks-page,.record-page,.preferences-page,.conversation-page)){height:100dvh;overflow:hidden;overscroll-behavior:none}
 .app-shell:has(:is(.home-page,.portfolio-page,.predictions-page,.stocks-page,.record-page,.preferences-page,.conversation-page)){height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}
 .app-shell:has(:is(.home-page,.portfolio-page,.predictions-page,.stocks-page,.record-page,.preferences-page,.conversation-page))>.topbar{flex:0 0 54px}
 .app-shell:has(:is(.home-page,.portfolio-page,.predictions-page,.stocks-page,.record-page,.preferences-page,.conversation-page))>main{flex:1;display:flex;min-width:0;min-height:0;overflow:hidden}
 .page:is(.home-page,.portfolio-page,.predictions-page,.stocks-page,.record-page,.preferences-page){display:flex;flex-direction:column;flex:1;min-height:0;height:100%;width:100%;padding:18px 28px 20px!important;overflow:hidden}
 .page:is(.home-page,.portfolio-page,.predictions-page,.stocks-page,.record-page,.preferences-page)>:is(.page-heading,.prediction-toolbar,[data-account-status]){flex:none}
 .page:is(.home-page,.portfolio-page,.stocks-page,.record-page,.preferences-page)>.page-heading{margin-bottom:18px}
 :is(.home-grid,[data-home-body],.analysis-table-scroll,#research-panel,[data-portfolio-content],.stocks-table,#history-feed,.preferences-list){overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
 /* Standard Home: all five panels remain on screen; lists scroll within cards. */
 .home-page .home-heading>span{font-size:11px;margin-bottom:6px}
 .home-page .home-heading h1{font-size:30px}
 .home-page .home-shortcuts{flex:none;margin:0 0 14px}
 .home-page .home-shortcuts>a{padding-block:8px}
 .home-page .home-grid{flex:1;min-height:0;overflow:auto;align-content:start;grid-auto-rows:280px;gap:16px;padding:1px}
 .home-page .home-grid.is-default{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:minmax(0,.85fr) minmax(0,1fr);align-content:stretch;overflow:hidden}
 .home-page .home-grid.is-default .home-widget.wide{grid-column:span 2}
 .home-page .home-grid .home-widget{display:flex;flex-direction:column;min-height:0;margin:0;padding:18px!important;border:1px solid var(--line-soft);border-radius:10px;background:var(--paper);overflow:hidden}
 .home-page .home-widget>header{flex:none;min-height:24px;margin-bottom:12px}
 .home-page .home-widget>[data-home-body]{flex:1;min-height:0;overflow:auto}
 .home-page .home-widget[data-home-widget=portfolio] .home-balance{min-height:0;height:100%;gap:24px;align-items:center}
 .home-page .home-balance>div:first-child>strong{font-size:38px;margin:8px 0 10px}
 .home-page .home-widget.wide .home-funds{min-width:160px;width:40%}
 .home-page .home-funds strong{font-size:20px}
 .home-page .home-research{min-height:0;height:100%;gap:8px}
 .home-page .home-research>strong{font-size:21px}
 .home-page .home-manager-actions{padding-top:10px}
 .home-page .home-rows>a{min-height:52px;padding:10px 0}
 .home-page .home-rows small{font-size:10px;margin-top:3px}
 .home-page .home-card-link{margin-top:10px}
 .home-page .home-chart-widget [data-home-body]{display:flex;flex-direction:column}
 .home-page .home-chart-stage{flex:1;min-height:120px;height:auto!important}
 /* Portfolio keeps the chart visible above the independently scrolling book. */
 .portfolio-page>.simple-balance{display:flex;flex-direction:column;align-items:stretch;flex:0 1 48%;min-height:224px;gap:10px;padding:0 0 14px}
 .portfolio-page .portfolio-hero-header{flex:none;gap:24px}
 .portfolio-page .simple-balance-total>.balance-value{font-size:40px;margin:5px 0;letter-spacing:-1.4px}
 .portfolio-page .simple-balance-stats>div>strong{font-size:23px;margin-top:3px}
 .portfolio-page .simple-balance-stats>div{min-width:100px}
 .portfolio-page .simple-balance-stats{gap:28px}
 .portfolio-page .portfolio-performance{display:flex;flex-direction:column;flex:1;min-height:0;margin:0}
 .portfolio-page .performance-toolbar{flex:none;margin-bottom:4px}
 .portfolio-page .performance-plot{flex:1;min-height:80px;height:auto}
 .portfolio-page .performance-footer{flex:none}
 .portfolio-page :is(.portfolio-workspace,.portfolio-workspace-main,.portfolio-book){display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
 .portfolio-page .portfolio-workspace .portfolio-book-tabs{flex:none;padding:6px 0 10px}
 .portfolio-page [data-portfolio-content]:not([hidden]){flex:1;min-height:0;overflow:auto;padding-right:4px}
 .portfolio-page .holdings-head{position:sticky;top:0;z-index:2;background:var(--bg)}
 .portfolio-page .portfolio-workspace .holding-row{min-height:60px;padding-block:12px}
 /* Prediction controls and outlook stay in place beside the company list. */
 .predictions-page .prediction-toolbar{margin:0 0 18px}
 .predictions-page #prediction-board{flex:1;min-height:0;overflow:hidden;align-items:stretch;grid-template-rows:minmax(0,1fr);margin:0}
 .predictions-page .prediction-main{display:flex;flex-direction:column;min-height:0;overflow:hidden;grid-column:1;grid-row:1}
 .predictions-page .portfolio-overview{flex:none;display:grid;grid-template-columns:minmax(0,1fr) auto;padding:0 0 16px;margin:0 0 12px;gap:10px}
 .predictions-page .portfolio-headline{gap:4px}
 .predictions-page .portfolio-metrics{width:auto;gap:28px;align-items:center}
 .predictions-page .portfolio-metrics>a,.predictions-page .portfolio-metrics>button{width:auto;min-width:80px;gap:6px;padding:0}
 .predictions-page .overview-value{font-size:38px;line-height:1.15;margin:6px 0}
 .predictions-page .portfolio-metrics strong{font-size:23px}
 .predictions-page .portfolio-overview .allocation-meter{grid-column:1/-1;margin:8px 0 0}
 .predictions-page .analysis-results{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;padding:0;margin:0}
 .predictions-page :is(.analysis-results-head,.analysis-table-toolbar){flex:none}
 .predictions-page .analysis-results-head{padding:10px 0;margin:0 0 8px;border:0}
 .predictions-page .analysis-table-toolbar{padding:0;margin:0 0 10px}
 .predictions-page .analysis-table-scroll{flex:1;min-height:0;overflow:auto;margin:0;padding:0}
 .predictions-page .analysis-table thead{position:sticky;top:0;z-index:2;background:var(--bg)}
 .predictions-page #research-panel.outlook-panel{position:static;min-height:0;max-height:none;height:100%;overflow:auto;grid-column:2;grid-row:1}
 /* Lists use the remaining height, without moving their page controls. */
 .stocks-page>.company-controls,.stocks-page>.sector-tabs{flex:none}
 .stocks-page .sector-tabs{flex-wrap:wrap;margin-bottom:12px}
 .stocks-page>.stocks-table{flex:1;min-height:0;overflow:auto}
 .stocks-page .stocks-table-head{position:sticky;top:0;z-index:2;background:var(--bg)}
 .record-page>.activity-workspace{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
 .record-page .activity-toolbar{flex:none;margin-bottom:16px}
 .record-page #history-feed{flex:1;min-height:0;overflow:auto;padding-right:6px}
 .preferences-page>.preferences-list{flex:1;min-height:0;overflow:auto;width:100%;padding-right:10px}
 .preferences-page .preference-list-group{margin-bottom:22px}
 .preferences-page .preference-item{padding-block:12px}
 .conversation-page{flex:1;min-height:0!important}
}
@media(min-width:761px) and (max-width:1100px){
 .home-page .home-grid.is-default{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr))}
 .home-page .home-grid.is-default .home-widget{padding:12px 14px!important}
 .home-page .home-grid.is-default .home-widget>header{margin-bottom:8px}
 .home-page .home-research>strong{font-size:18px}
 .home-page .home-balance>div:first-child>strong{font-size:30px}
 .home-page .home-funds strong{font-size:17px}
 .predictions-page .prediction-layout.has-research{grid-template-columns:minmax(0,1fr) 260px;gap:16px}
 .predictions-page .portfolio-overview{flex-wrap:wrap;gap:12px}
 .predictions-page .portfolio-metrics{gap:20px}
 .predictions-page .portfolio-metrics strong{font-size:19px}
 .predictions-page .analysis-table-toolbar{flex-wrap:wrap;gap:8px}
 .predictions-page .analysis-search{min-width:0;width:140px}
}
@media(min-width:761px) and (max-height:700px){
 .page:is(.home-page,.portfolio-page,.predictions-page,.stocks-page,.record-page,.preferences-page){padding:12px 24px!important}
 .home-page .home-shortcuts{display:none}
 .home-page .home-heading>span{display:none}
 .home-page .home-grid{gap:12px}
 .home-page .home-widget>header{margin-bottom:8px}
 .portfolio-page>.simple-balance{min-height:200px}
 .portfolio-page .simple-balance-total>.balance-value{font-size:34px}
 .predictions-page .portfolio-overview{padding-bottom:12px;margin-bottom:12px}
 .predictions-page .overview-value{font-size:32px}
}

/* Narrow windows and high zoom retain a fixed shell with reachable content. */
@media(max-width:760px){
 body:has(:is(.home-page,.portfolio-page,.predictions-page,.stocks-page,.record-page,.preferences-page)){height:100dvh;overflow:hidden;overscroll-behavior:none}
 .app-shell:has(:is(.home-page,.portfolio-page,.predictions-page,.stocks-page,.record-page,.preferences-page)){height:calc(100dvh - 74px - env(safe-area-inset-bottom));min-height:0;display:flex;flex-direction:column;overflow:hidden}
 .app-shell:has(:is(.home-page,.portfolio-page,.predictions-page,.stocks-page,.record-page,.preferences-page))>.topbar{flex:none}
 .app-shell:has(:is(.home-page,.portfolio-page,.predictions-page,.stocks-page,.record-page,.preferences-page))>main{flex:1;min-height:0;display:flex;overflow:hidden}
 .page:is(.home-page,.portfolio-page,.predictions-page,.stocks-page,.record-page,.preferences-page){display:flex;flex-direction:column;flex:1;min-height:0;height:100%;width:100%;padding:14px 16px!important;overflow:hidden}
 .page:is(.home-page,.portfolio-page,.predictions-page,.stocks-page,.record-page,.preferences-page)>:is(.page-heading,.prediction-toolbar,[data-account-status]){flex:none;margin-bottom:14px}
 .home-page .home-shortcuts{display:none}
 .home-page .home-heading>span{display:none}
 .home-page .home-heading h1{font-size:25px}
 .home-page .home-grid{display:grid;flex:1;min-height:0;overflow:auto;grid-template-columns:1fr;grid-auto-rows:auto;align-content:start;gap:14px}
 .home-page .home-widget.wide{grid-column:1}
 .portfolio-page>.simple-balance{flex:0 1 45%;min-height:90px;overflow:auto;padding:0 4px 12px 0;display:block}
 .portfolio-page .simple-balance-total>.balance-value{font-size:34px}
 .portfolio-page .performance-plot{height:140px}
 .portfolio-page :is(.portfolio-workspace,.portfolio-workspace-main,.portfolio-book){display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
 .portfolio-page .portfolio-book-tabs{flex:none}
 .portfolio-page [data-portfolio-content]:not([hidden]){flex:1;min-height:0;overflow:auto}
 .predictions-page #prediction-board{flex:1;min-height:0;display:block;overflow:auto}
 .predictions-page #research-panel.outlook-panel{position:static;max-height:none;height:auto;margin-top:20px}
 .stocks-page>:is(.company-controls,.sector-tabs){flex:none}
 .stocks-page>.stocks-table{flex:1;min-height:0;overflow:auto}
 .record-page>.activity-workspace{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
 .record-page .activity-toolbar{flex:none;margin-bottom:12px}
 .record-page #history-feed,.preferences-page>.preferences-list{flex:1;min-height:0;overflow:auto}
 .stocks-page .stocks-table-head,.portfolio-page .holdings-head{position:sticky;top:0;z-index:2;background:var(--bg)}
 :is(.home-grid,.simple-balance,[data-portfolio-content],#prediction-board,.stocks-table,#history-feed,.preferences-list){overscroll-behavior:contain;scrollbar-width:thin}
}

/* Portfolio: one primary canvas, with companies in a dedicated side pane. */
.page.portfolio-desk-page{display:flex;flex-direction:column;min-height:0;overflow:hidden}
.portfolio-desk-page .portfolio-desk{position:relative;display:grid;grid-template-columns:minmax(0,1fr);gap:28px;flex:1;min-height:0;overflow:hidden}
.portfolio-desk-page .portfolio-desk.with-companies{grid-template-columns:minmax(0,1fr) 294px}
.portfolio-desk-page .portfolio-main{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}
.portfolio-desk-page .portfolio-main>.simple-balance{display:block;flex:none;min-height:0;max-height:none;margin:0;padding:8px 0 24px;border:0;overflow:visible}
.portfolio-desk-page .portfolio-hero-header{display:flex;align-items:center;justify-content:space-between;gap:24px}
.portfolio-desk-page .simple-balance-total>.balance-value{font-size:44px;margin:8px 0;line-height:1.15;letter-spacing:-1.6px}
.portfolio-desk-page .simple-balance-stats{gap:28px;padding:0}
.portfolio-desk-page .simple-balance-stats>div{min-width:100px}
.portfolio-desk-page .simple-balance-stats>div>strong{font-size:22px;margin-top:5px}
.portfolio-desk-page .portfolio-view-tabs{display:flex;align-items:center;gap:22px;flex:none;border-bottom:1px solid var(--line-soft);margin-bottom:20px;padding:0}
.portfolio-desk-page .portfolio-view-tabs>button{position:relative;padding:11px 0 13px;color:var(--muted);font-size:12px;line-height:1.3;white-space:nowrap;border-radius:0;background:transparent}
.portfolio-desk-page .portfolio-view-tabs>button[aria-pressed=true]{color:var(--ink)}
.portfolio-desk-page .portfolio-view-tabs>button[aria-pressed=true]:after{content:'';position:absolute;left:0;right:0;bottom:-1px;height:2px;background:var(--ink);border-radius:2px}
.portfolio-desk-page .portfolio-view-pane{flex:1;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
.portfolio-desk-page .portfolio-view-pane[hidden]{display:none}
.portfolio-desk-page [data-portfolio-view-pane=overview]:not([hidden]){display:flex;flex-direction:column;overflow:hidden}
.portfolio-desk-page .portfolio-performance{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;margin:0}
.portfolio-desk-page .performance-toolbar{flex:none;gap:14px;flex-wrap:wrap;margin:0 0 16px}
.portfolio-desk-page .performance-ranges{margin-left:auto}
.portfolio-desk-page .performance-plot{flex:1;height:auto;min-height:70px}
.portfolio-desk-page .performance-footer{flex:none;min-height:24px;margin-top:8px}
.portfolio-desk-page .performance-info>div{width:min(320px,65vw)}
.portfolio-desk-page .portfolio-ledger{padding:0}
.portfolio-desk-page .portfolio-transaction{grid-template-columns:32px minmax(0,1fr) auto auto;gap:14px;padding:18px 2px}
.portfolio-desk-page .transaction-main{min-width:0}
.portfolio-desk-page .transaction-main>small{overflow-wrap:anywhere}
.portfolio-desk-page .allocation-card{border:0;padding:6px 0;background:transparent;max-width:640px}
.portfolio-desk-page .allocation-card .allocation-row{padding:16px 0}
.portfolio-desk-page .portfolio-companies{display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden;padding:18px 16px 6px;background:var(--paper);border:1px solid var(--line-soft);border-radius:12px}
.portfolio-desk-page .portfolio-companies[hidden]{display:none}
.portfolio-companies>header{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none;margin-bottom:18px}
.portfolio-companies>header>h2{font-size:13px;font-weight:500;display:flex;align-items:center;gap:8px;margin:0}
.portfolio-companies [data-portfolio-company-count]{font-size:11px;font-weight:400;color:var(--muted)}
.portfolio-companies>header .icon-button{width:28px;height:28px;color:var(--muted)}
.portfolio-companies>header .icon{width:16px;height:16px}
.portfolio-company-search{display:flex;align-items:center;gap:8px;flex:none;border:1px solid var(--line-soft);background:var(--bg);border-radius:7px;min-height:34px;padding:0 10px;margin-bottom:18px}
.portfolio-company-search>.icon{width:14px;height:14px;color:var(--muted);flex:none}
.portfolio-company-search input{width:100%;min-width:0;padding:8px 0;margin:0;background:transparent;border:0;font-size:11px;outline:none;color:var(--ink);box-shadow:none}
.portfolio-company-search:focus-within{border-color:var(--muted)}
.portfolio-companies-labels{display:flex;justify-content:space-between;flex:none;color:var(--muted);font-size:9px;padding:0 2px 8px}
.portfolio-companies-list{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.portfolio-company-row{display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:10px;min-height:70px;width:100%;padding:12px 2px;border-bottom:1px solid var(--line-soft);border-radius:0;text-align:left;background:transparent}
.portfolio-company-row:last-child{border-bottom:0}
.portfolio-company-row:hover{background:var(--hover)}
.portfolio-company-row:focus-visible{outline-offset:-2px}
.portfolio-company-row>.company-logo{width:30px;height:30px;border-radius:8px;flex:none}
.portfolio-company-name{min-width:0;display:flex;flex-direction:column;gap:5px}
.portfolio-company-name>strong{font-size:12px;font-weight:500}
.portfolio-company-name>small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;color:var(--muted)}
.portfolio-company-value{display:flex;flex-direction:column;align-items:flex-end;gap:5px;white-space:nowrap;font-variant-numeric:tabular-nums}
.portfolio-company-value>strong{font-size:12px;font-weight:450}
.portfolio-company-value>small{font-size:10px;color:var(--muted)}
.portfolio-company-value>small.positive{color:var(--green)}
.portfolio-company-value>small.negative{color:var(--red)}
.portfolio-companies-empty{display:flex;flex-direction:column;align-items:center;gap:16px;padding:36px 10px;text-align:center;color:var(--muted)}
.portfolio-companies-empty>strong{font-size:12px;font-weight:400}
.portfolio-companies-empty>span{font-size:11px}
.portfolio-desk-page .portfolio-companies-toggle[aria-expanded=true]{background:var(--selected);color:var(--ink)}
@media(min-width:1001px) and (max-width:1250px){
 .portfolio-desk-page .portfolio-desk.with-companies{grid-template-columns:minmax(0,1fr) 270px;gap:22px}
 .portfolio-desk-page .simple-balance-stats{gap:18px}
 .portfolio-desk-page .simple-balance-stats>div{min-width:85px}
 .portfolio-desk-page .simple-balance-stats>div>strong{font-size:20px}
 .portfolio-desk-page .simple-balance-total>.balance-value{font-size:38px}
}
@media(max-width:1000px){
 .portfolio-desk-page .portfolio-desk.with-companies{grid-template-columns:minmax(0,1fr)}
 .portfolio-desk-page .portfolio-companies{position:absolute;inset:0 0 0 auto;z-index:12;width:min(310px,90%);box-shadow:-14px 0 36px #0004}
 .portfolio-desk-page .portfolio-main>.simple-balance{padding-bottom:18px}
}
@media(max-width:760px){
 .portfolio-desk-page>.page-heading{display:flex;flex-direction:column;align-items:stretch;gap:12px}
 .portfolio-desk-page .heading-actions{display:flex;flex-wrap:wrap;justify-content:flex-start}
 .portfolio-desk-page .heading-actions>.primary{flex:1}
 .portfolio-desk-page .heading-actions>.portfolio-companies-toggle{flex:none}
 .portfolio-desk-page .portfolio-hero-header{flex-wrap:wrap;gap:14px}
 .portfolio-desk-page .simple-balance-total>.balance-value{font-size:32px}
 .portfolio-desk-page .simple-balance-stats{gap:20px}
 .portfolio-desk-page .simple-balance-stats>div>strong{font-size:19px}
 .portfolio-desk-page .simple-balance-stats>div>span{font-size:11px;min-height:24px}
 .portfolio-desk-page .portfolio-main>.simple-balance{padding:0 0 12px}
 .portfolio-desk-page .portfolio-view-tabs{margin-bottom:12px}
 .portfolio-desk-page .performance-toolbar{margin-bottom:6px;gap:8px}
 .portfolio-desk-page .performance-legend{gap:10px}
 .portfolio-desk-page .portfolio-transaction{grid-template-columns:24px minmax(0,1fr) auto;gap:10px}
 .portfolio-desk-page .portfolio-transaction>time{display:none}
}
@media(min-width:1001px) and (max-width:1100px){
 .home-page .home-grid.is-default{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:minmax(0,.85fr) minmax(0,1fr)}
 .home-page .home-grid.is-default .home-widget{padding:16px!important}
}

@media(max-height:480px){
 .portfolio-desk-page .portfolio-main{overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
 .portfolio-desk-page .portfolio-view-pane:not([hidden]){flex:none;min-height:210px;overflow:visible}
 .portfolio-desk-page [data-portfolio-view-pane=overview]:not([hidden]){height:240px;overflow:hidden}
}
.portfolio-desk-page .simple-balance-stats>div>span{white-space:nowrap}

/* A small stage indicator, shared by the outlook and live analysis. */
.run-status.run-progress{display:flex;flex-direction:column;gap:0;min-height:0;padding:0;background:transparent;border:0}
.run-status.run-progress>[data-run-content]{width:100%;min-width:0}
.run-status.run-progress .run-status-top{display:flex;align-items:center;gap:8px}
.run-status.run-progress .run-status-top strong{font-size:12px;line-height:1.5;font-weight:450}
.run-status.run-progress .run-status-top time{font-size:10px;margin-left:auto;font-variant-numeric:tabular-nums}
.run-status.run-progress .activity-dot{width:5px;height:5px;box-shadow:none;flex:none}
.run-stage-track{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));list-style:none;gap:7px;padding:0;margin:16px 0 0;width:100%}
.run-stage-track>li{display:flex;flex-direction:column;align-items:flex-start;gap:7px;min-width:0;padding:0;margin:0;font-size:9px;line-height:1.3;color:var(--muted);white-space:nowrap}
.run-stage-track>li>span{height:3px;width:100%;border-radius:2px;background:var(--line);box-shadow:none}
.run-stage-track>li.done>span{background:var(--sub)}
.run-stage-track>li.current{color:var(--ink)}
.run-stage-track>li.current>span{background:var(--green)}
.run-status.run-progress>.run-cancel{align-self:flex-end;min-height:24px;margin:10px 0 0;padding:4px 0;font-size:10px;color:var(--muted)}
.predictions-page .outlook-progress{margin:18px 0 0}
.predictions-page .outlook-panel:has(.outlook-progress) .outlook-status>h3{font-size:22px;margin-top:8px}
.predictions-page .outlook-panel:has(.outlook-progress) .outlook-capital{gap:12px;margin-top:16px;padding-top:8px}
.predictions-page .outlook-panel:has(.outlook-progress) .outlook-ring{width:52px;height:52px;font-size:12px}
.predictions-page .outlook-panel:has(.outlook-progress) .outlook-capital strong{font-size:22px}
.full-analysis-modal .analysis-live-header .run-stage-track{max-width:480px}

/* Predictions: two fitted panes with independent scrolling. */
.predictions-page #prediction-board{position:relative;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);flex:1;min-height:0;overflow:hidden;gap:24px}
.predictions-page #prediction-board.has-research{grid-template-columns:minmax(0,1fr) 280px}
.predictions-page .prediction-main{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;container-type:inline-size}
.predictions-page .portfolio-overview{display:flex;align-items:center;justify-content:space-between;gap:24px;flex:none;padding:6px 0 22px;margin:0 0 10px;border:0}
.predictions-page .portfolio-headline{display:grid;grid-template-columns:auto auto;align-items:baseline;gap:7px 16px}
.predictions-page .overview-label{grid-column:1/-1;font-size:11px}
.predictions-page .overview-value{font-size:32px;line-height:1.2;letter-spacing:-1px;margin:0}
.predictions-page .overview-return{font-size:10px;margin:0;max-width:150px;line-height:1.6}
.predictions-page .portfolio-metrics{width:auto;gap:28px;align-items:center}
.predictions-page .portfolio-metrics>a,.predictions-page .portfolio-metrics>button{min-width:75px;padding:0;gap:7px}
.predictions-page .portfolio-metrics strong{font-size:19px;letter-spacing:-.3px}
.predictions-page .portfolio-overview .allocation-meter{display:none}
.predictions-page .analysis-results{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;border:1px solid var(--line-soft);border-radius:11px;padding:0 16px 8px;background:var(--paper)}
.predictions-page .analysis-results-head{margin:0 0 6px;padding:16px 0 8px;flex:none;border:0}
.predictions-page .analysis-results-head h2{font-size:14px}
.predictions-page .analysis-table-toolbar{margin-bottom:8px;flex:none;flex-wrap:nowrap;border:0}
.predictions-page .analysis-search{width:158px;min-width:0;flex:0 1 158px}
.predictions-page .analysis-table-scroll{flex:1;min-height:0;max-height:none;overflow:auto;scrollbar-gutter:stable;margin:0;padding:0 0 12px;scroll-padding-top:40px}
.predictions-page .analysis-table{table-layout:fixed;width:100%;min-width:0}
.predictions-page .analysis-table thead{position:sticky;top:0;z-index:2;background:var(--paper)}
.predictions-page .analysis-table th{background:var(--paper)}
.predictions-page .analysis-table tbody tr:hover{background:var(--hover)}
.predictions-page .analysis-table th:first-child{width:30%}
.predictions-page .analysis-table th:nth-child(2){width:15%}
.predictions-page .analysis-table .analysis-chart-cell{width:28px}
.predictions-page .analysis-table td{height:62px;padding:10px 8px}
.predictions-page .analysis-table .analysis-company{min-width:0;gap:10px}
.predictions-page .analysis-company>span{min-width:0}
.predictions-page .analysis-company small{max-width:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.predictions-page .analysis-company .company-logo{width:29px;height:29px;flex:none}
.predictions-page .analysis-table .day-column,.predictions-page .analysis-table .holding-column{display:table-cell}
.predictions-page #research-panel.outlook-panel{display:flex;flex-direction:column;position:static;grid-column:2;grid-row:1;height:100%;max-height:none;min-height:0;overflow:hidden;padding:18px;border-radius:11px}
.predictions-page #research-panel.outlook-panel[hidden]{display:none}
.predictions-page #research-panel>.research-panel-header,.predictions-page #research-panel>.outlook-tabs{flex:none}
.predictions-page #research-panel>[data-outlook-pane]{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
.predictions-page #research-panel>[data-outlook-pane][hidden]{display:none}
.predictions-page #research-panel>.research-quick-actions{flex:none;margin-top:12px;padding-top:14px}
.predictions-page .outlook-status>h3{font-size:25px}
@container(max-width:760px){
 .predictions-page .analysis-table .holding-column{display:none}
 .predictions-page .portfolio-headline{display:flex;flex-direction:column;gap:5px}
}
@container(max-width:560px){
 .predictions-page .analysis-table .day-column{display:none}
 .predictions-page .analysis-table th:first-child{width:34%}
 .predictions-page .analysis-table th:nth-child(2){width:18%}
 .predictions-page .portfolio-metrics{gap:16px}
}
@media(max-width:860px){
 .predictions-page #prediction-board.has-research{grid-template-columns:minmax(0,1fr)}
 .predictions-page #research-panel.outlook-panel{position:absolute;grid-area:auto;inset:0 0 0 auto;z-index:12;width:min(310px,92%);margin:0;box-shadow:-14px 0 36px #0004}
}
@media(max-width:760px){
 .predictions-page .prediction-toolbar{align-items:center;gap:10px;flex-wrap:wrap}
 .predictions-page .prediction-toolbar>div{gap:8px;flex-wrap:wrap}
 .predictions-page .portfolio-overview{gap:16px;padding:4px 0 14px;margin:0}
 .predictions-page .overview-value{font-size:28px}
 .predictions-page .portfolio-metrics strong{font-size:17px}
 .predictions-page .analysis-table th:nth-child(3),.predictions-page .analysis-table td:nth-child(3){display:table-cell}
 .predictions-page .analysis-filters{gap:2px}
 .predictions-page .analysis-filters button{height:34px;padding:6px 8px}
 .predictions-page .analysis-search{flex-basis:125px}
}

/* Investigation documents: stable reading area and a compact, useful context pane. */
body:has(.research-workspace.has-document){height:100dvh;overflow:hidden}
.app-shell:has(.research-workspace.has-document){height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.app-shell:has(.research-workspace.has-document)>.topbar{flex:0 0 54px}
.app-shell:has(.research-workspace.has-document)>main{display:flex;flex:1;min-height:0;overflow:hidden}
.page.research-workspace.has-document{width:100%;display:flex;flex-direction:column;flex:1;min-height:0;height:100%;padding:18px 28px 20px!important;overflow:hidden}
.research-workspace.has-document>.research-workspace-heading{flex:none;margin:0 0 22px}
.research-workspace.has-document .research-library-shell{display:flex;flex:1;min-height:0;overflow:hidden}
.research-workspace.has-document .research-library-nav{display:none}
.research-workspace.has-document .research-library-main{flex:1;min-height:0;overflow:hidden}
.research-workspace.has-document .research-detail-layout{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 280px;grid-template-rows:minmax(0,1fr);gap:36px;height:100%;min-height:0}
.research-workspace.has-document .research-detail-layout.context-closed{grid-template-columns:minmax(0,1fr)}
.research-workspace.has-document .research-document{display:flex;flex-direction:column;min-height:0;overflow:hidden}
.research-workspace.has-document .research-document-header{flex:none;margin:0 0 16px}
.research-workspace.has-document .research-document-toolbar{margin:0 0 18px}
.research-workspace.has-document .research-document-header h1{font-size:25px;letter-spacing:-.5px}
.research-workspace.has-document .research-document-tabs{flex:none;margin-bottom:18px}
.research-workspace.has-document #research-document-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding-right:12px}
.research-workspace.has-document #research-context{grid-column:2;grid-row:1;min-height:0;overflow:hidden}
.research-workspace.has-document #research-context[hidden]{display:none}
.research-workspace .context-inspector{position:static;display:flex;flex-direction:column;height:100%;max-height:none;min-height:0;padding:18px;gap:0;overflow:hidden;border-radius:11px}
.context-inspector .report-inspector-top{flex:none;padding:0 0 22px}
.context-inspector .report-inspector-top h2{font-size:12px;font-weight:500}
.context-inspector .report-inspector-top>.icon-button{width:25px;height:25px;color:var(--muted)}
.context-inspector .report-inspector-top>.icon-button>.icon{width:16px;height:16px}
.report-context-content{flex:1;min-height:0;overflow:auto;scrollbar-width:thin}
.context-inspector .report-company{border:0;padding:0;margin:0 0 16px;gap:12px}
.context-inspector .report-company>.company-logo{width:36px;height:36px;flex:none}
.context-inspector .report-company>span{flex:1;min-width:0}
.context-inspector .report-company strong{font-size:14px}
.context-inspector .report-company small{display:flex;align-items:center;gap:6px;font-size:10px;margin-top:6px}
.context-inspector .report-company small>.icon{width:11px;height:11px;margin-left:auto}
.report-context-status{display:flex;align-items:center;gap:7px;font-size:10px;color:var(--muted);margin-bottom:24px}
.report-context-status>i{width:5px;height:5px;background:var(--muted);border-radius:50%}
.report-context-status>i.is-working{background:var(--green)}
.context-section{border-top:1px solid var(--line-soft);padding:0;margin:0}
.context-section>summary{display:flex;align-items:center;justify-content:space-between;list-style:none;cursor:pointer;font-size:11px;padding:16px 0;color:var(--sub)}
.context-section>summary::-webkit-details-marker{display:none}
.context-section>summary>.icon{width:13px;height:13px;color:var(--muted)}
.context-section[open]>summary>.icon{transform:rotate(90deg)}
.context-inspector .report-forecast{border:0;padding:2px 0 20px}
.context-inspector .report-forecast strong{font-size:24px}
.context-inspector .report-forecast>small{font-size:9px}
.context-inspector .report-facts{padding:4px 0 20px;border:0;gap:13px}
.context-source-link{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding:16px 0;border-top:1px solid var(--line-soft);font-size:11px;text-align:left}
.context-source-link>span{display:flex;align-items:center;gap:8px}
.context-source-link>span:last-child{color:var(--muted);font-size:10px}
.context-source-link .icon{width:13px;height:13px}
.context-inspector .report-folder-label{margin:18px 0 0;font-size:10px;color:var(--muted)}
.context-inspector .report-folder-label select{font-size:11px;min-height:34px;border-radius:7px}
.context-inspector .report-inspector-bottom{flex:none;display:flex;flex-direction:row;align-items:center;gap:14px;border:0;margin:0;padding:18px 0 0}
.context-inspector .report-inspector-bottom>.secondary{flex:1;width:auto;min-height:35px;border-radius:7px;font-size:11px}
.context-inspector .report-inspector-bottom>.text-link{font-size:11px;display:flex;align-items:center;gap:7px}
.context-inspector .report-inspector-bottom .icon{width:14px;height:14px}
.investigation-progress{padding:24px;margin:8px 0 26px;border:1px solid var(--line-soft);border-radius:11px;max-width:680px;background:var(--paper)}
.investigation-progress-label{display:block;font-size:11px;color:var(--muted);margin-bottom:20px}
#research-live-status .investigation-progress .run-status{padding:0;min-height:0;flex-direction:row;align-items:center;gap:15px}
#research-live-status .investigation-progress .run-status-top{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
#research-live-status .investigation-progress .run-status-top strong{font-size:15px;font-weight:450;line-height:1.5;flex:1}
#research-live-status .investigation-progress .run-status-top time{font-size:10px;font-variant-numeric:tabular-nums;margin:0}
#research-live-status .investigation-progress .run-cancel{font-size:10px;padding:6px 9px;background:var(--bg);border-radius:6px}
#research-live-status .investigation-progress .run-progress>.run-cancel{align-self:center;margin:0;flex:none}
.analysis-report-body .analysis-source{display:block;padding:20px 0}
.analysis-source>a{display:flex;gap:12px;align-items:baseline;justify-content:space-between;font-weight:500;line-height:1.6;margin-top:6px}
.analysis-source>a>small{flex:none;font-size:10px;color:var(--muted);font-weight:400}
.analysis-report-body .analysis-source>p{font-size:12px;color:var(--sub);line-height:1.7;margin:9px 0 0}
.investigation-progress>p{font-size:11px;color:var(--muted);line-height:1.6;margin:18px 0 0}
.investigation-progress.is-streaming{padding:14px 16px;margin-top:0}
.investigation-progress.is-streaming .investigation-progress-label{display:none}
@media(max-width:1000px){
 .research-workspace.has-document .research-detail-layout{grid-template-columns:minmax(0,1fr)}
 .research-workspace.has-document #research-context{position:absolute;grid-area:auto;inset:0 0 0 auto;z-index:12;width:min(290px,90%);box-shadow:-14px 0 36px #0004;border-radius:11px}
}
@media(max-width:760px){
 .app-shell:has(.research-workspace.has-document){height:calc(100dvh - 74px - env(safe-area-inset-bottom))}
 .page.research-workspace.has-document{padding:14px 16px!important}
 .research-workspace.has-document>.research-workspace-heading{margin-bottom:16px}
 .research-workspace.has-document .research-workspace-heading h1{font-size:23px}
 .research-workspace.has-document .research-workspace-heading>div{gap:10px}
 .research-workspace.has-document .research-document-header h1{font-size:22px}
 .research-workspace.has-document .research-document-header>span{font-size:10px}
 .research-workspace.has-document #research-document-body{padding-right:4px}
 .investigation-progress{padding:18px}
}

/* A short, repeatable connection flow, separate from the research workspace. */
.codex-onboarding{padding:8px 0 0}.connection-mark{display:grid;place-items:center;width:42px;height:42px;border:1px solid var(--line);border-radius:12px;color:var(--ink);margin:5px 0 20px}.connection-mark svg{width:20px;height:20px}.codex-onboarding h3{font-size:22px;font-weight:500;letter-spacing:-.6px;line-height:1.2;margin:0 0 12px}.codex-onboarding>p{font-size:13px;color:var(--sub);line-height:1.7;margin:0 0 22px}.connection-steps{list-style:none;display:grid;gap:14px;padding:0;margin:24px 0 28px}.connection-steps li{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:13px}.connection-steps li>span{display:grid;place-items:center;width:24px;height:24px;border:1px solid var(--line);border-radius:50%;font-size:11px}.connection-steps li.current{color:var(--ink)}.connection-steps li.current>span{background:var(--ink);color:var(--paper);border-color:var(--ink)}.connection-steps li.complete{color:var(--green)}.connection-actions{display:flex;flex-direction:column;align-items:stretch;gap:16px;margin:20px 0}.connection-actions .primary{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;text-decoration:none;font-size:13px;min-height:42px}.connection-actions .text-link{align-self:center}.codex-onboarding>p.model-connection-note{font-size:11px;color:var(--muted);margin:22px 0 0}

/* One sticky layer prevents fractional zoom from exposing the row above it. */
.predictions-page .analysis-table thead{position:static}
.predictions-page .analysis-table th{position:sticky;top:-1px;z-index:3;box-shadow:0 -2px 0 var(--paper);background:var(--paper)}
.predictions-page .analysis-table-scroll{isolation:isolate;outline-offset:-2px}
.predictions-page .portfolio-headline{display:flex;flex-direction:column;align-items:flex-start;gap:7px}
.predictions-page .overview-return{display:flex;align-items:center;gap:10px;max-width:none;font-size:11px;line-height:1.5;color:var(--muted)}
.predictions-page .overview-return .return-label{color:var(--muted)}
.predictions-page .overview-return strong{font-size:12px;font-weight:500;font-variant-numeric:tabular-nums}
@media(min-width:861px) and (max-width:1120px){.predictions-page #prediction-board{gap:18px}.predictions-page #prediction-board.has-research{grid-template-columns:minmax(0,1fr) 270px}.predictions-page #research-panel.outlook-panel{padding:16px}.predictions-page .portfolio-overview{gap:15px}.predictions-page .portfolio-metrics{gap:18px}}

/* Analysis reader: navigation, evidence and prose each have a defined place. */
#overlay .full-analysis-modal.live-modal{width:min(1040px,calc(100vw - 48px));max-width:1040px!important;height:min(760px,calc(100dvh - 48px));max-height:calc(100dvh - 48px);border:1px solid var(--line);border-radius:13px;background:var(--bg);overflow:hidden}
#overlay .full-analysis-modal .modal-top{min-height:54px;padding:12px 20px!important;background:var(--paper);border-bottom:1px solid var(--line-soft)}
#overlay .full-analysis-modal .modal-top h2{font-size:16px;letter-spacing:-.25px;font-weight:500}
#analysis-detail{flex:1;min-height:0;overflow:hidden}
#analysis-detail .analysis-detail-meta{min-height:43px;padding:10px 20px;font-size:10px;background:var(--bg);border:0;flex:none;gap:10px}
#analysis-detail .analysis-detail-meta>div{display:flex;align-items:center;gap:12px;min-width:0}
#analysis-detail .analysis-detail-meta time{white-space:nowrap;color:var(--muted)}
.report-state{color:var(--sub);font-size:10px;display:flex;align-items:center;gap:6px}.report-state:before{content:'';width:5px;height:5px;background:var(--sub);border-radius:50%}.report-state.is-running:before{background:var(--green)}
#analysis-detail .analysis-live-header{margin:0;padding:8px 20px 18px;background:var(--bg);border:0;border-radius:0;flex:none}
#analysis-detail .analysis-live-header .run-progress{margin:0;padding:0}
#analysis-detail .analysis-live-header .run-label{font-size:12px}
#analysis-detail .analysis-live-header .run-stage-track{margin:10px 0 0;max-width:none}
#analysis-detail .analysis-live-header .run-cancel{display:inline-flex;min-height:24px;padding:3px 0;font-size:10px;margin:3px 0 0 auto}
#analysis-detail .analysis-run-error{font-size:11px;padding:10px 20px;color:var(--red);flex:none}.analysis-run-error p{max-height:90px;overflow:auto;font-size:10px}
#analysis-detail .analysis-report{display:grid;grid-template-columns:170px minmax(0,1fr);flex:1;min-height:0;overflow:hidden;border-top:0}
.analysis-report-nav{padding:18px 10px 12px;background:var(--paper);border-right:1px solid var(--line-soft);display:flex;flex-direction:column;min-height:0;overflow:hidden}
.report-nav-label{display:block;font-size:9px;font-weight:500;color:var(--muted);letter-spacing:.2px;padding:0 10px;margin:0 0 10px}
#analysis-detail .analysis-report-tabs{display:flex;flex-direction:column;align-items:stretch;gap:3px;border:0;padding:0;margin:0;flex:none}
#analysis-detail .analysis-report-tabs>button{display:flex;align-items:center;gap:9px;min-height:36px;padding:8px 10px;font-size:12px;line-height:1.4;border:0;border-radius:6px;box-shadow:none;color:var(--sub);text-align:left;background:transparent}
#analysis-detail .analysis-report-tabs>button[aria-pressed=true]{background:var(--selected);color:var(--ink);box-shadow:none;border:0}
#analysis-detail .analysis-report-tabs>button:hover{background:var(--hover)}
#analysis-detail .analysis-report-tabs svg{width:15px;height:15px;flex:none;color:var(--muted)}
#analysis-detail .analysis-report-tabs small{margin-left:auto;font-size:10px;font-variant-numeric:tabular-nums}
.report-company-filter{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;margin-top:24px}.report-company-list{overflow:auto;min-height:0;scrollbar-width:thin;display:flex;flex-direction:column;gap:2px}
.report-company-list>button{display:flex;justify-content:space-between;align-items:center;flex:none;text-align:left;padding:8px 10px;min-height:32px;border-radius:5px;color:var(--muted);font-size:11px}.report-company-list>button small{font-size:10px}.report-company-list>button[aria-pressed=true]{color:var(--ink);background:var(--control)}.report-company-list>button:hover{color:var(--ink);background:var(--hover)}
.analysis-reader{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;background:var(--bg)}
.analysis-reader-toolbar{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:22px 40px 12px;min-height:62px;border-bottom:0;flex:none}
.analysis-reader-toolbar>div{display:flex;align-items:center;gap:12px;min-width:0}.analysis-reader-toolbar h3{font-size:13px;font-weight:500;line-height:1.4;margin:0;white-space:nowrap}.analysis-reader-toolbar>div>span{font-size:10px;color:var(--muted);white-space:nowrap}
.report-source-search{display:flex;align-items:center;gap:8px;border:1px solid var(--line-soft);background:var(--paper);border-radius:6px;padding:7px 9px;max-width:210px;min-width:100px}.report-source-search svg{width:13px;height:13px;color:var(--muted);flex:none}.report-source-search input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;font-size:11px;color:var(--ink)}
#analysis-detail .analysis-report-body{flex:1;min-height:0;max-height:none!important;overflow:auto!important;overscroll-behavior:contain;scrollbar-width:thin;padding:32px 40px 40px;margin:0;max-width:none;width:100%;font-size:14px;line-height:1.85;outline-offset:-3px}
#analysis-detail .analysis-report-body.markdown-body>*{max-width:680px;width:100%;margin-left:auto;margin-right:auto}
#analysis-detail .analysis-report-body.markdown-body h2{font-size:18px;font-weight:500;letter-spacing:-.4px;margin-top:26px;margin-bottom:14px}
#analysis-detail .analysis-report-body.markdown-body h3{font-size:15px;font-weight:500;margin-top:24px;margin-bottom:12px}
#analysis-detail .analysis-report-body.markdown-body h4{font-size:13px;font-weight:600;margin-top:22px;margin-bottom:9px}
#analysis-detail .analysis-report-body.markdown-body>:first-child{margin-top:0}
#analysis-detail .analysis-report-body.markdown-body strong{font-weight:550}
#analysis-detail .analysis-report-body .report-empty{display:grid;place-items:center;min-height:180px;padding:30px;color:var(--muted);font-size:12px;text-align:center}
#analysis-detail .source-library{display:flex;flex-direction:column;gap:0;padding:8px 40px 32px}
#analysis-detail .analysis-source{display:block;flex:none;border:0;border-bottom:1px solid var(--line-soft);border-radius:0;padding:24px 0;background:transparent}
.source-identity{display:flex;align-items:center;gap:9px;margin-bottom:10px}.source-identity>span{font-size:10px;color:var(--sub);background:var(--control);padding:3px 6px;border-radius:4px;line-height:1.3}.source-identity>small{font-size:10px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#analysis-detail .analysis-source>a{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;font-size:13px;line-height:1.6;font-weight:450;color:var(--ink);text-decoration:none}.analysis-source>a svg{width:14px;height:14px;flex:none;color:var(--muted);margin-top:4px}.analysis-source>a:hover>span{text-decoration:underline;text-underline-offset:3px}
.source-excerpt{margin:10px 0 0}.source-excerpt>summary{display:flex;align-items:center;gap:6px;width:max-content;list-style:none;font-size:10px;color:var(--muted);cursor:pointer}.source-excerpt>summary::-webkit-details-marker{display:none}.source-excerpt>summary svg{width:11px;height:11px}.source-excerpt[open]>summary svg{transform:rotate(180deg)}.source-excerpt>p{font-size:12px;line-height:1.75;color:var(--sub);margin:10px 0 0;padding-top:10px;border-top:1px solid var(--line-soft)}
#analysis-detail .analysis-detail-actions{min-height:55px;padding:10px 20px;background:var(--paper);border-top:1px solid var(--line-soft)}
#analysis-detail .analysis-detail-actions button{min-height:32px;padding:7px 11px;font-size:11px}
@media(max-width:700px){#overlay .full-analysis-modal.live-modal{width:calc(100vw - 20px);height:calc(100dvh - 20px);max-height:calc(100dvh - 20px)}#analysis-detail .analysis-report{grid-template-columns:122px minmax(0,1fr)}.analysis-report-nav{padding:14px 6px}.report-nav-label{padding:0 7px}#analysis-detail .analysis-report-tabs>button{font-size:11px;padding:8px 7px;gap:7px}#analysis-detail .analysis-report-tabs svg{display:none}.analysis-reader-toolbar{padding:13px 16px;flex-wrap:wrap;gap:10px}.analysis-reader-toolbar>div{gap:8px}#analysis-detail .analysis-report-body{padding:18px 16px;font-size:12px}.report-source-search{max-width:none;flex:1}#analysis-detail .analysis-detail-meta{padding:10px 16px;font-size:9px}.report-company-list>button{font-size:10px;padding:8px 7px}#analysis-detail .analysis-source{padding:13px}#analysis-detail .analysis-detail-actions{padding:10px 16px}.analysis-reader-toolbar>div>span{font-size:9px}}
#analysis-detail .report-source-search{height:32px;margin:0;padding:6px 9px}
#analysis-detail .report-source-search input{min-height:0!important;height:auto!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;font-size:11px;line-height:18px;box-shadow:none}
#analysis-detail .analysis-report-body.markdown-body h5{font-size:14px;font-weight:550;margin-top:24px;margin-bottom:10px}
#analysis-detail .analysis-report-body.markdown-body h6{font-size:12px;font-weight:550;margin-top:18px;margin-bottom:8px}

/* Give the canvas a definite containing block at every dashboard size. A
   percentage height inside the flexible, auto-height stage collapses to zero. */
.home-chart-stage>.home-chart-canvas{position:absolute;inset:0;width:100%;height:100%}
#home-chart-form{display:grid;gap:22px}
#home-chart-form>label,#home-chart-form .form-pair>label{margin:0!important}
#home-chart-form .form-pair{margin:0;gap:18px}
#home-chart-form .cash-form-footer{margin-top:0}
@media(min-width:761px){
 .home-page .home-chart-widget>[data-home-body]{overflow:hidden}
 .home-page .home-ticker-chart{display:flex;flex-direction:column;flex:1;min-height:0}
 .home-page .home-chart-heading,.home-page .home-ticker-chart>footer{flex:none}
 .home-page .home-chart-stage{min-height:80px}
 .home-page .home-grid:not(.is-default):not(:has(>.wide)):not(:has(>:nth-child(n+5))){grid-auto-rows:minmax(0,1fr);align-content:stretch;overflow:hidden}
}

/* Quieter surfaces and more reading space. Long lists keep their own scroll. */
.home-page .home-heading>span,.home-page .home-shortcuts{display:none}
.home-page .home-actions>[data-home-edit]:not(.primary){border:0;background:transparent}
.home-page .home-grid .home-widget{border-color:transparent;box-shadow:none}
.analysis-report-nav>.report-nav-label,#analysis-detail .analysis-report-tabs svg{display:none}
.analysis-report-nav{padding:22px 12px 16px;border-right:0}
#analysis-detail .analysis-report-tabs>button{min-height:42px;padding:11px 12px}
.report-company-list>button{min-height:37px;padding:10px 12px;font-size:12px}
#overlay .full-analysis-modal .modal-top{border-bottom:0;background:var(--bg);padding:18px 24px!important}
#analysis-detail .analysis-detail-meta{padding:8px 24px 18px}
#analysis-detail .analysis-report-body.markdown-body li{margin-block:10px}
#analysis-detail .analysis-source:last-child{border-bottom:0}
.source-identity>span{background:transparent;padding:0;color:var(--sub)}
.predictions-page .analysis-results{border:0;background:transparent;padding:0}
.predictions-page .analysis-results-head{padding-top:12px;margin-bottom:12px}
.predictions-page .analysis-table-toolbar{margin-bottom:16px}
.predictions-page .analysis-table td{height:72px;padding:14px 10px}
.predictions-page .analysis-table th{background:var(--bg);box-shadow:0 -2px 0 var(--bg)}
.predictions-page #prediction-board.has-research .analysis-table :is(th:nth-child(6),.suggested-cell,.analysis-chart-cell){display:none}
.predictions-page #prediction-board.has-research .analysis-results-head>div>span{display:none}
.predictions-page #research-panel.outlook-panel{padding:24px;border-color:transparent;box-shadow:none}
.predictions-page .outlook-ring{display:none}
.predictions-page .outlook-capital{display:none}
.predictions-page .outlook-tabs{margin-bottom:26px}
@media(min-width:761px) and (min-height:620px){
 .home-page .home-grid.is-fitting{grid-auto-rows:minmax(0,1fr);align-content:stretch;overflow:hidden}
 .home-page .home-grid.is-chart-led{grid-template-rows:minmax(0,1.15fr) minmax(0,.85fr)}
}
@media(max-width:760px){
 #analysis-detail .analysis-report-body{padding:24px}
 .analysis-reader-toolbar{padding:18px 24px 10px}
}
