/* Decision-first layouts, shared by both color themes. */
.strategy-overview{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important}
.strategy-overview .overview-card{padding:18px!important;min-height:0!important;display:flex;flex-direction:column;gap:8px}
.strategy-overview .overview-card strong{font-size:clamp(19px,2vw,27px);line-height:1.2;overflow-wrap:anywhere}
.strategy-overview .overview-card small{font-size:12px;line-height:1.5}
.workspace-layout[data-active-page=wallet] .wallet-content>.section-heading{margin-bottom:20px}
.portfolio-history-controls select{max-width:100%;min-width:0}
.rate-warning:not(:empty){padding:10px 14px;border-inline-start:3px solid #d9a44c;background:color-mix(in srgb,#d9a44c 9%,transparent)}
.rate-warning:empty{display:none}
.fund-decision-summary{padding:20px 0 8px;border-top:1px solid var(--wa-border);margin-top:20px}
.decision-summary-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}
.decision-summary-heading h3{margin:0;font-size:18px}
.decision-summary-heading a{font-size:13px}
.decision-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:16px}
.decision-metrics article{display:flex;flex-direction:column;gap:5px;background:none;border:0;box-shadow:none;padding:0}
.decision-metrics span,.decision-metrics small{font-size:12px;color:var(--wa-muted)}
.decision-metrics strong{font-size:22px;font-variant-numeric:tabular-nums}
.credit-review{margin-block:20px}
.fund-data-dates{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:12px;color:var(--wa-muted);margin:10px 0}

.research-preferences{display:flex;flex-wrap:wrap;align-items:end;gap:12px;padding-top:14px;border-top:1px solid var(--wa-border);margin-top:12px}
.research-preferences>label{flex:1;min-width:180px;margin:0!important}
.research-preferences>button{width:auto!important;margin:0;min-height:40px;font-size:13px}
.research-columns{position:relative;align-self:center;font-size:13px}
.research-columns summary{cursor:pointer;padding:10px;border-radius:8px}
.research-columns[open]{padding:12px;background:var(--wa-surface);border:1px solid var(--wa-border);border-radius:12px}
.research-page .research-columns label{display:flex;align-items:center;gap:8px;margin:6px 0!important}
.research-page .research-columns input[type=checkbox]{width:18px!important;height:18px!important;min-height:18px;display:inline-block;padding:0}
.research-select-row{display:grid;grid-template-columns:24px minmax(0,1fr);gap:6px;align-items:center;border-bottom:1px solid var(--wa-border)}
.research-select-row>input{width:18px;height:18px;margin:0;cursor:pointer}
.research-page .research-select-row>.research-fund-card{border-bottom:0;grid-template-columns:minmax(170px,1.3fr) minmax(280px,2fr) 16px;gap:16px}
.research-result-head{margin-left:30px}
.research-page .research-fund-metrics,.research-result-head>div{grid-template-columns:repeat(var(--metric-count,4),minmax(0,1fr))}
.research-reference{display:block;margin-top:3px;color:var(--wa-muted);font-size:11px;line-height:1.4}
.research-compare-bar{position:sticky;top:12px;z-index:30;display:flex;gap:16px;align-items:center;padding:12px 16px;margin-bottom:16px;background:var(--wa-surface);border:1px solid var(--wa-accent);border-radius:12px;box-shadow:0 8px 24px #0002}
.research-compare-bar>span{flex:1;font-size:14px}
.research-compare-bar a{font-size:14px;text-decoration:none}
.research-compare-bar[hidden]{display:none}

.alchemy-editor-page .wallet-header{height:0;min-height:0;padding:0;border:0}
.alchemy-editor-page .wallet-header .eyebrow{display:none}
.alchemy-editor-page .alchemy-page{padding-top:24px!important}
.alchemy-editor-page .editor-back{display:inline-block;margin-bottom:12px}
.alchemy-editor-page .notebook-manager{padding:0 0 16px!important;gap:14px;border:0;background:none;box-shadow:none;margin-bottom:0}
.alchemy-editor-page .notebook-title-row>label{margin:0;font-size:0}
.alchemy-editor-page #notebook-title{font-size:clamp(20px,2vw,28px);font-weight:600;padding:4px 0;min-height:40px;border:0;background:none;box-shadow:none;line-height:1.3}
.alchemy-editor-page #notebook-save-state{font-size:12px}
.alchemy-editor-page .notebook-actions{gap:6px;align-items:center;flex-wrap:wrap}
.alchemy-editor-page .notebook-actions button{font-size:12px;padding:8px 12px;min-height:36px;width:auto}
.alchemy-editor-page .document-ribbon{position:sticky;top:8px;z-index:35;background:var(--wa-surface);border:1px solid var(--wa-border);border-radius:12px;box-shadow:0 5px 20px #0001;gap:8px;padding:10px;display:flex;flex-wrap:wrap;align-items:center}
.document-history-controls{display:flex;gap:2px}
.document-history-controls button{width:32px!important;height:34px;padding:0;display:grid;place-content:center;font-size:20px;background:none;border:0;color:var(--wa-text)}
.document-period-label{display:flex;align-items:center;gap:6px;margin:0!important;font-size:12px!important}
.document-period-label select{width:auto;min-height:34px;padding:4px 8px;font-size:12px;background:var(--wa-surface);color:var(--wa-text);border:1px solid var(--wa-border);border-radius:8px}
.analysis-change-dialog,.analysis-template-dialog,.research-save-dialog{width:min(760px,calc(100vw - 32px));max-height:85dvh;box-sizing:border-box;padding:24px;border:1px solid var(--wa-border);border-radius:18px;background:var(--wa-surface);color:var(--wa-text)}
.analysis-change-dialog h2,.analysis-template-dialog h2,.research-save-dialog h2{font-size:23px;line-height:1.25;margin:0 0 12px}
.analysis-change-dialog .table-scroll{max-height:50dvh;overflow:auto;border:1px solid var(--wa-border);border-radius:10px}
.analysis-change-dialog table{width:100%;border-collapse:collapse;font-size:13px}
.analysis-change-dialog :is(td,th){padding:12px;text-align:left;border-bottom:1px solid var(--wa-border);font-variant-numeric:tabular-nums}
.analysis-change-dialog th{font-weight:500}
.analysis-change-dialog .dialog-actions,.research-save-dialog form>div{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}
.analysis-template-dialog>button{display:block;width:100%;text-align:left;margin-top:10px;padding:15px;background:var(--wa-raised);color:var(--wa-text);border:1px solid var(--wa-border);border-radius:10px}
.notebook-version{flex-wrap:wrap;gap:8px}
html[data-theme=light] :is(.analysis-change-dialog,.analysis-template-dialog,.research-save-dialog){background:var(--wa-surface);color:var(--wa-text)}

.home-journey{margin-block:24px 64px;padding:26px;border:1px solid var(--wa-border);border-radius:20px;background:color-mix(in srgb,var(--wa-surface) 70%,transparent)}
.home-journey h2{font-size:clamp(23px,3vw,32px);letter-spacing:-.7px;margin:0 0 18px}
.home-journey-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.home-journey-tabs button{display:flex;align-items:center;justify-content:flex-start;gap:10px;background:transparent;border:1px solid var(--wa-border);color:var(--wa-muted);padding:13px;border-radius:10px;font-size:14px;min-width:0}
.home-journey-tabs button[aria-selected=true]{color:var(--wa-text);background:color-mix(in srgb,var(--wa-accent) 12%,transparent);border-color:var(--wa-accent)}
.home-journey-tabs button b{font-size:12px;color:var(--wa-accent)}
.home-journey-panel{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 0 0;min-height:70px}
.home-journey-panel p{margin:0;color:var(--wa-muted);max-width:660px;line-height:1.6;font-size:15px}
.home-journey-panel a{white-space:nowrap;font-size:14px}
@media(max-width:1100px){.strategy-overview{grid-template-columns:repeat(2,minmax(0,1fr))!important}.alchemy-editor-page .notebook-manager{display:block}.alchemy-editor-page .notebook-actions{margin-top:12px}}
@media(max-width:900px){.alchemy-editor-page .wallet-header{height:66px;min-height:66px}.alchemy-editor-page .alchemy-page{padding-top:8px!important}.alchemy-editor-page .document-ribbon{top:8px}}
@media(max-width:850px){.research-page .research-select-row>.research-fund-card{grid-template-columns:minmax(0,1fr) 16px;gap:8px;padding:12px 8px}.research-page .research-fund-metrics{margin-left:0;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.research-reference{font-size:11px}.research-compare-bar{flex-wrap:wrap;gap:8px}.research-compare-bar>span{flex-basis:100%}}
@media(max-width:540px){.strategy-overview .overview-card{padding:12px!important}.strategy-overview .overview-card strong{font-size:20px}.overview-card span{font-size:12px}.decision-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.decision-summary-heading{align-items:flex-start}.alchemy-editor-page .document-ribbon{gap:6px}.document-history-controls{order:1}.document-period-label{order:1;flex:1}.alchemy-editor-page .document-format-controls{flex:1 0 100%}.alchemy-editor-page .notebook-actions{gap:4px}.home-journey{padding:18px;margin-block:10px 40px}.home-journey-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.home-journey-panel{display:block}.home-journey-panel a{display:inline-block;margin-top:14px}.research-preferences>label{min-width:100%}.analysis-change-dialog,.analysis-template-dialog,.research-save-dialog{padding:18px}.analysis-change-dialog :is(th,td){padding:8px}}
@media print{.document-history-controls,.document-period-label{display:none!important}}

.strategy-overview .overview-card{container-type:inline-size}
.strategy-overview .overview-card strong{font-size:clamp(17px,11cqw,26px);white-space:nowrap;overflow-wrap:normal}
.strategy-overview .overview-card>span{min-height:2.8em;line-height:1.4}

.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}
.analysis-template-dialog>button:last-child{width:auto;margin-left:auto;background:transparent;border-color:transparent;padding:10px 16px}

.research-page .research-compare-bar>button{width:auto!important;min-height:36px;margin:0;padding:8px 12px}
@media(max-width:540px){
 .alchemy-editor-page .document-ribbon .document-format-controls{display:flex;flex-wrap:nowrap;gap:2px;padding-bottom:6px;order:-1}
 .alchemy-editor-page .document-ribbon .document-style-label{width:auto;min-width:0;flex:1;margin:0}
 .alchemy-editor-page .document-ribbon .document-style-label select{min-width:0;width:100%;padding:5px;font-size:12px}
 .alchemy-editor-page .document-ribbon .document-format-controls button{width:34px;min-width:34px;flex:0 0 34px;padding:5px}
 .alchemy-editor-page .document-history-controls{order:0}
 .alchemy-editor-page .document-period-label{order:1;flex:1 0 100%;justify-content:space-between}
 .alchemy-editor-page .document-period-label select{min-width:0;max-width:72%}
 .alchemy-editor-page .document-view-actions{order:2}
}
.document-reading .document-history-controls,.document-reading .document-period-label{display:none!important}

@media(max-width:540px){.analysis-change-dialog table{min-width:0!important;table-layout:fixed;font-size:12px}.analysis-change-dialog tr>:first-child{width:38%}.analysis-change-dialog :is(th,td){white-space:normal;overflow-wrap:break-word}}
