/* One paired palette for shared surfaces, text, forms and disclosure content. */
:root{--mm-canvas:#f4f6fa;--mm-surface:#ffffff;--mm-soft:#eef2f7;--mm-ink:#17283e;--mm-muted:#4c5d72;--mm-line:#cbd5e2;--mm-link:#993708;--mm-up:#b51e36;--mm-down:#1755b6}
html[data-theme=dark]{--mm-canvas:#0e1727;--mm-surface:#172237;--mm-soft:#223149;--mm-ink:#edf2fa;--mm-muted:#c2cede;--mm-line:#465874;--mm-link:#ffc08c;--mm-up:#ffaab7;--mm-down:#adcbff}
html[data-theme]{--ink:var(--mm-ink);--text:var(--mm-ink);--navy:var(--mm-ink);--muted:var(--mm-muted);--paper:var(--mm-canvas);--bg:var(--mm-canvas);--surface:var(--mm-surface);--line:var(--mm-line);--next2-ink:var(--mm-ink);--next2-muted:var(--mm-muted);--next2-surface:var(--mm-surface);--next2-soft:var(--mm-soft);--next2-line:var(--mm-line);--next2-link:var(--mm-link)}
html[data-theme] body.desktop-v4{background:var(--mm-canvas)!important;color:var(--mm-ink)!important;color-scheme:light}
html[data-theme=dark] body.desktop-v4{color-scheme:dark}
html[data-theme] body.desktop-v4 :is(input,select,textarea){background:var(--mm-surface)!important;color:var(--mm-ink)!important;border-color:var(--mm-line)!important}
html[data-theme] body.desktop-v4 :is(input,textarea)::placeholder{color:var(--mm-muted)!important;opacity:1}
html[data-theme] body.desktop-v4 :is(footer,dialog,.live-panel,.member-card,.card,.metric-row,.live-insight-card,.ai-card,.ai-guidance-card,.ai-stat-grid article,.ai-risk-grid article,.v3-community-rule,.v4-community-empty,.community-guide,.info-box,.v4-tool-result,.real-opt-metrics>div){background-color:var(--mm-surface)!important;color:var(--mm-ink)!important;border-color:var(--mm-line)!important}
html[data-theme] body.desktop-v4 :where(footer,#modal) :is(a,p,small,span,strong,h2,h3,h4,label,summary){color:var(--mm-ink)!important}
html[data-theme] body.desktop-v4 :is(th,dt,legend,.member-field,.form-field,.filter-select,.tool-layout label,.real-weight label,.results-summary,.live-price-line,.stock-price,.member-record-detail,.ai-interpretation-grid article>div){color:var(--mm-ink)!important}
html[data-theme] body.desktop-v4 :is(th,.info-box,.next-info,.real-method,.live-provenance,.member-summary,.member-stat-grid>div,.ai-interpretation-grid article>div){background-color:var(--mm-soft)!important;border-color:var(--mm-line)!important}
html[data-theme] body.desktop-v4 :is(.next-info,.real-method,.live-provenance){padding:10px 12px;border-radius:8px}
html[data-theme] body.desktop-v4 :is(.next-info,.real-method,.live-provenance) :is(summary,p,li,span,b,strong){color:var(--mm-ink)!important}
html[data-theme] body.desktop-v4 :is(main,dialog) :is(.up,.up b){color:var(--mm-up)!important}
html[data-theme] body.desktop-v4 :is(main,dialog) :is(.down,.down b){color:var(--mm-down)!important}
html[data-theme] body.desktop-v4 :is(.v4-lp-hero,.next-budget-hero,.next-wealth-hero,.r2-asset-hero,.next-asset-chart) :is(.up,.up b){color:#681024!important}
html[data-theme] body.desktop-v4 :is(.v4-lp-hero,.next-budget-hero,.next-wealth-hero,.r2-asset-hero,.next-asset-chart) :is(.down,.down b){color:#12345e!important}
html[data-theme] body.desktop-v4 #real-heat-grid .r3-heat-tile{background:var(--tile-bg)!important;color:var(--tile-ink)!important}
html[data-theme] body.desktop-v4 #real-heat-grid .r3-heat-tile :is(span,small,b,strong){color:var(--tile-ink)!important}
html body.desktop-v4 #real-heat-grid .r3-heat-tile>small{display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;min-height:0!important;max-height:none!important;line-height:1.35!important;width:100%;min-width:0;max-width:100%;font-size:11px!important}
html body.desktop-v4 #real-heat-grid.r3-heat-map .r5-map-tile>span{font-size:var(--heat-code)!important}
html body.desktop-v4 #real-heat-grid.r3-heat-map .r5-map-tile>b{font-size:var(--heat-percent)!important}
html body.desktop-v4 #real-heat-grid .next-heat-medium>small{display:none!important}
html body.desktop-v4 #real-heat-grid .next-heat-card{min-width:0!important;overflow:hidden!important;box-sizing:border-box}
html body.desktop-v4 #real-heat-grid .next-heat-card>span,html body.desktop-v4 #real-heat-grid .next-heat-card>b{white-space:nowrap!important;line-height:1.3!important}
.next-heat-back{margin:0 0 6px!important;font-size:12px!important;min-height:28px!important}.next-heat-back[hidden]{display:none!important}
.next-fund-skeleton{padding:18px 0;color:var(--mm-muted)}.next-fund-skeleton>div{height:62px;background:linear-gradient(100deg,var(--mm-soft),var(--mm-surface),var(--mm-soft));background-size:200% 100%;animation:mm-pulse 1.5s ease-in-out infinite;border-radius:8px;margin:7px 0}
@keyframes mm-pulse{to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.next-fund-skeleton>div{animation:none}}

html[data-theme] body.desktop-v4 .skip{background:var(--mm-surface)!important;color:var(--mm-ink)!important}
html:not([data-theme=dark]) body.desktop-v4 #primary-navigation>a.active,html:not([data-theme=dark]) body.desktop-v4 .workspace-tabs>a[aria-current]{color:#a43b08!important}

html[data-theme] body.desktop-v4 .v4-steps article>b{color:#342112!important}
/* Shared states: selected controls and badges always keep their paired ink. */
html[data-theme=dark] body.desktop-v4 :is(button[aria-pressed=true],.stock-choice.is-selected):not(.r3-heat-tile) :is(span,small,strong,b,time){color:#302011!important}
html[data-theme] body.desktop-v4 :is(.live-pagination,.next-news-pages,.r5-insight-pagination){background:var(--mm-surface)!important;color:var(--mm-ink)!important;border-color:var(--mm-line)!important}
html[data-theme] body.desktop-v4 :is(.live-pagination,.next-news-pages,.r5-insight-pagination)>span{color:var(--mm-ink)!important;background:transparent!important}
html[data-theme] body.desktop-v4 :is(.ai-market-hero.r2-score-secondary){background:var(--mm-soft)!important;color:var(--mm-ink)!important}
html[data-theme] body.desktop-v4 .ai-market-hero.r2-score-secondary :is(h2,p,span,small){color:var(--mm-ink)!important}
html[data-theme] body.desktop-v4 .r2-summary :is(h2,p,li,b,strong,small,.jp-label){color:#352214!important}
html[data-theme] body.desktop-v4 .ai-score-card .ai-score-labels span{color:var(--mm-muted)!important}
html[data-theme=dark] body.desktop-v4 :is(.ai-step,.kicker,.v4-empty-icon,.v4-tool-tabs button.on strong){color:var(--mm-link)!important}
html[data-theme] body.desktop-v4 .tool-result :is(.v4-growth-legend,.v4-growth-axis) :is(span,b,small){color:#edf2fa!important}
html[data-theme] body.desktop-v4 .r2-summary button :is(span,small,strong,b){color:var(--mm-ink)!important}
html body.desktop-v4 #real-heat-grid.r3-heat-map .r5-map-tile>small{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}

html[data-theme] body.desktop-v4 :is(.r2-asset-hero,.next-wealth-hero,.next-budget-hero) details>summary{color:#432b18!important}
html[data-theme] body.desktop-v4 .r2-summary .r2-stock-chips :is(a,button,b,span){color:var(--mm-ink)!important}
html[data-theme] body.desktop-v4 .tool-result{background:var(--mm-surface)!important;color:var(--mm-ink)!important;border:1px solid var(--mm-line)}
html[data-theme] body.desktop-v4 .tool-result :is(p,span,small,strong,b,label,h2,h3){color:var(--mm-ink)!important}

html[data-theme] body.desktop-v4 .tool-result .v4-growth-chart{background:var(--mm-surface)!important;color:var(--mm-ink)!important}
html[data-theme] body.desktop-v4 .tool-result :is(.v4-growth-legend,.v4-growth-axis) :is(span,b,small){color:var(--mm-ink)!important}

html[data-theme] body.desktop-v4 .real-compare-dock{color:var(--mm-ink)!important}
html[data-theme] body.desktop-v4 .real-compare-dock .dock-chips button>span{color:var(--mm-ink)!important}
html[data-theme] body.desktop-v4 .v5-related-badge{background:var(--mm-soft)!important;color:var(--mm-link)!important;border-color:var(--mm-line)!important}
html[data-theme] body.desktop-v4 .next-cost-up{color:var(--mm-up)!important}
html[data-theme] body.desktop-v4 .next-cost-down{color:var(--mm-down)!important}
html[data-theme] body.desktop-v4 #r2-div-month-bars button[aria-pressed=true]{background:var(--mm-soft)!important;color:var(--mm-ink)!important;box-shadow:inset 0 0 0 2px var(--mm-link)}
html[data-theme] body.desktop-v4 #r2-div-month-bars button[aria-pressed=true] :is(small,span,b){color:var(--mm-ink)!important}
html[data-theme] body.desktop-v4 .js-plotly-plot :is(.textpoint text,.annotation-text){fill:var(--mm-ink)!important}

html[data-theme] body.desktop-v4 #real-heat-grid .r3-heat-tile{opacity:1!important}
/* Shared segmented controls keep selected backgrounds and text as a pair at every size. */
:root{--mm-selected-bg:#0c1427;--mm-selected-ink:#ffffff}
html[data-theme=dark]{--mm-selected-bg:#ffab63;--mm-selected-ink:#302011}
html[data-theme] body.desktop-v4 :is(main,#modal) .compact-tabs button[aria-pressed=true]{background:var(--mm-selected-bg)!important;color:var(--mm-selected-ink)!important;border-color:var(--mm-selected-bg)!important}
html[data-theme] body.desktop-v4 :is(main,#modal) .compact-tabs button[aria-pressed=true] :is(span,small,b,strong){color:var(--mm-selected-ink)!important}

/* Direct destinations and the fund overview use the shared light/dark palette. */
.mobile-direct-links{display:none}
html body.desktop-v4 header.refined-header{gap:18px}
html body.desktop-v4 #primary-navigation{gap:18px;min-width:0}
html body.desktop-v4 #primary-navigation>a{font-size:13px}
html body.desktop-v4 .nav-finder{min-width:36px;width:36px;padding:8px;margin-left:auto;flex-shrink:0}
html body.desktop-v4 .nav-finder span{display:none!important}
html body.desktop-v4 #primary-navigation>a[href="/optimizer/"]{border-radius:8px;padding:9px 11px;align-self:center;background:var(--mm-soft);border:1px solid var(--mm-line);color:var(--mm-link)!important}
html body.desktop-v4 #primary-navigation>a[href="/optimizer/"][aria-current]{background:#ff963e;color:#302011!important;border-color:#d96112}
.fund-intelligence{grid-column:1/-1;grid-row:1;min-width:0}
html body.desktop-v4 #fund-rankings{grid-row:2}
html body.desktop-v4 #real-fund-directory,html body.desktop-v4 #real-compare{grid-row:3}
.fund-overview-heading,.fund-overview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px;flex-wrap:wrap}
.fund-overview-heading h1{font-size:26px;margin:0 0 5px;line-height:1.3;color:var(--mm-ink)}
.fund-overview-heading p{font-size:13px;color:var(--mm-muted);margin:0}
.fund-overview-heading .btn{font-size:13px;min-height:42px;padding:10px 16px}
.fund-overview-toolbar label{display:flex;align-items:center;gap:10px;font-size:12px;font-weight:700;color:var(--mm-ink)}
.fund-overview-toolbar select{padding:7px 30px 7px 10px;border:1px solid var(--mm-line);border-radius:8px;font-size:12px;min-height:36px}
.fund-overview-toolbar>span{font-size:11px;color:var(--mm-muted);margin-right:auto}
.fund-overview-toolbar>a{font-size:12px;color:var(--mm-link);font-weight:700}
.fund-overview-grid{display:grid;grid-template-columns:minmax(300px,.85fr) minmax(0,1.4fr);gap:16px;align-items:start}
html body.desktop-v4 .fund-overview-grid>.live-panel{padding:18px!important;margin:0;min-width:0}
.fund-overview-grid h2{font-size:15px!important;line-height:1.5;margin:0}
.fund-overview-grid .live-panel-title{gap:10px;align-items:center;margin:0 0 10px;flex-wrap:wrap}
.fund-bubble-panel select{max-width:100%;min-width:0;padding:7px 24px 7px 8px;border:1px solid var(--mm-line);border-radius:8px;font-size:11px}
.fund-overview-period{font-size:11px;color:var(--mm-muted);margin:3px 0 12px}
.fund-leader-columns{display:grid;grid-template-columns:1fr;gap:13px}
.fund-leader-columns h3{font-size:12px;color:var(--mm-muted);margin:0 0 5px}
.fund-leader-row{display:grid;grid-template-columns:18px minmax(0,1fr) auto;gap:7px;width:100%;border:0;border-bottom:1px solid var(--mm-line);background:transparent;color:var(--mm-ink);text-align:left;padding:8px 0;cursor:pointer;align-items:center;font-size:12px}
.fund-leader-order{font-size:11px;color:var(--mm-muted)}
.fund-leader-name{min-width:0;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fund-leader-name small{display:block;font-size:10px;font-weight:400;color:var(--mm-muted)}
.fund-leader-row b{font-size:14px;white-space:nowrap;font-variant-numeric:tabular-nums}
.fund-leader-row>i{grid-column:2/-1;height:3px;border-radius:4px;background:var(--mm-soft);overflow:hidden;margin-top:-4px}
.fund-leader-row>i>span{display:block;height:100%;border-radius:4px}
.fund-chart-method{font-size:11px;color:var(--mm-muted);margin-top:12px}
.fund-chart-method summary{cursor:pointer;min-height:24px;color:var(--mm-muted)}
.fund-chart-method p{font-size:11px;line-height:1.7;color:var(--mm-muted);background:var(--mm-soft);padding:10px;border-radius:8px}
#fund-bubble-chart{height:250px;min-width:0;width:100%;max-width:100%;overflow:hidden}
.fund-bubble-empty{display:grid;place-items:center;height:100%;font-size:13px;padding:20px;text-align:center;color:var(--mm-muted);box-sizing:border-box}
.fund-analysis-login{padding:24px 14px;text-align:center;background:var(--mm-soft);border-radius:10px;color:var(--mm-ink);font-size:13px;line-height:1.8}
.fund-analysis-login .btn{font-size:12px;margin-top:7px}
#fund-bubble-chart:has(.fund-analysis-login){height:auto;min-height:140px}
.fund-bubble-picker{display:flex;align-items:center;gap:10px;font-size:11px;color:var(--mm-muted);margin:4px 0 10px}
.fund-bubble-picker select{flex:1;min-width:0;font-size:12px;height:36px}
.fund-bubble-readout{padding:12px;border:1px solid var(--mm-line);border-radius:10px;background:var(--mm-soft);color:var(--mm-ink)}
.fund-bubble-readout>div>strong{font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.fund-bubble-readout>div>small{display:block;font-size:10px;color:var(--mm-muted);margin-top:3px}
.fund-bubble-readout dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 0}
.fund-bubble-readout dt{font-size:10px;color:var(--mm-muted)}
.fund-bubble-readout dd{font-size:17px;font-weight:750;line-height:1.4;margin:3px 0 0;font-variant-numeric:tabular-nums}
.fund-bubble-readout .actions{gap:10px;flex-wrap:wrap}
.fund-bubble-readout .actions>button{font-size:11px;min-height:34px;padding:6px 9px}
html body.desktop-v4 .fund-workbench>.fund-rankings{margin-top:16px}
@media(min-width:1550px){.fund-leader-columns{grid-template-columns:1fr 1fr;gap:18px}}
@media(max-width:1150px) and (min-width:761px){
 html body.desktop-v4 header.refined-header{gap:10px;padding-inline:18px}
 html body.desktop-v4 header .brand span{font-size:18px}
 html body.desktop-v4 #primary-navigation{gap:12px}
 html body.desktop-v4 #primary-navigation>a{font-size:12px}
 html body.desktop-v4 #primary-navigation>a[href="/optimizer/"]{padding:8px 7px}
 .account-area .account-login,.account-area #member-signout{font-size:11px;padding:7px}
}
@media(max-width:1100px) and (min-width:761px){
 html body.desktop-v4 header.refined-header{height:108px;min-height:108px;box-sizing:border-box;flex-wrap:wrap;align-content:space-between;gap:0 12px;padding:10px 18px 0}
 html body.desktop-v4 header.refined-header .account-area{margin-left:auto}
 html body.desktop-v4 #primary-navigation{order:5;flex:1 1 100%;height:44px;align-self:auto;gap:20px}
 html body.desktop-v4 #primary-navigation>a{padding:10px 0 8px}
 html body.desktop-v4 #primary-navigation>a[href="/optimizer/"]{padding:7px 9px}
 html body.desktop-v4 .workspace-bar{top:108px}
}
@media(max-width:760px){
 html body.desktop-v4 .fund-workbench{display:flex;flex-direction:column}
 html body.desktop-v4 .fund-workbench>section{width:100%;box-sizing:border-box}
 html body.desktop-v4 .mobile-direct-links{display:flex;position:sticky;top:56px;z-index:40;height:46px;box-sizing:border-box;align-items:center;justify-content:space-between;gap:12px;padding:6px 14px;background:var(--mm-surface);border-bottom:1px solid var(--mm-line);color:var(--mm-ink)}
 html body.desktop-v4 .mobile-direct-links a{box-sizing:border-box;font-size:11px;line-height:1.2;height:34px;min-height:34px;padding:0 6px;white-space:nowrap;display:flex;align-items:center;gap:8px;text-decoration:none;color:var(--mm-link);font-weight:700}
 html body.desktop-v4 .workspace-bar{top:56px}
 .mobile-direct-links a:first-child{padding:0 10px;background:var(--mm-soft);border:1px solid var(--mm-line);border-radius:7px}
 .mobile-direct-links a[aria-current]{box-shadow:inset 0 -2px var(--mm-link)}
 .fund-overview-heading{gap:12px;margin:0 0 14px}
 .fund-overview-heading h1{font-size:23px}
 .fund-overview-heading .btn{width:100%;text-align:center;justify-content:center}
 .fund-overview-toolbar{gap:9px;margin-bottom:12px}
 .fund-overview-toolbar>span{order:3;width:100%;font-size:10px}
 .fund-overview-grid{grid-template-columns:1fr;gap:12px}
 html body.desktop-v4 .fund-overview-grid>.live-panel{padding:14px!important}
 .fund-overview-grid h2{font-size:14px!important}
 .fund-leader-columns{grid-template-columns:1fr 1fr;gap:12px}
 .fund-leader-row{grid-template-columns:15px minmax(0,1fr);gap:5px;padding:8px 0}
 .fund-leader-row b{grid-column:2;font-size:16px}
 .fund-leader-name{font-size:11px}
 .fund-leader-row>i{margin-top:0}
 .fund-bubble-readout dd{font-size:15px}
 html body.desktop-v4 .v3-bottom-nav{grid-template-columns:repeat(6,minmax(0,1fr))}
 html body.desktop-v4 .v3-bottom-nav>a{font-size:10px}
}

/* Keep the fund flow together; the stock section has its own list and watch view. */
html body.desktop-v4 .workspace-tabs>a[href^="/optimizer/"]{color:var(--mm-link);font-weight:800}
html body.desktop-v4 .workspace-tabs>a[href^="/optimizer/"][aria-current]{background:var(--mm-soft);box-shadow:inset 0 -3px #ef842f;padding-inline:12px;border-radius:7px 7px 0 0}
.stock-watch-filter{display:flex;gap:7px;align-items:center;font-size:12px;color:var(--mm-ink);margin:12px 0}
.fund-bubble-legend{display:flex;gap:12px;flex-wrap:wrap;font-size:10px;color:var(--mm-muted);margin:6px 0 0}
.fund-bubble-legend i{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:4px}
#fund-watch-coverage .fund-watch-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:11px;margin:12px 0 6px;color:var(--mm-ink)}
#fund-watch-coverage .fund-watch-heading>button{font-size:11px;background:none;border:0;color:var(--mm-link);cursor:pointer}
#fund-watch-coverage .fund-watch-heading>span{font-size:10px;color:var(--mm-muted)}
.fund-watch-items{display:grid;gap:4px}
.fund-watch-items>button{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 8px;padding:7px 9px;border:1px solid var(--mm-line);border-radius:7px;background:var(--mm-surface);text-align:left;color:var(--mm-ink);cursor:pointer}
.fund-watch-items>button>span{font-size:11px;min-width:0;overflow-wrap:anywhere}
.fund-watch-items>button>span>small{display:block;font-size:10px;color:var(--mm-muted);margin-top:2px}
.fund-watch-items>button>b{font-size:13px;text-align:right}
.fund-watch-items>button>small{grid-column:1/-1;font-size:10px;color:var(--mm-muted)}
.fund-stock-watch-link{display:block;margin-top:9px;font-size:10px;color:var(--mm-link)}
.fund-bubble-readout{background:var(--mm-soft);padding:10px;border:0}
.fund-bubble-readout dl{margin:8px 0;gap:12px}
.fund-bubble-readout dd{font-size:18px}
.fund-bubble-picker{margin:3px 0 7px}
.fund-bubble-picker select{height:32px}
.fund-bubble-readout .actions>button{min-height:30px;padding:5px 8px}
.fund-overview-grid>.live-panel{box-shadow:0 3px 14px #17283e05}

/* A compact allocation workbench: controls, mode and result stay together. */
html body.desktop-v4 .real-optimizer-grid{display:grid;grid-template-columns:260px minmax(0,1fr);gap:14px;align-items:start}
html body.desktop-v4 .real-allocation{padding:15px!important;top:136px;position:sticky;box-sizing:border-box}
html body.desktop-v4 .real-allocation h2{font-size:15px!important;margin:0}
html body.desktop-v4 .real-allocation .jp-label{display:none}
html body.desktop-v4 .real-mobile-allocation>summary{display:none}
html body.desktop-v4 .real-weight{margin:12px 0;padding:0;border:0}
html body.desktop-v4 .real-weight label small{font-size:10px;line-height:1.4;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin-top:2px}
html body.desktop-v4 .real-weight label b{font-size:12px}
html body.desktop-v4 .real-weight output{font-size:18px}
html body.desktop-v4 .real-weight input{margin:7px 0;height:16px}
html body.desktop-v4 .real-weight>div{font-size:10px}
html body.desktop-v4 .real-allocation-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding-top:10px;margin-top:10px}
html body.desktop-v4 .real-allocation-actions .btn{font-size:11px;padding:7px 10px;min-height:32px}
html body.desktop-v4 .real-allocation-actions .text-link{font-size:10px}
.opt-mix-details{margin:9px 0;font-size:11px;color:var(--mm-muted)}
.opt-mix-details>summary{min-height:28px;cursor:pointer}
html body.desktop-v4 .real-optimizer-results{gap:12px;min-width:0}
html body.desktop-v4 .optimizer-hero-panel{padding:15px!important}
html body.desktop-v4 .optimizer-hero-panel>.live-panel-title{position:sticky;top:124px;z-index:4;background:var(--mm-surface);padding:4px 0 9px;margin:0 0 8px;gap:10px;align-items:center}
html body.desktop-v4 .optimizer-hero-panel>.live-panel-title h2{font-size:18px;margin:0;line-height:1.4}
html body.desktop-v4 .optimizer-hero-panel>.live-panel-title .jp-label{display:none}
html body.desktop-v4 .optimizer-hero-panel>.live-panel-title p{font-size:11px;line-height:1.4;margin:4px 0 0;color:var(--mm-muted)}
html body.desktop-v4 .optimizer-hero-panel .compact-tabs button{min-height:32px;padding:7px 10px;font-size:11px}
html body.desktop-v4 .real-opt-plot{height:320px!important;background:var(--mm-surface);border:1px solid var(--mm-line);border-radius:10px}
html body.desktop-v4 #real-opt-metrics .metric-row{gap:8px;margin:0 0 8px}
html body.desktop-v4 #real-opt-metrics .metric-row>div{min-height:0;padding:10px;background:var(--mm-soft);border:0;border-radius:8px}
html body.desktop-v4 #real-opt-metrics strong{font-size:22px;line-height:1.3;margin:5px 0}
html body.desktop-v4 #real-opt-metrics :is(span,small){font-size:10px;line-height:1.4}
html body.desktop-v4 .real-plot-controls{font-size:10px;gap:12px;flex-wrap:wrap;padding:8px 0}
html body.desktop-v4 .real-plot-controls button{font-size:10px;min-height:28px}
.opt-history>summary{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--mm-ink);cursor:pointer;min-height:28px}
.opt-history>summary>span{font-size:10px;color:var(--mm-muted)}
html body.desktop-v4 .real-optimizer-results :is(.opt-history,.real-method){padding:12px 15px!important}
html body.desktop-v4 .r5-product-picker{padding:12px 15px!important;margin-bottom:12px}
html body.desktop-v4 .r5-product-picker h1{font-size:20px!important}
html body.desktop-v4 .r5-product-editor>summary{font-size:12px;padding:7px 0}

/* Articles are regular pages, with native URLs and browser back navigation. */
.insight-page{padding-top:18px;padding-bottom:32px}
.insight-breadcrumb{display:flex;align-items:center;gap:18px;margin-bottom:16px;font-size:12px;color:var(--mm-muted)}
.insight-breadcrumb a{color:var(--mm-link);text-decoration:none}
.insight-page .v4-reader{grid-template-columns:minmax(0,1fr) 280px;gap:24px;align-items:start}
.insight-page .v4-reader-content{min-width:0;background:var(--mm-surface);color:var(--mm-ink);padding:28px 32px;border:1px solid var(--mm-line);border-radius:14px}
.insight-page .v4-reader-content>h1{font-size:clamp(24px,2.5vw,32px);line-height:1.55;margin:10px 0 14px}
.insight-page .v4-reader-content p{font-size:15px;line-height:1.95}
.insight-page .v4-reader-aside{top:140px}
.insight-page .v4-reader-aside>section{background:var(--mm-surface);color:var(--mm-ink);padding:16px;border:1px solid var(--mm-line);border-radius:12px}
.insight-page .v4-reader-aside h3{font-size:14px;margin:0 0 10px}
.insight-page .v4-reader-aside p{font-size:12px;line-height:1.85;color:var(--mm-muted)}
.next-article-navigation>a{display:block;color:var(--mm-link);font-size:13px;line-height:1.6;padding:12px 0}
@media(max-width:760px){
 html body.desktop-v4 .real-optimizer-grid{grid-template-columns:1fr;gap:10px}
 html body.desktop-v4 .real-allocation{position:static;padding:12px!important}
 html body.desktop-v4 .real-allocation .live-panel-title{margin-bottom:7px}
 html body.desktop-v4 .real-weight{margin:8px 0}
 html body.desktop-v4 .real-weight label small{font-size:10px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:1}
 html body.desktop-v4 .real-weight label>span{max-width:75%}
 html body.desktop-v4 .real-weight label b:after{content:' ·';font-weight:400}
 html body.desktop-v4 .real-weight>div{display:none}
 html body.desktop-v4 .real-allocation-actions{margin-top:7px;padding-top:7px}
 html body.desktop-v4 .real-allocation .opt-mix-details{display:none}
 html body.desktop-v4 .optimizer-hero-panel{padding:12px!important}
 html body.desktop-v4 .optimizer-hero-panel>.live-panel-title{top:107px;gap:7px}
 html body.desktop-v4 .optimizer-hero-panel>.live-panel-title h2{font-size:15px}
 html body.desktop-v4 .optimizer-hero-panel>.live-panel-title p{display:none}
 html body.desktop-v4 .optimizer-hero-panel .compact-tabs{width:auto}
 html body.desktop-v4 .optimizer-hero-panel .compact-tabs button{padding:6px 8px;min-height:30px}
 html body.desktop-v4 .real-opt-plot{height:260px!important}
 html body.desktop-v4 #real-opt-metrics strong{font-size:18px}
 html body.desktop-v4 #real-opt-metrics .metric-row{gap:5px}
 html body.desktop-v4 #real-opt-metrics .metric-row>div{padding:7px}
 .insight-page{padding-top:12px}
 .insight-page .v4-reader{display:block}
 .insight-page .v4-reader-content{padding:18px 16px;border-radius:11px}
 .insight-page .v4-reader-content>h1{font-size:23px}
 .insight-page .v4-reader-content p{font-size:14px;line-height:1.95}
 .insight-page .v4-reader-aside{position:static;margin-top:14px}
 html body.desktop-v4 .workspace-tabs{gap:18px;min-height:44px}
 html body.desktop-v4 .workspace-tabs>a{font-size:11px;white-space:nowrap;padding:11px 0}
}

html body.desktop-v4 .real-compare-dock>div>b{color:var(--mm-ink)!important}
.fund-watch-compact{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:10px;font-size:10px;color:var(--mm-muted)}
.fund-watch-compact button{border:1px solid var(--mm-line);border-radius:6px;background:var(--mm-soft);color:var(--mm-ink);font-size:10px;padding:4px 7px;cursor:pointer}

html body.desktop-v4 .r5-product-picker>.live-panel-title{margin-bottom:3px;min-height:24px}
html body.desktop-v4 .r5-product-picker h1{font-size:16px!important;line-height:1.5;margin:0!important}
html body.desktop-v4 .r5-product-editor>summary{min-height:28px;line-height:1.5;padding:4px 0}
html body.desktop-v4 .r5-product-editor:not([open])>summary>span{padding:5px 9px;font-size:11px}
@media(max-width:760px){.fund-bubble-panel{order:-1}.fund-watch-items>button{padding:8px}.fund-bubble-readout dd{font-size:16px}}

html body.desktop-v4 #real-fund-directory>.real-compare-dock{position:static;transform:none;left:auto;bottom:auto;width:auto;max-width:none;margin:0 0 16px;padding:10px 12px;box-shadow:none;border:1px solid var(--mm-line);background:var(--mm-soft);border-radius:9px}
html body.desktop-v4 #real-fund-directory>.real-compare-dock>div>b{font-size:20px}
html body.desktop-v4 #real-fund-directory>.real-compare-dock .dock-chips button{font-size:10px;padding:6px 8px}
html body.desktop-v4 #real-fund-directory>.real-compare-dock .btn{font-size:11px;min-height:32px;padding:7px 10px}
html body.desktop-v4 #real-fund-directory>.real-compare-dock .text-link{font-size:11px}

.fund-bubble-legend{font-size:11px}
#fund-bubble-chart .scatterlayer .trace:last-child .point{stroke:var(--mm-ink)!important}
.fund-bubble-instruction{margin:0 0 4px;color:var(--mm-muted);font-size:14px;line-height:1.6}
.fund-bubble-legend{align-items:center;gap:8px 14px;line-height:1.5}
.fund-bubble-legend strong{color:var(--mm-ink);font-size:13px}
.fund-bubble-legend small{flex-basis:100%;font-size:13px}
.fund-bubble-legend i{width:11px;height:11px;vertical-align:middle}
.fund-bubble-legend .fund-legend-hollow{background:transparent;border:2px solid #698391;box-sizing:border-box}
.fund-bubble-active:empty{display:none}
.fund-bubble-active{margin-top:14px;padding:14px 16px;border:1px solid var(--mm-line);border-radius:12px;background:var(--mm-soft);color:var(--mm-ink)}
.fund-bubble-active-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.fund-bubble-active-head>span{font-size:13px;font-weight:700;color:var(--mm-muted)}
.fund-bubble-active-head label{display:flex;align-items:center;gap:8px;font-size:13px;min-width:0}
.fund-bubble-active-head select{max-width:min(100%,300px);min-height:40px;font-size:14px}
.fund-bubble-active-main{display:flex;align-items:center;justify-content:space-between;gap:14px;min-width:0;margin-top:8px}
.fund-bubble-active-main>div{flex:1;min-width:0}
.fund-bubble-active-main strong{display:block;overflow-wrap:anywhere;font-size:16px;line-height:1.5}
.fund-bubble-active-main small{display:block;color:var(--mm-muted);font-size:12px;line-height:1.5}
.fund-bubble-active-main dl{display:flex;gap:22px;margin:0;flex-shrink:0}
.fund-bubble-active-main dt{font-size:12px;color:var(--mm-muted)}
.fund-bubble-active-main dd{margin:3px 0 0;font-size:18px;font-weight:700;font-variant-numeric:tabular-nums}
.fund-bubble-active-main button{min-height:40px;white-space:nowrap}
#fund-bubble-chart .scatterlayer .trace .point{cursor:pointer}
@media(max-width:760px){.fund-bubble-instruction{font-size:13px}.fund-bubble-active{padding:12px}.fund-bubble-active-head{align-items:flex-start;flex-direction:column;gap:4px}.fund-bubble-active-head label{width:100%}.fund-bubble-active-head select{flex:1;max-width:none}.fund-bubble-active-main{flex-wrap:wrap}.fund-bubble-active-main>div{flex-basis:100%}.fund-bubble-active-main dl{flex:1;gap:16px}.fund-bubble-active-main button{flex-shrink:0}}
@media(max-width:760px){html body.desktop-v4 .optimizer-hero-panel .compact-tabs button{min-height:36px}}

/* Article navigation must not inherit the mobile main-menu panel styles. */
html body.desktop-v4 .insight-page :is(.insight-breadcrumb,.next-article-navigation){position:static;background:transparent;border:0;padding:0;left:auto;right:auto;top:auto;width:auto}
html body.desktop-v4 .insight-page .insight-breadcrumb{display:flex;gap:14px;align-items:center;margin-bottom:16px}
html body.desktop-v4 .insight-page .insight-breadcrumb a{font-size:12px}

.fund-bubble-readout .fund-aum-basis{display:block;margin-top:6px;font-size:12px;line-height:1.5;font-weight:400;overflow-wrap:anywhere}

.fund-fee-cell small{display:block;max-width:11rem;white-space:normal;font-size:11px;line-height:1.45;font-weight:400;margin-top:4px;color:var(--mm-muted)}
