/* Shared workspace. Page modules inherit one layout and control hierarchy. */
.workspace{--sc-sidebar-width:232px;--sc-page-pad:clamp(16px,2vw,30px);--green:#176d61;--brand:#176d61;--bg:#f5f7f9;--line:#dfe6eb;--muted:#5e7380;--ink:#173541}
.workspace .workspace-sidebar{width:var(--sc-sidebar-width);height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden;padding:22px 12px 12px;background:#122b36;border:0;transition:transform .18s ease}
.workspace .sidebar-heading{min-height:40px;flex-shrink:0}
.workspace .workspace-nav{display:block;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#3e5963 transparent;margin:24px 0 0;padding-right:3px}
.workspace .workspace-nav .nav-group{margin-bottom:20px}
.workspace .workspace-nav a{min-height:40px;padding:8px 10px;gap:10px;border-radius:8px;font-size:13px}
.workspace .nav-more>summary{padding:8px 10px;font-size:12px;font-weight:500;min-height:38px}
.workspace .nav-more[open]>summary{color:#d3e9e9}
.workspace main{width:calc(100% - var(--sc-sidebar-width));max-width:none;margin-left:var(--sc-sidebar-width);padding:0 var(--sc-page-pad) 28px}
.workspace .workspace-nav a:focus-visible{outline:2px solid #44ceb6;outline-offset:2px}
@media(min-width:1101px){
 .workspace.sidebar-collapsed{--sc-sidebar-width:72px}
 .workspace.sidebar-collapsed .workspace-sidebar{transform:none;padding:22px 10px 12px}
 .workspace.sidebar-collapsed .sidebar-heading{justify-content:center}
 .workspace.sidebar-collapsed .sidebar-heading .brand{justify-content:center;gap:0}
 .workspace.sidebar-collapsed .brand span,.workspace.sidebar-collapsed .nav-group>p,.workspace.sidebar-collapsed .nav-more>summary,.workspace.sidebar-collapsed .workspace-nav a>span{display:none}
 .workspace.sidebar-collapsed .workspace-nav{margin-top:20px;padding-right:0}
 .workspace.sidebar-collapsed .workspace-nav .nav-group{margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid #294854}
 .workspace.sidebar-collapsed .workspace-nav .nav-group:last-child{border-bottom:0;padding-bottom:0}
 .workspace.sidebar-collapsed .workspace-nav a{width:44px;min-height:44px;margin:4px auto;padding:12px;justify-content:center;gap:0}
 .workspace.sidebar-collapsed .workspace-sidebar .nav-group:last-child a:last-child{margin-top:4px;border-top:0;padding-top:12px}
 .workspace.sidebar-collapsed .workspace-nav svg{width:20px;height:20px}
}
.workspace .workspace-topbar{grid-template-areas:"nav search mode account";grid-template-columns:38px minmax(180px,1fr) minmax(170px,230px) auto;gap:14px;min-height:76px;padding:14px 0;margin-bottom:20px}
.workspace .sidebar-toggle{display:inline-flex;align-items:center;justify-content:center;width:38px;min-width:38px;height:40px;padding:9px;background:transparent;border:1px solid var(--line);color:#3c5c65}
.workspace .sidebar-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.workspace.sidebar-collapsed .sidebar-toggle svg{transform:scaleX(-1)}
.workspace h1{font-size:28px;line-height:1.2;letter-spacing:-.6px;margin:4px 0 8px}
.workspace h2{font-size:18px;line-height:1.35;letter-spacing:-.2px;margin:0 0 12px}
.workspace h3{font-size:16px;line-height:1.4;letter-spacing:0}
.workspace p{font-size:14px;line-height:1.55;margin:8px 0}
.workspace .eyebrow{font-size:10px;letter-spacing:1.5px}
.workspace main>.card-header,.workspace main>.heading{gap:14px;margin-bottom:18px}
.workspace .panel{margin:16px 0;padding:20px;border-radius:12px;box-shadow:none}
.workspace :is(button,.button){min-height:40px;border-radius:8px;font-size:13px;line-height:1.4;box-shadow:none}
.workspace :is(button,.button).secondary{background:#fff;border-color:var(--line);color:#294f59}
.workspace :is(button,.button):focus-visible,.workspace summary:focus-visible{outline:3px solid #39a99c;outline-offset:3px}
.workspace .actions{gap:8px;align-items:center}
.workspace .actions :is(button,.button){padding:9px 14px}
.workspace .corner-control{width:40px;min-width:40px;height:40px;padding:9px!important}
.workspace .card-header{margin-bottom:14px}
.workspace .notice{position:static;inset:auto;display:block;width:auto;padding:12px 14px;font-size:13px;margin:12px 0;color:#70571f}
.workspace .health-badge{font-size:12px;line-height:1.4;padding:4px 9px}
.workspace .feed-card{gap:8px;padding:18px;border-radius:12px}
.workspace .feed-card .card-header{margin-bottom:4px;align-items:center}
.workspace .feed-card h3{margin:0;font-size:16px}
.workspace .feed-card>details{margin:4px 0;font-size:12px}
.workspace .context-details{font-size:12px;color:var(--muted);margin:10px 0}
.workspace .context-details>summary{font-size:12px;font-weight:500;color:#466673}
.workspace details.panel>summary{font-size:15px;font-weight:600;color:var(--ink);padding:2px 0}
.workspace details.panel[open]>summary{margin-bottom:14px}
.workspace .crypto-page-header>.actions{max-width:none}
.workspace .crypto-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap}
.workspace .crypto-toolbar .crypto-filters{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;margin:0}
.workspace .crypto-filters label{margin:0;font-size:12px;font-weight:500}
.workspace .crypto-filters input{width:120px}
.workspace .crypto-filters select{min-width:200px;max-width:260px}
.workspace .crypto-filters :is(input,select){height:40px;margin-top:5px;padding:8px 10px;font-size:14px}
.workspace .crypto-toolbar>form{margin:0}
.workspace .crypto-status-line{display:flex;align-items:center;gap:10px;flex-wrap:wrap;color:var(--muted);font-size:12px;margin:0 0 14px}
.workspace .crypto-metrics{gap:14px}
.workspace .crypto-metrics>div{padding:16px;border-radius:10px;background:#f7faf9}
.workspace .crypto-metrics strong{font-size:26px;margin:12px 0;font-weight:600;letter-spacing:-.4px}
.workspace .crypto-metrics small{font-size:12px}
.workspace .crypto-asset-result{padding:16px;border-radius:10px;box-shadow:none}
.workspace .crypto-asset-result p{font-size:12px}
.workspace .crypto-workbook-help{display:none}
.workspace .crypto-import-grid form{padding:16px;border-radius:10px}
@media(max-width:1100px){
 .workspace .workspace-sidebar{transform:translateX(-100%);width:min(320px,calc(100vw - 48px));max-width:calc(100vw - 48px);z-index:45}
 .workspace.sidebar-open .workspace-sidebar{transform:translateX(0)}
 .workspace main,.workspace.sidebar-collapsed main{margin-left:0;width:100%}
 .workspace .workspace-topbar{grid-template-areas:"nav mode account" "search search search";grid-template-columns:40px minmax(0,1fr) auto;gap:8px 12px}
 .workspace .workspace-topbar>.mode-control{justify-self:end;max-width:250px}
 .workspace .sidebar-toggle{width:40px;height:40px}
}
@media(max-width:600px){
 .workspace{--sc-page-pad:14px}.workspace .panel{padding:16px;margin:14px 0}.workspace h1{font-size:25px}
 .workspace .workspace-topbar{padding:10px 0;margin-bottom:16px}.workspace .workspace-topbar>.mode-control{max-width:none}
 .workspace main>.card-header,.workspace main>.heading{flex-wrap:wrap}.workspace .crypto-page-header>.actions{flex-basis:100%;justify-content:flex-end}
 .workspace .crypto-toolbar{gap:12px}.workspace .crypto-filters{width:100%}.workspace .crypto-filters label{flex:1;min-width:100px}
 .workspace .crypto-filters :is(input,select){width:100%;min-width:0;max-width:none}.workspace .crypto-toolbar>form:last-child{margin-left:auto}
 .workspace .actions :is(button,.button){min-height:44px}.workspace .portfolio-summary-chart .chart-ranges button{background:#edf0f2;color:#183746}
}
@media(prefers-reduced-motion:reduce){.workspace .workspace-sidebar{transition:none}}
.workspace .notice.save-error,.workspace .notice[role=alert]{background:#fff0ef;border-color:#e3b5b0;color:#9b302d}
.workspace .notice.save-success{background:#eaf6ef;border-color:#88b59b;color:#155739}

/* RC53: compact mobile controls and intrinsic sizing, without clipping content. */
.workspace :is(.heading,.card-header,.actions,.candidate-numbers,.crypto-metrics,.crypto-status-line)>*{min-width:0}
.workspace .candidate-numbers>div{min-width:0}
.workspace :is(.candidate-numbers,.position-values,.sizing-policy-grid) dd{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.workspace .sector-tab{background:#fff;color:var(--ink);border-color:var(--line);border-top-color:#88b4aa;border-radius:10px;font-weight:400}
.workspace .sector-tab[aria-selected=true]{background:#edf7f4;border-color:#86bbae;outline:2px solid #176d61;outline-offset:2px}
.workspace .sector-tab strong{font-weight:600}
.workspace .sector-tab :is(span,small){color:var(--muted);line-height:1.45}
.workspace .sector-tab .sector-open-label{color:var(--green)}
.refresh-mobile-label,.export-mobile-label{display:none}
.workspace .stock-page-header{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:start;gap:12px;margin:0 0 16px}
.workspace .stock-page-header h1{font-size:28px;margin:4px 0}
.workspace .stock-page-header .eyebrow{margin:10px 0 2px}
.workspace .stock-page-header .actions{margin:0;max-width:none}
.workspace .stock-page-header .ticker-actions{margin:0;float:none}
.workspace .stock-back-link{display:inline-flex;align-items:center;min-height:36px;font-size:13px;text-decoration:none}
.workspace :is(.ticker-actions,.card-menu)>summary{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:10px;background:#fff;border:1px solid var(--line)}
.workspace :is(.ticker-actions,.card-menu)>summary svg{width:22px;height:22px;flex:none}
.workspace :is(.ticker-action-list,.card-menu-list){max-width:calc(100vw - 24px);color:var(--ink)}
.workspace :is(.ticker-action-list,.card-menu-list)[popover]{min-width:0}
.workspace :is(.ticker-action-list,.card-menu-list) :is(a,button){display:flex;align-items:center;min-height:44px;padding:10px 12px;text-align:left;font-size:13px;line-height:1.4;text-decoration:none;white-space:normal;border:0;border-radius:6px;color:#294f59;background:transparent;overflow-wrap:anywhere}
.workspace :is(.ticker-action-list,.card-menu-list) :is(a,button):hover{background:#edf7f4}
.workspace .stock-menu-label{display:block;padding:8px 12px;border-bottom:1px solid var(--line);font-size:12px;font-weight:600;color:var(--muted)}
.workspace .stock-protection-options{margin:2px 0 0;border-top:1px solid var(--line)}
.workspace .stock-protection-options>summary{min-height:44px;padding:12px;font-size:13px}
.workspace .crypto-results-header{flex-wrap:wrap;gap:8px}
.workspace .crypto-results-header h2{flex:1 1 190px;margin:0}
.workspace .crypto-results-header .health-badge{max-width:100%;white-space:normal}
.workspace .crypto-metrics strong{overflow-wrap:anywhere}
@media(max-width:650px){
 .workspace .card-header>.actions{max-width:100%;align-items:center}
 .workspace .card-header>.actions>form{flex:0 1 auto;order:0}
 .workspace .card-header>.actions>.corner-control{order:0}
 .workspace .card-header>.actions>form button{width:auto}
 .workspace .workspace-topbar{position:relative;top:auto;padding:10px 0 12px;gap:10px 8px;margin-bottom:16px}
 .workspace .workspace-topbar>.mode-control{min-width:0;width:100%;max-width:260px}
 .workspace .workspace-topbar .mode-button{min-height:44px;padding:8px 10px;font-size:12px;gap:8px}
 .workspace .workspace-topbar .mode-edit{flex:0 0 18px}
 .workspace .topbar-account{gap:6px;margin:0}
 .workspace .account-menu{margin:0}
 .workspace .workspace-search :is(input,button){min-height:44px}
 .workspace .workspace-search input{font-size:16px;padding:10px 12px}
 .workspace main>.workspace-title{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px}
 .workspace .workspace-title h1{font-size:24px;margin:0}
 .workspace .workspace-title>.actions{flex-wrap:nowrap;width:auto;max-width:none;gap:8px}
 .workspace .workspace-title>.actions>form,.workspace .workspace-title>.actions>.button{flex:none;margin:0}
 .workspace .workspace-title .corner-control{flex:0 0 44px;width:44px;min-height:44px}
 .workspace .refresh-desktop-label,.workspace .export-desktop-label{display:none}
 .workspace .refresh-mobile-label,.workspace .export-mobile-label{display:inline}
 .workspace .sector-tabs{gap:8px}
 .workspace .sector-tab{padding:12px;gap:4px}
 .workspace .sector-tab small:last-of-type{display:none}
 .workspace .sector-tab .sector-open-label{font-size:12px;min-height:24px;display:flex;align-items:center}
 .workspace .candidate-numbers{gap:12px;margin:12px 0}
 .workspace .candidate-numbers dd{font-size:16px}
 .workspace .stock-page-header{grid-template-columns:minmax(0,1fr) 44px;gap:12px}
 .workspace .stock-page-header .actions{align-self:start;padding-top:5px}
 .workspace .stock-page-header p{font-size:13px}
 .workspace .stock-page-header .eyebrow{font-size:10px}
 .workspace .stock-page-header+.stock-history{margin-top:0}
 .workspace :is(.ticker-action-list,.card-menu-list)[popover]{padding:8px;border-radius:12px;overscroll-behavior:contain;scrollbar-width:thin}
 .workspace .ticker-actions>.ticker-action-list:not([popover]){left:auto;right:0}
 .workspace :is(.ticker-action-list,.card-menu-list):not([popover]){max-height:65dvh;overflow-y:auto;max-width:calc(100vw - 36px);width:260px;min-width:0}
 .workspace .crypto-page-header{display:block}
 .workspace .crypto-page-header>.actions{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:8px;width:100%;margin-top:14px}
 .workspace .crypto-page-header>.actions>.button{flex:0 1 auto;min-height:44px;padding:10px 12px}
 .workspace .crypto-page-header>.actions>a:not(.button):not(.corner-control){display:inline-flex;align-items:center;min-height:44px;padding:8px;font-size:13px}
 .workspace .crypto-page-header>.actions>.corner-control{flex:0 0 44px;margin-left:auto}
 .workspace .crypto-toolbar{display:block}
 .workspace .crypto-toolbar .crypto-filters{display:grid;grid-template-columns:minmax(88px,1fr) minmax(0,2fr);gap:10px;align-items:end}
 .workspace .crypto-filters label{min-width:0}
 .workspace .crypto-filters :is(input,select){width:100%;height:44px;font-size:16px;min-width:0;max-width:100%}
 .workspace .crypto-filters button{grid-column:1/-1;width:100%;min-height:44px}
 .workspace .crypto-toolbar>form:last-child{margin:10px 0 0}
 .workspace .crypto-toolbar>form:last-child button{width:100%;min-height:44px}
 .workspace .crypto-results-header{display:block}
 .workspace .crypto-results-header .health-badge{margin-top:8px}
 .workspace .crypto-status-line{gap:6px 10px;line-height:1.5}
 .workspace .crypto-metrics strong{font-size:24px}
 .workspace :is(.panel[id],.stock-tools,.stock-monitor-controls,.advanced-settings){scroll-margin-top:16px}
 .workspace .toast-region{top:auto;bottom:max(12px,env(safe-area-inset-bottom));max-height:50dvh;overflow:auto}
}

/* RC56 shared action hierarchy, compact notices and readable filter controls. */
.workspace .page-header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:18px}
.workspace .page-header>.actions{margin-left:auto;justify-content:flex-end;max-width:100%}
.workspace .page-toolbar{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap}
.workspace .page-toolbar form{margin:0;min-width:0}
.workspace .page-toolbar label{margin:0;min-width:0}
.workspace .ticker-select-form{display:flex;align-items:flex-end;gap:12px;flex:1;flex-wrap:wrap}
.workspace .ticker-select-form label{flex:1 1 220px;max-width:520px}
.workspace .page-toolbar :is(input,select){width:100%;min-width:0;max-width:100%;height:44px;margin-top:6px}
.workspace .crypto-toolbar .crypto-filters{display:grid;grid-template-columns:minmax(96px,132px) minmax(180px,280px) auto;gap:12px;align-items:end;max-width:100%}
.workspace .crypto-toolbar .crypto-filters label{min-width:0;max-width:none}
.workspace .crypto-toolbar .crypto-filters :is(input,select){width:100%;min-width:0;max-width:100%}
.workspace .crypto-toolbar .crypto-filters button{height:44px;white-space:nowrap}
.workspace .module-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 18px}
.workspace .module-tabs a{display:inline-flex;align-items:center;min-height:40px;padding:9px 14px;border-radius:8px;text-decoration:none;background:#edf2f3;color:var(--ink)}
.workspace .module-tabs a[aria-current=page]{color:#fff;background:var(--green)}
.workspace .market-quote-caption{font-size:12px;margin:8px 0 16px}
.workspace .toast-region{position:fixed;inset:16px 16px auto auto;z-index:1000;width:min(400px,calc(100vw - 32px));max-height:70dvh;overflow:auto;display:grid;gap:8px;pointer-events:none}
.workspace .toast{pointer-events:auto;display:flex;align-items:center;gap:10px;padding:12px 14px;border:1px solid #9ccabb;border-radius:10px;background:#f4fcf7;color:#173d33;box-shadow:0 6px 24px #102f3620;font-size:13px;line-height:1.45;overflow-wrap:anywhere}
.workspace .toast-error{background:#fff5f3;border-color:#deb4ad;color:#8a2d27}
.workspace .toast>span:first-child{flex:1;min-width:0}
.workspace .toast>button{flex:0 0 32px;width:32px;min-height:32px;height:32px;padding:0;border:0;background:transparent;font-size:22px}
@media(max-width:600px){
 .workspace .page-header{align-items:flex-start;gap:10px}
 .workspace .page-header>.actions{width:100%;justify-content:flex-start;margin-left:0}
 .workspace .page-toolbar .ticker-select-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;width:100%}
 .workspace .ticker-select-form label{max-width:none}
 .workspace .crypto-toolbar .crypto-filters{grid-template-columns:minmax(88px,1fr) minmax(0,2fr);width:100%}
 .workspace .crypto-toolbar .crypto-filters button{grid-column:1/-1;width:100%}
 .workspace .toast-region{inset:max(12px,env(safe-area-inset-top)) 12px auto auto;width:calc(100vw - 24px)}
}
.workspace .strategy-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin:16px 0}
.workspace .strategy-summary>div{min-width:0;display:flex;flex-direction:column;gap:6px}
.workspace .strategy-summary strong{font-size:21px;line-height:1.25;overflow-wrap:anywhere}
.workspace .strategy-summary :is(span,small){font-size:12px;color:var(--muted)}
.workspace .strategy-symbol-form{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px;margin-bottom:16px}
.workspace .strategy-symbol-form label{margin:0;min-width:180px;max-width:100%}
.workspace .strategy-weight-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px}
@media(max-width:600px){.workspace .strategy-summary{grid-template-columns:1fr;gap:16px}.workspace .strategy-weight-grid{grid-template-columns:1fr}}

/* RC57: one account setup, reusable profiles and a quiet notification inbox. */
.workspace .mode-button{text-decoration:none;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:42px;color:#fff}
.workspace .account-workspace{max-width:1000px;margin:0 auto}
.workspace .account-workspace .page-header{align-items:flex-start}
.workspace .account-setup{padding:26px}
.workspace .account-connection{display:flex;align-items:center;justify-content:space-between;gap:18px;padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid var(--line)}
.workspace .account-connection form{margin:0;flex:0 0 auto}
.workspace .account-connection p{font-size:12px;margin:5px 0 0 18px}
.workspace .connection-dot{display:inline-block;width:8px;height:8px;margin-right:10px;border-radius:50%;background:#b1bdc3}
.workspace .connection-dot.connected{background:#159e83}
.workspace .account-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:end}
.workspace .account-fields label{min-width:0;margin:0}
.workspace .account-fields select{width:100%;min-width:0;height:44px}
.workspace .account-mode-description{padding:12px 0 0;color:var(--ink)}
.workspace #mode-form fieldset{min-width:0;margin:16px 0;padding:16px;border:1px solid var(--line);border-radius:8px}
.workspace #mode-form :is(input,select){max-width:100%}
.workspace #mode-form .check{display:flex;align-items:flex-start;gap:10px;line-height:1.5;font-size:13px}
.workspace #mode-form .check input{margin-top:4px;flex:0 0 auto}
.workspace .account-advanced,.workspace .account-connection-help{margin:20px 0;font-size:13px}
.workspace .account-advanced>summary,.workspace .account-connection-help>summary{font-size:13px;color:var(--green);font-weight:600}
.workspace .account-profile-save{border-top:1px solid var(--line);padding-top:16px;margin-top:16px}
.workspace .account-profile-save input{max-width:380px!important}
.workspace .account-save-row{display:flex;align-items:center;gap:16px;margin-top:18px}
.workspace .account-save-row span{font-size:12px;color:var(--muted)}
.workspace .account-status .card-header{align-items:flex-start}
.workspace .account-status h2{margin-bottom:4px}
.workspace .account-status p{font-size:13px}
.workspace .account-status .actions form{margin:0}
.workspace .account-blocker{padding:10px 12px;background:#fff8e8;border-radius:6px}
.workspace .account-decision{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px 0;border-top:1px solid var(--line)}
.workspace .account-utilities{display:flex;flex-wrap:wrap;gap:12px 22px;padding:12px 0;font-size:13px}
.workspace .notification-filter{max-width:280px;margin:0 0 16px}
.workspace .notification-filter label{margin:0;font-size:12px}
.workspace .notification-filter select{width:100%;height:42px}
.workspace .notification-inbox{padding:8px 22px}
.workspace .notification-inbox>.card-header{padding:12px 0;margin-bottom:0}
.workspace .notification-inbox h2{font-size:14px;margin:0}
.workspace .notification-row{display:flex;gap:20px;align-items:flex-start;padding:18px 0;border-top:1px solid var(--line)}
.workspace .notification-content{flex:1;min-width:0;padding-left:12px;border-left:3px solid transparent}
.workspace .notification-row.is-unread .notification-content{border-left-color:#27ad9b}
.workspace .notification-meta{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;font-size:11px;color:var(--muted)}
.workspace .notification-preview{font-size:14px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.workspace .notification-row details{font-size:12px;color:var(--muted)}
.workspace .notification-row .alert-message{white-space:pre-line;overflow-wrap:anywhere;font-size:13px;color:var(--ink)}
.workspace .notification-row form{margin:0;flex:0 0 auto}
@media(max-width:700px){
 .workspace .account-fields{grid-template-columns:1fr}
 .workspace .account-setup{padding:18px}
 .workspace .account-connection{align-items:flex-start;flex-direction:column;gap:12px}
 .workspace .account-connection form,.workspace .account-connection button{width:100%}
 .workspace .account-save-row{align-items:flex-start;flex-direction:column;gap:10px}
 .workspace .account-save-row>button{width:100%}
 .workspace .notification-row{gap:10px;flex-wrap:wrap}
 .workspace .notification-row form{margin-left:15px}
 .workspace .notification-inbox{padding:8px 14px}
 .workspace .account-decision{align-items:flex-start;flex-direction:column;gap:6px}
}

.workspace .account-save-row>button{color:#fff;background:var(--green)}
.workspace .account-advanced,.workspace .account-connection-help{margin:14px 0}
.workspace .account-run-controls form{margin:0}

.workspace .external-link-icon{width:14px;height:14px;margin-left:4px;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.7}
.workspace .order-workspace{display:grid;grid-template-columns:minmax(300px,.8fr) minmax(0,1.5fr);gap:20px;align-items:start}
.workspace .order-workspace>*,.workspace .stock-company-news>*,.workspace .stock-quick-metrics>div{min-width:0}
.workspace .order-workspace .panel{margin-top:0}
.workspace .stock-quick-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:22px 0}
.workspace .stock-quick-metrics dt{font-size:12px;color:var(--muted)}
.workspace .stock-quick-metrics dd{margin:5px 0 0;font-size:20px;font-weight:650;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.workspace .stock-company-news{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:32px;padding-top:22px;border-top:1px solid var(--line)}
.workspace .stock-company-news h2{font-size:17px}
.workspace .stock-company-news p,.workspace .technical-averages,.workspace .stock-ai-line{font-size:13px;line-height:1.6;overflow-wrap:anywhere}
.workspace .stock-news-item{padding:12px 0;border-bottom:1px solid var(--line);font-size:13px;overflow-wrap:anywhere}
.workspace .stock-news-item:first-of-type{padding-top:0}
.workspace .stock-news-item small{display:block;font-size:11px;color:var(--muted);margin-top:6px}
.workspace .stock-detail-workspace .stock-page-header{grid-template-columns:1fr}
@media(max-width:1100px){.workspace .order-workspace{grid-template-columns:1fr}.workspace .order-workspace>div:first-child{max-width:100%}}
@media(max-width:600px){.workspace .stock-quick-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px}.workspace .stock-quick-metrics dd{font-size:18px}.workspace .stock-company-news{grid-template-columns:1fr;gap:22px}.workspace .stock-overview .card-header{align-items:flex-start;flex-direction:column;gap:6px}}

.workspace .stock-chart-details{margin-top:12px;font-size:12px}.workspace .stock-chart-details>summary{min-height:44px;display:flex;align-items:center;color:var(--green);cursor:pointer}
@media(max-width:600px){.workspace .stock-history .portfolio-chart-heading{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}.workspace .stock-history .chart-ranges{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%}.workspace .stock-history .chart-ranges button{width:100%;min-width:0}.workspace .stock-history .period-summary small{font-size:11px}}

/* Navigation controls belong to the sidebar, including the mobile edge tab. */
.workspace .sidebar-surface{display:flex;flex-direction:column;min-height:0;flex:1}
.workspace .workspace-sidebar>.sidebar-toggle{position:absolute;top:22px;right:10px;z-index:2;background:#1e414b;color:#d7eae6;border-color:#42616a;width:40px;height:40px}
.workspace .sidebar-heading .brand{padding-right:40px;font-size:15px;gap:7px}
.workspace .sidebar-heading .brand-logo{width:28px;height:28px;flex-basis:28px}
@media(min-width:1101px){
 .workspace .workspace-topbar{grid-template-areas:"search mode account";grid-template-columns:minmax(180px,1fr) minmax(170px,230px) auto}
 .workspace.sidebar-collapsed .sidebar-heading .brand{padding:0}
 .workspace.sidebar-collapsed .workspace-sidebar>.sidebar-toggle{top:68px;right:16px}
 .workspace.sidebar-collapsed .workspace-nav{margin-top:68px}
}
@media(max-width:1100px){
 .workspace .workspace-sidebar,.workspace.sidebar-open .workspace-sidebar{width:0;max-width:none;padding:0;overflow:visible;transform:none;background:transparent;box-shadow:none}
 .workspace .sidebar-surface{position:absolute;inset:0 auto 0 0;width:min(320px,calc(100vw - 48px));padding:calc(16px + env(safe-area-inset-top)) 16px 16px;background:#122b36;transform:translateX(-100%);transition:transform .18s ease;overflow:hidden}
 .workspace.sidebar-open .sidebar-surface{transform:none;box-shadow:12px 0 40px #102f3640}
 .workspace .workspace-sidebar>.sidebar-toggle{top:14px;left:var(--sc-page-pad);right:auto;width:40px;height:44px}
 .workspace.sidebar-open .workspace-sidebar>.sidebar-toggle{left:calc(min(320px,100vw - 48px) - 54px)}
 .workspace .sidebar-heading .brand{font-size:17px}
}
@media(prefers-reduced-motion:reduce){.workspace .sidebar-surface{transition:none}}
.workspace .stock-sort-control{display:flex;align-items:center;justify-content:flex-end;gap:12px;font-size:12px;margin:18px 0}
.workspace .stock-sort-control select{width:auto;max-width:100%;min-width:0;margin:0;font-size:13px}
.workspace .investment-outlook{padding-bottom:20px;margin-bottom:22px;border-bottom:1px solid var(--line)}
.workspace .investment-outlook h3{font-size:20px;margin:8px 0;color:var(--ink)}
.workspace .outlook-scenarios{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:18px 0}
.workspace .outlook-scenarios dt{font-size:12px;color:var(--muted)}
.workspace .outlook-scenarios dd{margin:5px 0;font-size:18px;font-weight:650;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
@media(max-width:600px){.workspace .stock-sort-control{align-items:stretch;flex-direction:column;gap:6px}.workspace .stock-sort-control select{width:100%}.workspace .outlook-scenarios{grid-template-columns:1fr;gap:12px}.workspace .directory-heading .actions{width:100%}}
/* RC58: a flat navigation list with an explicit arrange mode. */
.workspace .sidebar-links{padding:0;margin:0;list-style:none;display:grid;gap:4px}
.workspace .sidebar-links>li{min-width:0;display:flex;align-items:center;gap:4px;border-radius:8px}
.workspace .sidebar-links>li>a{display:flex;align-items:center;flex:1;min-width:0;margin:0;min-height:44px}
.workspace .sidebar-links svg{width:20px;height:20px;flex:0 0 20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.workspace .nav-dragging{background:#29534f;outline:2px solid #44ceb6}
@media(min-width:1101px){
 .workspace.sidebar-collapsed .sidebar-links>li>a{width:44px;min-width:44px;max-width:44px;margin:0 auto;padding:12px;justify-content:center;gap:0}
}
/* One workspace editor and action standard across tools. */
.workspace .workspace-breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 18px;padding:0;font-size:12px;color:var(--muted);letter-spacing:0}
.workspace .workspace-breadcrumbs a{padding:0;color:var(--green);font-size:12px;border-radius:0;background:transparent}
.workspace .workspace-editor{min-width:0;width:100%}
.workspace .workspace-editor-back{margin-bottom:16px}
.workspace dialog.workspace-editor-panel[open]{position:static;inset:auto;display:block;width:100%;max-width:none;min-width:0;max-height:none;height:auto;margin:0;padding:22px;border:1px solid var(--line);border-radius:12px;box-shadow:none;overflow:visible;background:#fff;color:var(--ink)}
.workspace .workspace-editor-panel .sc-editor-head{position:static;padding:0 0 16px;border:0;background:transparent}
.workspace .workspace-editor-panel .sc-editor-body{max-height:none;height:auto;padding:0;overflow:visible}
.workspace .workspace-editor-panel .panel{margin:0;padding:0;border:0;background:transparent}
.workspace .workspace-editor-panel :is([data-close-dialog],.integration-close){display:none!important}
.workspace .workspace-editor-panel form{max-width:100%;min-width:0}
.workspace main>:is(.heading,.card-header,.page-header),.workspace .crypto-page-header,.workspace .directory-heading,.workspace .account-workspace>.page-header{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:12px}
.workspace main>:is(.heading,.card-header,.page-header)>:first-child,.workspace .crypto-page-header>:first-child,.workspace .directory-heading>div:first-child,.workspace .account-workspace>.page-header>:first-child{flex:0 1 auto}
.workspace main>:is(.heading,.card-header,.page-header)>.actions,.workspace .crypto-page-header>.actions,.workspace .directory-heading>.actions,.workspace .account-workspace>.page-header>.actions{margin:0;align-self:flex-start;justify-content:flex-start;max-width:100%}
.workspace .workspace-breadcrumbs a{display:inline-flex;align-items:center;min-height:24px}
.workspace .actions{justify-content:flex-start}
.workspace .actions>form{margin:0}
.workspace :is(button,.button){min-height:44px}
.workspace .actions :is(button,.button){margin-left:0}
.workspace .crypto-toolbar>form:last-child{margin-left:0}
.workspace .settings-launcher{display:flex;flex-direction:column;align-items:flex-start;gap:12px;padding:18px;margin:0;border:1px solid var(--line);border-radius:10px}
.workspace .settings-launcher h3{margin:0}
.workspace .workspace-editor-panel :is(input:not([type="checkbox"]),select){min-height:44px}
@media(max-width:600px){.workspace dialog.workspace-editor-panel[open]{padding:16px}.workspace .workspace-editor-back{width:auto}.workspace .actions>.button,.workspace .actions>form{flex:0 1 auto}.workspace .workspace-editor-panel .columns{grid-template-columns:1fr}}

.workspace .panel>.card-header:has(>.actions){flex-direction:column;align-items:flex-start;gap:12px}
.workspace .panel>.card-header:has(>.actions)>:first-child{flex:0 1 auto}
.workspace .panel>.card-header>.actions{margin:0;align-self:flex-start;justify-content:flex-start;max-width:100%}
.workspace .workspace-editor-panel form>button{width:auto;justify-self:start}
.workspace .workspace-editor-panel form>button:not(.secondary){color:#fff}
.workspace .actions>label{min-width:0;margin:0}
.workspace .actions :is(button,.button):not(.secondary):not(.corner-control):not(.icon-button){color:#fff}
.workspace :is(main>.heading,main>.card-header,main>.page-header,.crypto-page-header,.directory-heading,.account-workspace>.page-header)>.actions>.corner-control{margin-left:0;order:0}

.workspace .directory-help{margin:18px 0;font-size:12px}
.workspace .settings-launcher{margin:12px 0}
.workspace .settings-launcher h3{font-size:16px;letter-spacing:0}

.workspace .sidebar-links a{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:pan-y}
.workspace .nav-dragging,.workspace .nav-dragging a{cursor:grabbing;background:#29534f}
.workspace #directory-display-controls{display:grid;gap:12px;border-bottom:1px solid var(--line);padding-bottom:14px;margin-bottom:14px}
.workspace #directory-display-controls label{margin:0}
.workspace #directory-display-controls select{width:100%;min-width:0}
.workspace .directory-cards .table-display-options{display:none}
@media(max-width:640px){.workspace .directory-auto .table-display-options{display:none}}
.workspace .data-table .table-footer[hidden],.workspace .directory-table[hidden]{display:none!important}
.workspace .data-table .table-tools{margin-bottom:16px}
.workspace .data-table .table-filter{flex:1 1 200px}
.workspace .data-table .table-filter input[type=search]{min-width:0}
.workspace .data-table .table-toolbar-actions{width:auto;flex:0 0 auto}
