/* Weekly summary email settings (the first card on ⚙ Notifications). */
.weekly-toggle{display:flex;align-items:flex-start;gap:12px;margin:8px 0;font-size:14px;color:var(--text);cursor:pointer}
/* Plain text, not the mix theme's small-caps button style. */
.weekly-summary label.weekly-toggle{font-family:inherit!important;font-size:14px!important;font-weight:400!important;letter-spacing:normal;text-transform:none}
.weekly-toggle input{appearance:none;-webkit-appearance:none;flex:0 0 auto;position:relative;width:42px;height:24px;margin:1px 0 0;padding:0;border:1px solid var(--border);border-radius:999px;background:color-mix(in srgb,var(--muted) 25%,var(--panel));cursor:pointer;transition:background .15s}
.weekly-toggle input::after{content:'';position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:var(--muted);transition:transform .15s}
.weekly-toggle input:checked{background:var(--accent);border-color:var(--accent)}
.weekly-toggle input:checked::after{transform:translateX(18px);background:var(--panel)}
.weekly-toggle input:disabled{opacity:.45;cursor:default}
.weekly-toggle input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.weekly-toggle span{display:grid;gap:2px;min-width:0}
.weekly-toggle b{font-weight:600}
.weekly-toggle small{color:var(--muted);font-size:13px;line-height:1.4}
.weekly-sub{margin-left:54px}
.weekly-off .weekly-sub{opacity:.65}
.weekly-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:12px}
.weekly-actions small{color:var(--muted);font-size:13px;min-width:0;overflow-wrap:anywhere}
@media(max-width:600px){.weekly-sub{margin-left:24px}}
@media(prefers-reduced-motion:reduce){.weekly-toggle input,.weekly-toggle input::after{transition:none}}

/* Accounts home extras: sits under "Since your last visit", above the accounts. */
.home-extras{grid-column:1/-1;display:grid;gap:14px;margin:0 0 14px;min-width:0}
.home-extras>[hidden]{display:none}

/* Net worth over time. */
.networth-card{border:1px solid var(--border);border-radius:18px;background:var(--panel);padding:16px 18px 12px;min-width:0}
.networth-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:10px 16px}
.networth-headline{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;min-width:0}
.networth-headline h2{margin:0;font-size:15px;font-weight:600;color:var(--muted)}
.networth-value{font-size:28px;line-height:1.1;font-weight:650;font-variant-numeric:tabular-nums;color:var(--text)}
.networth-change{font-size:14px;font-variant-numeric:tabular-nums;color:var(--muted)}
.networth-change.tone-up{color:#76e8b5}.networth-change.tone-down{color:#ff8a94}
body.light .networth-change.tone-up{color:#087046}body.light .networth-change.tone-down{color:#b62932}
.networth-ranges{display:inline-flex;gap:2px;padding:2px;border:1px solid var(--border);border-radius:10px}
.networth-ranges button{padding:4px 10px;font-size:13px;line-height:1.3;border:0;border-radius:8px;background:none;color:var(--muted)}
.networth-ranges button[aria-pressed="true"]{background:color-mix(in srgb,var(--accent) 18%,transparent);color:var(--text);font-weight:600}
.networth-ranges button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.networth-parts{display:flex;flex-wrap:wrap;gap:4px 16px;margin:8px 0 4px;font-size:13px;color:var(--muted)}
.networth-parts b{color:var(--text);font-weight:600;font-variant-numeric:tabular-nums}
.networth-parts i{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:6px;vertical-align:1px}
.nw-key-inv{background:var(--accent)}.nw-key-cash{background:var(--chart-gold,#e5cc87)}.nw-key-own{background:var(--chart-blue,#8fc3ed)}.nw-key-debt{background:var(--chart-red,#f4a38d)}
.networth-chart{position:relative;min-width:0;margin-top:4px}
.networth-svg{display:block;width:100%;height:auto;overflow:visible;border-radius:8px}
.networth-svg:focus{outline:none}.networth-svg:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.networth-svg [hidden]{display:none}
.nw-grid{stroke:var(--border);stroke-width:1;opacity:.6}
.nw-axis{fill:var(--muted);font-size:11px;font-variant-numeric:tabular-nums}
.nw-line{fill:none;stroke:var(--accent);stroke-width:2.25;stroke-linejoin:round;stroke-linecap:round}
.nw-line.nw-estimated{stroke-dasharray:5 4;opacity:.55}
.nw-area{fill:color-mix(in srgb,var(--accent) 12%,transparent);stroke:none}
.nw-boundary{stroke:var(--muted);stroke-width:1;stroke-dasharray:2 3;opacity:.6}
.nw-guide{stroke:var(--muted);stroke-width:1;opacity:.7}
.nw-dot{fill:var(--panel);stroke:var(--accent);stroke-width:2.5}
.nw-dot.nw-dot-est{stroke-dasharray:3 2}
.nw-empty{fill:var(--muted);font-size:13px}
.networth-svg.nw-animate .nw-line,.networth-svg.nw-animate .nw-area{animation:nw-fade .45s ease-out both}
@keyframes nw-fade{from{opacity:0}}
.networth-svg.nw-animate .nw-line.nw-estimated{animation-name:nw-fade-est}
@keyframes nw-fade-est{from{opacity:0}to{opacity:.55}}
.networth-tip{position:absolute;top:0;z-index:2;min-width:170px;max-width:220px;padding:8px 10px;border:1px solid var(--border);border-radius:10px;background:var(--panel);box-shadow:0 8px 24px #0005;font-size:12px;pointer-events:none}
body.light .networth-tip{box-shadow:0 8px 24px #1a2b4a22}
.networth-tip p{margin:0;color:var(--text)}
.nw-tip-date{color:var(--muted)!important}
.nw-tip-est{display:inline-block;margin-left:4px;padding:0 6px;border:1px dashed var(--muted);border-radius:6px;font-size:11px;color:var(--muted)}
.nw-tip-total{font-size:16px;font-weight:650;font-variant-numeric:tabular-nums;margin:2px 0 4px!important}
.networth-tip dl{margin:0;display:grid;gap:1px}
.networth-tip dl div{display:flex;justify-content:space-between;gap:12px}
.networth-tip dt{color:var(--muted)}.networth-tip dd{margin:0;color:var(--text);font-variant-numeric:tabular-nums}
.networth-readout{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.networth-note,.networth-missing{margin:6px 0 0;font-size:12px;line-height:1.45;color:var(--muted)}
.networth-missing span{color:var(--text)}
/* Things you own, under the chart. */
.nw-own{margin-top:14px;padding-top:12px;border-top:1px solid var(--border);min-width:0}
.nw-own-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px}
.nw-own-head h3{margin:0;font-size:15px;font-weight:600;color:var(--text)}
.nw-own-sum{font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
.nw-own-add{margin-left:auto;padding:6px 12px;font-size:13px;border-radius:10px;color:var(--accent);white-space:nowrap}
.nw-own-empty{margin:8px 0 0;font-size:13px;line-height:1.45;color:var(--muted)}
.nw-own-list{list-style:none;margin:8px 0 0;padding:0;display:grid}
.nw-own-item{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1.8fr) auto;align-items:center;gap:6px 16px;padding:9px 6px;border-top:1px solid color-mix(in srgb,var(--border) 60%,transparent)}
.nw-own-item:first-child{border-top:0}
.nw-own-item.is-editing{background:color-mix(in srgb,var(--accent) 6%,transparent);border-radius:12px}
.nw-own-name{display:grid;gap:1px;min-width:0}
.nw-own-name b{font-size:14px;font-weight:600;color:var(--text);overflow-wrap:anywhere}
.nw-own-name small{font-size:12px;line-height:1.4;color:var(--muted)}
.nw-own-name .nw-own-warn{color:var(--chart-gold,#e5cc87)}
.nw-own-nums{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px 12px;margin:0}
.nw-own-nums div{min-width:0}
.nw-own-nums dt{font-size:11px;color:var(--muted);letter-spacing:.02em}
.nw-own-nums dd{margin:0;font-size:14px;color:var(--text);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.nw-own-nums dd small{display:block;font-size:11px;line-height:1.3;color:var(--muted)}
.nw-own-equity{font-weight:600}
.nw-own-paid{color:var(--muted)}
.nw-own-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:6px}
.nw-own-actions button,.nw-own-form-actions button{padding:5px 10px;font-size:13px;border-radius:8px}
.nw-own-confirm{font-size:13px;color:var(--text)}
.nw-own-danger{border-color:#ff8a94!important;color:#ff8a94}
body.light .nw-own-danger{border-color:#b62932!important;color:#b62932}
.nw-own-actions .visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.nw-own-form{display:block;grid-column:1/-1;margin:10px 0 2px;padding:12px 14px;border:1px solid var(--border);border-radius:14px;background:color-mix(in srgb,var(--panel) 70%,var(--bg))}
.nw-own-form h4{margin:0 0 10px;font-size:14px;font-weight:600;color:var(--text)}
.nw-own-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px 12px}
.nw-own-grid label{display:grid;gap:4px;align-content:start;font-size:13px;color:var(--muted);min-width:0}
.nw-own-grid label>span{overflow-wrap:anywhere}
.nw-own-grid label small{font-size:12px;color:var(--muted);opacity:.85}
.nw-own-grid input,.nw-own-grid select{width:100%;max-width:none;min-width:0;padding:8px 10px;font-size:14px}
.nw-own-grid input:disabled{opacity:.55}
.nw-own-grid .nw-f-loan{grid-column:span 2}
.nw-own-loan-note{margin:8px 0 0;font-size:12px;color:var(--muted)}
.nw-own-error{margin:6px 0 0;font-size:13px;color:#ff8a94}
.nw-own-error:empty{display:none}
body.light .nw-own-error{color:#b62932}
.nw-own-form-actions{display:flex;gap:8px;margin-top:10px}
.nw-own-save{background:var(--accent);border-color:var(--accent);color:var(--panel);font-weight:600}
.nw-own-add:focus-visible,.nw-own-actions button:focus-visible,.nw-own-form button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media(max-width:600px){
 .nw-own-item{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"name actions" "nums nums";align-items:start;gap:6px 8px;padding:10px 2px}
 .nw-own-name{grid-area:name}.nw-own-nums{grid-area:nums}.nw-own-actions{grid-area:actions;flex-wrap:nowrap}
 .nw-own-item>.nw-own-form{grid-column:1/-1}
 .nw-own-actions:has(.nw-own-confirm){grid-column:1/-1;grid-row:3;flex-wrap:wrap}
 .nw-own-add{margin-left:0}
 .nw-own-head h3{flex:1 1 auto}
 .nw-own-grid{grid-template-columns:minmax(0,1fr)}
 .nw-own-grid .nw-f-loan{grid-column:auto}
 .nw-own-form{padding:12px}
}
@media(max-width:600px){.networth-card{padding:14px 14px 10px}.networth-value{font-size:24px}.networth-head{align-items:flex-start}}
@media(prefers-reduced-motion:reduce){.networth-svg .nw-line,.networth-svg .nw-area{animation:none!important}}

/* Get set up checklist. */
.setup-card{border:1px solid var(--border);border-radius:18px;background:var(--panel);padding:14px 18px;min-width:0}
.setup-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px}
.setup-head h2{margin:0;font-size:16px;font-weight:650;color:var(--text)}
.setup-count{font-size:14px;color:var(--muted);font-variant-numeric:tabular-nums}
.setup-progress{flex:1 1 120px;min-width:80px;height:6px;border-radius:999px;background:color-mix(in srgb,var(--muted) 22%,transparent);overflow:hidden}
.setup-progress-fill{display:block;height:100%;width:0;border-radius:inherit;background:var(--accent);transition:width .4s ease-out}
.setup-toggle{padding:4px 10px;font-size:13px;border-radius:8px;background:none;color:var(--accent)}
.setup-toggle:focus-visible,.setup-go:focus-visible,.setup-dismiss:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.setup-steps{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:2px}
.setup-card.collapsed .setup-steps{display:none}
.setup-step{display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:4px 12px;padding:8px 6px;border-radius:12px}
.setup-step.is-next{background:color-mix(in srgb,var(--accent) 9%,transparent)}
.setup-check{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;border:1.5px solid var(--border);font-size:13px;line-height:1;color:var(--panel)}
.setup-step.is-done .setup-check{background:var(--accent);border-color:var(--accent)}
.setup-text{display:grid;gap:1px;min-width:0}
.setup-text b{font-size:14px;font-weight:600;color:var(--text)}
.setup-text small{font-size:13px;line-height:1.4;color:var(--muted)}
.setup-step.is-done .setup-text b{color:var(--muted);font-weight:500}
.setup-step.is-done{padding-top:4px;padding-bottom:4px}
.setup-step.is-done .setup-text small{display:none}
.setup-optional{display:inline-block;margin-left:6px;padding:0 6px;border:1px solid var(--border);border-radius:6px;font-size:11px;font-weight:500;color:var(--muted);vertical-align:1px}
.setup-state{font-size:13px;color:var(--muted)}
.setup-go{display:inline-block;padding:6px 12px;border:1px solid var(--border);border-radius:10px;font-size:13px;color:var(--text);text-decoration:none;white-space:nowrap}
.setup-go:hover{border-color:var(--accent)}
.setup-go-next{background:var(--accent);border-color:var(--accent);color:var(--panel);font-weight:600}
.setup-go .visually-hidden,.setup-skip .visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.setup-actions{display:inline-flex;align-items:center;gap:6px;justify-self:end}
.setup-skip{padding:6px 8px;border:0;background:transparent;font:inherit;font-size:13px;color:var(--muted);cursor:pointer;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
.setup-skip:hover{color:var(--text)}
.setup-step.is-skipped .setup-text b{color:var(--muted);font-weight:500}
.setup-step.is-skipped .setup-text small{display:none}
.setup-step.is-skipped .setup-check{border-style:dashed}
.setup-complete .setup-done-line{display:flex;align-items:center;gap:14px}
.setup-complete h2{margin:0;font-size:17px}
.setup-complete p{margin:2px 0 0;font-size:14px;color:var(--muted)}
.setup-complete .setup-done-line>div{flex:1;min-width:0}
.setup-check-big{width:34px;height:34px;font-size:18px;background:var(--accent);border-color:var(--accent);color:var(--panel);flex:0 0 auto;animation:setup-pop .5s ease-out both}
@keyframes setup-pop{0%{transform:scale(.4);opacity:0}70%{transform:scale(1.12)}100%{transform:scale(1)}}
.setup-dismiss{padding:6px 12px;font-size:13px}
@media(max-width:600px){
 .setup-card{padding:12px 14px}
 .setup-step{grid-template-columns:22px minmax(0,1fr);padding:8px 4px}
 .setup-step>.setup-go,.setup-step>.setup-actions{grid-column:2;justify-self:start}
 .setup-step.is-done>.setup-state{display:none}
 .setup-toggle{margin-left:auto}
 .setup-toggle-more{display:none}
 .setup-head{flex-wrap:nowrap;gap:6px 10px}
 .setup-head h2{white-space:nowrap}
 .setup-count{white-space:nowrap;font-size:13px}
 .setup-progress{min-width:36px}
}
@media(prefers-reduced-motion:reduce){.setup-progress-fill{transition:none}.setup-check-big{animation:none}}
.nw-own-hint{display:flex;align-items:flex-start;gap:10px;margin:8px 0 0;font-size:13px;line-height:1.45;color:var(--muted)}
.nw-own-hint>span{flex:1;min-width:0}
.nw-own-hint>button{flex:none;padding:0 4px;font-size:12px;line-height:1.45;color:var(--muted);background:none;border:0;cursor:pointer}
.nw-own-hint>button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
