:root {
    color-scheme: light;
    --edge-navy: #1f3a5f; --edge-navy-deep: #102943;
    --edge-blue: #1769aa; --edge-blue-hover: #12558b; --edge-blue-brand: #3b82c4;
    --edge-green: #2e8b57; --edge-success: #246b45;
    --edge-green-soft: #edf7f0; --edge-blue-soft: #edf4fb;
    --edge-surface: #ffffff; --edge-surface-alt: #f7fafc; --edge-page: #f0f4f8;
    --edge-border: #d6e1ec; --edge-control-border: #8295aa;
    --edge-text: #172b43; --edge-text-muted: #52657a;
    --edge-danger: #b42332; --edge-danger-soft: #fff0f1;
    --edge-warning: #85520c; --edge-warning-soft: #fff5e3;
    --edge-focus: #1769aa; --edge-radius: 14px;
    --edge-shadow: 0 3px 12px rgba(16,41,67,.06);
    /* Compatibility aliases preserve existing component classes. */
    --navy-900: var(--edge-navy); --navy-950: var(--edge-navy-deep);
    --blue-700: var(--edge-blue); --blue-tint: var(--edge-blue-soft);
    --teal-700: var(--edge-success); --teal-tint: var(--edge-green-soft);
    --amber-700: var(--edge-warning); --amber-500: var(--edge-warning); --amber-tint: var(--edge-warning-soft);
    --green-700: var(--edge-success); --green-500: var(--edge-green); --green-tint: var(--edge-green-soft);
    --red-600: var(--edge-danger); --red-tint: var(--edge-danger-soft);
    --surface-page: var(--edge-page); --surface-card: var(--edge-surface);
    --text-main: var(--edge-text); --text-muted: var(--edge-text-muted); --border-subtle: var(--edge-border);
    --shadow-card: var(--edge-shadow);
}
* { box-sizing: border-box; }
html, body { min-width: 320px; background: var(--surface-page); }
body { margin: 0; color: var(--text-main); font-family: Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--edge-focus); outline-offset: 3px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: .45rem; color: var(--navy-950); font-size: clamp(1.8rem,4vw,2.7rem); line-height: 1.12; letter-spacing: -.035em; }
h2 { margin-bottom: .45rem; color: var(--navy-900); font-size: 1.15rem; line-height: 1.25; }
h1:focus { outline: none; }
.page-heading { margin-bottom: 1.35rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.page-heading p:not(.eyebrow) { max-width: 720px; margin-bottom: 0; color: var(--text-muted); font-size: 1.02rem; }
.eyebrow { margin-bottom: .35rem; color: var(--blue-700); font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.demo-label, .coming-soon { display: inline-flex; align-items: center; width: fit-content; padding: .34rem .65rem; color: var(--blue-700); background: var(--blue-tint); border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.notice-card, .section-card, .metric-card, .feature-card, .settings-card { min-width: 0; background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--edge-radius); box-shadow: var(--shadow-card); }
.section-card { border-top-color: var(--edge-border); }
.notice-card { margin-bottom: 1.25rem; padding: .85rem 1rem; display: flex; align-items: center; gap: .75rem 1rem; color: var(--navy-900); background: var(--edge-blue-soft); border-left: 4px solid var(--blue-700); }
.notice-card span { color: var(--text-muted); }
.dashboard-grid, .feature-grid, .settings-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,250px),1fr)); gap: 1rem; }
.metric-card { position: relative; overflow: hidden; min-height: 225px; padding: 1.15rem; display: flex; flex-direction: column; }
.metric-card::before, .feature-card::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 5px; background: var(--accent,var(--blue-700)); }
.accent-blue { --accent: var(--blue-700); --tint: var(--blue-tint); --accent-text: var(--navy-900); }
.accent-teal { --accent: var(--teal-700); --tint: var(--teal-tint); --accent-text: var(--teal-700); }
.accent-amber { --accent: var(--amber-500); --tint: var(--amber-tint); --accent-text: var(--amber-700); }
.accent-green { --accent: var(--green-500); --tint: var(--green-tint); --accent-text: var(--green-700); }
.card-heading { display: flex; align-items: center; gap: .7rem; }
.card-heading p { margin: 0; color: var(--accent-text); font-weight: 800; }
.card-heading div span { color: var(--text-muted); font-size: .75rem; }
.card-icon, .feature-icon, .empty-state-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; color: var(--accent-text,var(--navy-900)); background: var(--tint,var(--blue-tint)); border-radius: 12px; font-weight: 850; }
.metric-value { margin-top: auto; padding-top: 1.2rem; font-size: clamp(1.65rem,3vw,2.25rem); line-height: 1.1; letter-spacing: -.035em; }
.status-positive { color: var(--green-700); }
.card-copy { margin: .65rem 0 0; color: var(--text-muted); font-size: .9rem; }
.next-step-card { margin-top: 1rem; padding: clamp(1.2rem,3vw,1.8rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.next-step-card p:last-child { margin-bottom: 0; color: var(--text-muted); }
.primary-link { min-height: 44px; padding: .72rem 1rem; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; color: #fff; background: var(--navy-900); border-radius: 10px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.primary-link:hover { color: #fff; background: var(--navy-950); }
.empty-state { min-height: 300px; padding: clamp(1.5rem,5vw,3rem); display: flex; align-items: center; justify-content: center; gap: 1.25rem; text-align: left; }
.empty-state > div:last-child { max-width: 620px; }
.empty-state p { color: var(--text-muted); }
.empty-state-icon { width: 68px; height: 68px; border-radius: 18px; font-size: 1.7rem; }
.empty-state-icon.danger { color: var(--red-600); background: var(--red-tint); }
.privacy-note { margin-bottom: 0; font-weight: 700; }
.feature-card { position: relative; overflow: hidden; min-height: 220px; padding: 1.2rem; display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.feature-card h2, .settings-card h2 { margin-bottom: .35rem; }
.feature-card p, .settings-card p { margin-bottom: 0; color: var(--text-muted); }
.feature-card .coming-soon { margin-top: auto; color: var(--accent-text); background: var(--tint); }
.settings-card { min-height: 150px; padding: 1.2rem; display: flex; align-items: flex-start; gap: .85rem; }
.settings-card > span { color: var(--blue-700); font-size: 1.4rem; font-weight: 800; }
.valid.modified:not([type=checkbox]) { outline: 1px solid var(--green-500); }
.invalid { outline: 1px solid var(--red-600); }
.validation-message { color: var(--red-600); }
.blazor-error-boundary { padding: 1rem; color: #fff; background: var(--red-600); }

@media (max-width: 720px) {
    .page-heading { align-items: flex-start; }
    .page-heading .demo-label { margin-top: .2rem; }
    .notice-card, .next-step-card, .empty-state { align-items: flex-start; flex-direction: column; }
    .next-step-card .primary-link { width: 100%; white-space: normal; }
    .empty-state { min-height: 260px; justify-content: flex-start; }
}
@media (max-width: 420px) {
    h1 { font-size: 1.75rem; }
    .page-heading { display: block; }
    .page-heading .demo-label { margin-top: .85rem; }
    .dashboard-grid, .feature-grid, .settings-grid { grid-template-columns: minmax(0,1fr); }
    .metric-card, .feature-card { min-height: 205px; }
}
/* Phase 2F account cards and inline editor. */
.accounts-page { min-width: 0; overflow-wrap: anywhere; }
.accounts-page button { min-height: 44px; color: var(--navy-900); background: #fff; border: 1px solid var(--edge-control-border); border-radius: 10px; padding: .6rem 1rem; font-weight: 700; cursor: pointer; }
.accounts-page button:hover:not(:disabled) { background: var(--blue-tint); border-color: var(--edge-blue); }
.accounts-page button:disabled { opacity: .6; cursor: wait; }
.account-panel, .account-card { padding: 1.25rem; }
.account-panel { margin-bottom: 1rem; }
.account-panel p:last-child, .account-card p:last-child { margin-bottom: 0; }
.account-summary { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr); gap: 1rem; }
.account-summary small { display: block; margin-top: .6rem; color: var(--text-muted); }
.account-balance { display: block; font-size: clamp(1.4rem,3vw,2rem); color: var(--navy-900); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.accounts-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,290px),1fr)); gap: 1rem; }
.account-card { display: flex; flex-direction: column; min-width: 0; gap: .5rem; }
.account-card h3 { margin: 0; font-size: 1.15rem; }
.account-card p { margin: 0; color: var(--text-muted); }
.account-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.account-card .account-actions { margin-top: auto; padding-top: .5rem; }
.archived-accounts { margin-top: 1.5rem; }
.archived-accounts > summary { cursor: pointer; padding: .75rem 0; font-weight: 750; min-height: 44px; }
.account-fields { padding: 0; margin: 1rem 0; border: 0; min-width: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.account-fields label { display: block; margin-bottom: .4rem; font-weight: 650; }
.account-fields input:not([type=checkbox]), .account-fields select, .account-fields textarea { width: 100%; min-width: 0; min-height: 44px; padding: .65rem; border: 1px solid var(--edge-control-border); border-radius: 8px; background: white; color: var(--text-main); }
.account-fields textarea { resize: vertical; }
.account-fields small { color: var(--text-muted); font-weight: normal; }
.full-field { grid-column: 1 / -1; }
.funding-field { align-self: center; }
.funding-field input { width: 20px; height: 20px; vertical-align: middle; }
.account-error, .account-success { padding: .85rem; border-radius: 10px; }
.account-error { background: var(--red-tint); color: var(--edge-danger); }
.account-success { background: var(--green-tint); color: var(--green-700); }
.archive-confirm { border: 2px solid var(--amber-700); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 600px) { .account-summary, .account-fields { grid-template-columns: minmax(0,1fr); } .accounts-page .page-heading { flex-direction: column; align-items: stretch; } .accounts-page .page-heading button { margin-top: .75rem; } }
@media (max-width: 859px) { html { scroll-padding-bottom: 6rem; } .bill-page button, .credit-card-page button { scroll-margin-bottom: 6rem; } }
/* Phase 2G financial preferences. */
.profile-settings { min-width: 0; overflow-wrap: anywhere; }
.profile-panel { padding: clamp(1rem,3vw,1.6rem); }
.profile-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.profile-heading h2 { margin: 0; }
.profile-hint { max-width: 850px; color: var(--text-muted); }
.profile-values { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; margin: 1.25rem 0; }
.profile-values > div { min-width: 0; padding: 1rem; border-radius: 12px; background: var(--blue-tint); }
.profile-values dt { color: var(--navy-900); font-size: .9rem; }
.profile-values dd { margin: .4rem 0 0; font-size: clamp(1.4rem,3vw,2rem); font-weight: 750; color: var(--navy-900); font-variant-numeric: tabular-nums; }
.profile-fields { border: 0; margin: 1.5rem 0 0; padding: 0; min-width: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.5rem; }
.profile-fields > div { min-width: 0; }
.profile-fields label { display: block; margin-bottom: .5rem; font-weight: 650; }
.profile-fields input { width: 100%; min-width: 0; min-height: 44px; padding: .65rem; border: 1px solid var(--edge-control-border); border-radius: 8px; background: white; color: var(--text-main); }
.profile-fields small { display: block; color: var(--text-muted); margin-top: .5rem; }
.profile-actions { margin-top: 1.5rem; }
.profile-settings button { min-height: 44px; padding: .7rem 1rem; border: 1px solid var(--border-subtle); border-radius: 10px; cursor: pointer; }
.profile-settings button:disabled { opacity: .6; cursor: wait; }
.profile-readonly { padding: .8rem 1rem; background: var(--blue-tint); border-radius: 10px; margin-bottom: 0; }
@media (max-width:600px) { .profile-values, .profile-fields { grid-template-columns: minmax(0,1fr); } .profile-actions button { width: 100%; } }
.paychecks-back { display: inline-block; padding: .5rem 0; margin-bottom: .75rem; color: var(--navy-900); }
.paycheck-date-controls { display: flex; align-items: center; gap: .5rem; }
.paycheck-date-controls input { flex: 1; min-width: 0; }
.paycheck-date-controls button { flex: 0 0 auto; }
.paycheck-page .account-fields small { display: block; margin-top: .35rem; }
.deposit-allocation-editor { grid-column:1/-1; min-width:0; margin:1rem 0; padding:1rem; border:1px solid var(--border-subtle); border-radius:12px; background:var(--edge-surface-alt); }
.deposit-allocation-editor .card-heading { justify-content:space-between; align-items:flex-start; flex-wrap:wrap; }
.deposit-allocation-editor h3 { margin:0; color:var(--navy-900); }
.deposit-allocation-list { display:grid; gap:.75rem; margin-top:1rem; }
.deposit-allocation-row { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) auto; align-items:end; gap:.75rem; min-width:0; }
.deposit-allocation-row label { display:block; margin-bottom:.35rem; font-weight:650; }
.deposit-allocation-row select,.deposit-allocation-row input { width:100%; min-width:0; min-height:44px; padding:.65rem; border:1px solid var(--edge-control-border); border-radius:8px; background:white; }
.deposit-allocation-totals,.deposit-breakdown { display:grid; gap:.4rem; margin:1rem 0 0; }
.deposit-allocation-totals div,.deposit-breakdown p { display:flex; justify-content:space-between; gap:1rem; margin:0; }
.deposit-allocation-totals dd { margin:0; font-variant-numeric:tabular-nums; }
@media(max-width:600px){.deposit-allocation-row{grid-template-columns:minmax(0,1fr)}.deposit-allocation-row button{width:100%}.deposit-allocation-editor .card-heading button{width:100%}}
.bill-page .account-fields small { display: block; margin-top: .35rem; }
.bill-amount-needed { color: var(--edge-warning); font-size: 1.3rem; }
.bill-amount-notice { padding: 1rem; border: 1px solid var(--edge-warning); border-radius: 12px; background: var(--edge-warning-soft); color: var(--edge-warning); }

.credit-card-facts { display: grid; gap: .8rem; margin: 1rem 0; }
.credit-card-facts div { min-width: 0; }
.credit-card-facts dt { color: var(--text-muted, #526079); font-size: .9rem; }
.credit-card-facts dd { margin: .2rem 0 0; font-weight: 600; overflow-wrap: anywhere; }
.credit-card-status { color: var(--edge-success); }
.goal-summary { grid-template-columns: repeat(4,minmax(0,1fr)); }
.goal-summary .account-balance { font-size: clamp(1.15rem,2vw,1.65rem); overflow-wrap: anywhere; }
.goal-card .credit-card-facts { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.goal-progress { display: block; width: 100%; height: 1rem; margin: 1rem 0; accent-color: var(--edge-blue); }
@media (max-width:1024px) { .goal-summary { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width:600px) { .goal-summary, .goal-card .credit-card-facts { grid-template-columns: minmax(0,1fr); } }
/* Phase 2L read-only account transaction history. */
.account-heading-actions, .transaction-filter-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.secondary-link { color: var(--navy-900); background: white; border: 1px solid var(--navy-900); }
.secondary-link:hover { color: white; }
.transaction-page button { min-height: 44px; padding: .65rem 1rem; border: 1px solid var(--border-subtle); border-radius: 10px; cursor: pointer; }
.transaction-page button:disabled { opacity: .6; cursor: wait; }
.transaction-filters { padding: 1.25rem; margin-bottom: 1.25rem; }
.transaction-filter-heading p { margin: 0; color: var(--text-muted); }
.transaction-filter-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1rem; margin: 1rem 0; }
.transaction-filter-grid label { display: block; margin-bottom: .35rem; font-weight: 650; }
.transaction-filter-grid select, .transaction-filter-grid input { width: 100%; min-width: 0; min-height: 44px; padding: .6rem; border: 1px solid var(--edge-control-border); border-radius: 8px; background: white; color: var(--text-main); }
.transaction-count { color: var(--text-muted); }
.transaction-list { display: grid; gap: .85rem; }
.transaction-card { padding: 1.1rem 1.25rem; }
.dashboard-breakdown { display:grid; gap:.45rem; margin:1rem 0; }
.dashboard-breakdown div,.transaction-card { display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; }
.dashboard-breakdown dt small { display:block; font-weight:400; }
.dashboard-breakdown dd { margin:0; text-align:right; }
.dashboard-primary { margin-bottom:1.25rem; }
@media (max-width: 560px) { .dashboard-breakdown div,.transaction-card { align-items:stretch; } .transaction-card { flex-direction:column; } .transaction-card > div:last-child { text-align:left; } }
.cash-flow-timeline { display:grid; gap:.75rem; }
.planner-items { display:grid; gap:.75rem; }.planner-entry { min-width:min(100%,18rem); display:grid; gap:.65rem; }.planner-entry label { display:grid; gap:.3rem; }
.purchase-comparison { display:grid; gap:.55rem; margin:1rem 0; }.purchase-comparison>div { display:grid; grid-template-columns:minmax(0,1.4fr) repeat(2,minmax(0,1fr)); gap:.75rem; padding:.65rem 0; border-bottom:1px solid var(--border-subtle); }.purchase-comparison>div:first-child { color:var(--navy-900); font-weight:750; }.purchase-comparison>div:first-child strong { grid-column:2; }.purchase-comparison span { text-align:right; font-variant-numeric:tabular-nums; }@media(max-width:560px){.purchase-comparison>div { grid-template-columns:1fr 1fr; }.purchase-comparison>div strong:first-child { grid-column:1/-1; }.purchase-comparison>div:first-child strong { grid-column:1; }}
.transaction-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.transaction-main time, .transaction-main p, .transaction-meta, .transaction-notes { color: var(--text-muted); }
.transaction-main h2 { margin: .2rem 0; overflow-wrap: anywhere; }
.transaction-main p { margin: 0; }
.transaction-amount { flex: 0 0 auto; max-width: 45%; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.amount-in { color: var(--green-700); }
.amount-out { color: var(--edge-text); }
.transaction-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--border-subtle); font-size: .9rem; }
.transaction-meta code { color: var(--navy-900); }
.transaction-notes { margin: .7rem 0 0; }
.transaction-voided { opacity: .75; }
.transaction-voided .transaction-main h2 { text-decoration: line-through; }
.transaction-empty { min-height: 220px; }
@media (max-width:900px) { .transaction-filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width:600px) {
    .account-heading-actions, .transaction-filter-heading, .transaction-main { align-items: stretch; flex-direction: column; }
    .account-heading-actions .primary-link { width: 100%; }
    .transaction-filter-grid { grid-template-columns: minmax(0,1fr); }
    .transaction-filter-heading button { width: 100%; }
    .transaction-amount { max-width: none; text-align: left; }
}
.reserve-page .dashboard-grid { margin-bottom: 1.25rem; }
.reserve-notes { grid-column: 1 / -1; }
.reserve-notes textarea { width:100%; min-height:6rem; resize:vertical; }
@media (max-width:600px) { .reserve-notes { grid-column:auto; } }

/* Help & Support feedback form */
.help-page .field {
    display: grid;
    gap: .4rem;
    margin-bottom: 1rem;
}

.help-page .field label {
    display: block;
    margin: 0;
    font-weight: 650;
}

.help-page .field input,
.help-page .field select,
.help-page .field textarea {
    display: block;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    min-height: 44px;
    padding: .65rem;
    color: var(--edge-text);
    background: var(--edge-surface);
    border: 1px solid var(--edge-control-border);
    border-radius: 9px;
}

.help-page .field textarea {
    min-height: 160px;
    resize: vertical;
}

/* Phase 2Y: shared presentation system; state attributes reflect existing display values. */
a { color: var(--edge-blue); text-underline-offset: .2em; }
a:hover { color: var(--edge-blue-hover); }
h3, label, .metric-value { color: var(--edge-navy); }
.metric-value { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.card-heading { flex-wrap: wrap; }
.account-heading-actions { flex-wrap: wrap; }
.page-heading > *, .transaction-card > *, .card-heading > * { min-width: 0; }
.section-card > .card-heading { padding-bottom: .85rem; margin-bottom: 1rem; border-bottom: 1px solid var(--edge-border); }
.dashboard-grid + .section-card { margin-top: 1.25rem; }
.dashboard-primary .metric-card { background: var(--edge-blue-soft); }
.dashboard-primary .metric-card.accent-teal { background: var(--edge-green-soft); }
.dashboard-primary .metric-card:first-child { border-top: 3px solid var(--accent,var(--edge-blue)); }
.dashboard-primary .metric-card:first-child .metric-value { color: var(--accent-text,var(--edge-navy)); }
.account-summary > .section-card:first-child { background: var(--edge-blue-soft); }
.accounts-page button.primary-link, .profile-settings button.primary-link, .primary-link {
    color: var(--edge-surface); background: var(--edge-blue); border: 1px solid var(--edge-blue);
    white-space: normal; text-align: center;
}
.accounts-page button.primary-link:hover:not(:disabled), .profile-settings button.primary-link:hover:not(:disabled), .primary-link:hover {
    color: var(--edge-surface); background: var(--edge-blue-hover); border-color: var(--edge-blue-hover);
}
.accounts-page button.secondary-link, .secondary-link { color: var(--edge-navy); background: var(--edge-surface); border-color: var(--edge-control-border); }
.accounts-page button.secondary-link:hover:not(:disabled), .secondary-link:hover { color: var(--edge-blue-hover); background: var(--edge-blue-soft); }
.accounts-page button.edge-danger { color: var(--edge-danger); background: var(--edge-surface); border-color: var(--edge-danger); }
.accounts-page button.edge-danger:hover:not(:disabled) { color: var(--edge-danger); background: var(--edge-danger-soft); border-color: var(--edge-danger); }
.accounts-page button.edge-utility { color: var(--edge-text-muted); background: var(--edge-surface-alt); border-color: var(--edge-border); }
:is(.account-fields,.profile-fields,.transaction-filter-grid,.planner-entry,.deposit-allocation-row) :is(input:not([type=checkbox]),select,textarea) {
    min-width: 0; max-width: 100%; min-height: 44px; padding: .65rem; color: var(--edge-text);
    background: var(--edge-surface); border: 1px solid var(--edge-control-border); border-radius: 9px;
}
:is(input,select,textarea):focus-visible { outline: 3px solid var(--edge-focus); outline-offset: 2px; }
input[type=checkbox] { accent-color: var(--edge-blue); width: 20px; height: 20px; }
.validation-message, .validation-errors { color: var(--edge-danger); font-size: .9rem; }
.edge-badge { display: inline-block; width: fit-content; padding: .25rem .65rem; border-radius: 999px; font-size: .85rem; font-weight: 700; line-height: 1.5; }
[data-edge-status] { --state-text: var(--edge-blue); --state-soft: var(--edge-blue-soft); }
:is([data-edge-status="OnTrack"],[data-edge-status="Comfortable"],[data-edge-status="Goal Reached"],[data-edge-status="Over Target"],[data-edge-status="Paid Off"],[data-edge-status="Cycle Satisfied"],[data-edge-status="Good for Now"]) { --state-text: var(--edge-success); --state-soft: var(--edge-green-soft); }
:is([data-edge-status="BelowCushion"],[data-edge-status="BillsNeedAmounts"],[data-edge-status="CardMinimumsNeeded"],[data-edge-status="ForecastIncomplete"],[data-edge-status="AffordableBelowCushion"],[data-edge-status="AnalysisIncomplete"],[data-edge-status="Target Needed"],[data-edge-status="Enter Amount Due"],[data-edge-status="Minimum Needed"],[data-edge-status="Payment Required"],[data-edge-status="Due Today"]) { --state-text: var(--edge-warning); --state-soft: var(--edge-warning-soft); }
:is([data-edge-status="NegativeBalanceProjected"],[data-edge-status="NegativeBalanceRisk"],[data-edge-status="Past Due"]) { --state-text: var(--edge-danger); --state-soft: var(--edge-danger-soft); }
:is([data-edge-status="Archived"],[data-edge-status="Released"],[data-edge-status="Consumed"],[data-edge-status="Skipped"]) { --state-text: var(--edge-text-muted); --state-soft: var(--edge-surface-alt); }
.edge-badge[data-edge-status] { color: var(--state-text); background: var(--state-soft); }
.edge-assessment[data-edge-status] { --accent: var(--state-text); --accent-text: var(--state-text); background: var(--state-soft); border-top: 3px solid var(--state-text); }
.edge-assessment h2 { color: var(--state-text); }
.account-card[data-account-type] { border-top: 3px solid var(--edge-blue); }
.account-card:is([data-account-type="Savings"],[data-account-type="Cash"]) { border-top-color: var(--edge-green); }
.account-card[data-account-type="Investment"] { border-top-color: var(--edge-navy); }
.archived-accounts :is(.account-card,.account-panel) { background: var(--edge-surface-alt); border-top-color: var(--edge-border); }
.archived-accounts .demo-label { color: var(--edge-text-muted); background: var(--edge-page); }
.goal-progress { overflow: hidden; border: 0; border-radius: 999px; background: var(--edge-blue-soft); accent-color: var(--state-text,var(--edge-blue)); }
.goal-progress::-webkit-progress-bar { background: var(--edge-blue-soft); border-radius: 999px; }
.goal-progress::-webkit-progress-value { background: var(--state-text,var(--edge-blue)); border-radius: 999px; }
.goal-progress::-moz-progress-bar { background: var(--state-text,var(--edge-blue)); border-radius: 999px; }
.credit-card-facts > div { padding-bottom: .55rem; border-bottom: 1px solid var(--edge-border); }
:is(.transaction-list,.cash-flow-timeline,.planner-items) > article { border-bottom: 1px solid var(--edge-border); padding-block: 1rem; }
:is(.cash-flow-timeline,.planner-items) > article { border-radius: 10px; background: var(--edge-surface-alt); }
.transaction-card p { color: var(--edge-text-muted); margin-bottom: .35rem; }
.coach-panel { border-top: 3px solid var(--edge-green); background: var(--edge-green-soft); }
.coach-panel .metric-value { display: block; padding-top: .4rem; }
.empty-state { border-top: 3px solid var(--edge-blue-brand); background: var(--edge-surface-alt); }
.edge-money-positive { color: var(--edge-success); }
.edge-money-negative { color: var(--edge-danger); }
.edge-money-reserved { color: var(--edge-blue); }
@media(max-width:600px) { .planner-entry { min-width: 0; width: 100%; } .account-heading-actions { align-items: stretch; } }
@media(forced-colors:active) { .edge-badge, .metric-card, .primary-link { border: 1px solid CanvasText; } }
/* Semantic details retain ordinary balances in navy. */
.transaction-card p.edge-money-negative { color: var(--edge-danger); }
.account-card p.edge-money-reserved { color: var(--edge-blue); }
.account-card p.edge-funding-needed { color: var(--edge-text-muted); }
.edge-utilization { padding: .65rem; background: var(--edge-blue-soft); border-radius: 9px; }
.edge-utilization[data-utilization="high"] { color: var(--edge-warning); background: var(--edge-warning-soft); }
.edge-utilization[data-utilization="over-limit"] { color: var(--edge-danger); background: var(--edge-danger-soft); }
.edge-utilization dt { color: inherit; }
[data-edge-status="Minimum Needed / Review Amount"] { --state-text: var(--edge-warning); --state-soft: var(--edge-warning-soft); }
.section-card > .card-heading p:not(.eyebrow) { color: var(--edge-text-muted); font-weight: 400; }
:is([data-edge-status^="Paid Off"],[data-edge-status^="Credit Balance"],[data-edge-status^="Cycle Satisfied"]) { --state-text: var(--edge-success); --state-soft: var(--edge-green-soft); }
[data-edge-status="Review required payment"] { --state-text: var(--edge-warning); --state-soft: var(--edge-warning-soft); }

/* Onboarding */
.onboarding-page {
    display: grid;
    gap: 1.5rem;
}

.onboarding-card {
    background: var(--surface, #fff);
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 18px;
    padding: 1.5rem;
    display: grid;
    gap: 1.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.onboarding-progress {
    display: grid;
    gap: 0.5rem;
}

.onboarding-progress span {
    font-weight: 700;
}

.onboarding-progress progress {
    width: 100%;
    height: 0.75rem;
}

.onboarding-content {
    display: grid;
    gap: 0.9rem;
    align-content: start;
    min-height: 22rem;
}

.onboarding-content h2,
.onboarding-content p {
    margin: 0;
}

.onboarding-content ul {
    margin: 0;
    padding-left: 1.25rem;
    display: grid;
    gap: 0.5rem;
}

.onboarding-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

@media (max-width: 700px) {
    .onboarding-card {
        padding: 1rem;
    }

    .onboarding-content {
        min-height: 0;
    }

    .onboarding-actions {
        justify-content: stretch;
    }

    .onboarding-actions button {
        flex: 1 1 100%;
    }
}
