.account-order-row{position:relative;min-width:0;display:flex}.account-order-row>.account-card{width:100%;height:100%}.account-list .account-order-row:has(.account-unavailable){align-self:start}.account-unavailable .account-value,.account-unavailable .account-composition,.account-unavailable .account-strategy-block{display:none!important}.account-card.account-unavailable{min-height:0;gap:12px}.holdings-unavailable{font-size:13px;color:var(--muted);padding:0 0 4px}.account-drag-handle{position:absolute;top:12px;right:12px;z-index:2;touch-action:none;cursor:grab;font-size:26px;padding:2px 10px;background:var(--panel);border:1px solid var(--accent)}.account-drag-handle[hidden]{display:none}.reordering .account-open{visibility:hidden}.reordering .account-card{outline:1px dashed var(--accent);cursor:default}.account-order-row.dragging{opacity:.7;transform:scale(.98);z-index:3}.account-order-row{transition:transform .15s,opacity .15s}.reorder-accounts{font-size:12px;padding:7px 12px;white-space:nowrap}.order-status{font-size:12px;color:var(--muted);margin:10px 0 0}.order-status:empty{display:none}.account-list-heading{flex-wrap:wrap}.strategy-actions{display:flex;align-items:flex-start;gap:12px;flex-wrap:wrap;margin-top:18px}.purchase-check{display:flex;flex-direction:column;gap:5px}.purchase-check small{font-size:11px;color:var(--muted);max-width:320px}.purchase-check button{font-size:13px}.allocation-calculator{background:var(--bg);border:1px solid var(--border);border-radius:14px;padding:16px;margin:14px 0;display:grid;gap:8px}.allocation-calculator strong{font-size:23px;color:var(--accent)}.allocation-calculator p{margin:0}.allocation-calculator .invalid-total{color:#ff5369}.allocation-calculator .allocation-sum{font-variant-numeric:tabular-nums}.allocation-calculator small{color:var(--muted)}.watchlist-chips{display:flex;flex-wrap:wrap;gap:8px;margin:15px 0}.watchlist-chips>span{display:inline-flex;align-items:center;gap:10px;padding:7px 11px;border:1px solid var(--border);border-radius:12px;background:var(--bg)}.watchlist-chips button{padding:1px 7px;border:0}.watchlist-chips small{font-size:10px;color:var(--muted)}.watchlist-chips .linked-ticker{border-color:color-mix(in srgb,var(--accent) 35%,var(--border))}.industry-map .map-tile strong{white-space:normal;overflow-wrap:anywhere}.industry-map .map-tile-content{overflow:hidden}.industry-detail{padding:14px 0;min-height:70px}.industry-map .map-tile.unclassified{background:#4b5364}.holding-types{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.holding-types span{border:1px solid var(--border);border-radius:9px;padding:8px 12px;font-size:13px}.allocation-calculator time{font-size:11px;color:var(--muted)}
@media(max-width:600px){.account-list-heading>span{width:100%}.strategy-actions>button{font-size:12px}.allocation-calculator{padding:12px}}
@media(prefers-reduced-motion:reduce){.account-order-row{transition:none}}
#accountStrategySettings .lump-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px 28px}#accountStrategySettings label:has(>input[type=checkbox]){display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;width:auto;margin:12px 0}#accountStrategySettings input[type=checkbox]{width:17px;min-width:17px;margin:0}#accountStrategySettings .lump-symbols{border:1px solid var(--border);border-radius:10px;padding:10px 16px;margin:12px 0 20px}#accountStrategySettings>section{padding-bottom:20px}#accountStrategySettings select{max-width:320px}.percent-control.percent-slider{gap:14px!important}.chart-add-ticker{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:16px 0}.chart-add-ticker label{max-width:230px}.chart-add-ticker small{flex-basis:100%;color:var(--muted)}@media(max-width:600px){#accountStrategySettings .lump-fields{grid-template-columns:1fr}.chart-add-ticker label{max-width:none;width:100%}}

.holdings-unavailable{display:block;padding:0 20px 14px}.percent-off{margin-left:8px}#lumpConfig .lump-fields{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}@media(max-width:600px){#lumpConfig .lump-fields{grid-template-columns:1fr}}
/* Strategy refinement: steady horizontal tiers, vertical editors and compact calculators. */
:root{--signal-green:#76e8b5;--signal-yellow:#f4ff70;--signal-red:#ff4058}.light{--signal-green:#147b50;--signal-yellow:#8d7400;--signal-red:#d8193c}
.account-drag-ghost{position:fixed!important;z-index:1000;pointer-events:none;opacity:.96;transform:rotate(1deg) scale(1.02);filter:drop-shadow(0 20px 22px #0005);transition:none!important}.account-drag-ghost .account-card{height:100%;background:var(--panel)}.account-order-row.dragging{opacity:.18;transform:none;outline:2px dashed var(--accent);border-radius:12px}.account-drag-ghost .account-drag-handle{display:none}
#content .lump-sim>.lump-zones,#lumpBoard .strategy-display>.lump-zones{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}#content .lump-zone{padding:12px;min-width:0}.lump-zone .lump-circle{width:60px;height:60px;font-size:20px}.lump-zone>p{font-size:11px}.lump-zone>button[data-clear-kind]{font-size:11px;padding:6px 9px}
.strategy-settings-shell>h2{margin:0 0 18px}.strategy-settings-top{display:grid;grid-template-columns:1fr auto;align-items:center;gap:10px 20px}.strategy-settings-top h3{margin:0!important}.strategy-settings-top>label:has(select){grid-column:1/-1;display:flex!important;flex-direction:row!important;align-items:center;gap:12px}.strategy-settings-top select{width:200px!important}.strategy-editor-grid{display:grid;grid-template-columns:minmax(260px,1.2fr) minmax(250px,.8fr);gap:38px;align-items:center}.strategy-sliders{min-width:0}.slider-group{border:0;padding:8px 0;margin:0;min-width:0}.slider-group legend{font-size:11px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}.slider-group>label{margin:0 0 6px!important}.funding-sliders{border-bottom:1px solid var(--border);margin-bottom:14px;padding-bottom:12px}.funding-sliders legend{color:var(--accent)}
#accountStrategySettings>section+section{border-top:1px solid var(--border);padding-top:24px;margin-top:14px}#accountStrategySettings .lump-symbols{margin:10px 0 18px;padding:6px 12px}#accountStrategySettings .lump-symbols legend{font-size:11px}#accountStrategySettings .lump-symbols label{display:inline-flex;margin:4px 14px 4px 0}
.strategy-editor-grid .allocation-calculator{align-self:center;text-align:center;padding:22px;margin:0;gap:12px}.allocation-calculator h3{font-size:14px;margin:0}.allocation-calculator .fund-total{font-size:32px;color:var(--signal-green)}.allocation-calculator .allocation-sum{font-size:12px}.allocation-calculator dl{margin:0;text-align:left}.allocation-calculator dl>div{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-top:1px solid var(--border)}.allocation-calculator dt{font-size:12px;color:var(--muted)}.allocation-calculator dd{margin:0;font-weight:700;color:var(--signal-green)}.allocation-calculator .invalid-total{color:var(--signal-red)}[data-risk=low]{--risk:#76e8b5}[data-risk=medium]{--risk:#f4ff70}[data-risk=high]{--risk:#ff4058}.allocation-calculator dd[data-risk=medium]{color:var(--signal-yellow)}.allocation-calculator dd[data-risk=high]{color:var(--signal-red)}
.percent-control.margin-risk .percent-rail{background:linear-gradient(90deg,var(--risk) var(--percent-fill),var(--border) var(--percent-fill));box-shadow:0 0 15px color-mix(in srgb,var(--risk) 35%,transparent)}.margin-risk input::-webkit-slider-thumb{background:var(--risk);border-color:var(--risk);box-shadow:0 0 0 4px color-mix(in srgb,var(--risk) 20%,transparent),0 2px 8px #0004}.margin-risk input::-moz-range-thumb{background:var(--risk);border-color:var(--risk)}.margin-risk[data-risk=medium] .percent-readout{border-color:color-mix(in srgb,#f4ff70 60%,var(--border))}.margin-risk[data-risk=high] .percent-readout{border-color:#ff4058}.holding-reset-badge{font-size:11px;padding:6px 9px;margin-left:8px;border:1px solid var(--signal-yellow);color:var(--signal-yellow)}.chart-dip-key{display:inline-flex;align-items:center;gap:8px}.chart-dip-key i{display:inline-block;width:26px;border-top:2px dashed #ff4058}
@media(max-width:700px){.strategy-editor-grid{grid-template-columns:1fr;gap:14px}.strategy-settings-top{grid-template-columns:1fr auto}#content .lump-sim>.lump-zones,#lumpBoard .strategy-display>.lump-zones{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.lump-zone .lump-circle{width:42px;height:42px;font-size:15px}#content .lump-zone{padding:8px}.lump-zone .lump-member{flex-wrap:wrap;font-size:11px}.lump-zone .lump-member b{font-size:12px}.lump-zone button{max-width:100%;overflow-wrap:anywhere}.strategy-editor-grid .allocation-calculator{padding:16px}}

/* Purchase evidence: exact amount matches are green; other buys are reference only. */
.purchase-evidence-row.purchase-recorded{opacity:.65;border-color:var(--border);background:transparent}
.purchase-evidence{margin:16px 0}.purchase-evidence h3{font-size:16px;margin:0 0 10px}.purchase-match-title{color:var(--signal-green)}.purchase-evidence-row{display:flex;justify-content:space-between;align-items:center;gap:14px;border:1px solid var(--border);border-radius:10px;padding:12px 14px;margin:7px 0}.purchase-evidence-row strong{font-size:14px}.purchase-evidence-row small{display:block;color:var(--muted);font-size:11px;margin-top:3px}.purchase-evidence-row b{font-size:21px;white-space:nowrap}.purchase-plan-match{border-color:#76e8b590;background:#76e8b510;box-shadow:0 0 16px #76e8b516}.purchase-plan-match b,.purchase-plan-match strong{color:#76e8b5}.purchase-other{background:var(--bg);color:var(--muted)}.purchase-other b{font-size:17px;color:var(--muted)}.purchase-other-heading{display:flex;justify-content:space-between;gap:8px;margin:18px 0 7px;font-size:12px}.purchase-other-heading small,.purchase-evidence-note{color:var(--muted);font-size:12px}.purchase-evidence-note{margin:8px 0!important}.light .purchase-plan-match{background:#eafaf1;border-color:#37b97c}.light .purchase-plan-match b,.light .purchase-plan-match strong{color:#147b50}
.review-dialog>h2{padding-right:70px;margin:0 0 12px}#closeLiveReview{position:absolute;right:20px;top:20px;font-size:12px;padding:6px 10px}.review-dialog fieldset label:has(input[type=checkbox]),.review-dialog fieldset label:has(input[type=radio]){display:flex;flex-direction:row;align-items:flex-start;gap:10px;margin:9px 0;font-size:13px}.review-dialog fieldset input[type=checkbox],.review-dialog fieldset input[type=radio]{width:16px;min-width:16px;height:16px;margin:1px 0 0}.review-dialog fieldset{padding:10px 14px}.review-dialog fieldset legend{font-size:13px}

/* Slightly larger strategy labels without increasing control spacing. */
#accountStrategySettings .slider-group>label,#lumpConfig .slider-group>label{font-size:14px;line-height:1.35;font-weight:500}.allocation-calculator .allocation-sum.fully-allocated,.allocation-calculator .allocation-sum.fully-allocated b{color:var(--signal-green);text-shadow:0 0 12px #76e8b53a}.light .allocation-calculator .allocation-sum.fully-allocated{ text-shadow:none; }

/* Distinct strategy cards with compact slider rows. */
#accountStrategySettings>section,#lumpConfig>.strategy-settings{border:1px solid var(--border);border-top:3px solid var(--accent);border-radius:14px;padding:18px;background:var(--bg);margin:0 0 22px}
#accountStrategySettings>section+section{margin-top:22px;padding-top:18px}
#accountStrategySettings>.reserve-settings,#lumpConfig>.reserve-settings{border-top:3px solid var(--signal-green)}
.strategy-sliders .percent-control.percent-slider{padding:7px 0}
.earlier-review-attention{border-color:color-mix(in srgb,var(--signal-yellow) 55%,var(--border))}.earlier-review-attention h2{font-size:18px;margin:0}.earlier-review-attention>p{font-size:12px;color:var(--muted);margin:8px 0 12px}.earlier-review-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 0;border-top:1px solid var(--border)}.earlier-review-row small{display:block;font-size:12px;color:var(--muted);margin-top:4px}.earlier-review-row button{flex-shrink:0;font-size:12px}
/* The strategy popup's Save bar stays in reach while the fields scroll, and its fade reaches 26px above it (home-bar.css): the last field sits past that fade, and a field reached by Tab never lands under the bar. */
.home-popup-body #accountStrategySettings>button{margin-top:30px}
.home-popup-body:has(#accountStrategySettings,#lumpConfig){scroll-padding-bottom:90px}
/* A failed save says so right above the bar, wherever the popup is scrolled; the form's light panel stays off so the fade has nothing to show against. */
.home-popup-body :is(#strategySaveStatus,#strategyApplyStatus,#lumpConfigError):not(:empty){position:sticky;bottom:48px;z-index:2;margin:0;padding:8px 0;background:var(--bg,#090d18)}
body.light .home-popup-body :is(#strategySaveStatus,#strategyApplyStatus,#lumpConfigError):not(:empty){background:#fff}
body.light .home-popup-body :is(.strategy-settings-shell,#lumpSettings){background-color:transparent!important}
@media(max-width:600px){#accountStrategySettings>section,#lumpConfig>.strategy-settings{padding:14px}.strategy-editor-grid{grid-template-columns:minmax(0,1fr)}}

.custom-strategy-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-top:14px}.custom-strategy-actions[hidden]{display:none}.custom-strategy-actions button{font-size:12px;padding:6px 11px}.custom-strategy-actions small{font-size:11px;color:var(--muted);margin-right:4px}.custom-strategy-actions [data-save-custom]:not(:disabled){border-color:var(--signal-green);color:var(--signal-green)}
@media(max-width:400px){.custom-strategy-actions{flex-wrap:wrap}.custom-strategy-actions small{flex-basis:100%;text-align:right}}

/* Accounts directory: put assets first and keep the introduction in the header. */
.account-home.account-directory{margin:0;padding:0 0 24px}
.account-directory .account-hero{margin-top:0;padding:22px 26px;gap:20px}
.account-directory .account-distribution{padding:14px 22px 16px;margin-bottom:18px}
.account-directory .account-list-heading{margin-top:18px}
@media(max-width:600px){
 .account-directory .account-hero{padding:18px 20px;gap:18px}
 .account-directory .account-hero .account-grand-total{gap:6px}
 .account-directory .account-distribution{padding:12px 16px 14px}
}

/* Reserve a visible base width for each account; labels retain actual shares. */
.account-distribution-track .account-share{flex-basis:18px;flex-shrink:1}

/* Turned-off strategy: only its name, switch and a short note are shown (values are kept). */
.strategy-off-note{display:none;margin:4px 0 0;font-size:12px;color:var(--muted)}
.strategy-off .strategy-off-note{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px}
.strategy-peek-toggle{font-size:12px;padding:4px 10px;margin:0}
.strategy-off:not(.strategy-peek)>.lump-symbols,.strategy-off:not(.strategy-peek)>.strategy-editor-grid,.strategy-off:not(.strategy-peek)>.custom-strategy-actions,.strategy-off:not(.strategy-peek)>.lump-fields,.strategy-off:not(.strategy-peek) .strategy-settings-top label:has(select[name$="Preset"]){display:none!important}

/* Account nickname control beside the page title. */
#title .title-rename{font-size:11px;padding:3px 9px;margin-left:8px;vertical-align:middle;font-weight:500;letter-spacing:0}
.rename-dialog form{display:grid;gap:10px;min-width:min(360px,80vw)}
.rename-dialog label{display:grid;gap:6px}
.rename-provider{font-size:12px;color:var(--muted);margin:0}
.rename-actions{display:flex;gap:8px}

/* Account header: account switcher + Rename on top, the account's own tabs underneath (replaces the old title). */
body.signed-in header:has(#title.account-title){padding-top:12px;padding-bottom:8px}
#title.account-title{display:flex;flex-direction:column;align-items:center;gap:6px;font-size:inherit;letter-spacing:0}
.account-title-row{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;max-width:100%}
.account-switch-wrap{position:relative;display:inline-flex;min-width:0}
.account-switch-wrap::after{content:'';position:absolute;right:11px;top:50%;width:7px;height:7px;margin-top:-6px;border-right:2px solid #93a4c3;border-bottom:2px solid #93a4c3;transform:rotate(45deg);pointer-events:none}
.account-switch-wrap.single::after{display:none}
.account-switch{appearance:none;-webkit-appearance:none;field-sizing:content;max-width:min(62vw,560px);text-overflow:ellipsis;font:inherit;font-size:26px;font-weight:650;letter-spacing:-.6px;color:inherit;background:transparent;border:1px solid transparent;border-radius:8px;padding:2px 32px 2px 10px;cursor:pointer}
.account-switch:hover,.account-switch:focus-visible{border-color:#405778;outline:none}
.account-switch:disabled{cursor:default;padding-right:10px;opacity:1}
.account-switch option{font-size:14px;color:var(--text);background:var(--panel)}
#title.account-title .title-rename{margin-left:0}
.account-tabs{display:flex;justify-content:center;gap:2px;flex-wrap:nowrap;overflow-x:auto;max-width:100%}
header .account-tabs button{background:transparent;border:0;border-bottom:2px solid transparent;border-radius:0;color:#c9d6ee;padding:4px 12px;font-size:13px;font-weight:500;line-height:20px;white-space:nowrap}
header .account-tabs button:hover{color:#fff}
header .account-tabs button.active{color:#fff;border-bottom-color:var(--accent)}
/* Header columns: brand · title · Connections · Light/dark · Lock app. */
body.signed-in>header:has(#connectionsLink){grid-template-columns:minmax(150px,1fr) minmax(0,2fr) auto auto auto}
body.signed-in>header #connectionsLink{grid-column:3;grid-row:1;min-height:36px;padding:6px 10px;font-size:12px;white-space:nowrap}
body.signed-in>header:has(#connectionsLink) #theme{grid-column:4}
body.signed-in>header:has(#connectionsLink) #logout{grid-column:5}
/* With the Lofi button: brand · title · Lofi · Connections · Light/dark · Lock app. */
body.signed-in>header:has(#lofiToggle){grid-template-columns:minmax(150px,1fr) minmax(0,2fr) auto auto auto auto}
body.signed-in>header #lofiToggle{grid-column:3;grid-row:1;min-height:36px;padding:6px 10px;font-size:12px;white-space:nowrap}
body.signed-in>header:has(#lofiToggle) #connectionsLink{grid-column:4}
body.signed-in>header:has(#lofiToggle) #theme{grid-column:5}
body.signed-in>header:has(#lofiToggle) #logout{grid-column:6}
@media(max-width:800px){
 body.signed-in>header:has(#connectionsLink){grid-template-columns:minmax(0,1fr) auto auto auto}
 body.signed-in>header #connectionsLink{grid-column:2}
 body.signed-in>header:has(#connectionsLink) #theme{grid-column:3}
 body.signed-in>header:has(#connectionsLink) #logout{grid-column:4}
 body.signed-in>header:has(#lofiToggle){grid-template-columns:minmax(0,1fr) auto auto auto auto}
 body.signed-in>header #lofiToggle{grid-column:2}
 body.signed-in>header:has(#lofiToggle) #connectionsLink{grid-column:3}
 body.signed-in>header:has(#lofiToggle) #theme{grid-column:4}
 body.signed-in>header:has(#lofiToggle) #logout{grid-column:5}
 #title.account-title{align-items:flex-start}
 .account-title-row,.account-tabs{justify-content:flex-start}
}
body.signed-in header #connectionsLink.active{border-color:var(--accent);color:var(--accent)}
body:not(.signed-in) :is(#connectionsLink,#notificationsLink,#signInLink,#siteAdminLink,#installLink){display:none}
@media(max-width:800px){.account-switch{font-size:20px;max-width:80vw}header .account-tabs button{padding:4px 8px;font-size:12px}}
