/* InvestElos · v7.24. Final presentation layer, shared by every viewport.
   Layout follows available space, not user-agent detection. No data mutations. */
html{--ie-radius:16px;--ie-shadow:0 8px 28px #00152809;scrollbar-gutter:stable;-webkit-text-size-adjust:100%;text-size-adjust:100%}
html:root body{--form-bg:var(--ie-paper);--form-ink:var(--ie-ink);--form-muted:var(--ie-muted);--form-border:var(--ie-line);--form-accent:var(--ie-accent);--form-hover:var(--ie-tint);font-variant-numeric:tabular-nums}
html:has(dialog[open]){overflow:hidden}
html:root body :is(button,input,select,textarea){font-family:inherit}
html:root body :is(button,a,summary){touch-action:manipulation}
html:root body :is(button,a,input,select,textarea,summary):focus-visible{outline:2px solid var(--ie-accent);outline-offset:3px}
html:root body :is(#app,#auth,.plans-standalone) :is(h1,h2,h3){text-wrap:balance}
html:root body :is(#app,#auth,.plans-standalone) p{overflow-wrap:break-word}
/* Access panel: an actual contained card, including on phones. */
html:root body #auth #terminal-login{
 box-sizing:border-box;position:fixed;inset:0;width:432px;max-width:calc(100% - 32px);height:auto;
 max-height:calc(100dvh - 32px);max-height:calc(var(--ie-viewport-height,100dvh) - 32px);
 margin:auto;padding:0;border:1px solid var(--ie-line);border-radius:22px;
 background:var(--ie-paper);color:var(--ie-ink);box-shadow:0 28px 100px #00102055;
 overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scroll-padding:20px;
}
html:root body #auth #terminal-login::backdrop{background:#03162999;backdrop-filter:blur(7px)}
html:root body #auth #terminal-login .market-login-card{
 box-sizing:border-box;width:100%;max-width:none;min-width:0;margin:0!important;padding:28px!important;
 border:0!important;border-radius:inherit!important;background:var(--ie-paper)!important;color:var(--ie-ink)!important;box-shadow:none!important;
}
html:root body #auth #terminal-login .market-login-card::before{display:none}
html:root body #auth #terminal-login .market-login-brand{display:flex;align-items:center;min-height:36px;margin:0 44px 22px 0!important}
html:root body #auth #terminal-login .ie-logo{width:168px;flex-basis:168px}
html:root body #auth #terminal-login .terminal-close{top:14px;right:14px;width:44px;height:44px;display:grid;place-items:center;padding:0;border:1px solid var(--ie-line);border-radius:50%;background:var(--ie-soft);color:var(--ie-muted);font-size:25px;line-height:1;z-index:4}
html:root body #auth #terminal-login .market-login-kicker{display:block;font-size:10px!important;line-height:1.5;letter-spacing:.16em!important;color:var(--ie-accent)!important;margin:0 0 8px}
html:root body #auth #terminal-login h1{font-size:28px!important;line-height:1.2!important;font-weight:650;letter-spacing:-.035em!important;margin:0 0 10px!important;color:var(--ie-ink)!important}
html:root body #auth #terminal-login .market-login-card>p{font-size:13px!important;line-height:1.55!important;margin:0 0 20px!important;color:var(--ie-muted)!important}
html:root body #auth #terminal-login .provider-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin:0}
html:root body #auth #terminal-login .provider-button{display:flex;align-items:center;justify-content:center;gap:10px;min-height:46px;padding:10px 14px;margin:0;border:1px solid #d5dfe8!important;border-radius:11px;background:#fff!important;color:#142b40!important;font-size:13px!important;font-weight:600;line-height:1.35;box-shadow:none;transform:none}
html:root body #auth #terminal-login :is(.google-logo,.microsoft-mark){width:18px;height:18px;flex:0 0 18px}
html:root body #auth #terminal-login .market-divider{margin:17px 0;color:var(--ie-muted);font-size:11px}
html:root body #auth #terminal-login .market-divider::before,html:root body #auth #terminal-login .market-divider::after{background:var(--ie-line)}
html:root body #auth #terminal-login .market-email-form{display:grid;gap:12px;margin:0}
html:root body #auth #terminal-login .auth-field{display:grid;gap:6px;margin:0;min-width:0}
html:root body #auth #terminal-login .auth-field>span{color:var(--ie-muted)!important;font-size:12px!important;font-weight:550;line-height:1.4}
html:root body #auth #terminal-login input{box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:48px!important;padding:11px 12px!important;font-size:16px!important;line-height:1.4!important;border:1px solid var(--ie-line)!important;border-radius:10px!important;background:var(--ie-soft)!important;color:var(--ie-ink)!important;box-shadow:none!important}
html:root body #auth #terminal-login input::placeholder{color:var(--ie-muted)!important;opacity:.8}
html:root body #auth #terminal-login input:focus{outline:2px solid var(--ie-accent);outline-offset:2px;border-color:var(--ie-accent)!important}
html:root body #auth #terminal-login input:-webkit-autofill{-webkit-text-fill-color:var(--ie-ink)!important;box-shadow:0 0 0 1000px var(--ie-soft) inset!important}
html:root body #auth #terminal-login .password-input-wrap{position:relative;min-width:0}
html:root body #auth #terminal-login .password-input-wrap input{padding-right:78px!important}
html:root body #auth #terminal-login .password-toggle{position:absolute;right:4px;top:2px;bottom:2px;min-width:68px;min-height:44px;padding:0 8px;font-size:12px;color:var(--ie-muted);background:transparent}
html:root body #auth #terminal-login .auth-form-links{display:flex;justify-content:flex-end;margin:-4px 0 -4px}
html:root body #auth #terminal-login .text-action{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:4px 0;color:var(--ie-accent)!important;font-size:12px!important;line-height:1.4}
html:root body #auth #terminal-login .auth-submit.market-auth-submit{display:flex;justify-content:space-between;align-items:center;width:100%;min-height:48px!important;margin:0!important;padding:12px 16px!important;border-radius:11px!important;font-size:14px!important;font-weight:650;box-shadow:none!important}
html:root body #auth #terminal-login .market-create-row{display:flex;align-items:center;justify-content:center;gap:7px;flex-wrap:wrap;margin:10px 0 0;font-size:12px;color:var(--ie-muted)}
html:root body #auth #terminal-login .login-note:empty{display:none}
html:root body #auth #terminal-login .login-note{margin:12px 0 0;padding:10px 12px;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
html:root body #auth #terminal-login .market-security-row{display:flex;justify-content:center;flex-wrap:wrap;margin:12px 0 0;padding:12px 0 0;border-top:1px solid var(--ie-line);font-size:10px;line-height:1.5;color:var(--ie-muted)}
html:root body #auth #terminal-login .verification-code{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;margin:18px 0}
html:root body #auth #terminal-login .verification-code input{padding:8px 0!important;text-align:center;font-size:20px!important}
html:root body #auth #terminal-login .verification-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:space-between}
/* Shared workspace rhythm: restrained widths, readable forms and surfaces. */
html:root body.authenticated-view #app{--layout-gutter:clamp(20px,2.5vw,40px)}
html:root body.authenticated-view #app main{max-width:1600px;padding-top:28px}
html:root body.authenticated-view #app :is(.page-heading,.cb-heading,.ip-header){margin-bottom:20px;gap:16px}
html:root body.authenticated-view #app :is(.cb-panel,.card,.income-panel,.ps-position,.plan-card,.premium-setting-card){border-radius:var(--ie-radius);box-shadow:var(--ie-shadow)}
html:root body.authenticated-view #app :is(.cb-kpi,.ps-summary article,.income-metric){border-radius:14px;min-width:0}
html:root body.authenticated-view #app :is(.cb-kpi>strong,.ps-summary article>strong,.income-metric>strong){font-variant-numeric:tabular-nums;white-space:nowrap;overflow-wrap:normal;letter-spacing:-.035em}
html:root body.authenticated-view #app :is(.top-actions,.page-actions,.row-actions){gap:8px}
html:root body.authenticated-view #app :is(.subscription-heading,.ar-panel-head,.growth-header){flex-wrap:wrap;gap:14px;min-width:0}
html:root body.authenticated-view #app :is(.table-wrap,.ar-table-wrap,.growth-table-scroll){max-width:100%;min-width:0;overflow-x:auto}
html:root body.authenticated-view #app :is(input,select,textarea){max-width:100%;min-width:0}
html:root body.authenticated-view #modal{box-sizing:border-box;width:min(720px,calc(100% - 40px));max-width:calc(100% - 40px);height:auto;max-height:calc(var(--ie-viewport-height,100dvh) - 32px);margin:auto;border-radius:20px;overflow:auto;overscroll-behavior:contain;border:1px solid var(--ie-line);background:var(--ie-paper);color:var(--ie-ink)}
html:root body.authenticated-view #modal .modal-heading,html:root body.authenticated-view #modal .modal-footer{background:var(--ie-paper);border-color:var(--ie-line)}
html:root body.authenticated-view #modal .modal-heading{padding:20px 24px}
html:root body.authenticated-view #modal #modal-body{padding:22px 24px}
html:root body.authenticated-view #modal .modal-footer{padding:16px 24px}
html:root body.authenticated-view #modal :is(input,select,textarea){font-size:16px!important;min-height:46px;border-radius:9px}
html:root body.authenticated-view #modal input[type=checkbox]{min-height:20px;width:20px;height:20px}
/* Public market and plans follow the same visual scale. */
html:root body #auth #public-market-dashboard{max-width:1440px;margin:auto}
html:root body #auth #public-market-dashboard .terminal-header{min-height:80px;height:auto}
html:root body #auth #public-market-dashboard :is(.bank-presentation,.market-primary-panel,.terminal-chart-panel,.market-mover-panel){border-radius:16px;min-width:0}
html:root body .plans-content{margin-inline:auto}
html:root body :is(.subscription-page,.plans-content){min-width:0}
html:root body :is(.plan-card,.checkout-summary,.checkout-payment){min-width:0;border-radius:16px}
@media(min-width:1600px){
 html:root body.authenticated-view #app{--layout-sidebar:240px;--layout-gutter:36px}
 html:root body.authenticated-view #app main{padding-top:36px}
}
@media(min-width:700px) and (max-width:1199px){
 html:root body.authenticated-view #app :is(.cb-kpis,.ps-summary,.ip-metrics){grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
 html:root body.authenticated-view #app :is(.cb-chart-grid,.cb-secondary-grid){grid-template-columns:minmax(0,1fr)}
 html:root body.authenticated-view #app :is(.cb-kpi,.ps-summary article,.income-metric){padding:20px}
}
@media(max-width:699px){
 html{--ie-radius:14px;scroll-padding-top:98px}
 html:root body.authenticated-view #app{--layout-gutter:16px}
 html:root body.authenticated-view #app main{padding:20px var(--layout-gutter) calc(90px + env(safe-area-inset-bottom));}
 html:root body.authenticated-view #app .topbar{padding:9px 12px 7px;gap:4px 8px}
 html:root body.authenticated-view #app .breadcrumb{font-size:13px}
 html:root body.authenticated-view #app .topbar-status{font-size:10px;line-height:1.5}
 html:root body.authenticated-view #app :is(.navigation-toggle,.display-icon-button,#refresh-button){width:40px;height:44px;min-height:44px;flex-basis:40px;padding:10px}
 html:root body.authenticated-view #app .mobile-navigation{padding:6px 12px calc(6px + env(safe-area-inset-bottom));box-shadow:0 -4px 18px #00152809}
 html:root body.authenticated-view #app .mobile-navigation button{min-height:48px;gap:3px;font-size:10px;border-radius:10px}
 html:root body.authenticated-view #app .mobile-navigation svg{width:20px;height:20px}
 html:root body.authenticated-view #app :is(.page-heading,.cb-heading,.ip-header){gap:12px;margin-bottom:18px;padding-bottom:0}
 html:root body.authenticated-view #app :is(.page-heading h1,.cb-heading h1,.ip-header h1,.subscription-heading h1){font-size:26px!important;line-height:1.2;letter-spacing:-.035em;margin:4px 0 8px}
 html:root body.authenticated-view #app :is(.page-heading p,.cb-heading p,.ip-header p,.subscription-heading p){font-size:12px;line-height:1.6}
 html:root body.authenticated-view #app :is(.btn,.cb-button,.subscription-button){min-height:44px;font-size:12px!important;line-height:1.4;white-space:normal;padding:10px 12px;border-radius:10px}
 html:root body.authenticated-view #app :is(input,select,textarea),html:root body .subscription-page :is(input,select,textarea){font-size:16px!important;min-height:46px;max-width:100%}
 html:root body.authenticated-view #app :is(input[type=checkbox],input[type=radio]){min-height:20px}
 html:root body.authenticated-view #app :is(.cb-kpis,.ps-summary,.ip-metrics){grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 html:root body.authenticated-view #app :is(.cb-kpi,.ps-summary article,.income-metric){padding:15px 13px}
 html:root body.authenticated-view #app .cb-kpi:first-child{grid-column:1/-1;padding:20px}
 html:root body.authenticated-view #app .cb-kpi:last-child{grid-column:auto}
 html:root body.authenticated-view #app .cb-kpi-feature>strong{font-size:30px;margin:12px 0 8px}
 html:root body.authenticated-view #app :is(.cb-kpi:not(:first-child)>strong,.ps-summary article>strong,.income-metric>strong){font-size:21px;line-height:1.3}
 html:root body.authenticated-view #app :is(.ps-summary article>span,.income-metric-label,.cb-kpi-label){font-size:11px;line-height:1.4}
 html:root body.authenticated-view #app :is(.cb-chart-grid,.cb-secondary-grid,.premium-settings-grid,.premium-help-grid,.subscription-plans,.checkout-grid){grid-template-columns:minmax(0,1fr);gap:16px}
 html:root body.authenticated-view #app :is(.cb-panel-head,.premium-section-head){padding:16px;gap:10px}
 html:root body.authenticated-view #app :is(.cb-panel-head h2,.income-panel-head h2,.ps-section-heading h2){font-size:18px;line-height:1.35}
 html:root body.authenticated-view #app .responsive-records tbody{padding:10px;gap:10px}
 html:root body.authenticated-view #app .responsive-records tbody tr{padding:14px;gap:12px;border-radius:12px}
 html:root body.authenticated-view #app .responsive-records tbody tr>td{font-size:13px;line-height:1.5;overflow-wrap:break-word}
 html:root body.authenticated-view #app .responsive-records td::before{font-size:11px}
 html:root body.authenticated-view #app .responsive-records .row-actions{display:flex;flex-wrap:wrap;gap:8px}
 html:root body.authenticated-view #app .responsive-records .row-actions .btn{flex:1 1 100px}
 html:root body.authenticated-view #app #income-center .ip-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:14px}
 html:root body.authenticated-view #app #income-center .ip-filters label{min-width:0}
 html:root body.authenticated-view #app #income-center .ip-tabs{display:flex;overflow-x:auto;gap:4px;padding:0 12px;scrollbar-width:thin}
 html:root body.authenticated-view #app #income-center .ip-tabs button{min-height:44px;flex:0 0 auto;padding:8px 10px;font-size:12px}
 html:root body.authenticated-view #app #income-center .ip-ledger tbody{padding:10px}
 html:root body.authenticated-view #app #income-center .ip-ledger tr{border-radius:12px;padding:14px}
 html:root body.authenticated-view #app #income-center .ip-calendar-months{grid-template-columns:repeat(3,minmax(0,1fr))}
 html:root body.authenticated-view #app #income-center .ip-calendar-months button{min-height:64px;padding:10px}
 html:root body.authenticated-view #app #positions-center .ps-position{border-radius:14px}
 html:root body.authenticated-view #app #positions-center .position-lots-table tbody{padding:10px;gap:10px}
 html:root body.authenticated-view #app #positions-center .ps-lot-actions{display:flex;gap:8px;flex-wrap:wrap}
 html:root body.authenticated-view #app #positions-center .ps-lot-actions .btn{flex:1 1 90px}
 html:root body.authenticated-view #modal{inset:0;width:calc(100% - 20px);max-width:calc(100% - 20px);height:auto;max-height:calc(var(--ie-viewport-height,100dvh) - 20px);margin:auto;border-radius:18px}
 html:root body.authenticated-view #modal form{min-height:0}
 html:root body.authenticated-view #modal .modal-heading{padding:16px;position:sticky;top:0}
 html:root body.authenticated-view #modal #modal-body{padding:18px 16px}
 html:root body.authenticated-view #modal .modal-footer{padding:12px 16px max(12px,env(safe-area-inset-bottom));position:sticky;bottom:0}
 html:root body.authenticated-view #modal .form-grid{gap:14px;grid-template-columns:1fr}
 html:root body #auth #public-market-dashboard .terminal-header{min-height:68px;gap:8px}
 html:root body #auth #public-market-dashboard .market-brand .ie-logo{width:150px;flex-basis:150px}
 html:root body #auth #public-market-dashboard .terminal-header-actions{gap:6px}
 html:root body #auth #public-market-dashboard .terminal-button{min-height:44px;min-width:70px;padding:10px 12px;font-size:13px}
 html:root body #auth #public-market-dashboard .commercial-intro{padding:22px 0;gap:18px}
 html:root body #auth #public-market-dashboard .commercial-intro h2{font-size:clamp(25px,7vw,32px);line-height:1.18}
 html:root body #auth #public-market-dashboard .market-hero-row h1{font-size:30px!important;line-height:1.2}
 html:root body #auth #public-market-dashboard .market-primary-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 html:root body #auth #public-market-dashboard .market-stock-card{padding:13px;min-height:0}
 html:root body #auth #public-market-dashboard .market-stock-value-row strong{font-size:19px}
 html:root body #auth #public-market-dashboard .bank-logo-grid li{min-height:58px}
 html:root body #auth #public-market-dashboard .bank-coverage-trigger{min-height:44px;margin-top:0}
 html:root body.plans-standalone .plans-header{padding:14px 16px;gap:8px}
 html:root body.plans-standalone .plans-brand .ie-logo{width:150px;flex-basis:150px}
 html:root body.plans-standalone .plans-header nav{gap:12px}
 html:root body.plans-standalone .plans-content{padding:26px 16px}
 html:root body .plans-heading{display:block;margin-bottom:24px}
 html:root body .subscription-page .plans-heading h1{font-size:30px;line-height:1.2;letter-spacing:-.035em}
 html:root body :is(.plan-card,.checkout-summary,.checkout-payment){padding:22px 18px}
 html:root body .subscription-plans{grid-template-columns:1fr;gap:16px}
 html:root body .subscription-page .subscription-button{min-height:46px;white-space:normal;line-height:1.4}
}
@media(max-width:399px){
 html:root body #auth #terminal-login{max-width:calc(100% - 20px);max-height:calc(var(--ie-viewport-height,100dvh) - 20px);border-radius:18px}
 html:root body #auth #terminal-login .market-login-card{padding:22px 18px 18px!important}
 html:root body #auth #terminal-login .ie-logo{width:148px;flex-basis:148px}
 html:root body #auth #terminal-login .market-login-brand{margin-bottom:18px!important}
 html:root body #auth #terminal-login h1{font-size:25px!important}
 html:root body.authenticated-view #app{--layout-gutter:12px}
 html:root body.authenticated-view #app .topbar{grid-template-columns:40px minmax(0,1fr) auto;gap:4px}
 html:root body.authenticated-view #app :is(.display-icon-button,#refresh-button){width:36px;flex-basis:36px;padding:8px}
 html:root body #auth #public-market-dashboard .market-brand .ie-logo{width:132px;flex-basis:132px}
 html:root body.plans-standalone .plans-brand .ie-logo{width:132px;flex-basis:132px}
}
@media(max-width:350px){
 html:root body.authenticated-view #app :is(.ps-summary,.ip-metrics){grid-template-columns:1fr}
 html:root body.authenticated-view #app #income-center .ip-filters{grid-template-columns:1fr}
}
@media(max-height:620px){
 html:root body #auth #terminal-login .market-login-card{padding-block:20px!important}
 html:root body #auth #terminal-login .market-login-brand{margin-bottom:14px!important}
 html:root body #auth #terminal-login .market-security-row{margin-top:8px}
}
@media(prefers-reduced-motion:reduce){html:root body :is(dialog,button,a){scroll-behavior:auto;transition:none!important;animation:none!important}}
/* Container modules own their styles; use equally scoped overrides. */
html:root body #app #income-center .income-metric,html:root body #app #positions-center .ps-summary article{border-radius:14px;min-width:0}
html:root body #app #income-center .income-metric>strong,html:root body #app #positions-center .ps-summary article>strong{white-space:nowrap;overflow-wrap:normal}
@media(min-width:700px) and (max-width:1199px){
 html:root body #app #income-center .ip-metrics,html:root body #app #positions-center .ps-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
}
@media(max-width:699px){
 html:root body #app #income-center .ip-metrics,html:root body #app #positions-center .ps-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 html:root body #app #income-center .income-metric,html:root body #app #positions-center .ps-summary article{padding:15px 13px}
 html:root body #app #income-center .income-metric>strong,html:root body #app #positions-center .ps-summary article>strong{font-size:21px;line-height:1.3}
 html:root body #app #income-center .income-metric-label{font-size:11px;line-height:1.4}
 html:root body #app #income-center .ip-header h1,html:root body #app #positions-center .page-heading h1{font-size:26px!important}
 html:root body #app #income-center .btn,html:root body #app #positions-center .btn{min-height:44px;border-radius:10px;font-size:12px}
}
@media(max-width:350px){html:root body #app #income-center .ip-metrics,html:root body #app #positions-center .ps-summary{grid-template-columns:1fr}}
@media(pointer:coarse){html:root body :is(#app,#modal,.subscription-page) :is(input,select,textarea){font-size:16px!important}}
